openapi.json 1.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. }
  856. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "type": "object",
  3850. "properties": {
  3851. "url": {
  3852. "type": "string"
  3853. },
  3854. "override": {
  3855. "type": "string"
  3856. },
  3857. "color": {
  3858. "type": "string"
  3859. }
  3860. },
  3861. "additionalProperties": false
  3862. },
  3863. "commands": {
  3864. "type": "object",
  3865. "properties": {
  3866. "start": {
  3867. "type": "string",
  3868. "description": "Startup script to run when creating a new workspace (worktree)"
  3869. }
  3870. },
  3871. "additionalProperties": false
  3872. }
  3873. },
  3874. "additionalProperties": false
  3875. }
  3876. }
  3877. }
  3878. },
  3879. "x-codeSamples": [
  3880. {
  3881. "lang": "js",
  3882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3883. }
  3884. ]
  3885. }
  3886. },
  3887. "/project/{projectID}/directories": {
  3888. "get": {
  3889. "tags": ["project"],
  3890. "operationId": "project.directories",
  3891. "parameters": [
  3892. {
  3893. "name": "projectID",
  3894. "in": "path",
  3895. "schema": {
  3896. "type": "string"
  3897. },
  3898. "required": true
  3899. },
  3900. {
  3901. "name": "directory",
  3902. "in": "query",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": false
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project directories",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectDirectories"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "Bad request",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "$ref": "#/components/schemas/BadRequestError"
  3934. }
  3935. }
  3936. }
  3937. }
  3938. },
  3939. "description": "List known local absolute directories for a project.",
  3940. "summary": "List project directories",
  3941. "x-codeSamples": [
  3942. {
  3943. "lang": "js",
  3944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3945. }
  3946. ]
  3947. }
  3948. },
  3949. "/experimental/project/{projectID}/copy/generate-name": {
  3950. "post": {
  3951. "tags": ["projectCopy"],
  3952. "operationId": "experimental.projectCopy.generateName",
  3953. "parameters": [
  3954. {
  3955. "name": "projectID",
  3956. "in": "path",
  3957. "schema": {
  3958. "type": "string"
  3959. },
  3960. "required": true
  3961. },
  3962. {
  3963. "name": "directory",
  3964. "in": "query",
  3965. "schema": {
  3966. "type": "string"
  3967. },
  3968. "required": false
  3969. },
  3970. {
  3971. "name": "workspace",
  3972. "in": "query",
  3973. "schema": {
  3974. "type": "string"
  3975. },
  3976. "required": false
  3977. }
  3978. ],
  3979. "responses": {
  3980. "200": {
  3981. "description": "Success",
  3982. "content": {
  3983. "application/json": {
  3984. "schema": {
  3985. "type": "object",
  3986. "properties": {
  3987. "name": {
  3988. "type": "string"
  3989. }
  3990. },
  3991. "required": ["name"],
  3992. "additionalProperties": false
  3993. }
  3994. }
  3995. }
  3996. },
  3997. "400": {
  3998. "description": "Bad request",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/BadRequestError"
  4003. }
  4004. }
  4005. }
  4006. }
  4007. },
  4008. "description": "Generate a short name for a project copy from task context.",
  4009. "summary": "Generate project copy name",
  4010. "requestBody": {
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "type": "object",
  4015. "properties": {
  4016. "context": {
  4017. "type": "string"
  4018. }
  4019. },
  4020. "additionalProperties": false
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "x-codeSamples": [
  4026. {
  4027. "lang": "js",
  4028. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4029. }
  4030. ]
  4031. }
  4032. },
  4033. "/pty/shells": {
  4034. "get": {
  4035. "tags": ["pty"],
  4036. "operationId": "pty.shells",
  4037. "parameters": [
  4038. {
  4039. "name": "directory",
  4040. "in": "query",
  4041. "schema": {
  4042. "type": "string"
  4043. },
  4044. "required": false
  4045. },
  4046. {
  4047. "name": "workspace",
  4048. "in": "query",
  4049. "schema": {
  4050. "type": "string"
  4051. },
  4052. "required": false
  4053. }
  4054. ],
  4055. "responses": {
  4056. "200": {
  4057. "description": "List of shells",
  4058. "content": {
  4059. "application/json": {
  4060. "schema": {
  4061. "type": "array",
  4062. "items": {
  4063. "type": "object",
  4064. "properties": {
  4065. "path": {
  4066. "type": "string"
  4067. },
  4068. "name": {
  4069. "type": "string"
  4070. },
  4071. "acceptable": {
  4072. "type": "boolean"
  4073. }
  4074. },
  4075. "required": ["path", "name", "acceptable"],
  4076. "additionalProperties": false
  4077. },
  4078. "description": "List of shells"
  4079. }
  4080. }
  4081. }
  4082. },
  4083. "400": {
  4084. "description": "Bad request",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "$ref": "#/components/schemas/BadRequestError"
  4089. }
  4090. }
  4091. }
  4092. }
  4093. },
  4094. "description": "Get a list of available shells on the system.",
  4095. "summary": "List available shells",
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4100. }
  4101. ]
  4102. }
  4103. },
  4104. "/pty": {
  4105. "get": {
  4106. "tags": ["pty"],
  4107. "operationId": "pty.list",
  4108. "parameters": [
  4109. {
  4110. "name": "directory",
  4111. "in": "query",
  4112. "schema": {
  4113. "type": "string"
  4114. },
  4115. "required": false
  4116. },
  4117. {
  4118. "name": "workspace",
  4119. "in": "query",
  4120. "schema": {
  4121. "type": "string"
  4122. },
  4123. "required": false
  4124. }
  4125. ],
  4126. "responses": {
  4127. "200": {
  4128. "description": "List of sessions",
  4129. "content": {
  4130. "application/json": {
  4131. "schema": {
  4132. "type": "array",
  4133. "items": {
  4134. "$ref": "#/components/schemas/Pty"
  4135. },
  4136. "description": "List of sessions"
  4137. }
  4138. }
  4139. }
  4140. },
  4141. "400": {
  4142. "description": "Bad request",
  4143. "content": {
  4144. "application/json": {
  4145. "schema": {
  4146. "$ref": "#/components/schemas/BadRequestError"
  4147. }
  4148. }
  4149. }
  4150. }
  4151. },
  4152. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4153. "summary": "List PTY sessions",
  4154. "x-codeSamples": [
  4155. {
  4156. "lang": "js",
  4157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4158. }
  4159. ]
  4160. },
  4161. "post": {
  4162. "tags": ["pty"],
  4163. "operationId": "pty.create",
  4164. "parameters": [
  4165. {
  4166. "name": "directory",
  4167. "in": "query",
  4168. "schema": {
  4169. "type": "string"
  4170. },
  4171. "required": false
  4172. },
  4173. {
  4174. "name": "workspace",
  4175. "in": "query",
  4176. "schema": {
  4177. "type": "string"
  4178. },
  4179. "required": false
  4180. }
  4181. ],
  4182. "responses": {
  4183. "200": {
  4184. "description": "Created session",
  4185. "content": {
  4186. "application/json": {
  4187. "schema": {
  4188. "$ref": "#/components/schemas/Pty"
  4189. }
  4190. }
  4191. }
  4192. },
  4193. "400": {
  4194. "description": "BadRequest | InvalidRequestError",
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "anyOf": [
  4199. {
  4200. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4201. },
  4202. {
  4203. "$ref": "#/components/schemas/InvalidRequestError"
  4204. }
  4205. ]
  4206. }
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4212. "summary": "Create PTY session",
  4213. "requestBody": {
  4214. "content": {
  4215. "application/json": {
  4216. "schema": {
  4217. "type": "object",
  4218. "properties": {
  4219. "command": {
  4220. "type": "string"
  4221. },
  4222. "args": {
  4223. "type": "array",
  4224. "items": {
  4225. "type": "string"
  4226. }
  4227. },
  4228. "cwd": {
  4229. "type": "string"
  4230. },
  4231. "title": {
  4232. "type": "string"
  4233. },
  4234. "env": {
  4235. "type": "object",
  4236. "additionalProperties": {
  4237. "type": "string"
  4238. }
  4239. }
  4240. },
  4241. "additionalProperties": false
  4242. }
  4243. }
  4244. }
  4245. },
  4246. "x-codeSamples": [
  4247. {
  4248. "lang": "js",
  4249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4250. }
  4251. ]
  4252. }
  4253. },
  4254. "/pty/{ptyID}": {
  4255. "get": {
  4256. "tags": ["pty"],
  4257. "operationId": "pty.get",
  4258. "parameters": [
  4259. {
  4260. "name": "ptyID",
  4261. "in": "path",
  4262. "schema": {
  4263. "type": "string",
  4264. "pattern": "^pty"
  4265. },
  4266. "required": true
  4267. },
  4268. {
  4269. "name": "directory",
  4270. "in": "query",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": false
  4275. },
  4276. {
  4277. "name": "workspace",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. }
  4284. ],
  4285. "responses": {
  4286. "200": {
  4287. "description": "Session info",
  4288. "content": {
  4289. "application/json": {
  4290. "schema": {
  4291. "$ref": "#/components/schemas/Pty"
  4292. }
  4293. }
  4294. }
  4295. },
  4296. "400": {
  4297. "description": "Bad request",
  4298. "content": {
  4299. "application/json": {
  4300. "schema": {
  4301. "$ref": "#/components/schemas/BadRequestError"
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "404": {
  4307. "description": "PtyNotFoundError",
  4308. "content": {
  4309. "application/json": {
  4310. "schema": {
  4311. "$ref": "#/components/schemas/PtyNotFoundError"
  4312. }
  4313. }
  4314. }
  4315. }
  4316. },
  4317. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4318. "summary": "Get PTY session",
  4319. "x-codeSamples": [
  4320. {
  4321. "lang": "js",
  4322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4323. }
  4324. ]
  4325. },
  4326. "put": {
  4327. "tags": ["pty"],
  4328. "operationId": "pty.update",
  4329. "parameters": [
  4330. {
  4331. "name": "ptyID",
  4332. "in": "path",
  4333. "schema": {
  4334. "type": "string",
  4335. "pattern": "^pty"
  4336. },
  4337. "required": true
  4338. },
  4339. {
  4340. "name": "directory",
  4341. "in": "query",
  4342. "schema": {
  4343. "type": "string"
  4344. },
  4345. "required": false
  4346. },
  4347. {
  4348. "name": "workspace",
  4349. "in": "query",
  4350. "schema": {
  4351. "type": "string"
  4352. },
  4353. "required": false
  4354. }
  4355. ],
  4356. "responses": {
  4357. "200": {
  4358. "description": "Updated session",
  4359. "content": {
  4360. "application/json": {
  4361. "schema": {
  4362. "$ref": "#/components/schemas/Pty"
  4363. }
  4364. }
  4365. }
  4366. },
  4367. "400": {
  4368. "description": "BadRequest | InvalidRequestError",
  4369. "content": {
  4370. "application/json": {
  4371. "schema": {
  4372. "anyOf": [
  4373. {
  4374. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4375. },
  4376. {
  4377. "$ref": "#/components/schemas/InvalidRequestError"
  4378. }
  4379. ]
  4380. }
  4381. }
  4382. }
  4383. },
  4384. "404": {
  4385. "description": "PtyNotFoundError",
  4386. "content": {
  4387. "application/json": {
  4388. "schema": {
  4389. "$ref": "#/components/schemas/PtyNotFoundError"
  4390. }
  4391. }
  4392. }
  4393. }
  4394. },
  4395. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4396. "summary": "Update PTY session",
  4397. "requestBody": {
  4398. "content": {
  4399. "application/json": {
  4400. "schema": {
  4401. "type": "object",
  4402. "properties": {
  4403. "title": {
  4404. "type": "string"
  4405. },
  4406. "size": {
  4407. "type": "object",
  4408. "properties": {
  4409. "rows": {
  4410. "type": "integer",
  4411. "exclusiveMinimum": 0
  4412. },
  4413. "cols": {
  4414. "type": "integer",
  4415. "exclusiveMinimum": 0
  4416. }
  4417. },
  4418. "required": ["rows", "cols"],
  4419. "additionalProperties": false
  4420. }
  4421. },
  4422. "additionalProperties": false
  4423. }
  4424. }
  4425. }
  4426. },
  4427. "x-codeSamples": [
  4428. {
  4429. "lang": "js",
  4430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4431. }
  4432. ]
  4433. },
  4434. "delete": {
  4435. "tags": ["pty"],
  4436. "operationId": "pty.remove",
  4437. "parameters": [
  4438. {
  4439. "name": "ptyID",
  4440. "in": "path",
  4441. "schema": {
  4442. "type": "string",
  4443. "pattern": "^pty"
  4444. },
  4445. "required": true
  4446. },
  4447. {
  4448. "name": "directory",
  4449. "in": "query",
  4450. "schema": {
  4451. "type": "string"
  4452. },
  4453. "required": false
  4454. },
  4455. {
  4456. "name": "workspace",
  4457. "in": "query",
  4458. "schema": {
  4459. "type": "string"
  4460. },
  4461. "required": false
  4462. }
  4463. ],
  4464. "responses": {
  4465. "200": {
  4466. "description": "Session removed",
  4467. "content": {
  4468. "application/json": {
  4469. "schema": {
  4470. "type": "boolean",
  4471. "description": "Session removed"
  4472. }
  4473. }
  4474. }
  4475. },
  4476. "400": {
  4477. "description": "Bad request",
  4478. "content": {
  4479. "application/json": {
  4480. "schema": {
  4481. "$ref": "#/components/schemas/BadRequestError"
  4482. }
  4483. }
  4484. }
  4485. },
  4486. "404": {
  4487. "description": "PtyNotFoundError",
  4488. "content": {
  4489. "application/json": {
  4490. "schema": {
  4491. "$ref": "#/components/schemas/PtyNotFoundError"
  4492. }
  4493. }
  4494. }
  4495. }
  4496. },
  4497. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4498. "summary": "Remove PTY session",
  4499. "x-codeSamples": [
  4500. {
  4501. "lang": "js",
  4502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4503. }
  4504. ]
  4505. }
  4506. },
  4507. "/pty/{ptyID}/connect-token": {
  4508. "post": {
  4509. "tags": ["pty"],
  4510. "operationId": "pty.connectToken",
  4511. "parameters": [
  4512. {
  4513. "name": "ptyID",
  4514. "in": "path",
  4515. "schema": {
  4516. "type": "string",
  4517. "pattern": "^pty"
  4518. },
  4519. "required": true
  4520. },
  4521. {
  4522. "name": "directory",
  4523. "in": "query",
  4524. "schema": {
  4525. "type": "string"
  4526. },
  4527. "required": false
  4528. },
  4529. {
  4530. "name": "workspace",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "description": "WebSocket connect token",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "type": "object",
  4545. "properties": {
  4546. "ticket": {
  4547. "type": "string"
  4548. },
  4549. "expires_in": {
  4550. "type": "integer",
  4551. "exclusiveMinimum": 0
  4552. }
  4553. },
  4554. "required": ["ticket", "expires_in"],
  4555. "additionalProperties": false,
  4556. "description": "WebSocket connect token"
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "400": {
  4562. "description": "Bad request",
  4563. "content": {
  4564. "application/json": {
  4565. "schema": {
  4566. "$ref": "#/components/schemas/BadRequestError"
  4567. }
  4568. }
  4569. }
  4570. },
  4571. "403": {
  4572. "description": "PtyForbiddenError",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "$ref": "#/components/schemas/PtyForbiddenError"
  4577. }
  4578. }
  4579. }
  4580. },
  4581. "404": {
  4582. "description": "PtyNotFoundError",
  4583. "content": {
  4584. "application/json": {
  4585. "schema": {
  4586. "$ref": "#/components/schemas/PtyNotFoundError"
  4587. }
  4588. }
  4589. }
  4590. }
  4591. },
  4592. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4593. "summary": "Create PTY WebSocket token",
  4594. "x-codeSamples": [
  4595. {
  4596. "lang": "js",
  4597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4598. }
  4599. ]
  4600. }
  4601. },
  4602. "/question": {
  4603. "get": {
  4604. "tags": ["question"],
  4605. "operationId": "question.list",
  4606. "parameters": [
  4607. {
  4608. "name": "directory",
  4609. "in": "query",
  4610. "schema": {
  4611. "type": "string"
  4612. },
  4613. "required": false
  4614. },
  4615. {
  4616. "name": "workspace",
  4617. "in": "query",
  4618. "schema": {
  4619. "type": "string"
  4620. },
  4621. "required": false
  4622. }
  4623. ],
  4624. "responses": {
  4625. "200": {
  4626. "description": "List of pending questions",
  4627. "content": {
  4628. "application/json": {
  4629. "schema": {
  4630. "type": "array",
  4631. "items": {
  4632. "$ref": "#/components/schemas/QuestionRequest"
  4633. },
  4634. "description": "List of pending questions"
  4635. }
  4636. }
  4637. }
  4638. },
  4639. "400": {
  4640. "description": "Bad request",
  4641. "content": {
  4642. "application/json": {
  4643. "schema": {
  4644. "$ref": "#/components/schemas/BadRequestError"
  4645. }
  4646. }
  4647. }
  4648. }
  4649. },
  4650. "description": "Get all pending question requests across all sessions.",
  4651. "summary": "List pending questions",
  4652. "x-codeSamples": [
  4653. {
  4654. "lang": "js",
  4655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4656. }
  4657. ]
  4658. }
  4659. },
  4660. "/question/{requestID}/reply": {
  4661. "post": {
  4662. "tags": ["question"],
  4663. "operationId": "question.reply",
  4664. "parameters": [
  4665. {
  4666. "name": "requestID",
  4667. "in": "path",
  4668. "schema": {
  4669. "type": "string",
  4670. "pattern": "^que"
  4671. },
  4672. "required": true
  4673. },
  4674. {
  4675. "name": "directory",
  4676. "in": "query",
  4677. "schema": {
  4678. "type": "string"
  4679. },
  4680. "required": false
  4681. },
  4682. {
  4683. "name": "workspace",
  4684. "in": "query",
  4685. "schema": {
  4686. "type": "string"
  4687. },
  4688. "required": false
  4689. }
  4690. ],
  4691. "responses": {
  4692. "200": {
  4693. "description": "Question answered successfully",
  4694. "content": {
  4695. "application/json": {
  4696. "schema": {
  4697. "type": "boolean",
  4698. "description": "Question answered successfully"
  4699. }
  4700. }
  4701. }
  4702. },
  4703. "400": {
  4704. "description": "BadRequest | InvalidRequestError",
  4705. "content": {
  4706. "application/json": {
  4707. "schema": {
  4708. "anyOf": [
  4709. {
  4710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4711. },
  4712. {
  4713. "$ref": "#/components/schemas/InvalidRequestError"
  4714. }
  4715. ]
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "404": {
  4721. "description": "QuestionNotFoundError",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/QuestionNotFoundError"
  4726. }
  4727. }
  4728. }
  4729. }
  4730. },
  4731. "description": "Provide answers to a question request from the AI assistant.",
  4732. "summary": "Reply to question request",
  4733. "requestBody": {
  4734. "content": {
  4735. "application/json": {
  4736. "schema": {
  4737. "type": "object",
  4738. "properties": {
  4739. "answers": {
  4740. "type": "array",
  4741. "items": {
  4742. "$ref": "#/components/schemas/QuestionAnswer"
  4743. },
  4744. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4745. }
  4746. },
  4747. "required": ["answers"],
  4748. "additionalProperties": false
  4749. }
  4750. }
  4751. }
  4752. },
  4753. "x-codeSamples": [
  4754. {
  4755. "lang": "js",
  4756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4757. }
  4758. ]
  4759. }
  4760. },
  4761. "/question/{requestID}/reject": {
  4762. "post": {
  4763. "tags": ["question"],
  4764. "operationId": "question.reject",
  4765. "parameters": [
  4766. {
  4767. "name": "requestID",
  4768. "in": "path",
  4769. "schema": {
  4770. "type": "string",
  4771. "pattern": "^que"
  4772. },
  4773. "required": true
  4774. },
  4775. {
  4776. "name": "directory",
  4777. "in": "query",
  4778. "schema": {
  4779. "type": "string"
  4780. },
  4781. "required": false
  4782. },
  4783. {
  4784. "name": "workspace",
  4785. "in": "query",
  4786. "schema": {
  4787. "type": "string"
  4788. },
  4789. "required": false
  4790. }
  4791. ],
  4792. "responses": {
  4793. "200": {
  4794. "description": "Question rejected successfully",
  4795. "content": {
  4796. "application/json": {
  4797. "schema": {
  4798. "type": "boolean",
  4799. "description": "Question rejected successfully"
  4800. }
  4801. }
  4802. }
  4803. },
  4804. "400": {
  4805. "description": "BadRequest | InvalidRequestError",
  4806. "content": {
  4807. "application/json": {
  4808. "schema": {
  4809. "anyOf": [
  4810. {
  4811. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4812. },
  4813. {
  4814. "$ref": "#/components/schemas/InvalidRequestError"
  4815. }
  4816. ]
  4817. }
  4818. }
  4819. }
  4820. },
  4821. "404": {
  4822. "description": "QuestionNotFoundError",
  4823. "content": {
  4824. "application/json": {
  4825. "schema": {
  4826. "$ref": "#/components/schemas/QuestionNotFoundError"
  4827. }
  4828. }
  4829. }
  4830. }
  4831. },
  4832. "description": "Reject a question request from the AI assistant.",
  4833. "summary": "Reject question request",
  4834. "x-codeSamples": [
  4835. {
  4836. "lang": "js",
  4837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4838. }
  4839. ]
  4840. }
  4841. },
  4842. "/permission": {
  4843. "get": {
  4844. "tags": ["permission"],
  4845. "operationId": "permission.list",
  4846. "parameters": [
  4847. {
  4848. "name": "directory",
  4849. "in": "query",
  4850. "schema": {
  4851. "type": "string"
  4852. },
  4853. "required": false
  4854. },
  4855. {
  4856. "name": "workspace",
  4857. "in": "query",
  4858. "schema": {
  4859. "type": "string"
  4860. },
  4861. "required": false
  4862. }
  4863. ],
  4864. "responses": {
  4865. "200": {
  4866. "description": "List of pending permissions",
  4867. "content": {
  4868. "application/json": {
  4869. "schema": {
  4870. "type": "array",
  4871. "items": {
  4872. "$ref": "#/components/schemas/PermissionRequest"
  4873. },
  4874. "description": "List of pending permissions"
  4875. }
  4876. }
  4877. }
  4878. },
  4879. "400": {
  4880. "description": "Bad request",
  4881. "content": {
  4882. "application/json": {
  4883. "schema": {
  4884. "$ref": "#/components/schemas/BadRequestError"
  4885. }
  4886. }
  4887. }
  4888. }
  4889. },
  4890. "description": "Get all pending permission requests across all sessions.",
  4891. "summary": "List pending permissions",
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/permission/{requestID}/reply": {
  4901. "post": {
  4902. "tags": ["permission"],
  4903. "operationId": "permission.reply",
  4904. "parameters": [
  4905. {
  4906. "name": "requestID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string",
  4910. "pattern": "^per"
  4911. },
  4912. "required": true
  4913. },
  4914. {
  4915. "name": "directory",
  4916. "in": "query",
  4917. "schema": {
  4918. "type": "string"
  4919. },
  4920. "required": false
  4921. },
  4922. {
  4923. "name": "workspace",
  4924. "in": "query",
  4925. "schema": {
  4926. "type": "string"
  4927. },
  4928. "required": false
  4929. }
  4930. ],
  4931. "responses": {
  4932. "200": {
  4933. "description": "Permission processed successfully",
  4934. "content": {
  4935. "application/json": {
  4936. "schema": {
  4937. "type": "boolean",
  4938. "description": "Permission processed successfully"
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "400": {
  4944. "description": "BadRequest | InvalidRequestError",
  4945. "content": {
  4946. "application/json": {
  4947. "schema": {
  4948. "anyOf": [
  4949. {
  4950. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4951. },
  4952. {
  4953. "$ref": "#/components/schemas/InvalidRequestError"
  4954. }
  4955. ]
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "404": {
  4961. "description": "PermissionNotFoundError",
  4962. "content": {
  4963. "application/json": {
  4964. "schema": {
  4965. "$ref": "#/components/schemas/PermissionNotFoundError"
  4966. }
  4967. }
  4968. }
  4969. }
  4970. },
  4971. "description": "Approve or deny a permission request from the AI assistant.",
  4972. "summary": "Respond to permission request",
  4973. "requestBody": {
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "type": "object",
  4978. "properties": {
  4979. "reply": {
  4980. "type": "string",
  4981. "enum": ["once", "always", "reject"]
  4982. },
  4983. "message": {
  4984. "type": "string"
  4985. }
  4986. },
  4987. "required": ["reply"],
  4988. "additionalProperties": false
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "x-codeSamples": [
  4994. {
  4995. "lang": "js",
  4996. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4997. }
  4998. ]
  4999. }
  5000. },
  5001. "/provider": {
  5002. "get": {
  5003. "tags": ["provider"],
  5004. "operationId": "provider.list",
  5005. "parameters": [
  5006. {
  5007. "name": "directory",
  5008. "in": "query",
  5009. "schema": {
  5010. "type": "string"
  5011. },
  5012. "required": false
  5013. },
  5014. {
  5015. "name": "workspace",
  5016. "in": "query",
  5017. "schema": {
  5018. "type": "string"
  5019. },
  5020. "required": false
  5021. }
  5022. ],
  5023. "responses": {
  5024. "200": {
  5025. "description": "List of providers",
  5026. "content": {
  5027. "application/json": {
  5028. "schema": {
  5029. "type": "object",
  5030. "properties": {
  5031. "all": {
  5032. "type": "array",
  5033. "items": {
  5034. "$ref": "#/components/schemas/Provider"
  5035. }
  5036. },
  5037. "default": {
  5038. "type": "object",
  5039. "additionalProperties": {
  5040. "type": "string"
  5041. }
  5042. },
  5043. "connected": {
  5044. "type": "array",
  5045. "items": {
  5046. "type": "string"
  5047. }
  5048. }
  5049. },
  5050. "required": ["all", "default", "connected"],
  5051. "additionalProperties": false,
  5052. "description": "List of providers"
  5053. }
  5054. }
  5055. }
  5056. },
  5057. "400": {
  5058. "description": "Bad request",
  5059. "content": {
  5060. "application/json": {
  5061. "schema": {
  5062. "$ref": "#/components/schemas/BadRequestError"
  5063. }
  5064. }
  5065. }
  5066. }
  5067. },
  5068. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5069. "summary": "List providers",
  5070. "x-codeSamples": [
  5071. {
  5072. "lang": "js",
  5073. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5074. }
  5075. ]
  5076. }
  5077. },
  5078. "/provider/auth": {
  5079. "get": {
  5080. "tags": ["provider"],
  5081. "operationId": "provider.auth",
  5082. "parameters": [
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. }
  5099. ],
  5100. "responses": {
  5101. "200": {
  5102. "description": "Provider auth methods",
  5103. "content": {
  5104. "application/json": {
  5105. "schema": {
  5106. "type": "object",
  5107. "additionalProperties": {
  5108. "type": "array",
  5109. "items": {
  5110. "$ref": "#/components/schemas/ProviderAuthMethod"
  5111. }
  5112. },
  5113. "description": "Provider auth methods"
  5114. }
  5115. }
  5116. }
  5117. },
  5118. "400": {
  5119. "description": "Bad request",
  5120. "content": {
  5121. "application/json": {
  5122. "schema": {
  5123. "$ref": "#/components/schemas/BadRequestError"
  5124. }
  5125. }
  5126. }
  5127. }
  5128. },
  5129. "description": "Retrieve available authentication methods for all AI providers.",
  5130. "summary": "Get provider auth methods",
  5131. "x-codeSamples": [
  5132. {
  5133. "lang": "js",
  5134. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5135. }
  5136. ]
  5137. }
  5138. },
  5139. "/provider/{providerID}/oauth/authorize": {
  5140. "post": {
  5141. "tags": ["provider"],
  5142. "operationId": "provider.oauth.authorize",
  5143. "parameters": [
  5144. {
  5145. "name": "providerID",
  5146. "in": "path",
  5147. "schema": {
  5148. "type": "string"
  5149. },
  5150. "required": true
  5151. },
  5152. {
  5153. "name": "directory",
  5154. "in": "query",
  5155. "schema": {
  5156. "type": "string"
  5157. },
  5158. "required": false
  5159. },
  5160. {
  5161. "name": "workspace",
  5162. "in": "query",
  5163. "schema": {
  5164. "type": "string"
  5165. },
  5166. "required": false
  5167. }
  5168. ],
  5169. "responses": {
  5170. "200": {
  5171. "description": "Authorization URL and method",
  5172. "content": {
  5173. "application/json": {
  5174. "schema": {
  5175. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5176. }
  5177. }
  5178. }
  5179. },
  5180. "400": {
  5181. "description": "ProviderAuthError | InvalidRequestError",
  5182. "content": {
  5183. "application/json": {
  5184. "schema": {
  5185. "anyOf": [
  5186. {
  5187. "$ref": "#/components/schemas/ProviderAuthError1"
  5188. },
  5189. {
  5190. "$ref": "#/components/schemas/InvalidRequestError"
  5191. }
  5192. ]
  5193. }
  5194. }
  5195. }
  5196. }
  5197. },
  5198. "description": "Start the OAuth authorization flow for a provider.",
  5199. "summary": "Start OAuth authorization",
  5200. "requestBody": {
  5201. "content": {
  5202. "application/json": {
  5203. "schema": {
  5204. "type": "object",
  5205. "properties": {
  5206. "method": {
  5207. "type": "number",
  5208. "description": "Auth method index"
  5209. },
  5210. "inputs": {
  5211. "type": "object",
  5212. "additionalProperties": {
  5213. "type": "string"
  5214. }
  5215. }
  5216. },
  5217. "required": ["method"],
  5218. "additionalProperties": false
  5219. }
  5220. }
  5221. }
  5222. },
  5223. "x-codeSamples": [
  5224. {
  5225. "lang": "js",
  5226. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5227. }
  5228. ]
  5229. }
  5230. },
  5231. "/provider/{providerID}/oauth/callback": {
  5232. "post": {
  5233. "tags": ["provider"],
  5234. "operationId": "provider.oauth.callback",
  5235. "parameters": [
  5236. {
  5237. "name": "providerID",
  5238. "in": "path",
  5239. "schema": {
  5240. "type": "string"
  5241. },
  5242. "required": true
  5243. },
  5244. {
  5245. "name": "directory",
  5246. "in": "query",
  5247. "schema": {
  5248. "type": "string"
  5249. },
  5250. "required": false
  5251. },
  5252. {
  5253. "name": "workspace",
  5254. "in": "query",
  5255. "schema": {
  5256. "type": "string"
  5257. },
  5258. "required": false
  5259. }
  5260. ],
  5261. "responses": {
  5262. "200": {
  5263. "description": "OAuth callback processed successfully",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "type": "boolean",
  5268. "description": "OAuth callback processed successfully"
  5269. }
  5270. }
  5271. }
  5272. },
  5273. "400": {
  5274. "description": "ProviderAuthError | InvalidRequestError",
  5275. "content": {
  5276. "application/json": {
  5277. "schema": {
  5278. "anyOf": [
  5279. {
  5280. "$ref": "#/components/schemas/ProviderAuthError1"
  5281. },
  5282. {
  5283. "$ref": "#/components/schemas/InvalidRequestError"
  5284. }
  5285. ]
  5286. }
  5287. }
  5288. }
  5289. }
  5290. },
  5291. "description": "Handle the OAuth callback from a provider after user authorization.",
  5292. "summary": "Handle OAuth callback",
  5293. "requestBody": {
  5294. "content": {
  5295. "application/json": {
  5296. "schema": {
  5297. "type": "object",
  5298. "properties": {
  5299. "method": {
  5300. "type": "number",
  5301. "description": "Auth method index"
  5302. },
  5303. "code": {
  5304. "type": "string"
  5305. }
  5306. },
  5307. "required": ["method"],
  5308. "additionalProperties": false
  5309. }
  5310. }
  5311. }
  5312. },
  5313. "x-codeSamples": [
  5314. {
  5315. "lang": "js",
  5316. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5317. }
  5318. ]
  5319. }
  5320. },
  5321. "/session": {
  5322. "get": {
  5323. "tags": ["session"],
  5324. "operationId": "session.list",
  5325. "parameters": [
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. },
  5342. {
  5343. "name": "scope",
  5344. "in": "query",
  5345. "schema": {
  5346. "type": "string",
  5347. "enum": ["project"]
  5348. },
  5349. "required": false
  5350. },
  5351. {
  5352. "name": "path",
  5353. "in": "query",
  5354. "schema": {
  5355. "type": "string"
  5356. },
  5357. "required": false
  5358. },
  5359. {
  5360. "name": "roots",
  5361. "in": "query",
  5362. "schema": {
  5363. "anyOf": [
  5364. {
  5365. "type": "boolean"
  5366. },
  5367. {
  5368. "type": "string",
  5369. "enum": ["true", "false"]
  5370. }
  5371. ]
  5372. },
  5373. "required": false
  5374. },
  5375. {
  5376. "name": "start",
  5377. "in": "query",
  5378. "schema": {
  5379. "type": "number"
  5380. },
  5381. "required": false
  5382. },
  5383. {
  5384. "name": "search",
  5385. "in": "query",
  5386. "schema": {
  5387. "type": "string"
  5388. },
  5389. "required": false
  5390. },
  5391. {
  5392. "name": "limit",
  5393. "in": "query",
  5394. "schema": {
  5395. "type": "number"
  5396. },
  5397. "required": false
  5398. }
  5399. ],
  5400. "responses": {
  5401. "200": {
  5402. "description": "List of sessions",
  5403. "content": {
  5404. "application/json": {
  5405. "schema": {
  5406. "type": "array",
  5407. "items": {
  5408. "$ref": "#/components/schemas/Session"
  5409. },
  5410. "description": "List of sessions"
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "400": {
  5416. "description": "Bad request",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/BadRequestError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5427. "summary": "List sessions",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "post": {
  5436. "tags": ["session"],
  5437. "operationId": "session.create",
  5438. "parameters": [
  5439. {
  5440. "name": "directory",
  5441. "in": "query",
  5442. "schema": {
  5443. "type": "string"
  5444. },
  5445. "required": false
  5446. },
  5447. {
  5448. "name": "workspace",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. }
  5455. ],
  5456. "responses": {
  5457. "200": {
  5458. "description": "Successfully created session",
  5459. "content": {
  5460. "application/json": {
  5461. "schema": {
  5462. "$ref": "#/components/schemas/Session"
  5463. }
  5464. }
  5465. }
  5466. },
  5467. "400": {
  5468. "description": "BadRequest | InvalidRequestError",
  5469. "content": {
  5470. "application/json": {
  5471. "schema": {
  5472. "anyOf": [
  5473. {
  5474. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5475. },
  5476. {
  5477. "$ref": "#/components/schemas/InvalidRequestError"
  5478. }
  5479. ]
  5480. }
  5481. }
  5482. }
  5483. }
  5484. },
  5485. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5486. "summary": "Create session",
  5487. "requestBody": {
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "type": "object",
  5492. "properties": {
  5493. "parentID": {
  5494. "type": "string",
  5495. "pattern": "^ses"
  5496. },
  5497. "title": {
  5498. "type": "string"
  5499. },
  5500. "agent": {
  5501. "type": "string"
  5502. },
  5503. "model": {
  5504. "type": "object",
  5505. "properties": {
  5506. "id": {
  5507. "type": "string"
  5508. },
  5509. "providerID": {
  5510. "type": "string"
  5511. },
  5512. "variant": {
  5513. "type": "string"
  5514. }
  5515. },
  5516. "required": ["id", "providerID"],
  5517. "additionalProperties": false
  5518. },
  5519. "metadata": {
  5520. "type": "object"
  5521. },
  5522. "permission": {
  5523. "$ref": "#/components/schemas/PermissionRuleset"
  5524. },
  5525. "workspaceID": {
  5526. "type": "string",
  5527. "pattern": "^wrk"
  5528. }
  5529. },
  5530. "additionalProperties": false
  5531. }
  5532. }
  5533. }
  5534. },
  5535. "x-codeSamples": [
  5536. {
  5537. "lang": "js",
  5538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5539. }
  5540. ]
  5541. }
  5542. },
  5543. "/session/status": {
  5544. "get": {
  5545. "tags": ["session"],
  5546. "operationId": "session.status",
  5547. "parameters": [
  5548. {
  5549. "name": "directory",
  5550. "in": "query",
  5551. "schema": {
  5552. "type": "string"
  5553. },
  5554. "required": false
  5555. },
  5556. {
  5557. "name": "workspace",
  5558. "in": "query",
  5559. "schema": {
  5560. "type": "string"
  5561. },
  5562. "required": false
  5563. }
  5564. ],
  5565. "responses": {
  5566. "200": {
  5567. "description": "Get session status",
  5568. "content": {
  5569. "application/json": {
  5570. "schema": {
  5571. "type": "object",
  5572. "additionalProperties": {
  5573. "$ref": "#/components/schemas/SessionStatus"
  5574. },
  5575. "description": "Get session status"
  5576. }
  5577. }
  5578. }
  5579. },
  5580. "400": {
  5581. "description": "BadRequest | InvalidRequestError",
  5582. "content": {
  5583. "application/json": {
  5584. "schema": {
  5585. "anyOf": [
  5586. {
  5587. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5588. },
  5589. {
  5590. "$ref": "#/components/schemas/InvalidRequestError"
  5591. }
  5592. ]
  5593. }
  5594. }
  5595. }
  5596. }
  5597. },
  5598. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5599. "summary": "Get session status",
  5600. "x-codeSamples": [
  5601. {
  5602. "lang": "js",
  5603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5604. }
  5605. ]
  5606. }
  5607. },
  5608. "/session/{sessionID}": {
  5609. "get": {
  5610. "tags": ["session"],
  5611. "operationId": "session.get",
  5612. "parameters": [
  5613. {
  5614. "name": "sessionID",
  5615. "in": "path",
  5616. "schema": {
  5617. "type": "string",
  5618. "pattern": "^ses"
  5619. },
  5620. "required": true
  5621. },
  5622. {
  5623. "name": "directory",
  5624. "in": "query",
  5625. "schema": {
  5626. "type": "string"
  5627. },
  5628. "required": false
  5629. },
  5630. {
  5631. "name": "workspace",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. }
  5638. ],
  5639. "responses": {
  5640. "200": {
  5641. "description": "Get session",
  5642. "content": {
  5643. "application/json": {
  5644. "schema": {
  5645. "$ref": "#/components/schemas/Session"
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "400": {
  5651. "description": "BadRequest | InvalidRequestError",
  5652. "content": {
  5653. "application/json": {
  5654. "schema": {
  5655. "anyOf": [
  5656. {
  5657. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5658. },
  5659. {
  5660. "$ref": "#/components/schemas/InvalidRequestError"
  5661. }
  5662. ]
  5663. }
  5664. }
  5665. }
  5666. },
  5667. "404": {
  5668. "description": "NotFoundError",
  5669. "content": {
  5670. "application/json": {
  5671. "schema": {
  5672. "$ref": "#/components/schemas/NotFoundError"
  5673. }
  5674. }
  5675. }
  5676. }
  5677. },
  5678. "description": "Retrieve detailed information about a specific OpenCode session.",
  5679. "summary": "Get session",
  5680. "x-codeSamples": [
  5681. {
  5682. "lang": "js",
  5683. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5684. }
  5685. ]
  5686. },
  5687. "delete": {
  5688. "tags": ["session"],
  5689. "operationId": "session.delete",
  5690. "parameters": [
  5691. {
  5692. "name": "sessionID",
  5693. "in": "path",
  5694. "schema": {
  5695. "type": "string",
  5696. "pattern": "^ses"
  5697. },
  5698. "required": true
  5699. },
  5700. {
  5701. "name": "directory",
  5702. "in": "query",
  5703. "schema": {
  5704. "type": "string"
  5705. },
  5706. "required": false
  5707. },
  5708. {
  5709. "name": "workspace",
  5710. "in": "query",
  5711. "schema": {
  5712. "type": "string"
  5713. },
  5714. "required": false
  5715. }
  5716. ],
  5717. "responses": {
  5718. "200": {
  5719. "description": "Successfully deleted session",
  5720. "content": {
  5721. "application/json": {
  5722. "schema": {
  5723. "type": "boolean",
  5724. "description": "Successfully deleted session"
  5725. }
  5726. }
  5727. }
  5728. },
  5729. "400": {
  5730. "description": "BadRequest | InvalidRequestError",
  5731. "content": {
  5732. "application/json": {
  5733. "schema": {
  5734. "anyOf": [
  5735. {
  5736. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5737. },
  5738. {
  5739. "$ref": "#/components/schemas/InvalidRequestError"
  5740. }
  5741. ]
  5742. }
  5743. }
  5744. }
  5745. },
  5746. "404": {
  5747. "description": "NotFoundError",
  5748. "content": {
  5749. "application/json": {
  5750. "schema": {
  5751. "$ref": "#/components/schemas/NotFoundError"
  5752. }
  5753. }
  5754. }
  5755. }
  5756. },
  5757. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5758. "summary": "Delete session",
  5759. "x-codeSamples": [
  5760. {
  5761. "lang": "js",
  5762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5763. }
  5764. ]
  5765. },
  5766. "patch": {
  5767. "tags": ["session"],
  5768. "operationId": "session.update",
  5769. "parameters": [
  5770. {
  5771. "name": "sessionID",
  5772. "in": "path",
  5773. "schema": {
  5774. "type": "string",
  5775. "pattern": "^ses"
  5776. },
  5777. "required": true
  5778. },
  5779. {
  5780. "name": "directory",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. },
  5787. {
  5788. "name": "workspace",
  5789. "in": "query",
  5790. "schema": {
  5791. "type": "string"
  5792. },
  5793. "required": false
  5794. }
  5795. ],
  5796. "responses": {
  5797. "200": {
  5798. "description": "Successfully updated session",
  5799. "content": {
  5800. "application/json": {
  5801. "schema": {
  5802. "$ref": "#/components/schemas/Session"
  5803. }
  5804. }
  5805. }
  5806. },
  5807. "400": {
  5808. "description": "BadRequest | InvalidRequestError",
  5809. "content": {
  5810. "application/json": {
  5811. "schema": {
  5812. "anyOf": [
  5813. {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5815. },
  5816. {
  5817. "$ref": "#/components/schemas/InvalidRequestError"
  5818. }
  5819. ]
  5820. }
  5821. }
  5822. }
  5823. },
  5824. "404": {
  5825. "description": "NotFoundError",
  5826. "content": {
  5827. "application/json": {
  5828. "schema": {
  5829. "$ref": "#/components/schemas/NotFoundError"
  5830. }
  5831. }
  5832. }
  5833. }
  5834. },
  5835. "description": "Update properties of an existing session, such as title or other metadata.",
  5836. "summary": "Update session",
  5837. "requestBody": {
  5838. "content": {
  5839. "application/json": {
  5840. "schema": {
  5841. "type": "object",
  5842. "properties": {
  5843. "title": {
  5844. "type": "string"
  5845. },
  5846. "metadata": {
  5847. "type": "object"
  5848. },
  5849. "permission": {
  5850. "$ref": "#/components/schemas/PermissionRuleset"
  5851. },
  5852. "time": {
  5853. "type": "object",
  5854. "properties": {
  5855. "archived": {
  5856. "type": "number"
  5857. }
  5858. },
  5859. "additionalProperties": false
  5860. }
  5861. },
  5862. "additionalProperties": false
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "x-codeSamples": [
  5868. {
  5869. "lang": "js",
  5870. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5871. }
  5872. ]
  5873. }
  5874. },
  5875. "/session/{sessionID}/children": {
  5876. "get": {
  5877. "tags": ["session"],
  5878. "operationId": "session.children",
  5879. "parameters": [
  5880. {
  5881. "name": "sessionID",
  5882. "in": "path",
  5883. "schema": {
  5884. "type": "string",
  5885. "pattern": "^ses"
  5886. },
  5887. "required": true
  5888. },
  5889. {
  5890. "name": "directory",
  5891. "in": "query",
  5892. "schema": {
  5893. "type": "string"
  5894. },
  5895. "required": false
  5896. },
  5897. {
  5898. "name": "workspace",
  5899. "in": "query",
  5900. "schema": {
  5901. "type": "string"
  5902. },
  5903. "required": false
  5904. }
  5905. ],
  5906. "responses": {
  5907. "200": {
  5908. "description": "List of children",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "type": "array",
  5913. "items": {
  5914. "$ref": "#/components/schemas/Session"
  5915. },
  5916. "description": "List of children"
  5917. }
  5918. }
  5919. }
  5920. },
  5921. "400": {
  5922. "description": "BadRequest | InvalidRequestError",
  5923. "content": {
  5924. "application/json": {
  5925. "schema": {
  5926. "anyOf": [
  5927. {
  5928. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5929. },
  5930. {
  5931. "$ref": "#/components/schemas/InvalidRequestError"
  5932. }
  5933. ]
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "404": {
  5939. "description": "NotFoundError",
  5940. "content": {
  5941. "application/json": {
  5942. "schema": {
  5943. "$ref": "#/components/schemas/NotFoundError"
  5944. }
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5950. "summary": "Get session children",
  5951. "x-codeSamples": [
  5952. {
  5953. "lang": "js",
  5954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5955. }
  5956. ]
  5957. }
  5958. },
  5959. "/session/{sessionID}/todo": {
  5960. "get": {
  5961. "tags": ["session"],
  5962. "operationId": "session.todo",
  5963. "parameters": [
  5964. {
  5965. "name": "sessionID",
  5966. "in": "path",
  5967. "schema": {
  5968. "type": "string",
  5969. "pattern": "^ses"
  5970. },
  5971. "required": true
  5972. },
  5973. {
  5974. "name": "directory",
  5975. "in": "query",
  5976. "schema": {
  5977. "type": "string"
  5978. },
  5979. "required": false
  5980. },
  5981. {
  5982. "name": "workspace",
  5983. "in": "query",
  5984. "schema": {
  5985. "type": "string"
  5986. },
  5987. "required": false
  5988. }
  5989. ],
  5990. "responses": {
  5991. "200": {
  5992. "description": "Todo list",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "type": "array",
  5997. "items": {
  5998. "$ref": "#/components/schemas/Todo"
  5999. },
  6000. "description": "Todo list"
  6001. }
  6002. }
  6003. }
  6004. },
  6005. "400": {
  6006. "description": "BadRequest | InvalidRequestError",
  6007. "content": {
  6008. "application/json": {
  6009. "schema": {
  6010. "anyOf": [
  6011. {
  6012. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6013. },
  6014. {
  6015. "$ref": "#/components/schemas/InvalidRequestError"
  6016. }
  6017. ]
  6018. }
  6019. }
  6020. }
  6021. },
  6022. "404": {
  6023. "description": "NotFoundError",
  6024. "content": {
  6025. "application/json": {
  6026. "schema": {
  6027. "$ref": "#/components/schemas/NotFoundError"
  6028. }
  6029. }
  6030. }
  6031. }
  6032. },
  6033. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6034. "summary": "Get session todos",
  6035. "x-codeSamples": [
  6036. {
  6037. "lang": "js",
  6038. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6039. }
  6040. ]
  6041. }
  6042. },
  6043. "/session/{sessionID}/diff": {
  6044. "get": {
  6045. "tags": ["session"],
  6046. "operationId": "session.diff",
  6047. "parameters": [
  6048. {
  6049. "name": "sessionID",
  6050. "in": "path",
  6051. "schema": {
  6052. "type": "string",
  6053. "pattern": "^ses"
  6054. },
  6055. "required": true
  6056. },
  6057. {
  6058. "name": "directory",
  6059. "in": "query",
  6060. "schema": {
  6061. "type": "string"
  6062. },
  6063. "required": false
  6064. },
  6065. {
  6066. "name": "workspace",
  6067. "in": "query",
  6068. "schema": {
  6069. "type": "string"
  6070. },
  6071. "required": false
  6072. },
  6073. {
  6074. "name": "messageID",
  6075. "in": "query",
  6076. "schema": {
  6077. "type": "string",
  6078. "pattern": "^msg"
  6079. },
  6080. "required": false
  6081. }
  6082. ],
  6083. "responses": {
  6084. "200": {
  6085. "description": "Successfully retrieved diff",
  6086. "content": {
  6087. "application/json": {
  6088. "schema": {
  6089. "type": "array",
  6090. "items": {
  6091. "$ref": "#/components/schemas/SnapshotFileDiff"
  6092. },
  6093. "description": "Successfully retrieved diff"
  6094. }
  6095. }
  6096. }
  6097. },
  6098. "400": {
  6099. "description": "Bad request",
  6100. "content": {
  6101. "application/json": {
  6102. "schema": {
  6103. "$ref": "#/components/schemas/BadRequestError"
  6104. }
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6110. "summary": "Get message diff",
  6111. "x-codeSamples": [
  6112. {
  6113. "lang": "js",
  6114. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6115. }
  6116. ]
  6117. }
  6118. },
  6119. "/session/{sessionID}/message": {
  6120. "get": {
  6121. "tags": ["session"],
  6122. "operationId": "session.messages",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "directory",
  6135. "in": "query",
  6136. "schema": {
  6137. "type": "string"
  6138. },
  6139. "required": false
  6140. },
  6141. {
  6142. "name": "workspace",
  6143. "in": "query",
  6144. "schema": {
  6145. "type": "string"
  6146. },
  6147. "required": false
  6148. },
  6149. {
  6150. "name": "limit",
  6151. "in": "query",
  6152. "schema": {
  6153. "type": "integer",
  6154. "minimum": 0,
  6155. "maximum": 9007199254740991
  6156. },
  6157. "required": false
  6158. },
  6159. {
  6160. "name": "before",
  6161. "in": "query",
  6162. "schema": {
  6163. "type": "string"
  6164. },
  6165. "required": false
  6166. }
  6167. ],
  6168. "responses": {
  6169. "200": {
  6170. "description": "List of messages",
  6171. "content": {
  6172. "application/json": {
  6173. "schema": {
  6174. "type": "array",
  6175. "items": {
  6176. "type": "object",
  6177. "properties": {
  6178. "info": {
  6179. "$ref": "#/components/schemas/Message"
  6180. },
  6181. "parts": {
  6182. "type": "array",
  6183. "items": {
  6184. "$ref": "#/components/schemas/Part"
  6185. }
  6186. }
  6187. },
  6188. "required": ["info", "parts"],
  6189. "additionalProperties": false
  6190. },
  6191. "description": "List of messages"
  6192. }
  6193. }
  6194. }
  6195. },
  6196. "400": {
  6197. "description": "BadRequest | InvalidRequestError",
  6198. "content": {
  6199. "application/json": {
  6200. "schema": {
  6201. "anyOf": [
  6202. {
  6203. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6204. },
  6205. {
  6206. "$ref": "#/components/schemas/InvalidRequestError"
  6207. }
  6208. ]
  6209. }
  6210. }
  6211. }
  6212. },
  6213. "404": {
  6214. "description": "NotFoundError",
  6215. "content": {
  6216. "application/json": {
  6217. "schema": {
  6218. "$ref": "#/components/schemas/NotFoundError"
  6219. }
  6220. }
  6221. }
  6222. }
  6223. },
  6224. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6225. "summary": "Get session messages",
  6226. "x-codeSamples": [
  6227. {
  6228. "lang": "js",
  6229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6230. }
  6231. ]
  6232. },
  6233. "post": {
  6234. "tags": ["session"],
  6235. "operationId": "session.prompt",
  6236. "parameters": [
  6237. {
  6238. "name": "sessionID",
  6239. "in": "path",
  6240. "schema": {
  6241. "type": "string",
  6242. "pattern": "^ses"
  6243. },
  6244. "required": true
  6245. },
  6246. {
  6247. "name": "directory",
  6248. "in": "query",
  6249. "schema": {
  6250. "type": "string"
  6251. },
  6252. "required": false
  6253. },
  6254. {
  6255. "name": "workspace",
  6256. "in": "query",
  6257. "schema": {
  6258. "type": "string"
  6259. },
  6260. "required": false
  6261. }
  6262. ],
  6263. "responses": {
  6264. "200": {
  6265. "description": "Created message",
  6266. "content": {
  6267. "application/json": {
  6268. "schema": {
  6269. "type": "object",
  6270. "required": ["info", "parts"],
  6271. "properties": {
  6272. "info": {
  6273. "$ref": "#/components/schemas/AssistantMessage"
  6274. },
  6275. "parts": {
  6276. "type": "array",
  6277. "items": {
  6278. "$ref": "#/components/schemas/Part"
  6279. }
  6280. }
  6281. }
  6282. }
  6283. }
  6284. }
  6285. },
  6286. "400": {
  6287. "description": "BadRequest | InvalidRequestError",
  6288. "content": {
  6289. "application/json": {
  6290. "schema": {
  6291. "anyOf": [
  6292. {
  6293. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6294. },
  6295. {
  6296. "$ref": "#/components/schemas/InvalidRequestError"
  6297. }
  6298. ]
  6299. }
  6300. }
  6301. }
  6302. },
  6303. "404": {
  6304. "description": "NotFoundError",
  6305. "content": {
  6306. "application/json": {
  6307. "schema": {
  6308. "$ref": "#/components/schemas/NotFoundError"
  6309. }
  6310. }
  6311. }
  6312. }
  6313. },
  6314. "description": "Create and send a new message to a session, streaming the AI response.",
  6315. "summary": "Send message",
  6316. "requestBody": {
  6317. "content": {
  6318. "application/json": {
  6319. "schema": {
  6320. "type": "object",
  6321. "properties": {
  6322. "messageID": {
  6323. "type": "string",
  6324. "pattern": "^msg"
  6325. },
  6326. "model": {
  6327. "type": "object",
  6328. "properties": {
  6329. "providerID": {
  6330. "type": "string"
  6331. },
  6332. "modelID": {
  6333. "type": "string"
  6334. }
  6335. },
  6336. "required": ["providerID", "modelID"],
  6337. "additionalProperties": false
  6338. },
  6339. "agent": {
  6340. "type": "string"
  6341. },
  6342. "noReply": {
  6343. "type": "boolean"
  6344. },
  6345. "tools": {
  6346. "type": "object",
  6347. "additionalProperties": {
  6348. "type": "boolean"
  6349. }
  6350. },
  6351. "format": {
  6352. "$ref": "#/components/schemas/OutputFormat"
  6353. },
  6354. "system": {
  6355. "type": "string"
  6356. },
  6357. "variant": {
  6358. "type": "string"
  6359. },
  6360. "parts": {
  6361. "type": "array",
  6362. "items": {
  6363. "anyOf": [
  6364. {
  6365. "$ref": "#/components/schemas/TextPartInput"
  6366. },
  6367. {
  6368. "$ref": "#/components/schemas/FilePartInput"
  6369. },
  6370. {
  6371. "$ref": "#/components/schemas/AgentPartInput"
  6372. },
  6373. {
  6374. "$ref": "#/components/schemas/SubtaskPartInput"
  6375. }
  6376. ]
  6377. }
  6378. }
  6379. },
  6380. "required": ["parts"],
  6381. "additionalProperties": false
  6382. }
  6383. }
  6384. }
  6385. },
  6386. "x-codeSamples": [
  6387. {
  6388. "lang": "js",
  6389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6390. }
  6391. ]
  6392. }
  6393. },
  6394. "/session/{sessionID}/message/{messageID}": {
  6395. "get": {
  6396. "tags": ["session"],
  6397. "operationId": "session.message",
  6398. "parameters": [
  6399. {
  6400. "name": "sessionID",
  6401. "in": "path",
  6402. "schema": {
  6403. "type": "string",
  6404. "pattern": "^ses"
  6405. },
  6406. "required": true
  6407. },
  6408. {
  6409. "name": "messageID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^msg"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Message",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "type": "object",
  6441. "properties": {
  6442. "info": {
  6443. "$ref": "#/components/schemas/Message"
  6444. },
  6445. "parts": {
  6446. "type": "array",
  6447. "items": {
  6448. "$ref": "#/components/schemas/Part"
  6449. }
  6450. }
  6451. },
  6452. "required": ["info", "parts"],
  6453. "additionalProperties": false,
  6454. "description": "Message"
  6455. }
  6456. }
  6457. }
  6458. },
  6459. "400": {
  6460. "description": "BadRequest | InvalidRequestError",
  6461. "content": {
  6462. "application/json": {
  6463. "schema": {
  6464. "anyOf": [
  6465. {
  6466. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6467. },
  6468. {
  6469. "$ref": "#/components/schemas/InvalidRequestError"
  6470. }
  6471. ]
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "404": {
  6477. "description": "NotFoundError",
  6478. "content": {
  6479. "application/json": {
  6480. "schema": {
  6481. "$ref": "#/components/schemas/NotFoundError"
  6482. }
  6483. }
  6484. }
  6485. }
  6486. },
  6487. "description": "Retrieve a specific message from a session by its message ID.",
  6488. "summary": "Get message",
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6493. }
  6494. ]
  6495. },
  6496. "delete": {
  6497. "tags": ["session"],
  6498. "operationId": "session.deleteMessage",
  6499. "parameters": [
  6500. {
  6501. "name": "sessionID",
  6502. "in": "path",
  6503. "schema": {
  6504. "type": "string",
  6505. "pattern": "^ses"
  6506. },
  6507. "required": true
  6508. },
  6509. {
  6510. "name": "messageID",
  6511. "in": "path",
  6512. "schema": {
  6513. "type": "string",
  6514. "pattern": "^msg"
  6515. },
  6516. "required": true
  6517. },
  6518. {
  6519. "name": "directory",
  6520. "in": "query",
  6521. "schema": {
  6522. "type": "string"
  6523. },
  6524. "required": false
  6525. },
  6526. {
  6527. "name": "workspace",
  6528. "in": "query",
  6529. "schema": {
  6530. "type": "string"
  6531. },
  6532. "required": false
  6533. }
  6534. ],
  6535. "responses": {
  6536. "200": {
  6537. "description": "Successfully deleted message",
  6538. "content": {
  6539. "application/json": {
  6540. "schema": {
  6541. "type": "boolean",
  6542. "description": "Successfully deleted message"
  6543. }
  6544. }
  6545. }
  6546. },
  6547. "400": {
  6548. "description": "BadRequest | InvalidRequestError",
  6549. "content": {
  6550. "application/json": {
  6551. "schema": {
  6552. "anyOf": [
  6553. {
  6554. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6555. },
  6556. {
  6557. "$ref": "#/components/schemas/InvalidRequestError"
  6558. }
  6559. ]
  6560. }
  6561. }
  6562. }
  6563. },
  6564. "404": {
  6565. "description": "NotFoundError",
  6566. "content": {
  6567. "application/json": {
  6568. "schema": {
  6569. "$ref": "#/components/schemas/NotFoundError"
  6570. }
  6571. }
  6572. }
  6573. },
  6574. "409": {
  6575. "description": "SessionBusyError",
  6576. "content": {
  6577. "application/json": {
  6578. "schema": {
  6579. "$ref": "#/components/schemas/SessionBusyError"
  6580. }
  6581. }
  6582. }
  6583. }
  6584. },
  6585. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6586. "summary": "Delete message",
  6587. "x-codeSamples": [
  6588. {
  6589. "lang": "js",
  6590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6591. }
  6592. ]
  6593. }
  6594. },
  6595. "/session/{sessionID}/fork": {
  6596. "post": {
  6597. "tags": ["session"],
  6598. "operationId": "session.fork",
  6599. "parameters": [
  6600. {
  6601. "name": "sessionID",
  6602. "in": "path",
  6603. "schema": {
  6604. "type": "string",
  6605. "pattern": "^ses"
  6606. },
  6607. "required": true
  6608. },
  6609. {
  6610. "name": "directory",
  6611. "in": "query",
  6612. "schema": {
  6613. "type": "string"
  6614. },
  6615. "required": false
  6616. },
  6617. {
  6618. "name": "workspace",
  6619. "in": "query",
  6620. "schema": {
  6621. "type": "string"
  6622. },
  6623. "required": false
  6624. }
  6625. ],
  6626. "responses": {
  6627. "200": {
  6628. "description": "200",
  6629. "content": {
  6630. "application/json": {
  6631. "schema": {
  6632. "$ref": "#/components/schemas/Session"
  6633. }
  6634. }
  6635. }
  6636. },
  6637. "400": {
  6638. "description": "BadRequest | InvalidRequestError",
  6639. "content": {
  6640. "application/json": {
  6641. "schema": {
  6642. "anyOf": [
  6643. {
  6644. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6645. },
  6646. {
  6647. "$ref": "#/components/schemas/InvalidRequestError"
  6648. }
  6649. ]
  6650. }
  6651. }
  6652. }
  6653. },
  6654. "404": {
  6655. "description": "NotFoundError",
  6656. "content": {
  6657. "application/json": {
  6658. "schema": {
  6659. "$ref": "#/components/schemas/NotFoundError"
  6660. }
  6661. }
  6662. }
  6663. }
  6664. },
  6665. "description": "Create a new session by forking an existing session at a specific message point.",
  6666. "summary": "Fork session",
  6667. "requestBody": {
  6668. "content": {
  6669. "application/json": {
  6670. "schema": {
  6671. "type": "object",
  6672. "properties": {
  6673. "messageID": {
  6674. "type": "string",
  6675. "pattern": "^msg"
  6676. }
  6677. },
  6678. "additionalProperties": false
  6679. }
  6680. }
  6681. }
  6682. },
  6683. "x-codeSamples": [
  6684. {
  6685. "lang": "js",
  6686. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6687. }
  6688. ]
  6689. }
  6690. },
  6691. "/session/{sessionID}/abort": {
  6692. "post": {
  6693. "tags": ["session"],
  6694. "operationId": "session.abort",
  6695. "parameters": [
  6696. {
  6697. "name": "sessionID",
  6698. "in": "path",
  6699. "schema": {
  6700. "type": "string",
  6701. "pattern": "^ses"
  6702. },
  6703. "required": true
  6704. },
  6705. {
  6706. "name": "directory",
  6707. "in": "query",
  6708. "schema": {
  6709. "type": "string"
  6710. },
  6711. "required": false
  6712. },
  6713. {
  6714. "name": "workspace",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. }
  6721. ],
  6722. "responses": {
  6723. "200": {
  6724. "description": "Aborted session",
  6725. "content": {
  6726. "application/json": {
  6727. "schema": {
  6728. "type": "boolean",
  6729. "description": "Aborted session"
  6730. }
  6731. }
  6732. }
  6733. },
  6734. "400": {
  6735. "description": "BadRequest | InvalidRequestError",
  6736. "content": {
  6737. "application/json": {
  6738. "schema": {
  6739. "anyOf": [
  6740. {
  6741. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6742. },
  6743. {
  6744. "$ref": "#/components/schemas/InvalidRequestError"
  6745. }
  6746. ]
  6747. }
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6753. "summary": "Abort session",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6758. }
  6759. ]
  6760. }
  6761. },
  6762. "/session/{sessionID}/init": {
  6763. "post": {
  6764. "tags": ["session"],
  6765. "operationId": "session.init",
  6766. "parameters": [
  6767. {
  6768. "name": "sessionID",
  6769. "in": "path",
  6770. "schema": {
  6771. "type": "string",
  6772. "pattern": "^ses"
  6773. },
  6774. "required": true
  6775. },
  6776. {
  6777. "name": "directory",
  6778. "in": "query",
  6779. "schema": {
  6780. "type": "string"
  6781. },
  6782. "required": false
  6783. },
  6784. {
  6785. "name": "workspace",
  6786. "in": "query",
  6787. "schema": {
  6788. "type": "string"
  6789. },
  6790. "required": false
  6791. }
  6792. ],
  6793. "responses": {
  6794. "200": {
  6795. "description": "200",
  6796. "content": {
  6797. "application/json": {
  6798. "schema": {
  6799. "type": "boolean",
  6800. "description": "200"
  6801. }
  6802. }
  6803. }
  6804. },
  6805. "400": {
  6806. "description": "BadRequest | InvalidRequestError",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "anyOf": [
  6811. {
  6812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6813. },
  6814. {
  6815. "$ref": "#/components/schemas/InvalidRequestError"
  6816. }
  6817. ]
  6818. }
  6819. }
  6820. }
  6821. },
  6822. "404": {
  6823. "description": "NotFoundError",
  6824. "content": {
  6825. "application/json": {
  6826. "schema": {
  6827. "$ref": "#/components/schemas/NotFoundError"
  6828. }
  6829. }
  6830. }
  6831. }
  6832. },
  6833. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6834. "summary": "Initialize session",
  6835. "requestBody": {
  6836. "content": {
  6837. "application/json": {
  6838. "schema": {
  6839. "type": "object",
  6840. "properties": {
  6841. "modelID": {
  6842. "type": "string"
  6843. },
  6844. "providerID": {
  6845. "type": "string"
  6846. },
  6847. "messageID": {
  6848. "type": "string",
  6849. "pattern": "^msg"
  6850. }
  6851. },
  6852. "required": ["modelID", "providerID", "messageID"],
  6853. "additionalProperties": false
  6854. }
  6855. }
  6856. }
  6857. },
  6858. "x-codeSamples": [
  6859. {
  6860. "lang": "js",
  6861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6862. }
  6863. ]
  6864. }
  6865. },
  6866. "/session/{sessionID}/share": {
  6867. "post": {
  6868. "tags": ["session"],
  6869. "operationId": "session.share",
  6870. "parameters": [
  6871. {
  6872. "name": "sessionID",
  6873. "in": "path",
  6874. "schema": {
  6875. "type": "string",
  6876. "pattern": "^ses"
  6877. },
  6878. "required": true
  6879. },
  6880. {
  6881. "name": "directory",
  6882. "in": "query",
  6883. "schema": {
  6884. "type": "string"
  6885. },
  6886. "required": false
  6887. },
  6888. {
  6889. "name": "workspace",
  6890. "in": "query",
  6891. "schema": {
  6892. "type": "string"
  6893. },
  6894. "required": false
  6895. }
  6896. ],
  6897. "responses": {
  6898. "200": {
  6899. "description": "Successfully shared session",
  6900. "content": {
  6901. "application/json": {
  6902. "schema": {
  6903. "$ref": "#/components/schemas/Session"
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "400": {
  6909. "description": "Bad request",
  6910. "content": {
  6911. "application/json": {
  6912. "schema": {
  6913. "$ref": "#/components/schemas/BadRequestError"
  6914. }
  6915. }
  6916. }
  6917. },
  6918. "404": {
  6919. "description": "NotFoundError",
  6920. "content": {
  6921. "application/json": {
  6922. "schema": {
  6923. "$ref": "#/components/schemas/NotFoundError"
  6924. }
  6925. }
  6926. }
  6927. },
  6928. "500": {
  6929. "description": "InternalServerError",
  6930. "content": {
  6931. "application/json": {
  6932. "schema": {
  6933. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6934. }
  6935. }
  6936. }
  6937. }
  6938. },
  6939. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6940. "summary": "Share session",
  6941. "x-codeSamples": [
  6942. {
  6943. "lang": "js",
  6944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6945. }
  6946. ]
  6947. },
  6948. "delete": {
  6949. "tags": ["session"],
  6950. "operationId": "session.unshare",
  6951. "parameters": [
  6952. {
  6953. "name": "sessionID",
  6954. "in": "path",
  6955. "schema": {
  6956. "type": "string",
  6957. "pattern": "^ses"
  6958. },
  6959. "required": true
  6960. },
  6961. {
  6962. "name": "directory",
  6963. "in": "query",
  6964. "schema": {
  6965. "type": "string"
  6966. },
  6967. "required": false
  6968. },
  6969. {
  6970. "name": "workspace",
  6971. "in": "query",
  6972. "schema": {
  6973. "type": "string"
  6974. },
  6975. "required": false
  6976. }
  6977. ],
  6978. "responses": {
  6979. "200": {
  6980. "description": "Successfully unshared session",
  6981. "content": {
  6982. "application/json": {
  6983. "schema": {
  6984. "$ref": "#/components/schemas/Session"
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "400": {
  6990. "description": "Bad request",
  6991. "content": {
  6992. "application/json": {
  6993. "schema": {
  6994. "$ref": "#/components/schemas/BadRequestError"
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "404": {
  7000. "description": "NotFoundError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "$ref": "#/components/schemas/NotFoundError"
  7005. }
  7006. }
  7007. }
  7008. },
  7009. "500": {
  7010. "description": "InternalServerError",
  7011. "content": {
  7012. "application/json": {
  7013. "schema": {
  7014. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7015. }
  7016. }
  7017. }
  7018. }
  7019. },
  7020. "description": "Remove the shareable link for a session, making it private again.",
  7021. "summary": "Unshare session",
  7022. "x-codeSamples": [
  7023. {
  7024. "lang": "js",
  7025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7026. }
  7027. ]
  7028. }
  7029. },
  7030. "/session/{sessionID}/summarize": {
  7031. "post": {
  7032. "tags": ["session"],
  7033. "operationId": "session.summarize",
  7034. "parameters": [
  7035. {
  7036. "name": "sessionID",
  7037. "in": "path",
  7038. "schema": {
  7039. "type": "string",
  7040. "pattern": "^ses"
  7041. },
  7042. "required": true
  7043. },
  7044. {
  7045. "name": "directory",
  7046. "in": "query",
  7047. "schema": {
  7048. "type": "string"
  7049. },
  7050. "required": false
  7051. },
  7052. {
  7053. "name": "workspace",
  7054. "in": "query",
  7055. "schema": {
  7056. "type": "string"
  7057. },
  7058. "required": false
  7059. }
  7060. ],
  7061. "responses": {
  7062. "200": {
  7063. "description": "Summarized session",
  7064. "content": {
  7065. "application/json": {
  7066. "schema": {
  7067. "type": "boolean",
  7068. "description": "Summarized session"
  7069. }
  7070. }
  7071. }
  7072. },
  7073. "400": {
  7074. "description": "BadRequest | InvalidRequestError",
  7075. "content": {
  7076. "application/json": {
  7077. "schema": {
  7078. "anyOf": [
  7079. {
  7080. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7081. },
  7082. {
  7083. "$ref": "#/components/schemas/InvalidRequestError"
  7084. }
  7085. ]
  7086. }
  7087. }
  7088. }
  7089. },
  7090. "404": {
  7091. "description": "NotFoundError",
  7092. "content": {
  7093. "application/json": {
  7094. "schema": {
  7095. "$ref": "#/components/schemas/NotFoundError"
  7096. }
  7097. }
  7098. }
  7099. }
  7100. },
  7101. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7102. "summary": "Summarize session",
  7103. "requestBody": {
  7104. "content": {
  7105. "application/json": {
  7106. "schema": {
  7107. "type": "object",
  7108. "properties": {
  7109. "providerID": {
  7110. "type": "string"
  7111. },
  7112. "modelID": {
  7113. "type": "string"
  7114. },
  7115. "auto": {
  7116. "type": "boolean"
  7117. }
  7118. },
  7119. "required": ["providerID", "modelID"],
  7120. "additionalProperties": false
  7121. }
  7122. }
  7123. }
  7124. },
  7125. "x-codeSamples": [
  7126. {
  7127. "lang": "js",
  7128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7129. }
  7130. ]
  7131. }
  7132. },
  7133. "/session/{sessionID}/prompt_async": {
  7134. "post": {
  7135. "tags": ["session"],
  7136. "operationId": "session.prompt_async",
  7137. "parameters": [
  7138. {
  7139. "name": "sessionID",
  7140. "in": "path",
  7141. "schema": {
  7142. "type": "string",
  7143. "pattern": "^ses"
  7144. },
  7145. "required": true
  7146. },
  7147. {
  7148. "name": "directory",
  7149. "in": "query",
  7150. "schema": {
  7151. "type": "string"
  7152. },
  7153. "required": false
  7154. },
  7155. {
  7156. "name": "workspace",
  7157. "in": "query",
  7158. "schema": {
  7159. "type": "string"
  7160. },
  7161. "required": false
  7162. }
  7163. ],
  7164. "responses": {
  7165. "204": {
  7166. "description": "Prompt accepted"
  7167. },
  7168. "400": {
  7169. "description": "BadRequest | InvalidRequestError",
  7170. "content": {
  7171. "application/json": {
  7172. "schema": {
  7173. "anyOf": [
  7174. {
  7175. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7176. },
  7177. {
  7178. "$ref": "#/components/schemas/InvalidRequestError"
  7179. }
  7180. ]
  7181. }
  7182. }
  7183. }
  7184. },
  7185. "404": {
  7186. "description": "NotFoundError",
  7187. "content": {
  7188. "application/json": {
  7189. "schema": {
  7190. "$ref": "#/components/schemas/NotFoundError"
  7191. }
  7192. }
  7193. }
  7194. }
  7195. },
  7196. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7197. "summary": "Send async message",
  7198. "requestBody": {
  7199. "content": {
  7200. "application/json": {
  7201. "schema": {
  7202. "type": "object",
  7203. "properties": {
  7204. "messageID": {
  7205. "type": "string",
  7206. "pattern": "^msg"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "agent": {
  7222. "type": "string"
  7223. },
  7224. "noReply": {
  7225. "type": "boolean"
  7226. },
  7227. "tools": {
  7228. "type": "object",
  7229. "additionalProperties": {
  7230. "type": "boolean"
  7231. }
  7232. },
  7233. "format": {
  7234. "$ref": "#/components/schemas/OutputFormat"
  7235. },
  7236. "system": {
  7237. "type": "string"
  7238. },
  7239. "variant": {
  7240. "type": "string"
  7241. },
  7242. "parts": {
  7243. "type": "array",
  7244. "items": {
  7245. "anyOf": [
  7246. {
  7247. "$ref": "#/components/schemas/TextPartInput"
  7248. },
  7249. {
  7250. "$ref": "#/components/schemas/FilePartInput"
  7251. },
  7252. {
  7253. "$ref": "#/components/schemas/AgentPartInput"
  7254. },
  7255. {
  7256. "$ref": "#/components/schemas/SubtaskPartInput"
  7257. }
  7258. ]
  7259. }
  7260. }
  7261. },
  7262. "required": ["parts"],
  7263. "additionalProperties": false
  7264. }
  7265. }
  7266. }
  7267. },
  7268. "x-codeSamples": [
  7269. {
  7270. "lang": "js",
  7271. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7272. }
  7273. ]
  7274. }
  7275. },
  7276. "/session/{sessionID}/command": {
  7277. "post": {
  7278. "tags": ["session"],
  7279. "operationId": "session.command",
  7280. "parameters": [
  7281. {
  7282. "name": "sessionID",
  7283. "in": "path",
  7284. "schema": {
  7285. "type": "string",
  7286. "pattern": "^ses"
  7287. },
  7288. "required": true
  7289. },
  7290. {
  7291. "name": "directory",
  7292. "in": "query",
  7293. "schema": {
  7294. "type": "string"
  7295. },
  7296. "required": false
  7297. },
  7298. {
  7299. "name": "workspace",
  7300. "in": "query",
  7301. "schema": {
  7302. "type": "string"
  7303. },
  7304. "required": false
  7305. }
  7306. ],
  7307. "responses": {
  7308. "200": {
  7309. "description": "Created message",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "type": "object",
  7314. "required": ["info", "parts"],
  7315. "properties": {
  7316. "info": {
  7317. "$ref": "#/components/schemas/AssistantMessage"
  7318. },
  7319. "parts": {
  7320. "type": "array",
  7321. "items": {
  7322. "$ref": "#/components/schemas/Part"
  7323. }
  7324. }
  7325. }
  7326. }
  7327. }
  7328. }
  7329. },
  7330. "400": {
  7331. "description": "BadRequest | InvalidRequestError",
  7332. "content": {
  7333. "application/json": {
  7334. "schema": {
  7335. "anyOf": [
  7336. {
  7337. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7338. },
  7339. {
  7340. "$ref": "#/components/schemas/InvalidRequestError"
  7341. }
  7342. ]
  7343. }
  7344. }
  7345. }
  7346. },
  7347. "404": {
  7348. "description": "NotFoundError",
  7349. "content": {
  7350. "application/json": {
  7351. "schema": {
  7352. "$ref": "#/components/schemas/NotFoundError"
  7353. }
  7354. }
  7355. }
  7356. }
  7357. },
  7358. "description": "Send a new command to a session for execution by the AI assistant.",
  7359. "summary": "Send command",
  7360. "requestBody": {
  7361. "content": {
  7362. "application/json": {
  7363. "schema": {
  7364. "type": "object",
  7365. "properties": {
  7366. "messageID": {
  7367. "type": "string",
  7368. "pattern": "^msg"
  7369. },
  7370. "agent": {
  7371. "type": "string"
  7372. },
  7373. "model": {
  7374. "type": "string"
  7375. },
  7376. "arguments": {
  7377. "type": "string"
  7378. },
  7379. "command": {
  7380. "type": "string"
  7381. },
  7382. "variant": {
  7383. "type": "string"
  7384. },
  7385. "parts": {
  7386. "type": "array",
  7387. "items": {
  7388. "type": "object",
  7389. "properties": {
  7390. "id": {
  7391. "type": "string",
  7392. "pattern": "^prt"
  7393. },
  7394. "type": {
  7395. "type": "string",
  7396. "enum": ["file"]
  7397. },
  7398. "mime": {
  7399. "type": "string"
  7400. },
  7401. "filename": {
  7402. "type": "string"
  7403. },
  7404. "url": {
  7405. "type": "string"
  7406. },
  7407. "source": {
  7408. "$ref": "#/components/schemas/FilePartSource"
  7409. }
  7410. },
  7411. "required": ["type", "mime", "url"],
  7412. "additionalProperties": false
  7413. }
  7414. }
  7415. },
  7416. "required": ["arguments", "command"],
  7417. "additionalProperties": false
  7418. }
  7419. }
  7420. }
  7421. },
  7422. "x-codeSamples": [
  7423. {
  7424. "lang": "js",
  7425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7426. }
  7427. ]
  7428. }
  7429. },
  7430. "/session/{sessionID}/shell": {
  7431. "post": {
  7432. "tags": ["session"],
  7433. "operationId": "session.shell",
  7434. "parameters": [
  7435. {
  7436. "name": "sessionID",
  7437. "in": "path",
  7438. "schema": {
  7439. "type": "string",
  7440. "pattern": "^ses"
  7441. },
  7442. "required": true
  7443. },
  7444. {
  7445. "name": "directory",
  7446. "in": "query",
  7447. "schema": {
  7448. "type": "string"
  7449. },
  7450. "required": false
  7451. },
  7452. {
  7453. "name": "workspace",
  7454. "in": "query",
  7455. "schema": {
  7456. "type": "string"
  7457. },
  7458. "required": false
  7459. }
  7460. ],
  7461. "responses": {
  7462. "200": {
  7463. "description": "Created message",
  7464. "content": {
  7465. "application/json": {
  7466. "schema": {
  7467. "type": "object",
  7468. "properties": {
  7469. "info": {
  7470. "$ref": "#/components/schemas/Message"
  7471. },
  7472. "parts": {
  7473. "type": "array",
  7474. "items": {
  7475. "$ref": "#/components/schemas/Part"
  7476. }
  7477. }
  7478. },
  7479. "required": ["info", "parts"],
  7480. "additionalProperties": false,
  7481. "description": "Created message"
  7482. }
  7483. }
  7484. }
  7485. },
  7486. "400": {
  7487. "description": "BadRequest | InvalidRequestError",
  7488. "content": {
  7489. "application/json": {
  7490. "schema": {
  7491. "anyOf": [
  7492. {
  7493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7494. },
  7495. {
  7496. "$ref": "#/components/schemas/InvalidRequestError"
  7497. }
  7498. ]
  7499. }
  7500. }
  7501. }
  7502. },
  7503. "404": {
  7504. "description": "NotFoundError",
  7505. "content": {
  7506. "application/json": {
  7507. "schema": {
  7508. "$ref": "#/components/schemas/NotFoundError"
  7509. }
  7510. }
  7511. }
  7512. },
  7513. "409": {
  7514. "description": "SessionBusyError",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "$ref": "#/components/schemas/SessionBusyError"
  7519. }
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "description": "Execute a shell command within the session context and return the AI's response.",
  7525. "summary": "Run shell command",
  7526. "requestBody": {
  7527. "content": {
  7528. "application/json": {
  7529. "schema": {
  7530. "type": "object",
  7531. "properties": {
  7532. "messageID": {
  7533. "type": "string",
  7534. "pattern": "^msg"
  7535. },
  7536. "agent": {
  7537. "type": "string"
  7538. },
  7539. "model": {
  7540. "type": "object",
  7541. "properties": {
  7542. "providerID": {
  7543. "type": "string"
  7544. },
  7545. "modelID": {
  7546. "type": "string"
  7547. }
  7548. },
  7549. "required": ["providerID", "modelID"],
  7550. "additionalProperties": false
  7551. },
  7552. "command": {
  7553. "type": "string"
  7554. }
  7555. },
  7556. "required": ["agent", "command"],
  7557. "additionalProperties": false
  7558. }
  7559. }
  7560. }
  7561. },
  7562. "x-codeSamples": [
  7563. {
  7564. "lang": "js",
  7565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7566. }
  7567. ]
  7568. }
  7569. },
  7570. "/session/{sessionID}/revert": {
  7571. "post": {
  7572. "tags": ["session"],
  7573. "operationId": "session.revert",
  7574. "parameters": [
  7575. {
  7576. "name": "sessionID",
  7577. "in": "path",
  7578. "schema": {
  7579. "type": "string",
  7580. "pattern": "^ses"
  7581. },
  7582. "required": true
  7583. },
  7584. {
  7585. "name": "directory",
  7586. "in": "query",
  7587. "schema": {
  7588. "type": "string"
  7589. },
  7590. "required": false
  7591. },
  7592. {
  7593. "name": "workspace",
  7594. "in": "query",
  7595. "schema": {
  7596. "type": "string"
  7597. },
  7598. "required": false
  7599. }
  7600. ],
  7601. "responses": {
  7602. "200": {
  7603. "description": "Updated session",
  7604. "content": {
  7605. "application/json": {
  7606. "schema": {
  7607. "$ref": "#/components/schemas/Session"
  7608. }
  7609. }
  7610. }
  7611. },
  7612. "400": {
  7613. "description": "BadRequest | InvalidRequestError",
  7614. "content": {
  7615. "application/json": {
  7616. "schema": {
  7617. "anyOf": [
  7618. {
  7619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7620. },
  7621. {
  7622. "$ref": "#/components/schemas/InvalidRequestError"
  7623. }
  7624. ]
  7625. }
  7626. }
  7627. }
  7628. },
  7629. "404": {
  7630. "description": "NotFoundError",
  7631. "content": {
  7632. "application/json": {
  7633. "schema": {
  7634. "$ref": "#/components/schemas/NotFoundError"
  7635. }
  7636. }
  7637. }
  7638. },
  7639. "409": {
  7640. "description": "SessionBusyError",
  7641. "content": {
  7642. "application/json": {
  7643. "schema": {
  7644. "$ref": "#/components/schemas/SessionBusyError"
  7645. }
  7646. }
  7647. }
  7648. }
  7649. },
  7650. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7651. "summary": "Revert message",
  7652. "requestBody": {
  7653. "content": {
  7654. "application/json": {
  7655. "schema": {
  7656. "type": "object",
  7657. "properties": {
  7658. "messageID": {
  7659. "type": "string",
  7660. "pattern": "^msg"
  7661. },
  7662. "partID": {
  7663. "type": "string",
  7664. "pattern": "^prt"
  7665. }
  7666. },
  7667. "required": ["messageID"],
  7668. "additionalProperties": false
  7669. }
  7670. }
  7671. }
  7672. },
  7673. "x-codeSamples": [
  7674. {
  7675. "lang": "js",
  7676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7677. }
  7678. ]
  7679. }
  7680. },
  7681. "/session/{sessionID}/unrevert": {
  7682. "post": {
  7683. "tags": ["session"],
  7684. "operationId": "session.unrevert",
  7685. "parameters": [
  7686. {
  7687. "name": "sessionID",
  7688. "in": "path",
  7689. "schema": {
  7690. "type": "string",
  7691. "pattern": "^ses"
  7692. },
  7693. "required": true
  7694. },
  7695. {
  7696. "name": "directory",
  7697. "in": "query",
  7698. "schema": {
  7699. "type": "string"
  7700. },
  7701. "required": false
  7702. },
  7703. {
  7704. "name": "workspace",
  7705. "in": "query",
  7706. "schema": {
  7707. "type": "string"
  7708. },
  7709. "required": false
  7710. }
  7711. ],
  7712. "responses": {
  7713. "200": {
  7714. "description": "Updated session",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "$ref": "#/components/schemas/Session"
  7719. }
  7720. }
  7721. }
  7722. },
  7723. "400": {
  7724. "description": "BadRequest | InvalidRequestError",
  7725. "content": {
  7726. "application/json": {
  7727. "schema": {
  7728. "anyOf": [
  7729. {
  7730. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7731. },
  7732. {
  7733. "$ref": "#/components/schemas/InvalidRequestError"
  7734. }
  7735. ]
  7736. }
  7737. }
  7738. }
  7739. },
  7740. "404": {
  7741. "description": "NotFoundError",
  7742. "content": {
  7743. "application/json": {
  7744. "schema": {
  7745. "$ref": "#/components/schemas/NotFoundError"
  7746. }
  7747. }
  7748. }
  7749. },
  7750. "409": {
  7751. "description": "SessionBusyError",
  7752. "content": {
  7753. "application/json": {
  7754. "schema": {
  7755. "$ref": "#/components/schemas/SessionBusyError"
  7756. }
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "description": "Restore all previously reverted messages in a session.",
  7762. "summary": "Restore reverted messages",
  7763. "x-codeSamples": [
  7764. {
  7765. "lang": "js",
  7766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7767. }
  7768. ]
  7769. }
  7770. },
  7771. "/session/{sessionID}/permissions/{permissionID}": {
  7772. "post": {
  7773. "tags": ["session"],
  7774. "operationId": "permission.respond",
  7775. "parameters": [
  7776. {
  7777. "name": "sessionID",
  7778. "in": "path",
  7779. "schema": {
  7780. "type": "string",
  7781. "pattern": "^ses"
  7782. },
  7783. "required": true
  7784. },
  7785. {
  7786. "name": "permissionID",
  7787. "in": "path",
  7788. "schema": {
  7789. "type": "string",
  7790. "pattern": "^per"
  7791. },
  7792. "required": true
  7793. },
  7794. {
  7795. "name": "directory",
  7796. "in": "query",
  7797. "schema": {
  7798. "type": "string"
  7799. },
  7800. "required": false
  7801. },
  7802. {
  7803. "name": "workspace",
  7804. "in": "query",
  7805. "schema": {
  7806. "type": "string"
  7807. },
  7808. "required": false
  7809. }
  7810. ],
  7811. "responses": {
  7812. "200": {
  7813. "description": "Permission processed successfully",
  7814. "content": {
  7815. "application/json": {
  7816. "schema": {
  7817. "type": "boolean",
  7818. "description": "Permission processed successfully"
  7819. }
  7820. }
  7821. }
  7822. },
  7823. "400": {
  7824. "description": "BadRequest | InvalidRequestError",
  7825. "content": {
  7826. "application/json": {
  7827. "schema": {
  7828. "anyOf": [
  7829. {
  7830. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7831. },
  7832. {
  7833. "$ref": "#/components/schemas/InvalidRequestError"
  7834. }
  7835. ]
  7836. }
  7837. }
  7838. }
  7839. },
  7840. "404": {
  7841. "description": "NotFoundError | PermissionNotFoundError",
  7842. "content": {
  7843. "application/json": {
  7844. "schema": {
  7845. "anyOf": [
  7846. {
  7847. "$ref": "#/components/schemas/NotFoundError"
  7848. },
  7849. {
  7850. "$ref": "#/components/schemas/PermissionNotFoundError"
  7851. }
  7852. ]
  7853. }
  7854. }
  7855. }
  7856. }
  7857. },
  7858. "description": "Approve or deny a permission request from the AI assistant.",
  7859. "summary": "Respond to permission",
  7860. "deprecated": true,
  7861. "requestBody": {
  7862. "content": {
  7863. "application/json": {
  7864. "schema": {
  7865. "type": "object",
  7866. "properties": {
  7867. "response": {
  7868. "type": "string",
  7869. "enum": ["once", "always", "reject"]
  7870. }
  7871. },
  7872. "required": ["response"],
  7873. "additionalProperties": false
  7874. }
  7875. }
  7876. }
  7877. },
  7878. "x-codeSamples": [
  7879. {
  7880. "lang": "js",
  7881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7882. }
  7883. ]
  7884. }
  7885. },
  7886. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7887. "delete": {
  7888. "tags": ["session"],
  7889. "operationId": "part.delete",
  7890. "parameters": [
  7891. {
  7892. "name": "sessionID",
  7893. "in": "path",
  7894. "schema": {
  7895. "type": "string",
  7896. "pattern": "^ses"
  7897. },
  7898. "required": true
  7899. },
  7900. {
  7901. "name": "messageID",
  7902. "in": "path",
  7903. "schema": {
  7904. "type": "string",
  7905. "pattern": "^msg"
  7906. },
  7907. "required": true
  7908. },
  7909. {
  7910. "name": "partID",
  7911. "in": "path",
  7912. "schema": {
  7913. "type": "string",
  7914. "pattern": "^prt"
  7915. },
  7916. "required": true
  7917. },
  7918. {
  7919. "name": "directory",
  7920. "in": "query",
  7921. "schema": {
  7922. "type": "string"
  7923. },
  7924. "required": false
  7925. },
  7926. {
  7927. "name": "workspace",
  7928. "in": "query",
  7929. "schema": {
  7930. "type": "string"
  7931. },
  7932. "required": false
  7933. }
  7934. ],
  7935. "responses": {
  7936. "200": {
  7937. "description": "Successfully deleted part",
  7938. "content": {
  7939. "application/json": {
  7940. "schema": {
  7941. "type": "boolean",
  7942. "description": "Successfully deleted part"
  7943. }
  7944. }
  7945. }
  7946. },
  7947. "400": {
  7948. "description": "BadRequest | InvalidRequestError",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "anyOf": [
  7953. {
  7954. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7955. },
  7956. {
  7957. "$ref": "#/components/schemas/InvalidRequestError"
  7958. }
  7959. ]
  7960. }
  7961. }
  7962. }
  7963. },
  7964. "404": {
  7965. "description": "NotFoundError",
  7966. "content": {
  7967. "application/json": {
  7968. "schema": {
  7969. "$ref": "#/components/schemas/NotFoundError"
  7970. }
  7971. }
  7972. }
  7973. }
  7974. },
  7975. "description": "Delete a part from a message.",
  7976. "x-codeSamples": [
  7977. {
  7978. "lang": "js",
  7979. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7980. }
  7981. ]
  7982. },
  7983. "patch": {
  7984. "tags": ["session"],
  7985. "operationId": "part.update",
  7986. "parameters": [
  7987. {
  7988. "name": "sessionID",
  7989. "in": "path",
  7990. "schema": {
  7991. "type": "string",
  7992. "pattern": "^ses"
  7993. },
  7994. "required": true
  7995. },
  7996. {
  7997. "name": "messageID",
  7998. "in": "path",
  7999. "schema": {
  8000. "type": "string",
  8001. "pattern": "^msg"
  8002. },
  8003. "required": true
  8004. },
  8005. {
  8006. "name": "partID",
  8007. "in": "path",
  8008. "schema": {
  8009. "type": "string",
  8010. "pattern": "^prt"
  8011. },
  8012. "required": true
  8013. },
  8014. {
  8015. "name": "directory",
  8016. "in": "query",
  8017. "schema": {
  8018. "type": "string"
  8019. },
  8020. "required": false
  8021. },
  8022. {
  8023. "name": "workspace",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. }
  8030. ],
  8031. "responses": {
  8032. "200": {
  8033. "description": "Successfully updated part",
  8034. "content": {
  8035. "application/json": {
  8036. "schema": {
  8037. "$ref": "#/components/schemas/Part"
  8038. }
  8039. }
  8040. }
  8041. },
  8042. "400": {
  8043. "description": "BadRequest | InvalidRequestError",
  8044. "content": {
  8045. "application/json": {
  8046. "schema": {
  8047. "anyOf": [
  8048. {
  8049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8050. },
  8051. {
  8052. "$ref": "#/components/schemas/InvalidRequestError"
  8053. }
  8054. ]
  8055. }
  8056. }
  8057. }
  8058. },
  8059. "404": {
  8060. "description": "NotFoundError",
  8061. "content": {
  8062. "application/json": {
  8063. "schema": {
  8064. "$ref": "#/components/schemas/NotFoundError"
  8065. }
  8066. }
  8067. }
  8068. }
  8069. },
  8070. "description": "Update a part in a message.",
  8071. "requestBody": {
  8072. "content": {
  8073. "application/json": {
  8074. "schema": {
  8075. "$ref": "#/components/schemas/Part"
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "x-codeSamples": [
  8081. {
  8082. "lang": "js",
  8083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8084. }
  8085. ]
  8086. }
  8087. },
  8088. "/sync/start": {
  8089. "post": {
  8090. "tags": ["sync"],
  8091. "operationId": "sync.start",
  8092. "parameters": [
  8093. {
  8094. "name": "directory",
  8095. "in": "query",
  8096. "schema": {
  8097. "type": "string"
  8098. },
  8099. "required": false
  8100. },
  8101. {
  8102. "name": "workspace",
  8103. "in": "query",
  8104. "schema": {
  8105. "type": "string"
  8106. },
  8107. "required": false
  8108. }
  8109. ],
  8110. "responses": {
  8111. "200": {
  8112. "description": "Workspace sync started",
  8113. "content": {
  8114. "application/json": {
  8115. "schema": {
  8116. "type": "boolean",
  8117. "description": "Workspace sync started"
  8118. }
  8119. }
  8120. }
  8121. },
  8122. "400": {
  8123. "description": "Bad request",
  8124. "content": {
  8125. "application/json": {
  8126. "schema": {
  8127. "$ref": "#/components/schemas/BadRequestError"
  8128. }
  8129. }
  8130. }
  8131. }
  8132. },
  8133. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8134. "summary": "Start workspace sync",
  8135. "x-codeSamples": [
  8136. {
  8137. "lang": "js",
  8138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8139. }
  8140. ]
  8141. }
  8142. },
  8143. "/sync/replay": {
  8144. "post": {
  8145. "tags": ["sync"],
  8146. "operationId": "sync.replay",
  8147. "parameters": [
  8148. {
  8149. "name": "directory",
  8150. "in": "query",
  8151. "schema": {
  8152. "type": "string"
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "workspace",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "string"
  8161. },
  8162. "required": false
  8163. }
  8164. ],
  8165. "responses": {
  8166. "200": {
  8167. "description": "Replayed sync events",
  8168. "content": {
  8169. "application/json": {
  8170. "schema": {
  8171. "type": "object",
  8172. "properties": {
  8173. "sessionID": {
  8174. "type": "string"
  8175. }
  8176. },
  8177. "required": ["sessionID"],
  8178. "additionalProperties": false,
  8179. "description": "Replayed sync events"
  8180. }
  8181. }
  8182. }
  8183. },
  8184. "400": {
  8185. "description": "BadRequest | InvalidRequestError",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "anyOf": [
  8190. {
  8191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8192. },
  8193. {
  8194. "$ref": "#/components/schemas/InvalidRequestError"
  8195. }
  8196. ]
  8197. }
  8198. }
  8199. }
  8200. }
  8201. },
  8202. "description": "Validate and replay a complete sync event history.",
  8203. "summary": "Replay sync events",
  8204. "requestBody": {
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "object",
  8209. "properties": {
  8210. "directory": {
  8211. "type": "string"
  8212. },
  8213. "events": {
  8214. "type": "array",
  8215. "minItems": 1,
  8216. "items": {
  8217. "type": "object",
  8218. "properties": {
  8219. "id": {
  8220. "type": "string",
  8221. "pattern": "^evt_"
  8222. },
  8223. "aggregateID": {
  8224. "type": "string"
  8225. },
  8226. "seq": {
  8227. "type": "integer",
  8228. "minimum": 0
  8229. },
  8230. "type": {
  8231. "type": "string"
  8232. },
  8233. "data": {
  8234. "type": "object"
  8235. }
  8236. },
  8237. "required": ["id", "aggregateID", "seq", "type", "data"],
  8238. "additionalProperties": false
  8239. }
  8240. }
  8241. },
  8242. "required": ["directory", "events"],
  8243. "additionalProperties": false
  8244. }
  8245. }
  8246. }
  8247. },
  8248. "x-codeSamples": [
  8249. {
  8250. "lang": "js",
  8251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8252. }
  8253. ]
  8254. }
  8255. },
  8256. "/sync/steal": {
  8257. "post": {
  8258. "tags": ["sync"],
  8259. "operationId": "sync.steal",
  8260. "parameters": [
  8261. {
  8262. "name": "directory",
  8263. "in": "query",
  8264. "schema": {
  8265. "type": "string"
  8266. },
  8267. "required": false
  8268. },
  8269. {
  8270. "name": "workspace",
  8271. "in": "query",
  8272. "schema": {
  8273. "type": "string"
  8274. },
  8275. "required": false
  8276. }
  8277. ],
  8278. "responses": {
  8279. "200": {
  8280. "description": "Session stolen into workspace",
  8281. "content": {
  8282. "application/json": {
  8283. "schema": {
  8284. "type": "object",
  8285. "properties": {
  8286. "sessionID": {
  8287. "type": "string",
  8288. "pattern": "^ses"
  8289. }
  8290. },
  8291. "required": ["sessionID"],
  8292. "additionalProperties": false,
  8293. "description": "Session stolen into workspace"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "400": {
  8299. "description": "BadRequest | InvalidRequestError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "anyOf": [
  8304. {
  8305. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8306. },
  8307. {
  8308. "$ref": "#/components/schemas/InvalidRequestError"
  8309. }
  8310. ]
  8311. }
  8312. }
  8313. }
  8314. }
  8315. },
  8316. "description": "Update a session to belong to the current workspace through the sync event system.",
  8317. "summary": "Steal session into workspace",
  8318. "requestBody": {
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "type": "object",
  8323. "properties": {
  8324. "sessionID": {
  8325. "type": "string",
  8326. "pattern": "^ses"
  8327. }
  8328. },
  8329. "required": ["sessionID"],
  8330. "additionalProperties": false
  8331. }
  8332. }
  8333. }
  8334. },
  8335. "x-codeSamples": [
  8336. {
  8337. "lang": "js",
  8338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8339. }
  8340. ]
  8341. }
  8342. },
  8343. "/sync/history": {
  8344. "post": {
  8345. "tags": ["sync"],
  8346. "operationId": "sync.history.list",
  8347. "parameters": [
  8348. {
  8349. "name": "directory",
  8350. "in": "query",
  8351. "schema": {
  8352. "type": "string"
  8353. },
  8354. "required": false
  8355. },
  8356. {
  8357. "name": "workspace",
  8358. "in": "query",
  8359. "schema": {
  8360. "type": "string"
  8361. },
  8362. "required": false
  8363. }
  8364. ],
  8365. "responses": {
  8366. "200": {
  8367. "description": "Sync events",
  8368. "content": {
  8369. "application/json": {
  8370. "schema": {
  8371. "type": "array",
  8372. "items": {
  8373. "type": "object",
  8374. "properties": {
  8375. "id": {
  8376. "type": "string",
  8377. "pattern": "^evt_"
  8378. },
  8379. "aggregate_id": {
  8380. "type": "string"
  8381. },
  8382. "seq": {
  8383. "type": "integer",
  8384. "minimum": 0
  8385. },
  8386. "type": {
  8387. "type": "string"
  8388. },
  8389. "data": {
  8390. "type": "object"
  8391. }
  8392. },
  8393. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8394. "additionalProperties": false
  8395. },
  8396. "description": "Sync events"
  8397. }
  8398. }
  8399. }
  8400. },
  8401. "400": {
  8402. "description": "BadRequest | InvalidRequestError",
  8403. "content": {
  8404. "application/json": {
  8405. "schema": {
  8406. "anyOf": [
  8407. {
  8408. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8409. },
  8410. {
  8411. "$ref": "#/components/schemas/InvalidRequestError"
  8412. }
  8413. ]
  8414. }
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8420. "summary": "List sync events",
  8421. "requestBody": {
  8422. "content": {
  8423. "application/json": {
  8424. "schema": {
  8425. "type": "object",
  8426. "additionalProperties": {
  8427. "type": "integer",
  8428. "minimum": 0
  8429. }
  8430. }
  8431. }
  8432. }
  8433. },
  8434. "x-codeSamples": [
  8435. {
  8436. "lang": "js",
  8437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8438. }
  8439. ]
  8440. }
  8441. },
  8442. "/tui/append-prompt": {
  8443. "post": {
  8444. "tags": ["tui"],
  8445. "operationId": "tui.appendPrompt",
  8446. "parameters": [
  8447. {
  8448. "name": "directory",
  8449. "in": "query",
  8450. "schema": {
  8451. "type": "string"
  8452. },
  8453. "required": false
  8454. },
  8455. {
  8456. "name": "workspace",
  8457. "in": "query",
  8458. "schema": {
  8459. "type": "string"
  8460. },
  8461. "required": false
  8462. }
  8463. ],
  8464. "responses": {
  8465. "200": {
  8466. "description": "Prompt processed successfully",
  8467. "content": {
  8468. "application/json": {
  8469. "schema": {
  8470. "type": "boolean",
  8471. "description": "Prompt processed successfully"
  8472. }
  8473. }
  8474. }
  8475. },
  8476. "400": {
  8477. "description": "BadRequest | InvalidRequestError",
  8478. "content": {
  8479. "application/json": {
  8480. "schema": {
  8481. "anyOf": [
  8482. {
  8483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8484. },
  8485. {
  8486. "$ref": "#/components/schemas/InvalidRequestError"
  8487. }
  8488. ]
  8489. }
  8490. }
  8491. }
  8492. }
  8493. },
  8494. "description": "Append prompt to the TUI.",
  8495. "summary": "Append TUI prompt",
  8496. "requestBody": {
  8497. "content": {
  8498. "application/json": {
  8499. "schema": {
  8500. "type": "object",
  8501. "properties": {
  8502. "text": {
  8503. "type": "string"
  8504. }
  8505. },
  8506. "required": ["text"],
  8507. "additionalProperties": false
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "x-codeSamples": [
  8513. {
  8514. "lang": "js",
  8515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8516. }
  8517. ]
  8518. }
  8519. },
  8520. "/tui/open-help": {
  8521. "post": {
  8522. "tags": ["tui"],
  8523. "operationId": "tui.openHelp",
  8524. "parameters": [
  8525. {
  8526. "name": "directory",
  8527. "in": "query",
  8528. "schema": {
  8529. "type": "string"
  8530. },
  8531. "required": false
  8532. },
  8533. {
  8534. "name": "workspace",
  8535. "in": "query",
  8536. "schema": {
  8537. "type": "string"
  8538. },
  8539. "required": false
  8540. }
  8541. ],
  8542. "responses": {
  8543. "200": {
  8544. "description": "Help dialog opened successfully",
  8545. "content": {
  8546. "application/json": {
  8547. "schema": {
  8548. "type": "boolean",
  8549. "description": "Help dialog opened successfully"
  8550. }
  8551. }
  8552. }
  8553. },
  8554. "400": {
  8555. "description": "Bad request",
  8556. "content": {
  8557. "application/json": {
  8558. "schema": {
  8559. "$ref": "#/components/schemas/BadRequestError"
  8560. }
  8561. }
  8562. }
  8563. }
  8564. },
  8565. "description": "Open the help dialog in the TUI to display user assistance information.",
  8566. "summary": "Open help dialog",
  8567. "x-codeSamples": [
  8568. {
  8569. "lang": "js",
  8570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8571. }
  8572. ]
  8573. }
  8574. },
  8575. "/tui/open-sessions": {
  8576. "post": {
  8577. "tags": ["tui"],
  8578. "operationId": "tui.openSessions",
  8579. "parameters": [
  8580. {
  8581. "name": "directory",
  8582. "in": "query",
  8583. "schema": {
  8584. "type": "string"
  8585. },
  8586. "required": false
  8587. },
  8588. {
  8589. "name": "workspace",
  8590. "in": "query",
  8591. "schema": {
  8592. "type": "string"
  8593. },
  8594. "required": false
  8595. }
  8596. ],
  8597. "responses": {
  8598. "200": {
  8599. "description": "Session dialog opened successfully",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "type": "boolean",
  8604. "description": "Session dialog opened successfully"
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "400": {
  8610. "description": "Bad request",
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "$ref": "#/components/schemas/BadRequestError"
  8615. }
  8616. }
  8617. }
  8618. }
  8619. },
  8620. "description": "Open the session dialog.",
  8621. "summary": "Open sessions dialog",
  8622. "x-codeSamples": [
  8623. {
  8624. "lang": "js",
  8625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8626. }
  8627. ]
  8628. }
  8629. },
  8630. "/tui/open-themes": {
  8631. "post": {
  8632. "tags": ["tui"],
  8633. "operationId": "tui.openThemes",
  8634. "parameters": [
  8635. {
  8636. "name": "directory",
  8637. "in": "query",
  8638. "schema": {
  8639. "type": "string"
  8640. },
  8641. "required": false
  8642. },
  8643. {
  8644. "name": "workspace",
  8645. "in": "query",
  8646. "schema": {
  8647. "type": "string"
  8648. },
  8649. "required": false
  8650. }
  8651. ],
  8652. "responses": {
  8653. "200": {
  8654. "description": "Theme dialog opened successfully",
  8655. "content": {
  8656. "application/json": {
  8657. "schema": {
  8658. "type": "boolean",
  8659. "description": "Theme dialog opened successfully"
  8660. }
  8661. }
  8662. }
  8663. },
  8664. "400": {
  8665. "description": "Bad request",
  8666. "content": {
  8667. "application/json": {
  8668. "schema": {
  8669. "$ref": "#/components/schemas/BadRequestError"
  8670. }
  8671. }
  8672. }
  8673. }
  8674. },
  8675. "description": "Open the theme dialog.",
  8676. "summary": "Open themes dialog",
  8677. "x-codeSamples": [
  8678. {
  8679. "lang": "js",
  8680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8681. }
  8682. ]
  8683. }
  8684. },
  8685. "/tui/open-models": {
  8686. "post": {
  8687. "tags": ["tui"],
  8688. "operationId": "tui.openModels",
  8689. "parameters": [
  8690. {
  8691. "name": "directory",
  8692. "in": "query",
  8693. "schema": {
  8694. "type": "string"
  8695. },
  8696. "required": false
  8697. },
  8698. {
  8699. "name": "workspace",
  8700. "in": "query",
  8701. "schema": {
  8702. "type": "string"
  8703. },
  8704. "required": false
  8705. }
  8706. ],
  8707. "responses": {
  8708. "200": {
  8709. "description": "Model dialog opened successfully",
  8710. "content": {
  8711. "application/json": {
  8712. "schema": {
  8713. "type": "boolean",
  8714. "description": "Model dialog opened successfully"
  8715. }
  8716. }
  8717. }
  8718. },
  8719. "400": {
  8720. "description": "Bad request",
  8721. "content": {
  8722. "application/json": {
  8723. "schema": {
  8724. "$ref": "#/components/schemas/BadRequestError"
  8725. }
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "description": "Open the model dialog.",
  8731. "summary": "Open models dialog",
  8732. "x-codeSamples": [
  8733. {
  8734. "lang": "js",
  8735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8736. }
  8737. ]
  8738. }
  8739. },
  8740. "/tui/submit-prompt": {
  8741. "post": {
  8742. "tags": ["tui"],
  8743. "operationId": "tui.submitPrompt",
  8744. "parameters": [
  8745. {
  8746. "name": "directory",
  8747. "in": "query",
  8748. "schema": {
  8749. "type": "string"
  8750. },
  8751. "required": false
  8752. },
  8753. {
  8754. "name": "workspace",
  8755. "in": "query",
  8756. "schema": {
  8757. "type": "string"
  8758. },
  8759. "required": false
  8760. }
  8761. ],
  8762. "responses": {
  8763. "200": {
  8764. "description": "Prompt submitted successfully",
  8765. "content": {
  8766. "application/json": {
  8767. "schema": {
  8768. "type": "boolean",
  8769. "description": "Prompt submitted successfully"
  8770. }
  8771. }
  8772. }
  8773. },
  8774. "400": {
  8775. "description": "Bad request",
  8776. "content": {
  8777. "application/json": {
  8778. "schema": {
  8779. "$ref": "#/components/schemas/BadRequestError"
  8780. }
  8781. }
  8782. }
  8783. }
  8784. },
  8785. "description": "Submit the prompt.",
  8786. "summary": "Submit TUI prompt",
  8787. "x-codeSamples": [
  8788. {
  8789. "lang": "js",
  8790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8791. }
  8792. ]
  8793. }
  8794. },
  8795. "/tui/clear-prompt": {
  8796. "post": {
  8797. "tags": ["tui"],
  8798. "operationId": "tui.clearPrompt",
  8799. "parameters": [
  8800. {
  8801. "name": "directory",
  8802. "in": "query",
  8803. "schema": {
  8804. "type": "string"
  8805. },
  8806. "required": false
  8807. },
  8808. {
  8809. "name": "workspace",
  8810. "in": "query",
  8811. "schema": {
  8812. "type": "string"
  8813. },
  8814. "required": false
  8815. }
  8816. ],
  8817. "responses": {
  8818. "200": {
  8819. "description": "Prompt cleared successfully",
  8820. "content": {
  8821. "application/json": {
  8822. "schema": {
  8823. "type": "boolean",
  8824. "description": "Prompt cleared successfully"
  8825. }
  8826. }
  8827. }
  8828. },
  8829. "400": {
  8830. "description": "Bad request",
  8831. "content": {
  8832. "application/json": {
  8833. "schema": {
  8834. "$ref": "#/components/schemas/BadRequestError"
  8835. }
  8836. }
  8837. }
  8838. }
  8839. },
  8840. "description": "Clear the prompt.",
  8841. "summary": "Clear TUI prompt",
  8842. "x-codeSamples": [
  8843. {
  8844. "lang": "js",
  8845. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8846. }
  8847. ]
  8848. }
  8849. },
  8850. "/tui/execute-command": {
  8851. "post": {
  8852. "tags": ["tui"],
  8853. "operationId": "tui.executeCommand",
  8854. "parameters": [
  8855. {
  8856. "name": "directory",
  8857. "in": "query",
  8858. "schema": {
  8859. "type": "string"
  8860. },
  8861. "required": false
  8862. },
  8863. {
  8864. "name": "workspace",
  8865. "in": "query",
  8866. "schema": {
  8867. "type": "string"
  8868. },
  8869. "required": false
  8870. }
  8871. ],
  8872. "responses": {
  8873. "200": {
  8874. "description": "Command executed successfully",
  8875. "content": {
  8876. "application/json": {
  8877. "schema": {
  8878. "type": "boolean",
  8879. "description": "Command executed successfully"
  8880. }
  8881. }
  8882. }
  8883. },
  8884. "400": {
  8885. "description": "BadRequest | InvalidRequestError",
  8886. "content": {
  8887. "application/json": {
  8888. "schema": {
  8889. "anyOf": [
  8890. {
  8891. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/InvalidRequestError"
  8895. }
  8896. ]
  8897. }
  8898. }
  8899. }
  8900. }
  8901. },
  8902. "description": "Execute a TUI command.",
  8903. "summary": "Execute TUI command",
  8904. "requestBody": {
  8905. "content": {
  8906. "application/json": {
  8907. "schema": {
  8908. "type": "object",
  8909. "properties": {
  8910. "command": {
  8911. "type": "string"
  8912. }
  8913. },
  8914. "required": ["command"],
  8915. "additionalProperties": false
  8916. }
  8917. }
  8918. }
  8919. },
  8920. "x-codeSamples": [
  8921. {
  8922. "lang": "js",
  8923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8924. }
  8925. ]
  8926. }
  8927. },
  8928. "/tui/show-toast": {
  8929. "post": {
  8930. "tags": ["tui"],
  8931. "operationId": "tui.showToast",
  8932. "parameters": [
  8933. {
  8934. "name": "directory",
  8935. "in": "query",
  8936. "schema": {
  8937. "type": "string"
  8938. },
  8939. "required": false
  8940. },
  8941. {
  8942. "name": "workspace",
  8943. "in": "query",
  8944. "schema": {
  8945. "type": "string"
  8946. },
  8947. "required": false
  8948. }
  8949. ],
  8950. "responses": {
  8951. "200": {
  8952. "description": "Toast notification shown successfully",
  8953. "content": {
  8954. "application/json": {
  8955. "schema": {
  8956. "type": "boolean",
  8957. "description": "Toast notification shown successfully"
  8958. }
  8959. }
  8960. }
  8961. },
  8962. "400": {
  8963. "description": "Bad request",
  8964. "content": {
  8965. "application/json": {
  8966. "schema": {
  8967. "$ref": "#/components/schemas/BadRequestError"
  8968. }
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "description": "Show a toast notification in the TUI.",
  8974. "summary": "Show TUI toast",
  8975. "requestBody": {
  8976. "content": {
  8977. "application/json": {
  8978. "schema": {
  8979. "type": "object",
  8980. "properties": {
  8981. "title": {
  8982. "type": "string"
  8983. },
  8984. "message": {
  8985. "type": "string"
  8986. },
  8987. "variant": {
  8988. "type": "string",
  8989. "enum": ["info", "success", "warning", "error"]
  8990. },
  8991. "duration": {
  8992. "type": "integer",
  8993. "exclusiveMinimum": 0
  8994. }
  8995. },
  8996. "required": ["message", "variant"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/publish": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.publish",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Event published successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Event published successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "BadRequest | InvalidRequestError",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "anyOf": [
  9050. {
  9051. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9052. },
  9053. {
  9054. "$ref": "#/components/schemas/InvalidRequestError"
  9055. }
  9056. ]
  9057. }
  9058. }
  9059. }
  9060. }
  9061. },
  9062. "description": "Publish a TUI event.",
  9063. "summary": "Publish TUI event",
  9064. "requestBody": {
  9065. "content": {
  9066. "application/json": {
  9067. "schema": {
  9068. "anyOf": [
  9069. {
  9070. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9071. },
  9072. {
  9073. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9074. },
  9075. {
  9076. "$ref": "#/components/schemas/EventTuiToastShow"
  9077. },
  9078. {
  9079. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9080. }
  9081. ]
  9082. }
  9083. }
  9084. }
  9085. },
  9086. "x-codeSamples": [
  9087. {
  9088. "lang": "js",
  9089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9090. }
  9091. ]
  9092. }
  9093. },
  9094. "/tui/select-session": {
  9095. "post": {
  9096. "tags": ["tui"],
  9097. "operationId": "tui.selectSession",
  9098. "parameters": [
  9099. {
  9100. "name": "directory",
  9101. "in": "query",
  9102. "schema": {
  9103. "type": "string"
  9104. },
  9105. "required": false
  9106. },
  9107. {
  9108. "name": "workspace",
  9109. "in": "query",
  9110. "schema": {
  9111. "type": "string"
  9112. },
  9113. "required": false
  9114. }
  9115. ],
  9116. "responses": {
  9117. "200": {
  9118. "description": "Session selected successfully",
  9119. "content": {
  9120. "application/json": {
  9121. "schema": {
  9122. "type": "boolean",
  9123. "description": "Session selected successfully"
  9124. }
  9125. }
  9126. }
  9127. },
  9128. "400": {
  9129. "description": "BadRequest | InvalidRequestError",
  9130. "content": {
  9131. "application/json": {
  9132. "schema": {
  9133. "anyOf": [
  9134. {
  9135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9136. },
  9137. {
  9138. "$ref": "#/components/schemas/InvalidRequestError"
  9139. }
  9140. ]
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "404": {
  9146. "description": "NotFoundError",
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "$ref": "#/components/schemas/NotFoundError"
  9151. }
  9152. }
  9153. }
  9154. }
  9155. },
  9156. "description": "Navigate the TUI to display the specified session.",
  9157. "summary": "Select session",
  9158. "requestBody": {
  9159. "content": {
  9160. "application/json": {
  9161. "schema": {
  9162. "type": "object",
  9163. "properties": {
  9164. "sessionID": {
  9165. "type": "string",
  9166. "pattern": "^ses",
  9167. "description": "Session ID to navigate to"
  9168. }
  9169. },
  9170. "required": ["sessionID"],
  9171. "additionalProperties": false
  9172. }
  9173. }
  9174. }
  9175. },
  9176. "x-codeSamples": [
  9177. {
  9178. "lang": "js",
  9179. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9180. }
  9181. ]
  9182. }
  9183. },
  9184. "/tui/control/next": {
  9185. "get": {
  9186. "tags": ["tui"],
  9187. "operationId": "tui.control.next",
  9188. "parameters": [
  9189. {
  9190. "name": "directory",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. },
  9197. {
  9198. "name": "workspace",
  9199. "in": "query",
  9200. "schema": {
  9201. "type": "string"
  9202. },
  9203. "required": false
  9204. }
  9205. ],
  9206. "responses": {
  9207. "200": {
  9208. "description": "Next TUI request",
  9209. "content": {
  9210. "application/json": {
  9211. "schema": {
  9212. "type": "object",
  9213. "properties": {
  9214. "path": {
  9215. "type": "string"
  9216. },
  9217. "body": {}
  9218. },
  9219. "required": ["path", "body"],
  9220. "additionalProperties": false,
  9221. "description": "Next TUI request"
  9222. }
  9223. }
  9224. }
  9225. },
  9226. "400": {
  9227. "description": "Bad request",
  9228. "content": {
  9229. "application/json": {
  9230. "schema": {
  9231. "$ref": "#/components/schemas/BadRequestError"
  9232. }
  9233. }
  9234. }
  9235. }
  9236. },
  9237. "description": "Retrieve the next TUI request from the queue for processing.",
  9238. "summary": "Get next TUI request",
  9239. "x-codeSamples": [
  9240. {
  9241. "lang": "js",
  9242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9243. }
  9244. ]
  9245. }
  9246. },
  9247. "/tui/control/response": {
  9248. "post": {
  9249. "tags": ["tui"],
  9250. "operationId": "tui.control.response",
  9251. "parameters": [
  9252. {
  9253. "name": "directory",
  9254. "in": "query",
  9255. "schema": {
  9256. "type": "string"
  9257. },
  9258. "required": false
  9259. },
  9260. {
  9261. "name": "workspace",
  9262. "in": "query",
  9263. "schema": {
  9264. "type": "string"
  9265. },
  9266. "required": false
  9267. }
  9268. ],
  9269. "responses": {
  9270. "200": {
  9271. "description": "Response submitted successfully",
  9272. "content": {
  9273. "application/json": {
  9274. "schema": {
  9275. "type": "boolean",
  9276. "description": "Response submitted successfully"
  9277. }
  9278. }
  9279. }
  9280. },
  9281. "400": {
  9282. "description": "Bad request",
  9283. "content": {
  9284. "application/json": {
  9285. "schema": {
  9286. "$ref": "#/components/schemas/BadRequestError"
  9287. }
  9288. }
  9289. }
  9290. }
  9291. },
  9292. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9293. "summary": "Submit TUI response",
  9294. "requestBody": {
  9295. "content": {
  9296. "application/json": {
  9297. "schema": {}
  9298. }
  9299. }
  9300. },
  9301. "x-codeSamples": [
  9302. {
  9303. "lang": "js",
  9304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9305. }
  9306. ]
  9307. }
  9308. },
  9309. "/experimental/workspace/adapter": {
  9310. "get": {
  9311. "tags": ["workspace"],
  9312. "operationId": "experimental.workspace.adapter.list",
  9313. "parameters": [
  9314. {
  9315. "name": "directory",
  9316. "in": "query",
  9317. "schema": {
  9318. "type": "string"
  9319. },
  9320. "required": false
  9321. },
  9322. {
  9323. "name": "workspace",
  9324. "in": "query",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": false
  9329. }
  9330. ],
  9331. "responses": {
  9332. "200": {
  9333. "description": "Workspace adapters",
  9334. "content": {
  9335. "application/json": {
  9336. "schema": {
  9337. "type": "array",
  9338. "items": {
  9339. "type": "object",
  9340. "properties": {
  9341. "type": {
  9342. "type": "string"
  9343. },
  9344. "name": {
  9345. "type": "string"
  9346. },
  9347. "description": {
  9348. "type": "string"
  9349. }
  9350. },
  9351. "required": ["type", "name", "description"],
  9352. "additionalProperties": false
  9353. },
  9354. "description": "Workspace adapters"
  9355. }
  9356. }
  9357. }
  9358. },
  9359. "400": {
  9360. "description": "Bad request",
  9361. "content": {
  9362. "application/json": {
  9363. "schema": {
  9364. "$ref": "#/components/schemas/BadRequestError"
  9365. }
  9366. }
  9367. }
  9368. }
  9369. },
  9370. "description": "List all available workspace adapters for the current project.",
  9371. "summary": "List workspace adapters",
  9372. "x-codeSamples": [
  9373. {
  9374. "lang": "js",
  9375. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9376. }
  9377. ]
  9378. }
  9379. },
  9380. "/experimental/workspace": {
  9381. "get": {
  9382. "tags": ["workspace"],
  9383. "operationId": "experimental.workspace.list",
  9384. "parameters": [
  9385. {
  9386. "name": "directory",
  9387. "in": "query",
  9388. "schema": {
  9389. "type": "string"
  9390. },
  9391. "required": false
  9392. },
  9393. {
  9394. "name": "workspace",
  9395. "in": "query",
  9396. "schema": {
  9397. "type": "string"
  9398. },
  9399. "required": false
  9400. }
  9401. ],
  9402. "responses": {
  9403. "200": {
  9404. "description": "Workspaces",
  9405. "content": {
  9406. "application/json": {
  9407. "schema": {
  9408. "type": "array",
  9409. "items": {
  9410. "$ref": "#/components/schemas/Workspace"
  9411. },
  9412. "description": "Workspaces"
  9413. }
  9414. }
  9415. }
  9416. },
  9417. "400": {
  9418. "description": "Bad request",
  9419. "content": {
  9420. "application/json": {
  9421. "schema": {
  9422. "$ref": "#/components/schemas/BadRequestError"
  9423. }
  9424. }
  9425. }
  9426. }
  9427. },
  9428. "description": "List all workspaces.",
  9429. "summary": "List workspaces",
  9430. "x-codeSamples": [
  9431. {
  9432. "lang": "js",
  9433. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9434. }
  9435. ]
  9436. },
  9437. "post": {
  9438. "tags": ["workspace"],
  9439. "operationId": "experimental.workspace.create",
  9440. "parameters": [
  9441. {
  9442. "name": "directory",
  9443. "in": "query",
  9444. "schema": {
  9445. "type": "string"
  9446. },
  9447. "required": false
  9448. },
  9449. {
  9450. "name": "workspace",
  9451. "in": "query",
  9452. "schema": {
  9453. "type": "string"
  9454. },
  9455. "required": false
  9456. }
  9457. ],
  9458. "responses": {
  9459. "200": {
  9460. "description": "Workspace created",
  9461. "content": {
  9462. "application/json": {
  9463. "schema": {
  9464. "$ref": "#/components/schemas/Workspace"
  9465. }
  9466. }
  9467. }
  9468. },
  9469. "400": {
  9470. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9471. "content": {
  9472. "application/json": {
  9473. "schema": {
  9474. "anyOf": [
  9475. {
  9476. "$ref": "#/components/schemas/WorkspaceCreateError"
  9477. },
  9478. {
  9479. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9480. },
  9481. {
  9482. "$ref": "#/components/schemas/InvalidRequestError"
  9483. }
  9484. ]
  9485. }
  9486. }
  9487. }
  9488. }
  9489. },
  9490. "description": "Create a workspace for the current project.",
  9491. "summary": "Create workspace",
  9492. "requestBody": {
  9493. "content": {
  9494. "application/json": {
  9495. "schema": {
  9496. "type": "object",
  9497. "properties": {
  9498. "id": {
  9499. "type": "string",
  9500. "pattern": "^wrk"
  9501. },
  9502. "type": {
  9503. "type": "string"
  9504. },
  9505. "branch": {
  9506. "anyOf": [
  9507. {
  9508. "type": "string"
  9509. },
  9510. {
  9511. "type": "null"
  9512. }
  9513. ]
  9514. },
  9515. "extra": {
  9516. "anyOf": [
  9517. {},
  9518. {
  9519. "type": "null"
  9520. }
  9521. ]
  9522. }
  9523. },
  9524. "required": ["type"],
  9525. "additionalProperties": false
  9526. }
  9527. }
  9528. }
  9529. },
  9530. "x-codeSamples": [
  9531. {
  9532. "lang": "js",
  9533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9534. }
  9535. ]
  9536. }
  9537. },
  9538. "/experimental/workspace/sync-list": {
  9539. "post": {
  9540. "tags": ["workspace"],
  9541. "operationId": "experimental.workspace.syncList",
  9542. "parameters": [
  9543. {
  9544. "name": "directory",
  9545. "in": "query",
  9546. "schema": {
  9547. "type": "string"
  9548. },
  9549. "required": false
  9550. },
  9551. {
  9552. "name": "workspace",
  9553. "in": "query",
  9554. "schema": {
  9555. "type": "string"
  9556. },
  9557. "required": false
  9558. }
  9559. ],
  9560. "responses": {
  9561. "204": {
  9562. "description": "Workspace list synced"
  9563. },
  9564. "400": {
  9565. "description": "Bad request",
  9566. "content": {
  9567. "application/json": {
  9568. "schema": {
  9569. "$ref": "#/components/schemas/BadRequestError"
  9570. }
  9571. }
  9572. }
  9573. }
  9574. },
  9575. "description": "Register missing workspaces returned by workspace adapters.",
  9576. "summary": "Sync workspace list",
  9577. "x-codeSamples": [
  9578. {
  9579. "lang": "js",
  9580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9581. }
  9582. ]
  9583. }
  9584. },
  9585. "/experimental/workspace/status": {
  9586. "get": {
  9587. "tags": ["workspace"],
  9588. "operationId": "experimental.workspace.status",
  9589. "parameters": [
  9590. {
  9591. "name": "directory",
  9592. "in": "query",
  9593. "schema": {
  9594. "type": "string"
  9595. },
  9596. "required": false
  9597. },
  9598. {
  9599. "name": "workspace",
  9600. "in": "query",
  9601. "schema": {
  9602. "type": "string"
  9603. },
  9604. "required": false
  9605. }
  9606. ],
  9607. "responses": {
  9608. "200": {
  9609. "description": "Workspace status",
  9610. "content": {
  9611. "application/json": {
  9612. "schema": {
  9613. "type": "array",
  9614. "items": {
  9615. "type": "object",
  9616. "properties": {
  9617. "workspaceID": {
  9618. "type": "string",
  9619. "pattern": "^wrk"
  9620. },
  9621. "status": {
  9622. "type": "string",
  9623. "enum": ["connected", "connecting", "disconnected", "error"]
  9624. }
  9625. },
  9626. "required": ["workspaceID", "status"],
  9627. "additionalProperties": false
  9628. },
  9629. "description": "Workspace status"
  9630. }
  9631. }
  9632. }
  9633. },
  9634. "400": {
  9635. "description": "Bad request",
  9636. "content": {
  9637. "application/json": {
  9638. "schema": {
  9639. "$ref": "#/components/schemas/BadRequestError"
  9640. }
  9641. }
  9642. }
  9643. }
  9644. },
  9645. "description": "Get connection status for workspaces in the current project.",
  9646. "summary": "Workspace status",
  9647. "x-codeSamples": [
  9648. {
  9649. "lang": "js",
  9650. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9651. }
  9652. ]
  9653. }
  9654. },
  9655. "/experimental/workspace/{id}": {
  9656. "delete": {
  9657. "tags": ["workspace"],
  9658. "operationId": "experimental.workspace.remove",
  9659. "parameters": [
  9660. {
  9661. "name": "id",
  9662. "in": "path",
  9663. "schema": {
  9664. "type": "string",
  9665. "pattern": "^wrk"
  9666. },
  9667. "required": true
  9668. },
  9669. {
  9670. "name": "directory",
  9671. "in": "query",
  9672. "schema": {
  9673. "type": "string"
  9674. },
  9675. "required": false
  9676. },
  9677. {
  9678. "name": "workspace",
  9679. "in": "query",
  9680. "schema": {
  9681. "type": "string"
  9682. },
  9683. "required": false
  9684. }
  9685. ],
  9686. "responses": {
  9687. "200": {
  9688. "description": "Workspace removed",
  9689. "content": {
  9690. "application/json": {
  9691. "schema": {
  9692. "$ref": "#/components/schemas/Workspace"
  9693. }
  9694. }
  9695. }
  9696. },
  9697. "400": {
  9698. "description": "BadRequest | InvalidRequestError",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "anyOf": [
  9703. {
  9704. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9705. },
  9706. {
  9707. "$ref": "#/components/schemas/InvalidRequestError"
  9708. }
  9709. ]
  9710. }
  9711. }
  9712. }
  9713. }
  9714. },
  9715. "description": "Remove an existing workspace.",
  9716. "summary": "Remove workspace",
  9717. "x-codeSamples": [
  9718. {
  9719. "lang": "js",
  9720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9721. }
  9722. ]
  9723. }
  9724. },
  9725. "/experimental/workspace/warp": {
  9726. "post": {
  9727. "tags": ["workspace"],
  9728. "operationId": "experimental.workspace.warp",
  9729. "parameters": [
  9730. {
  9731. "name": "directory",
  9732. "in": "query",
  9733. "schema": {
  9734. "type": "string"
  9735. },
  9736. "required": false
  9737. },
  9738. {
  9739. "name": "workspace",
  9740. "in": "query",
  9741. "schema": {
  9742. "type": "string"
  9743. },
  9744. "required": false
  9745. }
  9746. ],
  9747. "responses": {
  9748. "204": {
  9749. "description": "Session warped"
  9750. },
  9751. "400": {
  9752. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9753. "content": {
  9754. "application/json": {
  9755. "schema": {
  9756. "anyOf": [
  9757. {
  9758. "$ref": "#/components/schemas/WorkspaceWarpError"
  9759. },
  9760. {
  9761. "$ref": "#/components/schemas/VcsApplyError"
  9762. },
  9763. {
  9764. "$ref": "#/components/schemas/InvalidRequestError"
  9765. }
  9766. ]
  9767. }
  9768. }
  9769. }
  9770. },
  9771. "404": {
  9772. "description": "NotFoundError",
  9773. "content": {
  9774. "application/json": {
  9775. "schema": {
  9776. "$ref": "#/components/schemas/NotFoundError"
  9777. }
  9778. }
  9779. }
  9780. }
  9781. },
  9782. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9783. "summary": "Warp session into workspace",
  9784. "requestBody": {
  9785. "content": {
  9786. "application/json": {
  9787. "schema": {
  9788. "type": "object",
  9789. "properties": {
  9790. "id": {
  9791. "anyOf": [
  9792. {
  9793. "type": "string",
  9794. "pattern": "^wrk"
  9795. },
  9796. {
  9797. "type": "null"
  9798. }
  9799. ]
  9800. },
  9801. "sessionID": {
  9802. "type": "string",
  9803. "pattern": "^ses"
  9804. },
  9805. "copyChanges": {
  9806. "type": "boolean"
  9807. }
  9808. },
  9809. "required": ["id", "sessionID"],
  9810. "additionalProperties": false
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "x-codeSamples": [
  9816. {
  9817. "lang": "js",
  9818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9819. }
  9820. ]
  9821. }
  9822. },
  9823. "/api/health": {
  9824. "get": {
  9825. "tags": ["opencode HttpApi"],
  9826. "operationId": "v2.health.get",
  9827. "parameters": [],
  9828. "security": [],
  9829. "responses": {
  9830. "200": {
  9831. "description": "Success",
  9832. "content": {
  9833. "application/json": {
  9834. "schema": {
  9835. "type": "object",
  9836. "properties": {
  9837. "healthy": {
  9838. "type": "boolean",
  9839. "enum": [true]
  9840. }
  9841. },
  9842. "required": ["healthy"],
  9843. "additionalProperties": false
  9844. }
  9845. }
  9846. }
  9847. },
  9848. "400": {
  9849. "description": "InvalidRequestError",
  9850. "content": {
  9851. "application/json": {
  9852. "schema": {
  9853. "$ref": "#/components/schemas/InvalidRequestError"
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "401": {
  9859. "description": "UnauthorizedError",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/UnauthorizedError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Check whether the API server is ready to accept requests.",
  9870. "summary": "Check server health",
  9871. "x-codeSamples": [
  9872. {
  9873. "lang": "js",
  9874. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9875. }
  9876. ]
  9877. }
  9878. },
  9879. "/api/location": {
  9880. "get": {
  9881. "tags": ["opencode HttpApi"],
  9882. "operationId": "v2.location.get",
  9883. "parameters": [
  9884. {
  9885. "name": "location",
  9886. "in": "query",
  9887. "schema": {
  9888. "type": "object",
  9889. "properties": {
  9890. "directory": {
  9891. "type": "string"
  9892. },
  9893. "workspace": {
  9894. "type": "string"
  9895. }
  9896. },
  9897. "additionalProperties": false
  9898. },
  9899. "required": false,
  9900. "style": "deepObject",
  9901. "explode": true
  9902. }
  9903. ],
  9904. "security": [],
  9905. "responses": {
  9906. "200": {
  9907. "description": "Location.Info",
  9908. "content": {
  9909. "application/json": {
  9910. "schema": {
  9911. "$ref": "#/components/schemas/LocationInfo"
  9912. }
  9913. }
  9914. }
  9915. },
  9916. "400": {
  9917. "description": "InvalidRequestError",
  9918. "content": {
  9919. "application/json": {
  9920. "schema": {
  9921. "$ref": "#/components/schemas/InvalidRequestError"
  9922. }
  9923. }
  9924. }
  9925. },
  9926. "401": {
  9927. "description": "UnauthorizedError",
  9928. "content": {
  9929. "application/json": {
  9930. "schema": {
  9931. "$ref": "#/components/schemas/UnauthorizedError"
  9932. }
  9933. }
  9934. }
  9935. }
  9936. },
  9937. "description": "Resolve the requested location or the server default location.",
  9938. "summary": "Get location",
  9939. "x-codeSamples": [
  9940. {
  9941. "lang": "js",
  9942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9943. }
  9944. ]
  9945. }
  9946. },
  9947. "/api/agent": {
  9948. "get": {
  9949. "tags": ["opencode HttpApi"],
  9950. "operationId": "v2.agent.list",
  9951. "parameters": [
  9952. {
  9953. "name": "location",
  9954. "in": "query",
  9955. "schema": {
  9956. "type": "object",
  9957. "properties": {
  9958. "directory": {
  9959. "type": "string"
  9960. },
  9961. "workspace": {
  9962. "type": "string"
  9963. }
  9964. },
  9965. "additionalProperties": false
  9966. },
  9967. "required": false,
  9968. "style": "deepObject",
  9969. "explode": true
  9970. }
  9971. ],
  9972. "security": [],
  9973. "responses": {
  9974. "200": {
  9975. "description": "Success",
  9976. "content": {
  9977. "application/json": {
  9978. "schema": {
  9979. "type": "object",
  9980. "properties": {
  9981. "location": {
  9982. "$ref": "#/components/schemas/LocationInfo"
  9983. },
  9984. "data": {
  9985. "type": "array",
  9986. "items": {
  9987. "$ref": "#/components/schemas/AgentV2Info"
  9988. }
  9989. }
  9990. },
  9991. "required": ["location", "data"],
  9992. "additionalProperties": false
  9993. }
  9994. }
  9995. }
  9996. },
  9997. "400": {
  9998. "description": "InvalidRequestError",
  9999. "content": {
  10000. "application/json": {
  10001. "schema": {
  10002. "$ref": "#/components/schemas/InvalidRequestError"
  10003. }
  10004. }
  10005. }
  10006. },
  10007. "401": {
  10008. "description": "UnauthorizedError",
  10009. "content": {
  10010. "application/json": {
  10011. "schema": {
  10012. "$ref": "#/components/schemas/UnauthorizedError"
  10013. }
  10014. }
  10015. }
  10016. }
  10017. },
  10018. "description": "Retrieve currently registered agents.",
  10019. "summary": "List agents",
  10020. "x-codeSamples": [
  10021. {
  10022. "lang": "js",
  10023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10024. }
  10025. ]
  10026. }
  10027. },
  10028. "/api/session": {
  10029. "get": {
  10030. "tags": ["sessions"],
  10031. "operationId": "v2.session.list",
  10032. "parameters": [
  10033. {
  10034. "name": "workspace",
  10035. "in": "query",
  10036. "schema": {
  10037. "type": "string",
  10038. "pattern": "^wrk"
  10039. },
  10040. "required": false
  10041. },
  10042. {
  10043. "name": "limit",
  10044. "in": "query",
  10045. "schema": {
  10046. "type": "number"
  10047. },
  10048. "required": false
  10049. },
  10050. {
  10051. "name": "order",
  10052. "in": "query",
  10053. "schema": {
  10054. "type": "string",
  10055. "enum": ["asc", "desc"]
  10056. },
  10057. "required": false
  10058. },
  10059. {
  10060. "name": "search",
  10061. "in": "query",
  10062. "schema": {
  10063. "type": "string"
  10064. },
  10065. "required": false
  10066. },
  10067. {
  10068. "name": "directory",
  10069. "in": "query",
  10070. "schema": {
  10071. "type": "string"
  10072. },
  10073. "required": false
  10074. },
  10075. {
  10076. "name": "project",
  10077. "in": "query",
  10078. "schema": {
  10079. "type": "string"
  10080. },
  10081. "required": false
  10082. },
  10083. {
  10084. "name": "subpath",
  10085. "in": "query",
  10086. "schema": {
  10087. "type": "string"
  10088. },
  10089. "required": false
  10090. },
  10091. {
  10092. "name": "cursor",
  10093. "in": "query",
  10094. "schema": {
  10095. "type": "string",
  10096. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10097. },
  10098. "required": false
  10099. }
  10100. ],
  10101. "security": [],
  10102. "responses": {
  10103. "200": {
  10104. "description": "SessionsResponse",
  10105. "content": {
  10106. "application/json": {
  10107. "schema": {
  10108. "$ref": "#/components/schemas/SessionsResponse"
  10109. }
  10110. }
  10111. }
  10112. },
  10113. "400": {
  10114. "description": "InvalidCursorError | InvalidRequestError",
  10115. "content": {
  10116. "application/json": {
  10117. "schema": {
  10118. "anyOf": [
  10119. {
  10120. "$ref": "#/components/schemas/InvalidCursorError"
  10121. },
  10122. {
  10123. "$ref": "#/components/schemas/InvalidRequestError"
  10124. },
  10125. {
  10126. "$ref": "#/components/schemas/InvalidRequestError"
  10127. }
  10128. ]
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "401": {
  10134. "description": "UnauthorizedError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/UnauthorizedError"
  10139. }
  10140. }
  10141. }
  10142. }
  10143. },
  10144. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10145. "summary": "List sessions",
  10146. "x-codeSamples": [
  10147. {
  10148. "lang": "js",
  10149. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10150. }
  10151. ]
  10152. },
  10153. "post": {
  10154. "tags": ["sessions"],
  10155. "operationId": "v2.session.create",
  10156. "parameters": [],
  10157. "security": [],
  10158. "responses": {
  10159. "200": {
  10160. "description": "Success",
  10161. "content": {
  10162. "application/json": {
  10163. "schema": {
  10164. "type": "object",
  10165. "properties": {
  10166. "data": {
  10167. "$ref": "#/components/schemas/SessionV2Info"
  10168. }
  10169. },
  10170. "required": ["data"],
  10171. "additionalProperties": false
  10172. }
  10173. }
  10174. }
  10175. },
  10176. "400": {
  10177. "description": "InvalidRequestError",
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "$ref": "#/components/schemas/InvalidRequestError"
  10182. }
  10183. }
  10184. }
  10185. },
  10186. "401": {
  10187. "description": "UnauthorizedError",
  10188. "content": {
  10189. "application/json": {
  10190. "schema": {
  10191. "$ref": "#/components/schemas/UnauthorizedError"
  10192. }
  10193. }
  10194. }
  10195. }
  10196. },
  10197. "description": "Create a session at the requested location.",
  10198. "summary": "Create session",
  10199. "requestBody": {
  10200. "content": {
  10201. "application/json": {
  10202. "schema": {
  10203. "type": "object",
  10204. "properties": {
  10205. "id": {
  10206. "type": "string",
  10207. "pattern": "^ses"
  10208. },
  10209. "agent": {
  10210. "type": "string"
  10211. },
  10212. "model": {
  10213. "type": "object",
  10214. "properties": {
  10215. "id": {
  10216. "type": "string"
  10217. },
  10218. "providerID": {
  10219. "type": "string"
  10220. },
  10221. "variant": {
  10222. "type": "string"
  10223. }
  10224. },
  10225. "required": ["id", "providerID"],
  10226. "additionalProperties": false
  10227. },
  10228. "location": {
  10229. "$ref": "#/components/schemas/LocationRef"
  10230. }
  10231. },
  10232. "additionalProperties": false
  10233. }
  10234. }
  10235. },
  10236. "required": true
  10237. },
  10238. "x-codeSamples": [
  10239. {
  10240. "lang": "js",
  10241. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10242. }
  10243. ]
  10244. }
  10245. },
  10246. "/api/session/{sessionID}": {
  10247. "get": {
  10248. "tags": ["sessions"],
  10249. "operationId": "v2.session.get",
  10250. "parameters": [
  10251. {
  10252. "name": "sessionID",
  10253. "in": "path",
  10254. "schema": {
  10255. "type": "string",
  10256. "pattern": "^ses"
  10257. },
  10258. "required": true
  10259. }
  10260. ],
  10261. "security": [],
  10262. "responses": {
  10263. "200": {
  10264. "description": "Success",
  10265. "content": {
  10266. "application/json": {
  10267. "schema": {
  10268. "type": "object",
  10269. "properties": {
  10270. "data": {
  10271. "$ref": "#/components/schemas/SessionV2Info"
  10272. }
  10273. },
  10274. "required": ["data"],
  10275. "additionalProperties": false
  10276. }
  10277. }
  10278. }
  10279. },
  10280. "400": {
  10281. "description": "InvalidRequestError",
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "$ref": "#/components/schemas/InvalidRequestError"
  10286. }
  10287. }
  10288. }
  10289. },
  10290. "401": {
  10291. "description": "UnauthorizedError",
  10292. "content": {
  10293. "application/json": {
  10294. "schema": {
  10295. "$ref": "#/components/schemas/UnauthorizedError"
  10296. }
  10297. }
  10298. }
  10299. },
  10300. "404": {
  10301. "description": "SessionNotFoundError",
  10302. "content": {
  10303. "application/json": {
  10304. "schema": {
  10305. "anyOf": [
  10306. {
  10307. "$ref": "#/components/schemas/SessionNotFoundError"
  10308. },
  10309. {
  10310. "$ref": "#/components/schemas/SessionNotFoundError"
  10311. }
  10312. ]
  10313. }
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "description": "Retrieve a session by ID.",
  10319. "summary": "Get session",
  10320. "x-codeSamples": [
  10321. {
  10322. "lang": "js",
  10323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10324. }
  10325. ]
  10326. }
  10327. },
  10328. "/api/session/{sessionID}/agent": {
  10329. "post": {
  10330. "tags": ["sessions"],
  10331. "operationId": "v2.session.switchAgent",
  10332. "parameters": [
  10333. {
  10334. "name": "sessionID",
  10335. "in": "path",
  10336. "schema": {
  10337. "type": "string",
  10338. "pattern": "^ses"
  10339. },
  10340. "required": true
  10341. }
  10342. ],
  10343. "security": [],
  10344. "responses": {
  10345. "204": {
  10346. "description": "<No Content>"
  10347. },
  10348. "400": {
  10349. "description": "InvalidRequestError",
  10350. "content": {
  10351. "application/json": {
  10352. "schema": {
  10353. "$ref": "#/components/schemas/InvalidRequestError"
  10354. }
  10355. }
  10356. }
  10357. },
  10358. "401": {
  10359. "description": "UnauthorizedError",
  10360. "content": {
  10361. "application/json": {
  10362. "schema": {
  10363. "$ref": "#/components/schemas/UnauthorizedError"
  10364. }
  10365. }
  10366. }
  10367. },
  10368. "404": {
  10369. "description": "SessionNotFoundError",
  10370. "content": {
  10371. "application/json": {
  10372. "schema": {
  10373. "anyOf": [
  10374. {
  10375. "$ref": "#/components/schemas/SessionNotFoundError"
  10376. },
  10377. {
  10378. "$ref": "#/components/schemas/SessionNotFoundError"
  10379. }
  10380. ]
  10381. }
  10382. }
  10383. }
  10384. }
  10385. },
  10386. "description": "Switch the agent used by subsequent provider turns.",
  10387. "summary": "Switch session agent",
  10388. "requestBody": {
  10389. "content": {
  10390. "application/json": {
  10391. "schema": {
  10392. "type": "object",
  10393. "properties": {
  10394. "agent": {
  10395. "type": "string"
  10396. }
  10397. },
  10398. "required": ["agent"],
  10399. "additionalProperties": false
  10400. }
  10401. }
  10402. },
  10403. "required": true
  10404. },
  10405. "x-codeSamples": [
  10406. {
  10407. "lang": "js",
  10408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10409. }
  10410. ]
  10411. }
  10412. },
  10413. "/api/session/{sessionID}/model": {
  10414. "post": {
  10415. "tags": ["sessions"],
  10416. "operationId": "v2.session.switchModel",
  10417. "parameters": [
  10418. {
  10419. "name": "sessionID",
  10420. "in": "path",
  10421. "schema": {
  10422. "type": "string",
  10423. "pattern": "^ses"
  10424. },
  10425. "required": true
  10426. }
  10427. ],
  10428. "security": [],
  10429. "responses": {
  10430. "204": {
  10431. "description": "<No Content>"
  10432. },
  10433. "400": {
  10434. "description": "InvalidRequestError",
  10435. "content": {
  10436. "application/json": {
  10437. "schema": {
  10438. "$ref": "#/components/schemas/InvalidRequestError"
  10439. }
  10440. }
  10441. }
  10442. },
  10443. "401": {
  10444. "description": "UnauthorizedError",
  10445. "content": {
  10446. "application/json": {
  10447. "schema": {
  10448. "$ref": "#/components/schemas/UnauthorizedError"
  10449. }
  10450. }
  10451. }
  10452. },
  10453. "404": {
  10454. "description": "SessionNotFoundError",
  10455. "content": {
  10456. "application/json": {
  10457. "schema": {
  10458. "anyOf": [
  10459. {
  10460. "$ref": "#/components/schemas/SessionNotFoundError"
  10461. },
  10462. {
  10463. "$ref": "#/components/schemas/SessionNotFoundError"
  10464. }
  10465. ]
  10466. }
  10467. }
  10468. }
  10469. }
  10470. },
  10471. "description": "Switch the model used by subsequent provider turns.",
  10472. "summary": "Switch session model",
  10473. "requestBody": {
  10474. "content": {
  10475. "application/json": {
  10476. "schema": {
  10477. "type": "object",
  10478. "properties": {
  10479. "model": {
  10480. "type": "object",
  10481. "properties": {
  10482. "id": {
  10483. "type": "string"
  10484. },
  10485. "providerID": {
  10486. "type": "string"
  10487. },
  10488. "variant": {
  10489. "type": "string"
  10490. }
  10491. },
  10492. "required": ["id", "providerID"],
  10493. "additionalProperties": false
  10494. }
  10495. },
  10496. "required": ["model"],
  10497. "additionalProperties": false
  10498. }
  10499. }
  10500. },
  10501. "required": true
  10502. },
  10503. "x-codeSamples": [
  10504. {
  10505. "lang": "js",
  10506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10507. }
  10508. ]
  10509. }
  10510. },
  10511. "/api/session/{sessionID}/prompt": {
  10512. "post": {
  10513. "tags": ["sessions"],
  10514. "operationId": "v2.session.prompt",
  10515. "parameters": [
  10516. {
  10517. "name": "sessionID",
  10518. "in": "path",
  10519. "schema": {
  10520. "type": "string",
  10521. "pattern": "^ses"
  10522. },
  10523. "required": true
  10524. }
  10525. ],
  10526. "security": [],
  10527. "responses": {
  10528. "200": {
  10529. "description": "Success",
  10530. "content": {
  10531. "application/json": {
  10532. "schema": {
  10533. "type": "object",
  10534. "properties": {
  10535. "data": {
  10536. "$ref": "#/components/schemas/SessionInputAdmitted"
  10537. }
  10538. },
  10539. "required": ["data"],
  10540. "additionalProperties": false
  10541. }
  10542. }
  10543. }
  10544. },
  10545. "400": {
  10546. "description": "InvalidRequestError",
  10547. "content": {
  10548. "application/json": {
  10549. "schema": {
  10550. "$ref": "#/components/schemas/InvalidRequestError"
  10551. }
  10552. }
  10553. }
  10554. },
  10555. "401": {
  10556. "description": "UnauthorizedError",
  10557. "content": {
  10558. "application/json": {
  10559. "schema": {
  10560. "$ref": "#/components/schemas/UnauthorizedError"
  10561. }
  10562. }
  10563. }
  10564. },
  10565. "404": {
  10566. "description": "SessionNotFoundError",
  10567. "content": {
  10568. "application/json": {
  10569. "schema": {
  10570. "anyOf": [
  10571. {
  10572. "$ref": "#/components/schemas/SessionNotFoundError"
  10573. },
  10574. {
  10575. "$ref": "#/components/schemas/SessionNotFoundError"
  10576. }
  10577. ]
  10578. }
  10579. }
  10580. }
  10581. },
  10582. "409": {
  10583. "description": "ConflictError",
  10584. "content": {
  10585. "application/json": {
  10586. "schema": {
  10587. "$ref": "#/components/schemas/ConflictError"
  10588. }
  10589. }
  10590. }
  10591. }
  10592. },
  10593. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10594. "summary": "Send message",
  10595. "requestBody": {
  10596. "content": {
  10597. "application/json": {
  10598. "schema": {
  10599. "type": "object",
  10600. "properties": {
  10601. "id": {
  10602. "type": "string",
  10603. "pattern": "^msg_"
  10604. },
  10605. "prompt": {
  10606. "$ref": "#/components/schemas/Prompt"
  10607. },
  10608. "delivery": {
  10609. "type": "string",
  10610. "enum": ["steer", "queue"]
  10611. },
  10612. "resume": {
  10613. "type": "boolean"
  10614. }
  10615. },
  10616. "required": ["prompt"],
  10617. "additionalProperties": false
  10618. }
  10619. }
  10620. },
  10621. "required": true
  10622. },
  10623. "x-codeSamples": [
  10624. {
  10625. "lang": "js",
  10626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10627. }
  10628. ]
  10629. }
  10630. },
  10631. "/api/session/{sessionID}/compact": {
  10632. "post": {
  10633. "tags": ["sessions"],
  10634. "operationId": "v2.session.compact",
  10635. "parameters": [
  10636. {
  10637. "name": "sessionID",
  10638. "in": "path",
  10639. "schema": {
  10640. "type": "string",
  10641. "pattern": "^ses"
  10642. },
  10643. "required": true
  10644. }
  10645. ],
  10646. "security": [],
  10647. "responses": {
  10648. "204": {
  10649. "description": "<No Content>"
  10650. },
  10651. "400": {
  10652. "description": "InvalidRequestError",
  10653. "content": {
  10654. "application/json": {
  10655. "schema": {
  10656. "$ref": "#/components/schemas/InvalidRequestError"
  10657. }
  10658. }
  10659. }
  10660. },
  10661. "401": {
  10662. "description": "UnauthorizedError",
  10663. "content": {
  10664. "application/json": {
  10665. "schema": {
  10666. "$ref": "#/components/schemas/UnauthorizedError"
  10667. }
  10668. }
  10669. }
  10670. },
  10671. "404": {
  10672. "description": "SessionNotFoundError",
  10673. "content": {
  10674. "application/json": {
  10675. "schema": {
  10676. "anyOf": [
  10677. {
  10678. "$ref": "#/components/schemas/SessionNotFoundError"
  10679. },
  10680. {
  10681. "$ref": "#/components/schemas/SessionNotFoundError"
  10682. }
  10683. ]
  10684. }
  10685. }
  10686. }
  10687. },
  10688. "503": {
  10689. "description": "ServiceUnavailableError",
  10690. "content": {
  10691. "application/json": {
  10692. "schema": {
  10693. "$ref": "#/components/schemas/ServiceUnavailableError"
  10694. }
  10695. }
  10696. }
  10697. }
  10698. },
  10699. "description": "Compact a session conversation.",
  10700. "summary": "Compact session",
  10701. "x-codeSamples": [
  10702. {
  10703. "lang": "js",
  10704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10705. }
  10706. ]
  10707. }
  10708. },
  10709. "/api/session/{sessionID}/wait": {
  10710. "post": {
  10711. "tags": ["sessions"],
  10712. "operationId": "v2.session.wait",
  10713. "parameters": [
  10714. {
  10715. "name": "sessionID",
  10716. "in": "path",
  10717. "schema": {
  10718. "type": "string",
  10719. "pattern": "^ses"
  10720. },
  10721. "required": true
  10722. }
  10723. ],
  10724. "security": [],
  10725. "responses": {
  10726. "204": {
  10727. "description": "<No Content>"
  10728. },
  10729. "400": {
  10730. "description": "InvalidRequestError",
  10731. "content": {
  10732. "application/json": {
  10733. "schema": {
  10734. "$ref": "#/components/schemas/InvalidRequestError"
  10735. }
  10736. }
  10737. }
  10738. },
  10739. "401": {
  10740. "description": "UnauthorizedError",
  10741. "content": {
  10742. "application/json": {
  10743. "schema": {
  10744. "$ref": "#/components/schemas/UnauthorizedError"
  10745. }
  10746. }
  10747. }
  10748. },
  10749. "404": {
  10750. "description": "SessionNotFoundError",
  10751. "content": {
  10752. "application/json": {
  10753. "schema": {
  10754. "anyOf": [
  10755. {
  10756. "$ref": "#/components/schemas/SessionNotFoundError"
  10757. },
  10758. {
  10759. "$ref": "#/components/schemas/SessionNotFoundError"
  10760. }
  10761. ]
  10762. }
  10763. }
  10764. }
  10765. },
  10766. "503": {
  10767. "description": "ServiceUnavailableError",
  10768. "content": {
  10769. "application/json": {
  10770. "schema": {
  10771. "$ref": "#/components/schemas/ServiceUnavailableError"
  10772. }
  10773. }
  10774. }
  10775. }
  10776. },
  10777. "description": "Wait for a session agent loop to become idle.",
  10778. "summary": "Wait for session",
  10779. "x-codeSamples": [
  10780. {
  10781. "lang": "js",
  10782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10783. }
  10784. ]
  10785. }
  10786. },
  10787. "/api/session/{sessionID}/revert/stage": {
  10788. "post": {
  10789. "tags": ["sessions"],
  10790. "operationId": "v2.session.revert.stage",
  10791. "parameters": [
  10792. {
  10793. "name": "sessionID",
  10794. "in": "path",
  10795. "schema": {
  10796. "type": "string",
  10797. "pattern": "^ses"
  10798. },
  10799. "required": true
  10800. }
  10801. ],
  10802. "security": [],
  10803. "responses": {
  10804. "200": {
  10805. "description": "Success",
  10806. "content": {
  10807. "application/json": {
  10808. "schema": {
  10809. "type": "object",
  10810. "properties": {
  10811. "data": {
  10812. "type": "object",
  10813. "properties": {
  10814. "messageID": {
  10815. "type": "string",
  10816. "pattern": "^msg_"
  10817. },
  10818. "partID": {
  10819. "type": "string"
  10820. },
  10821. "snapshot": {
  10822. "type": "string"
  10823. },
  10824. "diff": {
  10825. "type": "string"
  10826. },
  10827. "files": {
  10828. "type": "array",
  10829. "items": {
  10830. "$ref": "#/components/schemas/FileDiff"
  10831. }
  10832. }
  10833. },
  10834. "required": ["messageID"],
  10835. "additionalProperties": false
  10836. }
  10837. },
  10838. "required": ["data"],
  10839. "additionalProperties": false
  10840. }
  10841. }
  10842. }
  10843. },
  10844. "400": {
  10845. "description": "InvalidRequestError",
  10846. "content": {
  10847. "application/json": {
  10848. "schema": {
  10849. "$ref": "#/components/schemas/InvalidRequestError"
  10850. }
  10851. }
  10852. }
  10853. },
  10854. "401": {
  10855. "description": "UnauthorizedError",
  10856. "content": {
  10857. "application/json": {
  10858. "schema": {
  10859. "$ref": "#/components/schemas/UnauthorizedError"
  10860. }
  10861. }
  10862. }
  10863. },
  10864. "404": {
  10865. "description": "MessageNotFoundError | SessionNotFoundError",
  10866. "content": {
  10867. "application/json": {
  10868. "schema": {
  10869. "anyOf": [
  10870. {
  10871. "$ref": "#/components/schemas/MessageNotFoundError"
  10872. },
  10873. {
  10874. "$ref": "#/components/schemas/SessionNotFoundError"
  10875. },
  10876. {
  10877. "$ref": "#/components/schemas/SessionNotFoundError"
  10878. }
  10879. ]
  10880. }
  10881. }
  10882. }
  10883. },
  10884. "500": {
  10885. "description": "UnknownError",
  10886. "content": {
  10887. "application/json": {
  10888. "schema": {
  10889. "$ref": "#/components/schemas/UnknownError1"
  10890. }
  10891. }
  10892. }
  10893. }
  10894. },
  10895. "description": "Stage or move a reversible session boundary and optionally apply its file changes.",
  10896. "summary": "Stage session revert",
  10897. "requestBody": {
  10898. "content": {
  10899. "application/json": {
  10900. "schema": {
  10901. "type": "object",
  10902. "properties": {
  10903. "messageID": {
  10904. "type": "string",
  10905. "pattern": "^msg_"
  10906. },
  10907. "files": {
  10908. "type": "boolean"
  10909. }
  10910. },
  10911. "required": ["messageID"],
  10912. "additionalProperties": false
  10913. }
  10914. }
  10915. },
  10916. "required": true
  10917. },
  10918. "x-codeSamples": [
  10919. {
  10920. "lang": "js",
  10921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.stage({\n ...\n})"
  10922. }
  10923. ]
  10924. }
  10925. },
  10926. "/api/session/{sessionID}/revert/clear": {
  10927. "post": {
  10928. "tags": ["sessions"],
  10929. "operationId": "v2.session.revert.clear",
  10930. "parameters": [
  10931. {
  10932. "name": "sessionID",
  10933. "in": "path",
  10934. "schema": {
  10935. "type": "string",
  10936. "pattern": "^ses"
  10937. },
  10938. "required": true
  10939. }
  10940. ],
  10941. "security": [],
  10942. "responses": {
  10943. "204": {
  10944. "description": "<No Content>"
  10945. },
  10946. "400": {
  10947. "description": "InvalidRequestError",
  10948. "content": {
  10949. "application/json": {
  10950. "schema": {
  10951. "$ref": "#/components/schemas/InvalidRequestError"
  10952. }
  10953. }
  10954. }
  10955. },
  10956. "401": {
  10957. "description": "UnauthorizedError",
  10958. "content": {
  10959. "application/json": {
  10960. "schema": {
  10961. "$ref": "#/components/schemas/UnauthorizedError"
  10962. }
  10963. }
  10964. }
  10965. },
  10966. "404": {
  10967. "description": "SessionNotFoundError",
  10968. "content": {
  10969. "application/json": {
  10970. "schema": {
  10971. "anyOf": [
  10972. {
  10973. "$ref": "#/components/schemas/SessionNotFoundError"
  10974. },
  10975. {
  10976. "$ref": "#/components/schemas/SessionNotFoundError"
  10977. }
  10978. ]
  10979. }
  10980. }
  10981. }
  10982. },
  10983. "500": {
  10984. "description": "UnknownError",
  10985. "content": {
  10986. "application/json": {
  10987. "schema": {
  10988. "$ref": "#/components/schemas/UnknownError1"
  10989. }
  10990. }
  10991. }
  10992. }
  10993. },
  10994. "summary": "Clear staged revert",
  10995. "x-codeSamples": [
  10996. {
  10997. "lang": "js",
  10998. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.clear({\n ...\n})"
  10999. }
  11000. ]
  11001. }
  11002. },
  11003. "/api/session/{sessionID}/revert/commit": {
  11004. "post": {
  11005. "tags": ["sessions"],
  11006. "operationId": "v2.session.revert.commit",
  11007. "parameters": [
  11008. {
  11009. "name": "sessionID",
  11010. "in": "path",
  11011. "schema": {
  11012. "type": "string",
  11013. "pattern": "^ses"
  11014. },
  11015. "required": true
  11016. }
  11017. ],
  11018. "security": [],
  11019. "responses": {
  11020. "204": {
  11021. "description": "<No Content>"
  11022. },
  11023. "400": {
  11024. "description": "InvalidRequestError",
  11025. "content": {
  11026. "application/json": {
  11027. "schema": {
  11028. "$ref": "#/components/schemas/InvalidRequestError"
  11029. }
  11030. }
  11031. }
  11032. },
  11033. "401": {
  11034. "description": "UnauthorizedError",
  11035. "content": {
  11036. "application/json": {
  11037. "schema": {
  11038. "$ref": "#/components/schemas/UnauthorizedError"
  11039. }
  11040. }
  11041. }
  11042. },
  11043. "404": {
  11044. "description": "SessionNotFoundError",
  11045. "content": {
  11046. "application/json": {
  11047. "schema": {
  11048. "anyOf": [
  11049. {
  11050. "$ref": "#/components/schemas/SessionNotFoundError"
  11051. },
  11052. {
  11053. "$ref": "#/components/schemas/SessionNotFoundError"
  11054. }
  11055. ]
  11056. }
  11057. }
  11058. }
  11059. }
  11060. },
  11061. "summary": "Commit staged revert",
  11062. "x-codeSamples": [
  11063. {
  11064. "lang": "js",
  11065. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.commit({\n ...\n})"
  11066. }
  11067. ]
  11068. }
  11069. },
  11070. "/api/session/{sessionID}/context": {
  11071. "get": {
  11072. "tags": ["sessions"],
  11073. "operationId": "v2.session.context",
  11074. "parameters": [
  11075. {
  11076. "name": "sessionID",
  11077. "in": "path",
  11078. "schema": {
  11079. "type": "string",
  11080. "pattern": "^ses"
  11081. },
  11082. "required": true
  11083. }
  11084. ],
  11085. "security": [],
  11086. "responses": {
  11087. "200": {
  11088. "description": "Success",
  11089. "content": {
  11090. "application/json": {
  11091. "schema": {
  11092. "type": "object",
  11093. "properties": {
  11094. "data": {
  11095. "type": "array",
  11096. "items": {
  11097. "$ref": "#/components/schemas/SessionMessage"
  11098. }
  11099. }
  11100. },
  11101. "required": ["data"],
  11102. "additionalProperties": false
  11103. }
  11104. }
  11105. }
  11106. },
  11107. "400": {
  11108. "description": "InvalidRequestError",
  11109. "content": {
  11110. "application/json": {
  11111. "schema": {
  11112. "$ref": "#/components/schemas/InvalidRequestError"
  11113. }
  11114. }
  11115. }
  11116. },
  11117. "401": {
  11118. "description": "UnauthorizedError",
  11119. "content": {
  11120. "application/json": {
  11121. "schema": {
  11122. "$ref": "#/components/schemas/UnauthorizedError"
  11123. }
  11124. }
  11125. }
  11126. },
  11127. "404": {
  11128. "description": "SessionNotFoundError",
  11129. "content": {
  11130. "application/json": {
  11131. "schema": {
  11132. "anyOf": [
  11133. {
  11134. "$ref": "#/components/schemas/SessionNotFoundError"
  11135. },
  11136. {
  11137. "$ref": "#/components/schemas/SessionNotFoundError"
  11138. }
  11139. ]
  11140. }
  11141. }
  11142. }
  11143. },
  11144. "500": {
  11145. "description": "UnknownError",
  11146. "content": {
  11147. "application/json": {
  11148. "schema": {
  11149. "$ref": "#/components/schemas/UnknownError1"
  11150. }
  11151. }
  11152. }
  11153. }
  11154. },
  11155. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  11156. "summary": "Get session context",
  11157. "x-codeSamples": [
  11158. {
  11159. "lang": "js",
  11160. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  11161. }
  11162. ]
  11163. }
  11164. },
  11165. "/api/session/{sessionID}/message": {
  11166. "get": {
  11167. "tags": ["messages"],
  11168. "operationId": "v2.session.messages",
  11169. "parameters": [
  11170. {
  11171. "name": "sessionID",
  11172. "in": "path",
  11173. "schema": {
  11174. "type": "string",
  11175. "pattern": "^ses"
  11176. },
  11177. "required": true
  11178. },
  11179. {
  11180. "name": "limit",
  11181. "in": "query",
  11182. "schema": {
  11183. "type": "number"
  11184. },
  11185. "required": false
  11186. },
  11187. {
  11188. "name": "order",
  11189. "in": "query",
  11190. "schema": {
  11191. "type": "string",
  11192. "enum": ["asc", "desc"]
  11193. },
  11194. "required": false
  11195. },
  11196. {
  11197. "name": "cursor",
  11198. "in": "query",
  11199. "schema": {
  11200. "type": "string",
  11201. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  11202. },
  11203. "required": false
  11204. }
  11205. ],
  11206. "security": [],
  11207. "responses": {
  11208. "200": {
  11209. "description": "SessionMessagesResponse",
  11210. "content": {
  11211. "application/json": {
  11212. "schema": {
  11213. "$ref": "#/components/schemas/SessionMessagesResponse"
  11214. }
  11215. }
  11216. }
  11217. },
  11218. "400": {
  11219. "description": "InvalidCursorError | InvalidRequestError",
  11220. "content": {
  11221. "application/json": {
  11222. "schema": {
  11223. "anyOf": [
  11224. {
  11225. "$ref": "#/components/schemas/InvalidCursorError"
  11226. },
  11227. {
  11228. "$ref": "#/components/schemas/InvalidRequestError"
  11229. }
  11230. ]
  11231. }
  11232. }
  11233. }
  11234. },
  11235. "401": {
  11236. "description": "UnauthorizedError",
  11237. "content": {
  11238. "application/json": {
  11239. "schema": {
  11240. "$ref": "#/components/schemas/UnauthorizedError"
  11241. }
  11242. }
  11243. }
  11244. },
  11245. "404": {
  11246. "description": "SessionNotFoundError",
  11247. "content": {
  11248. "application/json": {
  11249. "schema": {
  11250. "anyOf": [
  11251. {
  11252. "$ref": "#/components/schemas/SessionNotFoundError"
  11253. },
  11254. {
  11255. "$ref": "#/components/schemas/SessionNotFoundError"
  11256. }
  11257. ]
  11258. }
  11259. }
  11260. }
  11261. },
  11262. "500": {
  11263. "description": "UnknownError",
  11264. "content": {
  11265. "application/json": {
  11266. "schema": {
  11267. "$ref": "#/components/schemas/UnknownError1"
  11268. }
  11269. }
  11270. }
  11271. }
  11272. },
  11273. "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.",
  11274. "summary": "Get session messages",
  11275. "x-codeSamples": [
  11276. {
  11277. "lang": "js",
  11278. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  11279. }
  11280. ]
  11281. }
  11282. },
  11283. "/api/model": {
  11284. "get": {
  11285. "tags": ["models"],
  11286. "operationId": "v2.model.list",
  11287. "parameters": [
  11288. {
  11289. "name": "location",
  11290. "in": "query",
  11291. "schema": {
  11292. "type": "object",
  11293. "properties": {
  11294. "directory": {
  11295. "type": "string"
  11296. },
  11297. "workspace": {
  11298. "type": "string"
  11299. }
  11300. },
  11301. "additionalProperties": false
  11302. },
  11303. "required": false,
  11304. "style": "deepObject",
  11305. "explode": true
  11306. }
  11307. ],
  11308. "security": [],
  11309. "responses": {
  11310. "200": {
  11311. "description": "Success",
  11312. "content": {
  11313. "application/json": {
  11314. "schema": {
  11315. "type": "object",
  11316. "properties": {
  11317. "location": {
  11318. "$ref": "#/components/schemas/LocationInfo"
  11319. },
  11320. "data": {
  11321. "type": "array",
  11322. "items": {
  11323. "$ref": "#/components/schemas/ModelV2Info"
  11324. }
  11325. }
  11326. },
  11327. "required": ["location", "data"],
  11328. "additionalProperties": false
  11329. }
  11330. }
  11331. }
  11332. },
  11333. "400": {
  11334. "description": "InvalidRequestError",
  11335. "content": {
  11336. "application/json": {
  11337. "schema": {
  11338. "$ref": "#/components/schemas/InvalidRequestError"
  11339. }
  11340. }
  11341. }
  11342. },
  11343. "401": {
  11344. "description": "UnauthorizedError",
  11345. "content": {
  11346. "application/json": {
  11347. "schema": {
  11348. "$ref": "#/components/schemas/UnauthorizedError"
  11349. }
  11350. }
  11351. }
  11352. },
  11353. "503": {
  11354. "description": "ServiceUnavailableError",
  11355. "content": {
  11356. "application/json": {
  11357. "schema": {
  11358. "$ref": "#/components/schemas/ServiceUnavailableError"
  11359. }
  11360. }
  11361. }
  11362. }
  11363. },
  11364. "description": "Retrieve available models ordered by release date.",
  11365. "summary": "List models",
  11366. "x-codeSamples": [
  11367. {
  11368. "lang": "js",
  11369. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11370. }
  11371. ]
  11372. }
  11373. },
  11374. "/api/provider": {
  11375. "get": {
  11376. "tags": ["providers"],
  11377. "operationId": "v2.provider.list",
  11378. "parameters": [
  11379. {
  11380. "name": "location",
  11381. "in": "query",
  11382. "schema": {
  11383. "type": "object",
  11384. "properties": {
  11385. "directory": {
  11386. "type": "string"
  11387. },
  11388. "workspace": {
  11389. "type": "string"
  11390. }
  11391. },
  11392. "additionalProperties": false
  11393. },
  11394. "required": false,
  11395. "style": "deepObject",
  11396. "explode": true
  11397. }
  11398. ],
  11399. "security": [],
  11400. "responses": {
  11401. "200": {
  11402. "description": "Success",
  11403. "content": {
  11404. "application/json": {
  11405. "schema": {
  11406. "type": "object",
  11407. "properties": {
  11408. "location": {
  11409. "$ref": "#/components/schemas/LocationInfo"
  11410. },
  11411. "data": {
  11412. "type": "array",
  11413. "items": {
  11414. "$ref": "#/components/schemas/ProviderV2Info"
  11415. }
  11416. }
  11417. },
  11418. "required": ["location", "data"],
  11419. "additionalProperties": false
  11420. }
  11421. }
  11422. }
  11423. },
  11424. "400": {
  11425. "description": "InvalidRequestError",
  11426. "content": {
  11427. "application/json": {
  11428. "schema": {
  11429. "$ref": "#/components/schemas/InvalidRequestError"
  11430. }
  11431. }
  11432. }
  11433. },
  11434. "401": {
  11435. "description": "UnauthorizedError",
  11436. "content": {
  11437. "application/json": {
  11438. "schema": {
  11439. "$ref": "#/components/schemas/UnauthorizedError"
  11440. }
  11441. }
  11442. }
  11443. },
  11444. "503": {
  11445. "description": "ServiceUnavailableError",
  11446. "content": {
  11447. "application/json": {
  11448. "schema": {
  11449. "$ref": "#/components/schemas/ServiceUnavailableError"
  11450. }
  11451. }
  11452. }
  11453. }
  11454. },
  11455. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11456. "summary": "List providers",
  11457. "x-codeSamples": [
  11458. {
  11459. "lang": "js",
  11460. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11461. }
  11462. ]
  11463. }
  11464. },
  11465. "/api/provider/{providerID}": {
  11466. "get": {
  11467. "tags": ["providers"],
  11468. "operationId": "v2.provider.get",
  11469. "parameters": [
  11470. {
  11471. "name": "providerID",
  11472. "in": "path",
  11473. "schema": {
  11474. "type": "string"
  11475. },
  11476. "required": true
  11477. },
  11478. {
  11479. "name": "location",
  11480. "in": "query",
  11481. "schema": {
  11482. "type": "object",
  11483. "properties": {
  11484. "directory": {
  11485. "type": "string"
  11486. },
  11487. "workspace": {
  11488. "type": "string"
  11489. }
  11490. },
  11491. "additionalProperties": false
  11492. },
  11493. "required": false,
  11494. "style": "deepObject",
  11495. "explode": true
  11496. }
  11497. ],
  11498. "security": [],
  11499. "responses": {
  11500. "200": {
  11501. "description": "Success",
  11502. "content": {
  11503. "application/json": {
  11504. "schema": {
  11505. "type": "object",
  11506. "properties": {
  11507. "location": {
  11508. "$ref": "#/components/schemas/LocationInfo"
  11509. },
  11510. "data": {
  11511. "$ref": "#/components/schemas/ProviderV2Info"
  11512. }
  11513. },
  11514. "required": ["location", "data"],
  11515. "additionalProperties": false
  11516. }
  11517. }
  11518. }
  11519. },
  11520. "400": {
  11521. "description": "InvalidRequestError",
  11522. "content": {
  11523. "application/json": {
  11524. "schema": {
  11525. "$ref": "#/components/schemas/InvalidRequestError"
  11526. }
  11527. }
  11528. }
  11529. },
  11530. "401": {
  11531. "description": "UnauthorizedError",
  11532. "content": {
  11533. "application/json": {
  11534. "schema": {
  11535. "$ref": "#/components/schemas/UnauthorizedError"
  11536. }
  11537. }
  11538. }
  11539. },
  11540. "404": {
  11541. "description": "ProviderNotFoundError",
  11542. "content": {
  11543. "application/json": {
  11544. "schema": {
  11545. "$ref": "#/components/schemas/ProviderNotFoundError"
  11546. }
  11547. }
  11548. }
  11549. },
  11550. "503": {
  11551. "description": "ServiceUnavailableError",
  11552. "content": {
  11553. "application/json": {
  11554. "schema": {
  11555. "$ref": "#/components/schemas/ServiceUnavailableError"
  11556. }
  11557. }
  11558. }
  11559. }
  11560. },
  11561. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11562. "summary": "Get provider",
  11563. "x-codeSamples": [
  11564. {
  11565. "lang": "js",
  11566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11567. }
  11568. ]
  11569. }
  11570. },
  11571. "/api/integration": {
  11572. "get": {
  11573. "tags": ["integrations"],
  11574. "operationId": "v2.integration.list",
  11575. "parameters": [
  11576. {
  11577. "name": "location",
  11578. "in": "query",
  11579. "schema": {
  11580. "type": "object",
  11581. "properties": {
  11582. "directory": {
  11583. "type": "string"
  11584. },
  11585. "workspace": {
  11586. "type": "string"
  11587. }
  11588. },
  11589. "additionalProperties": false
  11590. },
  11591. "required": false,
  11592. "style": "deepObject",
  11593. "explode": true
  11594. }
  11595. ],
  11596. "security": [],
  11597. "responses": {
  11598. "200": {
  11599. "description": "Success",
  11600. "content": {
  11601. "application/json": {
  11602. "schema": {
  11603. "type": "object",
  11604. "properties": {
  11605. "location": {
  11606. "$ref": "#/components/schemas/LocationInfo"
  11607. },
  11608. "data": {
  11609. "type": "array",
  11610. "items": {
  11611. "$ref": "#/components/schemas/IntegrationInfo"
  11612. }
  11613. }
  11614. },
  11615. "required": ["location", "data"],
  11616. "additionalProperties": false
  11617. }
  11618. }
  11619. }
  11620. },
  11621. "400": {
  11622. "description": "InvalidRequestError",
  11623. "content": {
  11624. "application/json": {
  11625. "schema": {
  11626. "$ref": "#/components/schemas/InvalidRequestError"
  11627. }
  11628. }
  11629. }
  11630. },
  11631. "401": {
  11632. "description": "UnauthorizedError",
  11633. "content": {
  11634. "application/json": {
  11635. "schema": {
  11636. "$ref": "#/components/schemas/UnauthorizedError"
  11637. }
  11638. }
  11639. }
  11640. }
  11641. },
  11642. "description": "Retrieve available integrations and their authentication methods.",
  11643. "summary": "List integrations",
  11644. "x-codeSamples": [
  11645. {
  11646. "lang": "js",
  11647. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11648. }
  11649. ]
  11650. }
  11651. },
  11652. "/api/integration/{integrationID}": {
  11653. "get": {
  11654. "tags": ["integrations"],
  11655. "operationId": "v2.integration.get",
  11656. "parameters": [
  11657. {
  11658. "name": "integrationID",
  11659. "in": "path",
  11660. "schema": {
  11661. "type": "string"
  11662. },
  11663. "required": true
  11664. },
  11665. {
  11666. "name": "location",
  11667. "in": "query",
  11668. "schema": {
  11669. "type": "object",
  11670. "properties": {
  11671. "directory": {
  11672. "type": "string"
  11673. },
  11674. "workspace": {
  11675. "type": "string"
  11676. }
  11677. },
  11678. "additionalProperties": false
  11679. },
  11680. "required": false,
  11681. "style": "deepObject",
  11682. "explode": true
  11683. }
  11684. ],
  11685. "security": [],
  11686. "responses": {
  11687. "200": {
  11688. "description": "Success",
  11689. "content": {
  11690. "application/json": {
  11691. "schema": {
  11692. "type": "object",
  11693. "properties": {
  11694. "location": {
  11695. "$ref": "#/components/schemas/LocationInfo"
  11696. },
  11697. "data": {
  11698. "$ref": "#/components/schemas/IntegrationInfo"
  11699. }
  11700. },
  11701. "required": ["location", "data"],
  11702. "additionalProperties": false
  11703. }
  11704. }
  11705. }
  11706. },
  11707. "400": {
  11708. "description": "InvalidRequestError",
  11709. "content": {
  11710. "application/json": {
  11711. "schema": {
  11712. "$ref": "#/components/schemas/InvalidRequestError"
  11713. }
  11714. }
  11715. }
  11716. },
  11717. "401": {
  11718. "description": "UnauthorizedError",
  11719. "content": {
  11720. "application/json": {
  11721. "schema": {
  11722. "$ref": "#/components/schemas/UnauthorizedError"
  11723. }
  11724. }
  11725. }
  11726. }
  11727. },
  11728. "description": "Retrieve one integration and its authentication methods.",
  11729. "summary": "Get integration",
  11730. "x-codeSamples": [
  11731. {
  11732. "lang": "js",
  11733. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11734. }
  11735. ]
  11736. }
  11737. },
  11738. "/api/integration/{integrationID}/connect/key": {
  11739. "post": {
  11740. "tags": ["integrations"],
  11741. "operationId": "v2.integration.connect.key",
  11742. "parameters": [
  11743. {
  11744. "name": "integrationID",
  11745. "in": "path",
  11746. "schema": {
  11747. "type": "string"
  11748. },
  11749. "required": true
  11750. },
  11751. {
  11752. "name": "location",
  11753. "in": "query",
  11754. "schema": {
  11755. "type": "object",
  11756. "properties": {
  11757. "directory": {
  11758. "type": "string"
  11759. },
  11760. "workspace": {
  11761. "type": "string"
  11762. }
  11763. },
  11764. "additionalProperties": false
  11765. },
  11766. "required": false,
  11767. "style": "deepObject",
  11768. "explode": true
  11769. }
  11770. ],
  11771. "security": [],
  11772. "responses": {
  11773. "204": {
  11774. "description": "<No Content>"
  11775. },
  11776. "400": {
  11777. "description": "InvalidRequestError",
  11778. "content": {
  11779. "application/json": {
  11780. "schema": {
  11781. "anyOf": [
  11782. {
  11783. "$ref": "#/components/schemas/InvalidRequestError"
  11784. },
  11785. {
  11786. "$ref": "#/components/schemas/InvalidRequestError"
  11787. }
  11788. ]
  11789. }
  11790. }
  11791. }
  11792. },
  11793. "401": {
  11794. "description": "UnauthorizedError",
  11795. "content": {
  11796. "application/json": {
  11797. "schema": {
  11798. "$ref": "#/components/schemas/UnauthorizedError"
  11799. }
  11800. }
  11801. }
  11802. }
  11803. },
  11804. "description": "Run a key authentication method and store the resulting credential.",
  11805. "summary": "Connect with key",
  11806. "requestBody": {
  11807. "content": {
  11808. "application/json": {
  11809. "schema": {
  11810. "type": "object",
  11811. "properties": {
  11812. "key": {
  11813. "type": "string"
  11814. },
  11815. "label": {
  11816. "type": "string"
  11817. }
  11818. },
  11819. "required": ["key"],
  11820. "additionalProperties": false
  11821. }
  11822. }
  11823. },
  11824. "required": true
  11825. },
  11826. "x-codeSamples": [
  11827. {
  11828. "lang": "js",
  11829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11830. }
  11831. ]
  11832. }
  11833. },
  11834. "/api/integration/{integrationID}/connect/oauth": {
  11835. "post": {
  11836. "tags": ["integrations"],
  11837. "operationId": "v2.integration.connect.oauth",
  11838. "parameters": [
  11839. {
  11840. "name": "integrationID",
  11841. "in": "path",
  11842. "schema": {
  11843. "type": "string"
  11844. },
  11845. "required": true
  11846. },
  11847. {
  11848. "name": "location",
  11849. "in": "query",
  11850. "schema": {
  11851. "type": "object",
  11852. "properties": {
  11853. "directory": {
  11854. "type": "string"
  11855. },
  11856. "workspace": {
  11857. "type": "string"
  11858. }
  11859. },
  11860. "additionalProperties": false
  11861. },
  11862. "required": false,
  11863. "style": "deepObject",
  11864. "explode": true
  11865. }
  11866. ],
  11867. "security": [],
  11868. "responses": {
  11869. "200": {
  11870. "description": "Success",
  11871. "content": {
  11872. "application/json": {
  11873. "schema": {
  11874. "type": "object",
  11875. "properties": {
  11876. "location": {
  11877. "$ref": "#/components/schemas/LocationInfo"
  11878. },
  11879. "data": {
  11880. "$ref": "#/components/schemas/IntegrationAttempt"
  11881. }
  11882. },
  11883. "required": ["location", "data"],
  11884. "additionalProperties": false
  11885. }
  11886. }
  11887. }
  11888. },
  11889. "400": {
  11890. "description": "InvalidRequestError",
  11891. "content": {
  11892. "application/json": {
  11893. "schema": {
  11894. "anyOf": [
  11895. {
  11896. "$ref": "#/components/schemas/InvalidRequestError"
  11897. },
  11898. {
  11899. "$ref": "#/components/schemas/InvalidRequestError"
  11900. }
  11901. ]
  11902. }
  11903. }
  11904. }
  11905. },
  11906. "401": {
  11907. "description": "UnauthorizedError",
  11908. "content": {
  11909. "application/json": {
  11910. "schema": {
  11911. "$ref": "#/components/schemas/UnauthorizedError"
  11912. }
  11913. }
  11914. }
  11915. }
  11916. },
  11917. "description": "Start an OAuth attempt and return the authorization details.",
  11918. "summary": "Begin OAuth connection",
  11919. "requestBody": {
  11920. "content": {
  11921. "application/json": {
  11922. "schema": {
  11923. "type": "object",
  11924. "properties": {
  11925. "methodID": {
  11926. "type": "string"
  11927. },
  11928. "inputs": {
  11929. "type": "object",
  11930. "additionalProperties": {
  11931. "type": "string"
  11932. }
  11933. },
  11934. "label": {
  11935. "type": "string"
  11936. }
  11937. },
  11938. "required": ["methodID", "inputs"],
  11939. "additionalProperties": false
  11940. }
  11941. }
  11942. },
  11943. "required": true
  11944. },
  11945. "x-codeSamples": [
  11946. {
  11947. "lang": "js",
  11948. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11949. }
  11950. ]
  11951. }
  11952. },
  11953. "/api/integration/attempt/{attemptID}": {
  11954. "get": {
  11955. "tags": ["integrations"],
  11956. "operationId": "v2.integration.attempt.status",
  11957. "parameters": [
  11958. {
  11959. "name": "attemptID",
  11960. "in": "path",
  11961. "schema": {
  11962. "type": "string"
  11963. },
  11964. "required": true
  11965. },
  11966. {
  11967. "name": "location",
  11968. "in": "query",
  11969. "schema": {
  11970. "type": "object",
  11971. "properties": {
  11972. "directory": {
  11973. "type": "string"
  11974. },
  11975. "workspace": {
  11976. "type": "string"
  11977. }
  11978. },
  11979. "additionalProperties": false
  11980. },
  11981. "required": false,
  11982. "style": "deepObject",
  11983. "explode": true
  11984. }
  11985. ],
  11986. "security": [],
  11987. "responses": {
  11988. "200": {
  11989. "description": "Success",
  11990. "content": {
  11991. "application/json": {
  11992. "schema": {
  11993. "type": "object",
  11994. "properties": {
  11995. "location": {
  11996. "$ref": "#/components/schemas/LocationInfo"
  11997. },
  11998. "data": {
  11999. "anyOf": [
  12000. {
  12001. "type": "object",
  12002. "properties": {
  12003. "status": {
  12004. "type": "string",
  12005. "enum": ["pending"]
  12006. },
  12007. "time": {
  12008. "type": "object",
  12009. "properties": {
  12010. "created": {
  12011. "anyOf": [
  12012. {
  12013. "type": "number"
  12014. },
  12015. {
  12016. "type": "string",
  12017. "enum": ["NaN"]
  12018. },
  12019. {
  12020. "type": "string",
  12021. "enum": ["Infinity"]
  12022. },
  12023. {
  12024. "type": "string",
  12025. "enum": ["-Infinity"]
  12026. },
  12027. {
  12028. "type": "string",
  12029. "enum": ["Infinity", "-Infinity", "NaN"]
  12030. }
  12031. ]
  12032. },
  12033. "expires": {
  12034. "anyOf": [
  12035. {
  12036. "type": "number"
  12037. },
  12038. {
  12039. "type": "string",
  12040. "enum": ["NaN"]
  12041. },
  12042. {
  12043. "type": "string",
  12044. "enum": ["Infinity"]
  12045. },
  12046. {
  12047. "type": "string",
  12048. "enum": ["-Infinity"]
  12049. },
  12050. {
  12051. "type": "string",
  12052. "enum": ["Infinity", "-Infinity", "NaN"]
  12053. }
  12054. ]
  12055. }
  12056. },
  12057. "required": ["created", "expires"],
  12058. "additionalProperties": false
  12059. }
  12060. },
  12061. "required": ["status", "time"],
  12062. "additionalProperties": false
  12063. },
  12064. {
  12065. "type": "object",
  12066. "properties": {
  12067. "status": {
  12068. "type": "string",
  12069. "enum": ["complete"]
  12070. },
  12071. "time": {
  12072. "type": "object",
  12073. "properties": {
  12074. "created": {
  12075. "anyOf": [
  12076. {
  12077. "type": "number"
  12078. },
  12079. {
  12080. "type": "string",
  12081. "enum": ["NaN"]
  12082. },
  12083. {
  12084. "type": "string",
  12085. "enum": ["Infinity"]
  12086. },
  12087. {
  12088. "type": "string",
  12089. "enum": ["-Infinity"]
  12090. },
  12091. {
  12092. "type": "string",
  12093. "enum": ["Infinity", "-Infinity", "NaN"]
  12094. }
  12095. ]
  12096. },
  12097. "expires": {
  12098. "anyOf": [
  12099. {
  12100. "type": "number"
  12101. },
  12102. {
  12103. "type": "string",
  12104. "enum": ["NaN"]
  12105. },
  12106. {
  12107. "type": "string",
  12108. "enum": ["Infinity"]
  12109. },
  12110. {
  12111. "type": "string",
  12112. "enum": ["-Infinity"]
  12113. },
  12114. {
  12115. "type": "string",
  12116. "enum": ["Infinity", "-Infinity", "NaN"]
  12117. }
  12118. ]
  12119. }
  12120. },
  12121. "required": ["created", "expires"],
  12122. "additionalProperties": false
  12123. }
  12124. },
  12125. "required": ["status", "time"],
  12126. "additionalProperties": false
  12127. },
  12128. {
  12129. "type": "object",
  12130. "properties": {
  12131. "status": {
  12132. "type": "string",
  12133. "enum": ["failed"]
  12134. },
  12135. "message": {
  12136. "type": "string"
  12137. },
  12138. "time": {
  12139. "type": "object",
  12140. "properties": {
  12141. "created": {
  12142. "anyOf": [
  12143. {
  12144. "type": "number"
  12145. },
  12146. {
  12147. "type": "string",
  12148. "enum": ["NaN"]
  12149. },
  12150. {
  12151. "type": "string",
  12152. "enum": ["Infinity"]
  12153. },
  12154. {
  12155. "type": "string",
  12156. "enum": ["-Infinity"]
  12157. },
  12158. {
  12159. "type": "string",
  12160. "enum": ["Infinity", "-Infinity", "NaN"]
  12161. }
  12162. ]
  12163. },
  12164. "expires": {
  12165. "anyOf": [
  12166. {
  12167. "type": "number"
  12168. },
  12169. {
  12170. "type": "string",
  12171. "enum": ["NaN"]
  12172. },
  12173. {
  12174. "type": "string",
  12175. "enum": ["Infinity"]
  12176. },
  12177. {
  12178. "type": "string",
  12179. "enum": ["-Infinity"]
  12180. },
  12181. {
  12182. "type": "string",
  12183. "enum": ["Infinity", "-Infinity", "NaN"]
  12184. }
  12185. ]
  12186. }
  12187. },
  12188. "required": ["created", "expires"],
  12189. "additionalProperties": false
  12190. }
  12191. },
  12192. "required": ["status", "message", "time"],
  12193. "additionalProperties": false
  12194. },
  12195. {
  12196. "type": "object",
  12197. "properties": {
  12198. "status": {
  12199. "type": "string",
  12200. "enum": ["expired"]
  12201. },
  12202. "time": {
  12203. "type": "object",
  12204. "properties": {
  12205. "created": {
  12206. "anyOf": [
  12207. {
  12208. "type": "number"
  12209. },
  12210. {
  12211. "type": "string",
  12212. "enum": ["NaN"]
  12213. },
  12214. {
  12215. "type": "string",
  12216. "enum": ["Infinity"]
  12217. },
  12218. {
  12219. "type": "string",
  12220. "enum": ["-Infinity"]
  12221. },
  12222. {
  12223. "type": "string",
  12224. "enum": ["Infinity", "-Infinity", "NaN"]
  12225. }
  12226. ]
  12227. },
  12228. "expires": {
  12229. "anyOf": [
  12230. {
  12231. "type": "number"
  12232. },
  12233. {
  12234. "type": "string",
  12235. "enum": ["NaN"]
  12236. },
  12237. {
  12238. "type": "string",
  12239. "enum": ["Infinity"]
  12240. },
  12241. {
  12242. "type": "string",
  12243. "enum": ["-Infinity"]
  12244. },
  12245. {
  12246. "type": "string",
  12247. "enum": ["Infinity", "-Infinity", "NaN"]
  12248. }
  12249. ]
  12250. }
  12251. },
  12252. "required": ["created", "expires"],
  12253. "additionalProperties": false
  12254. }
  12255. },
  12256. "required": ["status", "time"],
  12257. "additionalProperties": false
  12258. }
  12259. ]
  12260. }
  12261. },
  12262. "required": ["location", "data"],
  12263. "additionalProperties": false
  12264. }
  12265. }
  12266. }
  12267. },
  12268. "400": {
  12269. "description": "InvalidRequestError",
  12270. "content": {
  12271. "application/json": {
  12272. "schema": {
  12273. "$ref": "#/components/schemas/InvalidRequestError"
  12274. }
  12275. }
  12276. }
  12277. },
  12278. "401": {
  12279. "description": "UnauthorizedError",
  12280. "content": {
  12281. "application/json": {
  12282. "schema": {
  12283. "$ref": "#/components/schemas/UnauthorizedError"
  12284. }
  12285. }
  12286. }
  12287. }
  12288. },
  12289. "description": "Poll the current status of an OAuth attempt.",
  12290. "summary": "Get OAuth attempt status",
  12291. "x-codeSamples": [
  12292. {
  12293. "lang": "js",
  12294. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12295. }
  12296. ]
  12297. },
  12298. "delete": {
  12299. "tags": ["integrations"],
  12300. "operationId": "v2.integration.attempt.cancel",
  12301. "parameters": [
  12302. {
  12303. "name": "attemptID",
  12304. "in": "path",
  12305. "schema": {
  12306. "type": "string"
  12307. },
  12308. "required": true
  12309. },
  12310. {
  12311. "name": "location",
  12312. "in": "query",
  12313. "schema": {
  12314. "type": "object",
  12315. "properties": {
  12316. "directory": {
  12317. "type": "string"
  12318. },
  12319. "workspace": {
  12320. "type": "string"
  12321. }
  12322. },
  12323. "additionalProperties": false
  12324. },
  12325. "required": false,
  12326. "style": "deepObject",
  12327. "explode": true
  12328. }
  12329. ],
  12330. "security": [],
  12331. "responses": {
  12332. "204": {
  12333. "description": "<No Content>"
  12334. },
  12335. "400": {
  12336. "description": "InvalidRequestError",
  12337. "content": {
  12338. "application/json": {
  12339. "schema": {
  12340. "$ref": "#/components/schemas/InvalidRequestError"
  12341. }
  12342. }
  12343. }
  12344. },
  12345. "401": {
  12346. "description": "UnauthorizedError",
  12347. "content": {
  12348. "application/json": {
  12349. "schema": {
  12350. "$ref": "#/components/schemas/UnauthorizedError"
  12351. }
  12352. }
  12353. }
  12354. }
  12355. },
  12356. "description": "Cancel an OAuth attempt and release its resources.",
  12357. "summary": "Cancel OAuth connection",
  12358. "x-codeSamples": [
  12359. {
  12360. "lang": "js",
  12361. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12362. }
  12363. ]
  12364. }
  12365. },
  12366. "/api/integration/attempt/{attemptID}/complete": {
  12367. "post": {
  12368. "tags": ["integrations"],
  12369. "operationId": "v2.integration.attempt.complete",
  12370. "parameters": [
  12371. {
  12372. "name": "attemptID",
  12373. "in": "path",
  12374. "schema": {
  12375. "type": "string"
  12376. },
  12377. "required": true
  12378. },
  12379. {
  12380. "name": "location",
  12381. "in": "query",
  12382. "schema": {
  12383. "type": "object",
  12384. "properties": {
  12385. "directory": {
  12386. "type": "string"
  12387. },
  12388. "workspace": {
  12389. "type": "string"
  12390. }
  12391. },
  12392. "additionalProperties": false
  12393. },
  12394. "required": false,
  12395. "style": "deepObject",
  12396. "explode": true
  12397. }
  12398. ],
  12399. "security": [],
  12400. "responses": {
  12401. "204": {
  12402. "description": "<No Content>"
  12403. },
  12404. "400": {
  12405. "description": "InvalidRequestError",
  12406. "content": {
  12407. "application/json": {
  12408. "schema": {
  12409. "anyOf": [
  12410. {
  12411. "$ref": "#/components/schemas/InvalidRequestError"
  12412. },
  12413. {
  12414. "$ref": "#/components/schemas/InvalidRequestError"
  12415. }
  12416. ]
  12417. }
  12418. }
  12419. }
  12420. },
  12421. "401": {
  12422. "description": "UnauthorizedError",
  12423. "content": {
  12424. "application/json": {
  12425. "schema": {
  12426. "$ref": "#/components/schemas/UnauthorizedError"
  12427. }
  12428. }
  12429. }
  12430. }
  12431. },
  12432. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12433. "summary": "Complete OAuth connection",
  12434. "requestBody": {
  12435. "content": {
  12436. "application/json": {
  12437. "schema": {
  12438. "type": "object",
  12439. "properties": {
  12440. "code": {
  12441. "type": "string"
  12442. }
  12443. },
  12444. "additionalProperties": false
  12445. }
  12446. }
  12447. },
  12448. "required": true
  12449. },
  12450. "x-codeSamples": [
  12451. {
  12452. "lang": "js",
  12453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12454. }
  12455. ]
  12456. }
  12457. },
  12458. "/api/credential/{credentialID}": {
  12459. "patch": {
  12460. "tags": ["opencode HttpApi"],
  12461. "operationId": "v2.credential.update",
  12462. "parameters": [
  12463. {
  12464. "name": "credentialID",
  12465. "in": "path",
  12466. "schema": {
  12467. "type": "string"
  12468. },
  12469. "required": true
  12470. },
  12471. {
  12472. "name": "location",
  12473. "in": "query",
  12474. "schema": {
  12475. "type": "object",
  12476. "properties": {
  12477. "directory": {
  12478. "type": "string"
  12479. },
  12480. "workspace": {
  12481. "type": "string"
  12482. }
  12483. },
  12484. "additionalProperties": false
  12485. },
  12486. "required": false,
  12487. "style": "deepObject",
  12488. "explode": true
  12489. }
  12490. ],
  12491. "security": [],
  12492. "responses": {
  12493. "204": {
  12494. "description": "<No Content>"
  12495. },
  12496. "400": {
  12497. "description": "InvalidRequestError",
  12498. "content": {
  12499. "application/json": {
  12500. "schema": {
  12501. "$ref": "#/components/schemas/InvalidRequestError"
  12502. }
  12503. }
  12504. }
  12505. },
  12506. "401": {
  12507. "description": "UnauthorizedError",
  12508. "content": {
  12509. "application/json": {
  12510. "schema": {
  12511. "$ref": "#/components/schemas/UnauthorizedError"
  12512. }
  12513. }
  12514. }
  12515. }
  12516. },
  12517. "description": "Update a stored credential label.",
  12518. "summary": "Update credential",
  12519. "requestBody": {
  12520. "content": {
  12521. "application/json": {
  12522. "schema": {
  12523. "type": "object",
  12524. "properties": {
  12525. "label": {
  12526. "type": "string"
  12527. }
  12528. },
  12529. "required": ["label"],
  12530. "additionalProperties": false
  12531. }
  12532. }
  12533. },
  12534. "required": true
  12535. },
  12536. "x-codeSamples": [
  12537. {
  12538. "lang": "js",
  12539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12540. }
  12541. ]
  12542. },
  12543. "delete": {
  12544. "tags": ["opencode HttpApi"],
  12545. "operationId": "v2.credential.remove",
  12546. "parameters": [
  12547. {
  12548. "name": "credentialID",
  12549. "in": "path",
  12550. "schema": {
  12551. "type": "string"
  12552. },
  12553. "required": true
  12554. },
  12555. {
  12556. "name": "location",
  12557. "in": "query",
  12558. "schema": {
  12559. "type": "object",
  12560. "properties": {
  12561. "directory": {
  12562. "type": "string"
  12563. },
  12564. "workspace": {
  12565. "type": "string"
  12566. }
  12567. },
  12568. "additionalProperties": false
  12569. },
  12570. "required": false,
  12571. "style": "deepObject",
  12572. "explode": true
  12573. }
  12574. ],
  12575. "security": [],
  12576. "responses": {
  12577. "204": {
  12578. "description": "<No Content>"
  12579. },
  12580. "400": {
  12581. "description": "InvalidRequestError",
  12582. "content": {
  12583. "application/json": {
  12584. "schema": {
  12585. "$ref": "#/components/schemas/InvalidRequestError"
  12586. }
  12587. }
  12588. }
  12589. },
  12590. "401": {
  12591. "description": "UnauthorizedError",
  12592. "content": {
  12593. "application/json": {
  12594. "schema": {
  12595. "$ref": "#/components/schemas/UnauthorizedError"
  12596. }
  12597. }
  12598. }
  12599. }
  12600. },
  12601. "description": "Remove a stored integration credential.",
  12602. "summary": "Remove credential",
  12603. "x-codeSamples": [
  12604. {
  12605. "lang": "js",
  12606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12607. }
  12608. ]
  12609. }
  12610. },
  12611. "/api/permission/request": {
  12612. "get": {
  12613. "tags": ["permissions"],
  12614. "operationId": "v2.permission.request.list",
  12615. "parameters": [
  12616. {
  12617. "name": "location",
  12618. "in": "query",
  12619. "schema": {
  12620. "type": "object",
  12621. "properties": {
  12622. "directory": {
  12623. "type": "string"
  12624. },
  12625. "workspace": {
  12626. "type": "string"
  12627. }
  12628. },
  12629. "additionalProperties": false
  12630. },
  12631. "required": false,
  12632. "style": "deepObject",
  12633. "explode": true
  12634. }
  12635. ],
  12636. "security": [],
  12637. "responses": {
  12638. "200": {
  12639. "description": "Success",
  12640. "content": {
  12641. "application/json": {
  12642. "schema": {
  12643. "type": "object",
  12644. "properties": {
  12645. "location": {
  12646. "$ref": "#/components/schemas/LocationInfo"
  12647. },
  12648. "data": {
  12649. "type": "array",
  12650. "items": {
  12651. "$ref": "#/components/schemas/PermissionV2Request"
  12652. }
  12653. }
  12654. },
  12655. "required": ["location", "data"],
  12656. "additionalProperties": false
  12657. }
  12658. }
  12659. }
  12660. },
  12661. "400": {
  12662. "description": "InvalidRequestError",
  12663. "content": {
  12664. "application/json": {
  12665. "schema": {
  12666. "$ref": "#/components/schemas/InvalidRequestError"
  12667. }
  12668. }
  12669. }
  12670. },
  12671. "401": {
  12672. "description": "UnauthorizedError",
  12673. "content": {
  12674. "application/json": {
  12675. "schema": {
  12676. "$ref": "#/components/schemas/UnauthorizedError"
  12677. }
  12678. }
  12679. }
  12680. }
  12681. },
  12682. "description": "Retrieve pending permission requests for a location.",
  12683. "summary": "List pending permission requests",
  12684. "x-codeSamples": [
  12685. {
  12686. "lang": "js",
  12687. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12688. }
  12689. ]
  12690. }
  12691. },
  12692. "/api/permission/saved": {
  12693. "get": {
  12694. "tags": ["permissions"],
  12695. "operationId": "v2.permission.saved.list",
  12696. "parameters": [
  12697. {
  12698. "name": "projectID",
  12699. "in": "query",
  12700. "schema": {
  12701. "type": "string"
  12702. },
  12703. "required": false
  12704. }
  12705. ],
  12706. "security": [],
  12707. "responses": {
  12708. "200": {
  12709. "description": "Success",
  12710. "content": {
  12711. "application/json": {
  12712. "schema": {
  12713. "type": "object",
  12714. "properties": {
  12715. "data": {
  12716. "type": "array",
  12717. "items": {
  12718. "$ref": "#/components/schemas/PermissionSavedInfo"
  12719. }
  12720. }
  12721. },
  12722. "required": ["data"],
  12723. "additionalProperties": false
  12724. }
  12725. }
  12726. }
  12727. },
  12728. "400": {
  12729. "description": "InvalidRequestError",
  12730. "content": {
  12731. "application/json": {
  12732. "schema": {
  12733. "$ref": "#/components/schemas/InvalidRequestError"
  12734. }
  12735. }
  12736. }
  12737. },
  12738. "401": {
  12739. "description": "UnauthorizedError",
  12740. "content": {
  12741. "application/json": {
  12742. "schema": {
  12743. "$ref": "#/components/schemas/UnauthorizedError"
  12744. }
  12745. }
  12746. }
  12747. }
  12748. },
  12749. "description": "Retrieve saved permissions, optionally filtered by project.",
  12750. "summary": "List saved permissions",
  12751. "x-codeSamples": [
  12752. {
  12753. "lang": "js",
  12754. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12755. }
  12756. ]
  12757. }
  12758. },
  12759. "/api/permission/saved/{id}": {
  12760. "delete": {
  12761. "tags": ["permissions"],
  12762. "operationId": "v2.permission.saved.remove",
  12763. "parameters": [
  12764. {
  12765. "name": "id",
  12766. "in": "path",
  12767. "schema": {
  12768. "type": "string"
  12769. },
  12770. "required": true
  12771. }
  12772. ],
  12773. "security": [],
  12774. "responses": {
  12775. "204": {
  12776. "description": "<No Content>"
  12777. },
  12778. "400": {
  12779. "description": "InvalidRequestError",
  12780. "content": {
  12781. "application/json": {
  12782. "schema": {
  12783. "$ref": "#/components/schemas/InvalidRequestError"
  12784. }
  12785. }
  12786. }
  12787. },
  12788. "401": {
  12789. "description": "UnauthorizedError",
  12790. "content": {
  12791. "application/json": {
  12792. "schema": {
  12793. "$ref": "#/components/schemas/UnauthorizedError"
  12794. }
  12795. }
  12796. }
  12797. }
  12798. },
  12799. "description": "Remove a saved permission by ID.",
  12800. "summary": "Remove saved permission",
  12801. "x-codeSamples": [
  12802. {
  12803. "lang": "js",
  12804. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12805. }
  12806. ]
  12807. }
  12808. },
  12809. "/api/session/{sessionID}/permission": {
  12810. "get": {
  12811. "tags": ["permissions"],
  12812. "operationId": "v2.session.permission.list",
  12813. "parameters": [
  12814. {
  12815. "name": "sessionID",
  12816. "in": "path",
  12817. "schema": {
  12818. "type": "string",
  12819. "pattern": "^ses"
  12820. },
  12821. "required": true
  12822. }
  12823. ],
  12824. "security": [],
  12825. "responses": {
  12826. "200": {
  12827. "description": "Success",
  12828. "content": {
  12829. "application/json": {
  12830. "schema": {
  12831. "type": "object",
  12832. "properties": {
  12833. "data": {
  12834. "type": "array",
  12835. "items": {
  12836. "$ref": "#/components/schemas/PermissionV2Request"
  12837. }
  12838. }
  12839. },
  12840. "required": ["data"],
  12841. "additionalProperties": false
  12842. }
  12843. }
  12844. }
  12845. },
  12846. "400": {
  12847. "description": "InvalidRequestError",
  12848. "content": {
  12849. "application/json": {
  12850. "schema": {
  12851. "$ref": "#/components/schemas/InvalidRequestError"
  12852. }
  12853. }
  12854. }
  12855. },
  12856. "401": {
  12857. "description": "UnauthorizedError",
  12858. "content": {
  12859. "application/json": {
  12860. "schema": {
  12861. "$ref": "#/components/schemas/UnauthorizedError"
  12862. }
  12863. }
  12864. }
  12865. },
  12866. "404": {
  12867. "description": "SessionNotFoundError",
  12868. "content": {
  12869. "application/json": {
  12870. "schema": {
  12871. "anyOf": [
  12872. {
  12873. "$ref": "#/components/schemas/SessionNotFoundError"
  12874. },
  12875. {
  12876. "$ref": "#/components/schemas/SessionNotFoundError"
  12877. }
  12878. ]
  12879. }
  12880. }
  12881. }
  12882. }
  12883. },
  12884. "description": "Retrieve pending permission requests owned by a session.",
  12885. "summary": "List session permission requests",
  12886. "x-codeSamples": [
  12887. {
  12888. "lang": "js",
  12889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12890. }
  12891. ]
  12892. }
  12893. },
  12894. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12895. "post": {
  12896. "tags": ["permissions"],
  12897. "operationId": "v2.session.permission.reply",
  12898. "parameters": [
  12899. {
  12900. "name": "sessionID",
  12901. "in": "path",
  12902. "schema": {
  12903. "type": "string",
  12904. "pattern": "^ses"
  12905. },
  12906. "required": true
  12907. },
  12908. {
  12909. "name": "requestID",
  12910. "in": "path",
  12911. "schema": {
  12912. "type": "string",
  12913. "pattern": "^per"
  12914. },
  12915. "required": true
  12916. }
  12917. ],
  12918. "security": [],
  12919. "responses": {
  12920. "204": {
  12921. "description": "<No Content>"
  12922. },
  12923. "400": {
  12924. "description": "InvalidRequestError",
  12925. "content": {
  12926. "application/json": {
  12927. "schema": {
  12928. "$ref": "#/components/schemas/InvalidRequestError"
  12929. }
  12930. }
  12931. }
  12932. },
  12933. "401": {
  12934. "description": "UnauthorizedError",
  12935. "content": {
  12936. "application/json": {
  12937. "schema": {
  12938. "$ref": "#/components/schemas/UnauthorizedError"
  12939. }
  12940. }
  12941. }
  12942. },
  12943. "404": {
  12944. "description": "SessionNotFoundError | PermissionNotFoundError",
  12945. "content": {
  12946. "application/json": {
  12947. "schema": {
  12948. "anyOf": [
  12949. {
  12950. "$ref": "#/components/schemas/PermissionNotFoundError"
  12951. },
  12952. {
  12953. "$ref": "#/components/schemas/SessionNotFoundError"
  12954. },
  12955. {
  12956. "$ref": "#/components/schemas/SessionNotFoundError"
  12957. }
  12958. ]
  12959. }
  12960. }
  12961. }
  12962. }
  12963. },
  12964. "description": "Respond to a pending permission request owned by a session.",
  12965. "summary": "Reply to pending permission request",
  12966. "requestBody": {
  12967. "content": {
  12968. "application/json": {
  12969. "schema": {
  12970. "type": "object",
  12971. "properties": {
  12972. "reply": {
  12973. "$ref": "#/components/schemas/PermissionV2Reply"
  12974. },
  12975. "message": {
  12976. "type": "string"
  12977. }
  12978. },
  12979. "required": ["reply"],
  12980. "additionalProperties": false
  12981. }
  12982. }
  12983. },
  12984. "required": true
  12985. },
  12986. "x-codeSamples": [
  12987. {
  12988. "lang": "js",
  12989. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12990. }
  12991. ]
  12992. }
  12993. },
  12994. "/api/fs/read/*": {
  12995. "get": {
  12996. "tags": ["filesystem"],
  12997. "operationId": "v2.fs.read",
  12998. "parameters": [
  12999. {
  13000. "name": "location",
  13001. "in": "query",
  13002. "schema": {
  13003. "type": "object",
  13004. "properties": {
  13005. "directory": {
  13006. "type": "string"
  13007. },
  13008. "workspace": {
  13009. "type": "string"
  13010. }
  13011. },
  13012. "additionalProperties": false
  13013. },
  13014. "required": false,
  13015. "style": "deepObject",
  13016. "explode": true
  13017. }
  13018. ],
  13019. "security": [],
  13020. "responses": {
  13021. "200": {
  13022. "description": "Success",
  13023. "content": {
  13024. "application/octet-stream": {
  13025. "schema": {
  13026. "type": "string",
  13027. "format": "binary"
  13028. }
  13029. }
  13030. }
  13031. },
  13032. "400": {
  13033. "description": "InvalidRequestError",
  13034. "content": {
  13035. "application/json": {
  13036. "schema": {
  13037. "$ref": "#/components/schemas/InvalidRequestError"
  13038. }
  13039. }
  13040. }
  13041. },
  13042. "401": {
  13043. "description": "UnauthorizedError",
  13044. "content": {
  13045. "application/json": {
  13046. "schema": {
  13047. "$ref": "#/components/schemas/UnauthorizedError"
  13048. }
  13049. }
  13050. }
  13051. }
  13052. },
  13053. "description": "Serve one file relative to the requested location.",
  13054. "summary": "Read file",
  13055. "x-codeSamples": [
  13056. {
  13057. "lang": "js",
  13058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  13059. }
  13060. ]
  13061. }
  13062. },
  13063. "/api/fs/list": {
  13064. "get": {
  13065. "tags": ["filesystem"],
  13066. "operationId": "v2.fs.list",
  13067. "parameters": [
  13068. {
  13069. "name": "location",
  13070. "in": "query",
  13071. "schema": {
  13072. "type": "object",
  13073. "properties": {
  13074. "directory": {
  13075. "type": "string"
  13076. },
  13077. "workspace": {
  13078. "type": "string"
  13079. }
  13080. },
  13081. "additionalProperties": false
  13082. },
  13083. "required": false,
  13084. "style": "deepObject",
  13085. "explode": true
  13086. },
  13087. {
  13088. "name": "path",
  13089. "in": "query",
  13090. "schema": {
  13091. "type": "string"
  13092. },
  13093. "required": false
  13094. }
  13095. ],
  13096. "security": [],
  13097. "responses": {
  13098. "200": {
  13099. "description": "Success",
  13100. "content": {
  13101. "application/json": {
  13102. "schema": {
  13103. "type": "object",
  13104. "properties": {
  13105. "location": {
  13106. "$ref": "#/components/schemas/LocationInfo"
  13107. },
  13108. "data": {
  13109. "type": "array",
  13110. "items": {
  13111. "$ref": "#/components/schemas/FileSystemEntry"
  13112. }
  13113. }
  13114. },
  13115. "required": ["location", "data"],
  13116. "additionalProperties": false
  13117. }
  13118. }
  13119. }
  13120. },
  13121. "400": {
  13122. "description": "InvalidRequestError",
  13123. "content": {
  13124. "application/json": {
  13125. "schema": {
  13126. "$ref": "#/components/schemas/InvalidRequestError"
  13127. }
  13128. }
  13129. }
  13130. },
  13131. "401": {
  13132. "description": "UnauthorizedError",
  13133. "content": {
  13134. "application/json": {
  13135. "schema": {
  13136. "$ref": "#/components/schemas/UnauthorizedError"
  13137. }
  13138. }
  13139. }
  13140. }
  13141. },
  13142. "description": "List direct children of one directory relative to the requested location.",
  13143. "summary": "List directory",
  13144. "x-codeSamples": [
  13145. {
  13146. "lang": "js",
  13147. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13148. }
  13149. ]
  13150. }
  13151. },
  13152. "/api/fs/find": {
  13153. "get": {
  13154. "tags": ["filesystem"],
  13155. "operationId": "v2.fs.find",
  13156. "parameters": [
  13157. {
  13158. "name": "location",
  13159. "in": "query",
  13160. "schema": {
  13161. "type": "object",
  13162. "properties": {
  13163. "directory": {
  13164. "type": "string"
  13165. },
  13166. "workspace": {
  13167. "type": "string"
  13168. }
  13169. },
  13170. "additionalProperties": false
  13171. },
  13172. "required": false,
  13173. "style": "deepObject",
  13174. "explode": true
  13175. },
  13176. {
  13177. "name": "query",
  13178. "in": "query",
  13179. "schema": {
  13180. "type": "string"
  13181. },
  13182. "required": true
  13183. },
  13184. {
  13185. "name": "type",
  13186. "in": "query",
  13187. "schema": {
  13188. "type": "string",
  13189. "enum": ["file", "directory"]
  13190. },
  13191. "required": false
  13192. },
  13193. {
  13194. "name": "limit",
  13195. "in": "query",
  13196. "schema": {
  13197. "type": "string"
  13198. },
  13199. "required": false
  13200. }
  13201. ],
  13202. "security": [],
  13203. "responses": {
  13204. "200": {
  13205. "description": "Success",
  13206. "content": {
  13207. "application/json": {
  13208. "schema": {
  13209. "type": "object",
  13210. "properties": {
  13211. "location": {
  13212. "$ref": "#/components/schemas/LocationInfo"
  13213. },
  13214. "data": {
  13215. "type": "array",
  13216. "items": {
  13217. "$ref": "#/components/schemas/FileSystemEntry"
  13218. }
  13219. }
  13220. },
  13221. "required": ["location", "data"],
  13222. "additionalProperties": false
  13223. }
  13224. }
  13225. }
  13226. },
  13227. "400": {
  13228. "description": "InvalidRequestError",
  13229. "content": {
  13230. "application/json": {
  13231. "schema": {
  13232. "$ref": "#/components/schemas/InvalidRequestError"
  13233. }
  13234. }
  13235. }
  13236. },
  13237. "401": {
  13238. "description": "UnauthorizedError",
  13239. "content": {
  13240. "application/json": {
  13241. "schema": {
  13242. "$ref": "#/components/schemas/UnauthorizedError"
  13243. }
  13244. }
  13245. }
  13246. }
  13247. },
  13248. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13249. "summary": "Find files",
  13250. "x-codeSamples": [
  13251. {
  13252. "lang": "js",
  13253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13254. }
  13255. ]
  13256. }
  13257. },
  13258. "/api/command": {
  13259. "get": {
  13260. "tags": ["commands"],
  13261. "operationId": "v2.command.list",
  13262. "parameters": [
  13263. {
  13264. "name": "location",
  13265. "in": "query",
  13266. "schema": {
  13267. "type": "object",
  13268. "properties": {
  13269. "directory": {
  13270. "type": "string"
  13271. },
  13272. "workspace": {
  13273. "type": "string"
  13274. }
  13275. },
  13276. "additionalProperties": false
  13277. },
  13278. "required": false,
  13279. "style": "deepObject",
  13280. "explode": true
  13281. }
  13282. ],
  13283. "security": [],
  13284. "responses": {
  13285. "200": {
  13286. "description": "Success",
  13287. "content": {
  13288. "application/json": {
  13289. "schema": {
  13290. "type": "object",
  13291. "properties": {
  13292. "location": {
  13293. "$ref": "#/components/schemas/LocationInfo"
  13294. },
  13295. "data": {
  13296. "type": "array",
  13297. "items": {
  13298. "$ref": "#/components/schemas/CommandV2Info"
  13299. }
  13300. }
  13301. },
  13302. "required": ["location", "data"],
  13303. "additionalProperties": false
  13304. }
  13305. }
  13306. }
  13307. },
  13308. "400": {
  13309. "description": "InvalidRequestError",
  13310. "content": {
  13311. "application/json": {
  13312. "schema": {
  13313. "$ref": "#/components/schemas/InvalidRequestError"
  13314. }
  13315. }
  13316. }
  13317. },
  13318. "401": {
  13319. "description": "UnauthorizedError",
  13320. "content": {
  13321. "application/json": {
  13322. "schema": {
  13323. "$ref": "#/components/schemas/UnauthorizedError"
  13324. }
  13325. }
  13326. }
  13327. }
  13328. },
  13329. "description": "Retrieve currently registered commands.",
  13330. "summary": "List commands",
  13331. "x-codeSamples": [
  13332. {
  13333. "lang": "js",
  13334. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13335. }
  13336. ]
  13337. }
  13338. },
  13339. "/api/skill": {
  13340. "get": {
  13341. "tags": ["skills"],
  13342. "operationId": "v2.skill.list",
  13343. "parameters": [
  13344. {
  13345. "name": "location",
  13346. "in": "query",
  13347. "schema": {
  13348. "type": "object",
  13349. "properties": {
  13350. "directory": {
  13351. "type": "string"
  13352. },
  13353. "workspace": {
  13354. "type": "string"
  13355. }
  13356. },
  13357. "additionalProperties": false
  13358. },
  13359. "required": false,
  13360. "style": "deepObject",
  13361. "explode": true
  13362. }
  13363. ],
  13364. "security": [],
  13365. "responses": {
  13366. "200": {
  13367. "description": "Success",
  13368. "content": {
  13369. "application/json": {
  13370. "schema": {
  13371. "type": "object",
  13372. "properties": {
  13373. "location": {
  13374. "$ref": "#/components/schemas/LocationInfo"
  13375. },
  13376. "data": {
  13377. "type": "array",
  13378. "items": {
  13379. "$ref": "#/components/schemas/SkillV2Info"
  13380. }
  13381. }
  13382. },
  13383. "required": ["location", "data"],
  13384. "additionalProperties": false
  13385. }
  13386. }
  13387. }
  13388. },
  13389. "400": {
  13390. "description": "InvalidRequestError",
  13391. "content": {
  13392. "application/json": {
  13393. "schema": {
  13394. "$ref": "#/components/schemas/InvalidRequestError"
  13395. }
  13396. }
  13397. }
  13398. },
  13399. "401": {
  13400. "description": "UnauthorizedError",
  13401. "content": {
  13402. "application/json": {
  13403. "schema": {
  13404. "$ref": "#/components/schemas/UnauthorizedError"
  13405. }
  13406. }
  13407. }
  13408. }
  13409. },
  13410. "description": "Retrieve currently registered skills.",
  13411. "summary": "List skills",
  13412. "x-codeSamples": [
  13413. {
  13414. "lang": "js",
  13415. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13416. }
  13417. ]
  13418. }
  13419. },
  13420. "/api/event": {
  13421. "get": {
  13422. "tags": ["events"],
  13423. "operationId": "v2.event.subscribe",
  13424. "parameters": [],
  13425. "security": [],
  13426. "responses": {
  13427. "200": {
  13428. "description": "Event stream",
  13429. "content": {
  13430. "text/event-stream": {
  13431. "schema": {
  13432. "$ref": "#/components/schemas/V2Event"
  13433. }
  13434. }
  13435. }
  13436. },
  13437. "400": {
  13438. "description": "InvalidRequestError",
  13439. "content": {
  13440. "application/json": {
  13441. "schema": {
  13442. "$ref": "#/components/schemas/InvalidRequestError"
  13443. }
  13444. }
  13445. }
  13446. },
  13447. "401": {
  13448. "description": "UnauthorizedError",
  13449. "content": {
  13450. "application/json": {
  13451. "schema": {
  13452. "$ref": "#/components/schemas/UnauthorizedError"
  13453. }
  13454. }
  13455. }
  13456. }
  13457. },
  13458. "description": "Subscribe to native event payloads for the server.",
  13459. "summary": "Subscribe to events",
  13460. "x-codeSamples": [
  13461. {
  13462. "lang": "js",
  13463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13464. }
  13465. ]
  13466. }
  13467. },
  13468. "/api/pty": {
  13469. "get": {
  13470. "tags": ["pty"],
  13471. "operationId": "v2.pty.list",
  13472. "parameters": [
  13473. {
  13474. "name": "location",
  13475. "in": "query",
  13476. "schema": {
  13477. "type": "object",
  13478. "properties": {
  13479. "directory": {
  13480. "type": "string"
  13481. },
  13482. "workspace": {
  13483. "type": "string"
  13484. }
  13485. },
  13486. "additionalProperties": false
  13487. },
  13488. "required": false,
  13489. "style": "deepObject",
  13490. "explode": true
  13491. }
  13492. ],
  13493. "security": [],
  13494. "responses": {
  13495. "200": {
  13496. "description": "Success",
  13497. "content": {
  13498. "application/json": {
  13499. "schema": {
  13500. "type": "object",
  13501. "properties": {
  13502. "location": {
  13503. "$ref": "#/components/schemas/LocationInfo"
  13504. },
  13505. "data": {
  13506. "type": "array",
  13507. "items": {
  13508. "$ref": "#/components/schemas/Pty"
  13509. }
  13510. }
  13511. },
  13512. "required": ["location", "data"],
  13513. "additionalProperties": false
  13514. }
  13515. }
  13516. }
  13517. },
  13518. "400": {
  13519. "description": "InvalidRequestError",
  13520. "content": {
  13521. "application/json": {
  13522. "schema": {
  13523. "$ref": "#/components/schemas/InvalidRequestError"
  13524. }
  13525. }
  13526. }
  13527. },
  13528. "401": {
  13529. "description": "UnauthorizedError",
  13530. "content": {
  13531. "application/json": {
  13532. "schema": {
  13533. "$ref": "#/components/schemas/UnauthorizedError"
  13534. }
  13535. }
  13536. }
  13537. }
  13538. },
  13539. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13540. "summary": "List PTY sessions",
  13541. "x-codeSamples": [
  13542. {
  13543. "lang": "js",
  13544. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13545. }
  13546. ]
  13547. },
  13548. "post": {
  13549. "tags": ["pty"],
  13550. "operationId": "v2.pty.create",
  13551. "parameters": [
  13552. {
  13553. "name": "location",
  13554. "in": "query",
  13555. "schema": {
  13556. "type": "object",
  13557. "properties": {
  13558. "directory": {
  13559. "type": "string"
  13560. },
  13561. "workspace": {
  13562. "type": "string"
  13563. }
  13564. },
  13565. "additionalProperties": false
  13566. },
  13567. "required": false,
  13568. "style": "deepObject",
  13569. "explode": true
  13570. }
  13571. ],
  13572. "security": [],
  13573. "responses": {
  13574. "200": {
  13575. "description": "Success",
  13576. "content": {
  13577. "application/json": {
  13578. "schema": {
  13579. "type": "object",
  13580. "properties": {
  13581. "location": {
  13582. "$ref": "#/components/schemas/LocationInfo"
  13583. },
  13584. "data": {
  13585. "$ref": "#/components/schemas/Pty"
  13586. }
  13587. },
  13588. "required": ["location", "data"],
  13589. "additionalProperties": false
  13590. }
  13591. }
  13592. }
  13593. },
  13594. "400": {
  13595. "description": "InvalidRequestError",
  13596. "content": {
  13597. "application/json": {
  13598. "schema": {
  13599. "$ref": "#/components/schemas/InvalidRequestError"
  13600. }
  13601. }
  13602. }
  13603. },
  13604. "401": {
  13605. "description": "UnauthorizedError",
  13606. "content": {
  13607. "application/json": {
  13608. "schema": {
  13609. "$ref": "#/components/schemas/UnauthorizedError"
  13610. }
  13611. }
  13612. }
  13613. }
  13614. },
  13615. "description": "Create a pseudo-terminal session for a location.",
  13616. "summary": "Create PTY session",
  13617. "requestBody": {
  13618. "content": {
  13619. "application/json": {
  13620. "schema": {
  13621. "type": "object",
  13622. "properties": {
  13623. "command": {
  13624. "type": "string"
  13625. },
  13626. "args": {
  13627. "type": "array",
  13628. "items": {
  13629. "type": "string"
  13630. }
  13631. },
  13632. "cwd": {
  13633. "type": "string"
  13634. },
  13635. "title": {
  13636. "type": "string"
  13637. },
  13638. "env": {
  13639. "type": "object",
  13640. "additionalProperties": {
  13641. "type": "string"
  13642. }
  13643. }
  13644. },
  13645. "additionalProperties": false
  13646. }
  13647. }
  13648. },
  13649. "required": true
  13650. },
  13651. "x-codeSamples": [
  13652. {
  13653. "lang": "js",
  13654. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13655. }
  13656. ]
  13657. }
  13658. },
  13659. "/api/pty/{ptyID}": {
  13660. "get": {
  13661. "tags": ["pty"],
  13662. "operationId": "v2.pty.get",
  13663. "parameters": [
  13664. {
  13665. "name": "ptyID",
  13666. "in": "path",
  13667. "schema": {
  13668. "type": "string",
  13669. "pattern": "^pty"
  13670. },
  13671. "required": true
  13672. },
  13673. {
  13674. "name": "location",
  13675. "in": "query",
  13676. "schema": {
  13677. "type": "object",
  13678. "properties": {
  13679. "directory": {
  13680. "type": "string"
  13681. },
  13682. "workspace": {
  13683. "type": "string"
  13684. }
  13685. },
  13686. "additionalProperties": false
  13687. },
  13688. "required": false,
  13689. "style": "deepObject",
  13690. "explode": true
  13691. }
  13692. ],
  13693. "security": [],
  13694. "responses": {
  13695. "200": {
  13696. "description": "Success",
  13697. "content": {
  13698. "application/json": {
  13699. "schema": {
  13700. "type": "object",
  13701. "properties": {
  13702. "location": {
  13703. "$ref": "#/components/schemas/LocationInfo"
  13704. },
  13705. "data": {
  13706. "$ref": "#/components/schemas/Pty"
  13707. }
  13708. },
  13709. "required": ["location", "data"],
  13710. "additionalProperties": false
  13711. }
  13712. }
  13713. }
  13714. },
  13715. "400": {
  13716. "description": "InvalidRequestError",
  13717. "content": {
  13718. "application/json": {
  13719. "schema": {
  13720. "$ref": "#/components/schemas/InvalidRequestError"
  13721. }
  13722. }
  13723. }
  13724. },
  13725. "401": {
  13726. "description": "UnauthorizedError",
  13727. "content": {
  13728. "application/json": {
  13729. "schema": {
  13730. "$ref": "#/components/schemas/UnauthorizedError"
  13731. }
  13732. }
  13733. }
  13734. },
  13735. "404": {
  13736. "description": "PtyNotFoundError",
  13737. "content": {
  13738. "application/json": {
  13739. "schema": {
  13740. "$ref": "#/components/schemas/PtyNotFoundError"
  13741. }
  13742. }
  13743. }
  13744. }
  13745. },
  13746. "description": "Get one PTY session, including its exit code once exited.",
  13747. "summary": "Get PTY session",
  13748. "x-codeSamples": [
  13749. {
  13750. "lang": "js",
  13751. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13752. }
  13753. ]
  13754. },
  13755. "put": {
  13756. "tags": ["pty"],
  13757. "operationId": "v2.pty.update",
  13758. "parameters": [
  13759. {
  13760. "name": "ptyID",
  13761. "in": "path",
  13762. "schema": {
  13763. "type": "string",
  13764. "pattern": "^pty"
  13765. },
  13766. "required": true
  13767. },
  13768. {
  13769. "name": "location",
  13770. "in": "query",
  13771. "schema": {
  13772. "type": "object",
  13773. "properties": {
  13774. "directory": {
  13775. "type": "string"
  13776. },
  13777. "workspace": {
  13778. "type": "string"
  13779. }
  13780. },
  13781. "additionalProperties": false
  13782. },
  13783. "required": false,
  13784. "style": "deepObject",
  13785. "explode": true
  13786. }
  13787. ],
  13788. "security": [],
  13789. "responses": {
  13790. "200": {
  13791. "description": "Success",
  13792. "content": {
  13793. "application/json": {
  13794. "schema": {
  13795. "type": "object",
  13796. "properties": {
  13797. "location": {
  13798. "$ref": "#/components/schemas/LocationInfo"
  13799. },
  13800. "data": {
  13801. "$ref": "#/components/schemas/Pty"
  13802. }
  13803. },
  13804. "required": ["location", "data"],
  13805. "additionalProperties": false
  13806. }
  13807. }
  13808. }
  13809. },
  13810. "400": {
  13811. "description": "InvalidRequestError",
  13812. "content": {
  13813. "application/json": {
  13814. "schema": {
  13815. "$ref": "#/components/schemas/InvalidRequestError"
  13816. }
  13817. }
  13818. }
  13819. },
  13820. "401": {
  13821. "description": "UnauthorizedError",
  13822. "content": {
  13823. "application/json": {
  13824. "schema": {
  13825. "$ref": "#/components/schemas/UnauthorizedError"
  13826. }
  13827. }
  13828. }
  13829. },
  13830. "404": {
  13831. "description": "PtyNotFoundError",
  13832. "content": {
  13833. "application/json": {
  13834. "schema": {
  13835. "$ref": "#/components/schemas/PtyNotFoundError"
  13836. }
  13837. }
  13838. }
  13839. }
  13840. },
  13841. "description": "Update the title or viewport size of one PTY session.",
  13842. "summary": "Update PTY session",
  13843. "requestBody": {
  13844. "content": {
  13845. "application/json": {
  13846. "schema": {
  13847. "type": "object",
  13848. "properties": {
  13849. "title": {
  13850. "type": "string"
  13851. },
  13852. "size": {
  13853. "type": "object",
  13854. "properties": {
  13855. "rows": {
  13856. "type": "integer",
  13857. "exclusiveMinimum": 0
  13858. },
  13859. "cols": {
  13860. "type": "integer",
  13861. "exclusiveMinimum": 0
  13862. }
  13863. },
  13864. "required": ["rows", "cols"],
  13865. "additionalProperties": false
  13866. }
  13867. },
  13868. "additionalProperties": false
  13869. }
  13870. }
  13871. },
  13872. "required": true
  13873. },
  13874. "x-codeSamples": [
  13875. {
  13876. "lang": "js",
  13877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  13878. }
  13879. ]
  13880. },
  13881. "delete": {
  13882. "tags": ["pty"],
  13883. "operationId": "v2.pty.remove",
  13884. "parameters": [
  13885. {
  13886. "name": "ptyID",
  13887. "in": "path",
  13888. "schema": {
  13889. "type": "string",
  13890. "pattern": "^pty"
  13891. },
  13892. "required": true
  13893. },
  13894. {
  13895. "name": "location",
  13896. "in": "query",
  13897. "schema": {
  13898. "type": "object",
  13899. "properties": {
  13900. "directory": {
  13901. "type": "string"
  13902. },
  13903. "workspace": {
  13904. "type": "string"
  13905. }
  13906. },
  13907. "additionalProperties": false
  13908. },
  13909. "required": false,
  13910. "style": "deepObject",
  13911. "explode": true
  13912. }
  13913. ],
  13914. "security": [],
  13915. "responses": {
  13916. "204": {
  13917. "description": "<No Content>"
  13918. },
  13919. "400": {
  13920. "description": "InvalidRequestError",
  13921. "content": {
  13922. "application/json": {
  13923. "schema": {
  13924. "$ref": "#/components/schemas/InvalidRequestError"
  13925. }
  13926. }
  13927. }
  13928. },
  13929. "401": {
  13930. "description": "UnauthorizedError",
  13931. "content": {
  13932. "application/json": {
  13933. "schema": {
  13934. "$ref": "#/components/schemas/UnauthorizedError"
  13935. }
  13936. }
  13937. }
  13938. },
  13939. "404": {
  13940. "description": "PtyNotFoundError",
  13941. "content": {
  13942. "application/json": {
  13943. "schema": {
  13944. "$ref": "#/components/schemas/PtyNotFoundError"
  13945. }
  13946. }
  13947. }
  13948. }
  13949. },
  13950. "description": "Terminate and remove one PTY session.",
  13951. "summary": "Remove PTY session",
  13952. "x-codeSamples": [
  13953. {
  13954. "lang": "js",
  13955. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  13956. }
  13957. ]
  13958. }
  13959. },
  13960. "/api/pty/{ptyID}/connect-token": {
  13961. "post": {
  13962. "tags": ["pty"],
  13963. "operationId": "v2.pty.connectToken",
  13964. "parameters": [
  13965. {
  13966. "name": "ptyID",
  13967. "in": "path",
  13968. "schema": {
  13969. "type": "string",
  13970. "pattern": "^pty"
  13971. },
  13972. "required": true
  13973. },
  13974. {
  13975. "name": "location",
  13976. "in": "query",
  13977. "schema": {
  13978. "type": "object",
  13979. "properties": {
  13980. "directory": {
  13981. "type": "string"
  13982. },
  13983. "workspace": {
  13984. "type": "string"
  13985. }
  13986. },
  13987. "additionalProperties": false
  13988. },
  13989. "required": false,
  13990. "style": "deepObject",
  13991. "explode": true
  13992. }
  13993. ],
  13994. "security": [],
  13995. "responses": {
  13996. "200": {
  13997. "description": "Success",
  13998. "content": {
  13999. "application/json": {
  14000. "schema": {
  14001. "type": "object",
  14002. "properties": {
  14003. "location": {
  14004. "$ref": "#/components/schemas/LocationInfo"
  14005. },
  14006. "data": {
  14007. "type": "object",
  14008. "properties": {
  14009. "ticket": {
  14010. "type": "string"
  14011. },
  14012. "expires_in": {
  14013. "type": "integer",
  14014. "exclusiveMinimum": 0
  14015. }
  14016. },
  14017. "required": ["ticket", "expires_in"],
  14018. "additionalProperties": false
  14019. }
  14020. },
  14021. "required": ["location", "data"],
  14022. "additionalProperties": false
  14023. }
  14024. }
  14025. }
  14026. },
  14027. "400": {
  14028. "description": "InvalidRequestError",
  14029. "content": {
  14030. "application/json": {
  14031. "schema": {
  14032. "$ref": "#/components/schemas/InvalidRequestError"
  14033. }
  14034. }
  14035. }
  14036. },
  14037. "401": {
  14038. "description": "UnauthorizedError",
  14039. "content": {
  14040. "application/json": {
  14041. "schema": {
  14042. "$ref": "#/components/schemas/UnauthorizedError"
  14043. }
  14044. }
  14045. }
  14046. },
  14047. "403": {
  14048. "description": "ForbiddenError",
  14049. "content": {
  14050. "application/json": {
  14051. "schema": {
  14052. "$ref": "#/components/schemas/ForbiddenError"
  14053. }
  14054. }
  14055. }
  14056. },
  14057. "404": {
  14058. "description": "PtyNotFoundError",
  14059. "content": {
  14060. "application/json": {
  14061. "schema": {
  14062. "$ref": "#/components/schemas/PtyNotFoundError"
  14063. }
  14064. }
  14065. }
  14066. }
  14067. },
  14068. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  14069. "summary": "Create PTY WebSocket token",
  14070. "x-codeSamples": [
  14071. {
  14072. "lang": "js",
  14073. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  14074. }
  14075. ]
  14076. }
  14077. },
  14078. "/api/pty/{ptyID}/connect": {
  14079. "get": {
  14080. "tags": ["pty"],
  14081. "operationId": "v2.pty.connect",
  14082. "parameters": [
  14083. {
  14084. "name": "ptyID",
  14085. "in": "path",
  14086. "schema": {
  14087. "type": "string",
  14088. "pattern": "^pty"
  14089. },
  14090. "required": true
  14091. },
  14092. {
  14093. "in": "query",
  14094. "name": "location[directory]",
  14095. "schema": {
  14096. "type": "string"
  14097. }
  14098. },
  14099. {
  14100. "in": "query",
  14101. "name": "location[workspace]",
  14102. "schema": {
  14103. "type": "string"
  14104. }
  14105. },
  14106. {
  14107. "in": "query",
  14108. "name": "cursor",
  14109. "schema": {
  14110. "type": "string"
  14111. }
  14112. },
  14113. {
  14114. "in": "query",
  14115. "name": "ticket",
  14116. "schema": {
  14117. "type": "string"
  14118. }
  14119. }
  14120. ],
  14121. "security": [],
  14122. "responses": {
  14123. "200": {
  14124. "description": "Success",
  14125. "content": {
  14126. "application/json": {
  14127. "schema": {
  14128. "type": "boolean"
  14129. }
  14130. }
  14131. }
  14132. },
  14133. "400": {
  14134. "description": "InvalidRequestError",
  14135. "content": {
  14136. "application/json": {
  14137. "schema": {
  14138. "$ref": "#/components/schemas/InvalidRequestError"
  14139. }
  14140. }
  14141. }
  14142. },
  14143. "401": {
  14144. "description": "UnauthorizedError",
  14145. "content": {
  14146. "application/json": {
  14147. "schema": {
  14148. "$ref": "#/components/schemas/UnauthorizedError"
  14149. }
  14150. }
  14151. }
  14152. },
  14153. "403": {
  14154. "description": "ForbiddenError",
  14155. "content": {
  14156. "application/json": {
  14157. "schema": {
  14158. "$ref": "#/components/schemas/ForbiddenError"
  14159. }
  14160. }
  14161. }
  14162. },
  14163. "404": {
  14164. "description": "PtyNotFoundError",
  14165. "content": {
  14166. "application/json": {
  14167. "schema": {
  14168. "$ref": "#/components/schemas/PtyNotFoundError"
  14169. }
  14170. }
  14171. }
  14172. }
  14173. },
  14174. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14175. "summary": "Connect to PTY session",
  14176. "x-codeSamples": [
  14177. {
  14178. "lang": "js",
  14179. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14180. }
  14181. ]
  14182. }
  14183. },
  14184. "/api/question/request": {
  14185. "get": {
  14186. "tags": ["session questions"],
  14187. "operationId": "v2.question.request.list",
  14188. "parameters": [
  14189. {
  14190. "name": "location",
  14191. "in": "query",
  14192. "schema": {
  14193. "type": "object",
  14194. "properties": {
  14195. "directory": {
  14196. "type": "string"
  14197. },
  14198. "workspace": {
  14199. "type": "string"
  14200. }
  14201. },
  14202. "additionalProperties": false
  14203. },
  14204. "required": false,
  14205. "style": "deepObject",
  14206. "explode": true
  14207. }
  14208. ],
  14209. "security": [],
  14210. "responses": {
  14211. "200": {
  14212. "description": "Success",
  14213. "content": {
  14214. "application/json": {
  14215. "schema": {
  14216. "type": "object",
  14217. "properties": {
  14218. "location": {
  14219. "$ref": "#/components/schemas/LocationInfo"
  14220. },
  14221. "data": {
  14222. "type": "array",
  14223. "items": {
  14224. "$ref": "#/components/schemas/QuestionV2Request"
  14225. }
  14226. }
  14227. },
  14228. "required": ["location", "data"],
  14229. "additionalProperties": false
  14230. }
  14231. }
  14232. }
  14233. },
  14234. "400": {
  14235. "description": "InvalidRequestError",
  14236. "content": {
  14237. "application/json": {
  14238. "schema": {
  14239. "$ref": "#/components/schemas/InvalidRequestError"
  14240. }
  14241. }
  14242. }
  14243. },
  14244. "401": {
  14245. "description": "UnauthorizedError",
  14246. "content": {
  14247. "application/json": {
  14248. "schema": {
  14249. "$ref": "#/components/schemas/UnauthorizedError"
  14250. }
  14251. }
  14252. }
  14253. }
  14254. },
  14255. "description": "Retrieve pending question requests for a location.",
  14256. "summary": "List pending question requests",
  14257. "x-codeSamples": [
  14258. {
  14259. "lang": "js",
  14260. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14261. }
  14262. ]
  14263. }
  14264. },
  14265. "/api/session/{sessionID}/question": {
  14266. "get": {
  14267. "tags": ["session questions"],
  14268. "operationId": "v2.session.question.list",
  14269. "parameters": [
  14270. {
  14271. "name": "sessionID",
  14272. "in": "path",
  14273. "schema": {
  14274. "type": "string",
  14275. "pattern": "^ses"
  14276. },
  14277. "required": true
  14278. }
  14279. ],
  14280. "security": [],
  14281. "responses": {
  14282. "200": {
  14283. "description": "Success",
  14284. "content": {
  14285. "application/json": {
  14286. "schema": {
  14287. "type": "object",
  14288. "properties": {
  14289. "data": {
  14290. "type": "array",
  14291. "items": {
  14292. "$ref": "#/components/schemas/QuestionV2Request"
  14293. }
  14294. }
  14295. },
  14296. "required": ["data"],
  14297. "additionalProperties": false
  14298. }
  14299. }
  14300. }
  14301. },
  14302. "400": {
  14303. "description": "InvalidRequestError",
  14304. "content": {
  14305. "application/json": {
  14306. "schema": {
  14307. "$ref": "#/components/schemas/InvalidRequestError"
  14308. }
  14309. }
  14310. }
  14311. },
  14312. "401": {
  14313. "description": "UnauthorizedError",
  14314. "content": {
  14315. "application/json": {
  14316. "schema": {
  14317. "$ref": "#/components/schemas/UnauthorizedError"
  14318. }
  14319. }
  14320. }
  14321. },
  14322. "404": {
  14323. "description": "SessionNotFoundError",
  14324. "content": {
  14325. "application/json": {
  14326. "schema": {
  14327. "anyOf": [
  14328. {
  14329. "$ref": "#/components/schemas/SessionNotFoundError"
  14330. },
  14331. {
  14332. "$ref": "#/components/schemas/SessionNotFoundError"
  14333. }
  14334. ]
  14335. }
  14336. }
  14337. }
  14338. }
  14339. },
  14340. "description": "Retrieve pending question requests owned by a session.",
  14341. "summary": "List session question requests",
  14342. "x-codeSamples": [
  14343. {
  14344. "lang": "js",
  14345. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14346. }
  14347. ]
  14348. }
  14349. },
  14350. "/api/session/{sessionID}/question/{requestID}/reply": {
  14351. "post": {
  14352. "tags": ["session questions"],
  14353. "operationId": "v2.session.question.reply",
  14354. "parameters": [
  14355. {
  14356. "name": "sessionID",
  14357. "in": "path",
  14358. "schema": {
  14359. "type": "string",
  14360. "pattern": "^ses"
  14361. },
  14362. "required": true
  14363. },
  14364. {
  14365. "name": "requestID",
  14366. "in": "path",
  14367. "schema": {
  14368. "type": "string",
  14369. "pattern": "^que"
  14370. },
  14371. "required": true
  14372. }
  14373. ],
  14374. "security": [],
  14375. "responses": {
  14376. "204": {
  14377. "description": "<No Content>"
  14378. },
  14379. "400": {
  14380. "description": "InvalidRequestError",
  14381. "content": {
  14382. "application/json": {
  14383. "schema": {
  14384. "$ref": "#/components/schemas/InvalidRequestError"
  14385. }
  14386. }
  14387. }
  14388. },
  14389. "401": {
  14390. "description": "UnauthorizedError",
  14391. "content": {
  14392. "application/json": {
  14393. "schema": {
  14394. "$ref": "#/components/schemas/UnauthorizedError"
  14395. }
  14396. }
  14397. }
  14398. },
  14399. "404": {
  14400. "description": "SessionNotFoundError | QuestionNotFoundError",
  14401. "content": {
  14402. "application/json": {
  14403. "schema": {
  14404. "anyOf": [
  14405. {
  14406. "$ref": "#/components/schemas/QuestionNotFoundError"
  14407. },
  14408. {
  14409. "$ref": "#/components/schemas/SessionNotFoundError"
  14410. },
  14411. {
  14412. "$ref": "#/components/schemas/SessionNotFoundError"
  14413. }
  14414. ]
  14415. }
  14416. }
  14417. }
  14418. }
  14419. },
  14420. "description": "Answer a pending question request owned by a session.",
  14421. "summary": "Reply to pending question request",
  14422. "requestBody": {
  14423. "content": {
  14424. "application/json": {
  14425. "schema": {
  14426. "$ref": "#/components/schemas/QuestionV2Reply"
  14427. }
  14428. }
  14429. },
  14430. "required": true
  14431. },
  14432. "x-codeSamples": [
  14433. {
  14434. "lang": "js",
  14435. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14436. }
  14437. ]
  14438. }
  14439. },
  14440. "/api/session/{sessionID}/question/{requestID}/reject": {
  14441. "post": {
  14442. "tags": ["session questions"],
  14443. "operationId": "v2.session.question.reject",
  14444. "parameters": [
  14445. {
  14446. "name": "sessionID",
  14447. "in": "path",
  14448. "schema": {
  14449. "type": "string",
  14450. "pattern": "^ses"
  14451. },
  14452. "required": true
  14453. },
  14454. {
  14455. "name": "requestID",
  14456. "in": "path",
  14457. "schema": {
  14458. "type": "string",
  14459. "pattern": "^que"
  14460. },
  14461. "required": true
  14462. }
  14463. ],
  14464. "security": [],
  14465. "responses": {
  14466. "204": {
  14467. "description": "<No Content>"
  14468. },
  14469. "400": {
  14470. "description": "InvalidRequestError",
  14471. "content": {
  14472. "application/json": {
  14473. "schema": {
  14474. "$ref": "#/components/schemas/InvalidRequestError"
  14475. }
  14476. }
  14477. }
  14478. },
  14479. "401": {
  14480. "description": "UnauthorizedError",
  14481. "content": {
  14482. "application/json": {
  14483. "schema": {
  14484. "$ref": "#/components/schemas/UnauthorizedError"
  14485. }
  14486. }
  14487. }
  14488. },
  14489. "404": {
  14490. "description": "SessionNotFoundError | QuestionNotFoundError",
  14491. "content": {
  14492. "application/json": {
  14493. "schema": {
  14494. "anyOf": [
  14495. {
  14496. "$ref": "#/components/schemas/QuestionNotFoundError"
  14497. },
  14498. {
  14499. "$ref": "#/components/schemas/SessionNotFoundError"
  14500. },
  14501. {
  14502. "$ref": "#/components/schemas/SessionNotFoundError"
  14503. }
  14504. ]
  14505. }
  14506. }
  14507. }
  14508. }
  14509. },
  14510. "description": "Reject a pending question request owned by a session.",
  14511. "summary": "Reject pending question request",
  14512. "x-codeSamples": [
  14513. {
  14514. "lang": "js",
  14515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14516. }
  14517. ]
  14518. }
  14519. },
  14520. "/api/reference": {
  14521. "get": {
  14522. "tags": ["reference"],
  14523. "operationId": "v2.reference.list",
  14524. "parameters": [
  14525. {
  14526. "name": "location",
  14527. "in": "query",
  14528. "schema": {
  14529. "type": "object",
  14530. "properties": {
  14531. "directory": {
  14532. "type": "string"
  14533. },
  14534. "workspace": {
  14535. "type": "string"
  14536. }
  14537. },
  14538. "additionalProperties": false
  14539. },
  14540. "required": false,
  14541. "style": "deepObject",
  14542. "explode": true
  14543. }
  14544. ],
  14545. "security": [],
  14546. "responses": {
  14547. "200": {
  14548. "description": "Success",
  14549. "content": {
  14550. "application/json": {
  14551. "schema": {
  14552. "type": "object",
  14553. "properties": {
  14554. "location": {
  14555. "$ref": "#/components/schemas/LocationInfo"
  14556. },
  14557. "data": {
  14558. "type": "array",
  14559. "items": {
  14560. "$ref": "#/components/schemas/ReferenceInfo"
  14561. }
  14562. }
  14563. },
  14564. "required": ["location", "data"],
  14565. "additionalProperties": false
  14566. }
  14567. }
  14568. }
  14569. },
  14570. "400": {
  14571. "description": "InvalidRequestError",
  14572. "content": {
  14573. "application/json": {
  14574. "schema": {
  14575. "$ref": "#/components/schemas/InvalidRequestError"
  14576. }
  14577. }
  14578. }
  14579. },
  14580. "401": {
  14581. "description": "UnauthorizedError",
  14582. "content": {
  14583. "application/json": {
  14584. "schema": {
  14585. "$ref": "#/components/schemas/UnauthorizedError"
  14586. }
  14587. }
  14588. }
  14589. }
  14590. },
  14591. "description": "List references available in the requested location.",
  14592. "summary": "List references",
  14593. "x-codeSamples": [
  14594. {
  14595. "lang": "js",
  14596. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14597. }
  14598. ]
  14599. }
  14600. },
  14601. "/experimental/project/{projectID}/copy": {
  14602. "post": {
  14603. "tags": ["projectCopy"],
  14604. "operationId": "v2.projectCopy.create",
  14605. "parameters": [
  14606. {
  14607. "name": "projectID",
  14608. "in": "path",
  14609. "schema": {
  14610. "type": "string"
  14611. },
  14612. "required": true
  14613. },
  14614. {
  14615. "name": "location",
  14616. "in": "query",
  14617. "schema": {
  14618. "type": "object",
  14619. "properties": {
  14620. "directory": {
  14621. "type": "string"
  14622. },
  14623. "workspace": {
  14624. "type": "string"
  14625. }
  14626. },
  14627. "additionalProperties": false
  14628. },
  14629. "required": false,
  14630. "style": "deepObject",
  14631. "explode": true
  14632. }
  14633. ],
  14634. "responses": {
  14635. "200": {
  14636. "description": "ProjectCopy.Copy",
  14637. "content": {
  14638. "application/json": {
  14639. "schema": {
  14640. "$ref": "#/components/schemas/ProjectCopyCopy"
  14641. }
  14642. }
  14643. }
  14644. },
  14645. "400": {
  14646. "description": "ProjectCopyError | InvalidRequestError",
  14647. "content": {
  14648. "application/json": {
  14649. "schema": {
  14650. "anyOf": [
  14651. {
  14652. "$ref": "#/components/schemas/ProjectCopyError"
  14653. },
  14654. {
  14655. "$ref": "#/components/schemas/InvalidRequestError"
  14656. }
  14657. ]
  14658. }
  14659. }
  14660. }
  14661. }
  14662. },
  14663. "requestBody": {
  14664. "content": {
  14665. "application/json": {
  14666. "schema": {
  14667. "type": "object",
  14668. "properties": {
  14669. "strategy": {
  14670. "type": "string"
  14671. },
  14672. "directory": {
  14673. "type": "string"
  14674. },
  14675. "name": {
  14676. "type": "string"
  14677. }
  14678. },
  14679. "required": ["strategy", "directory"],
  14680. "additionalProperties": false
  14681. }
  14682. }
  14683. }
  14684. },
  14685. "x-codeSamples": [
  14686. {
  14687. "lang": "js",
  14688. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14689. }
  14690. ]
  14691. },
  14692. "delete": {
  14693. "tags": ["projectCopy"],
  14694. "operationId": "v2.projectCopy.remove",
  14695. "parameters": [
  14696. {
  14697. "name": "projectID",
  14698. "in": "path",
  14699. "schema": {
  14700. "type": "string"
  14701. },
  14702. "required": true
  14703. },
  14704. {
  14705. "name": "location",
  14706. "in": "query",
  14707. "schema": {
  14708. "type": "object",
  14709. "properties": {
  14710. "directory": {
  14711. "type": "string"
  14712. },
  14713. "workspace": {
  14714. "type": "string"
  14715. }
  14716. },
  14717. "additionalProperties": false
  14718. },
  14719. "required": false,
  14720. "style": "deepObject",
  14721. "explode": true
  14722. }
  14723. ],
  14724. "responses": {
  14725. "204": {
  14726. "description": "<No Content>"
  14727. },
  14728. "400": {
  14729. "description": "ProjectCopyError | InvalidRequestError",
  14730. "content": {
  14731. "application/json": {
  14732. "schema": {
  14733. "anyOf": [
  14734. {
  14735. "$ref": "#/components/schemas/ProjectCopyError"
  14736. },
  14737. {
  14738. "$ref": "#/components/schemas/InvalidRequestError"
  14739. }
  14740. ]
  14741. }
  14742. }
  14743. }
  14744. }
  14745. },
  14746. "requestBody": {
  14747. "content": {
  14748. "application/json": {
  14749. "schema": {
  14750. "type": "object",
  14751. "properties": {
  14752. "directory": {
  14753. "type": "string"
  14754. },
  14755. "force": {
  14756. "type": "boolean"
  14757. }
  14758. },
  14759. "required": ["directory", "force"],
  14760. "additionalProperties": false
  14761. }
  14762. }
  14763. }
  14764. },
  14765. "x-codeSamples": [
  14766. {
  14767. "lang": "js",
  14768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14769. }
  14770. ]
  14771. }
  14772. },
  14773. "/experimental/project/{projectID}/copy/refresh": {
  14774. "post": {
  14775. "tags": ["projectCopy"],
  14776. "operationId": "v2.projectCopy.refresh",
  14777. "parameters": [
  14778. {
  14779. "name": "projectID",
  14780. "in": "path",
  14781. "schema": {
  14782. "type": "string"
  14783. },
  14784. "required": true
  14785. },
  14786. {
  14787. "name": "location",
  14788. "in": "query",
  14789. "schema": {
  14790. "type": "object",
  14791. "properties": {
  14792. "directory": {
  14793. "type": "string"
  14794. },
  14795. "workspace": {
  14796. "type": "string"
  14797. }
  14798. },
  14799. "additionalProperties": false
  14800. },
  14801. "required": false,
  14802. "style": "deepObject",
  14803. "explode": true
  14804. }
  14805. ],
  14806. "responses": {
  14807. "204": {
  14808. "description": "<No Content>"
  14809. },
  14810. "400": {
  14811. "description": "ProjectCopyError | InvalidRequestError",
  14812. "content": {
  14813. "application/json": {
  14814. "schema": {
  14815. "anyOf": [
  14816. {
  14817. "$ref": "#/components/schemas/ProjectCopyError"
  14818. },
  14819. {
  14820. "$ref": "#/components/schemas/InvalidRequestError"
  14821. }
  14822. ]
  14823. }
  14824. }
  14825. }
  14826. }
  14827. },
  14828. "x-codeSamples": [
  14829. {
  14830. "lang": "js",
  14831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  14832. }
  14833. ]
  14834. }
  14835. },
  14836. "/pty/{ptyID}/connect": {
  14837. "get": {
  14838. "tags": ["pty"],
  14839. "operationId": "pty.connect",
  14840. "parameters": [
  14841. {
  14842. "name": "ptyID",
  14843. "in": "path",
  14844. "schema": {
  14845. "type": "string",
  14846. "pattern": "^pty"
  14847. },
  14848. "required": true
  14849. },
  14850. {
  14851. "in": "query",
  14852. "name": "directory",
  14853. "schema": {
  14854. "type": "string"
  14855. }
  14856. },
  14857. {
  14858. "in": "query",
  14859. "name": "workspace",
  14860. "schema": {
  14861. "type": "string"
  14862. }
  14863. },
  14864. {
  14865. "in": "query",
  14866. "name": "cursor",
  14867. "schema": {
  14868. "type": "string"
  14869. }
  14870. },
  14871. {
  14872. "in": "query",
  14873. "name": "ticket",
  14874. "schema": {
  14875. "type": "string"
  14876. }
  14877. }
  14878. ],
  14879. "responses": {
  14880. "200": {
  14881. "description": "Connected session",
  14882. "content": {
  14883. "application/json": {
  14884. "schema": {
  14885. "type": "boolean",
  14886. "description": "Connected session"
  14887. }
  14888. }
  14889. }
  14890. },
  14891. "403": {
  14892. "description": "Forbidden",
  14893. "content": {
  14894. "application/json": {
  14895. "schema": {
  14896. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  14897. }
  14898. }
  14899. }
  14900. },
  14901. "404": {
  14902. "description": "Not found",
  14903. "content": {
  14904. "application/json": {
  14905. "schema": {
  14906. "$ref": "#/components/schemas/NotFoundError"
  14907. }
  14908. }
  14909. }
  14910. }
  14911. },
  14912. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  14913. "summary": "Connect to PTY session",
  14914. "x-codeSamples": [
  14915. {
  14916. "lang": "js",
  14917. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  14918. }
  14919. ]
  14920. }
  14921. }
  14922. },
  14923. "components": {
  14924. "schemas": {
  14925. "Event": {
  14926. "anyOf": [
  14927. {
  14928. "$ref": "#/components/schemas/EventModels-devRefreshed"
  14929. },
  14930. {
  14931. "$ref": "#/components/schemas/EventIntegrationUpdated"
  14932. },
  14933. {
  14934. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  14935. },
  14936. {
  14937. "$ref": "#/components/schemas/EventCatalogUpdated"
  14938. },
  14939. {
  14940. "$ref": "#/components/schemas/EventSessionCreated"
  14941. },
  14942. {
  14943. "$ref": "#/components/schemas/EventSessionUpdated"
  14944. },
  14945. {
  14946. "$ref": "#/components/schemas/EventSessionDeleted"
  14947. },
  14948. {
  14949. "$ref": "#/components/schemas/EventMessageUpdated"
  14950. },
  14951. {
  14952. "$ref": "#/components/schemas/EventMessageRemoved"
  14953. },
  14954. {
  14955. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14956. },
  14957. {
  14958. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14959. },
  14960. {
  14961. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14962. },
  14963. {
  14964. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14965. },
  14966. {
  14967. "$ref": "#/components/schemas/EventSessionNextMoved"
  14968. },
  14969. {
  14970. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14971. },
  14972. {
  14973. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14974. },
  14975. {
  14976. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14977. },
  14978. {
  14979. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14980. },
  14981. {
  14982. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14983. },
  14984. {
  14985. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14986. },
  14987. {
  14988. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14989. },
  14990. {
  14991. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14992. },
  14993. {
  14994. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14995. },
  14996. {
  14997. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14998. },
  14999. {
  15000. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15001. },
  15002. {
  15003. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15004. },
  15005. {
  15006. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15007. },
  15008. {
  15009. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15010. },
  15011. {
  15012. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15013. },
  15014. {
  15015. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15016. },
  15017. {
  15018. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15019. },
  15020. {
  15021. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15022. },
  15023. {
  15024. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15025. },
  15026. {
  15027. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15028. },
  15029. {
  15030. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15031. },
  15032. {
  15033. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15034. },
  15035. {
  15036. "$ref": "#/components/schemas/EventSessionNextRetried"
  15037. },
  15038. {
  15039. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15040. },
  15041. {
  15042. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15043. },
  15044. {
  15045. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15046. },
  15047. {
  15048. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15049. },
  15050. {
  15051. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15052. },
  15053. {
  15054. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15055. },
  15056. {
  15057. "$ref": "#/components/schemas/EventMessagePartDelta"
  15058. },
  15059. {
  15060. "$ref": "#/components/schemas/EventSessionDiff"
  15061. },
  15062. {
  15063. "$ref": "#/components/schemas/EventSessionError"
  15064. },
  15065. {
  15066. "$ref": "#/components/schemas/EventInstallationUpdated"
  15067. },
  15068. {
  15069. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15070. },
  15071. {
  15072. "$ref": "#/components/schemas/EventFileEdited"
  15073. },
  15074. {
  15075. "$ref": "#/components/schemas/EventReferenceUpdated"
  15076. },
  15077. {
  15078. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15079. },
  15080. {
  15081. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15082. },
  15083. {
  15084. "$ref": "#/components/schemas/EventPluginAdded"
  15085. },
  15086. {
  15087. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15088. },
  15089. {
  15090. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15091. },
  15092. {
  15093. "$ref": "#/components/schemas/EventPtyCreated"
  15094. },
  15095. {
  15096. "$ref": "#/components/schemas/EventPtyUpdated"
  15097. },
  15098. {
  15099. "$ref": "#/components/schemas/EventPtyExited"
  15100. },
  15101. {
  15102. "$ref": "#/components/schemas/EventPtyDeleted"
  15103. },
  15104. {
  15105. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15106. },
  15107. {
  15108. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15109. },
  15110. {
  15111. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15112. },
  15113. {
  15114. "$ref": "#/components/schemas/EventTodoUpdated"
  15115. },
  15116. {
  15117. "$ref": "#/components/schemas/EventLspUpdated"
  15118. },
  15119. {
  15120. "$ref": "#/components/schemas/EventPermissionAsked"
  15121. },
  15122. {
  15123. "$ref": "#/components/schemas/EventPermissionReplied"
  15124. },
  15125. {
  15126. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15127. },
  15128. {
  15129. "$ref": "#/components/schemas/Event.tui.command.execute"
  15130. },
  15131. {
  15132. "$ref": "#/components/schemas/Event.tui.toast.show"
  15133. },
  15134. {
  15135. "$ref": "#/components/schemas/Event.tui.session.select"
  15136. },
  15137. {
  15138. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15139. },
  15140. {
  15141. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15142. },
  15143. {
  15144. "$ref": "#/components/schemas/EventCommandExecuted"
  15145. },
  15146. {
  15147. "$ref": "#/components/schemas/EventProjectUpdated"
  15148. },
  15149. {
  15150. "$ref": "#/components/schemas/EventSessionStatus"
  15151. },
  15152. {
  15153. "$ref": "#/components/schemas/EventSessionIdle"
  15154. },
  15155. {
  15156. "$ref": "#/components/schemas/EventQuestionAsked"
  15157. },
  15158. {
  15159. "$ref": "#/components/schemas/EventQuestionReplied"
  15160. },
  15161. {
  15162. "$ref": "#/components/schemas/EventQuestionRejected"
  15163. },
  15164. {
  15165. "$ref": "#/components/schemas/EventSessionCompacted"
  15166. },
  15167. {
  15168. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15169. },
  15170. {
  15171. "$ref": "#/components/schemas/EventWorkspaceReady"
  15172. },
  15173. {
  15174. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15175. },
  15176. {
  15177. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15178. },
  15179. {
  15180. "$ref": "#/components/schemas/EventWorktreeReady"
  15181. },
  15182. {
  15183. "$ref": "#/components/schemas/EventWorktreeFailed"
  15184. },
  15185. {
  15186. "$ref": "#/components/schemas/EventServerConnected"
  15187. },
  15188. {
  15189. "$ref": "#/components/schemas/EventGlobalDisposed"
  15190. },
  15191. {
  15192. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15193. }
  15194. ]
  15195. },
  15196. "QuestionReplied": {
  15197. "type": "object",
  15198. "properties": {
  15199. "sessionID": {
  15200. "type": "string",
  15201. "pattern": "^ses"
  15202. },
  15203. "requestID": {
  15204. "type": "string",
  15205. "pattern": "^que"
  15206. },
  15207. "answers": {
  15208. "type": "array",
  15209. "items": {
  15210. "$ref": "#/components/schemas/QuestionAnswer"
  15211. }
  15212. }
  15213. },
  15214. "required": ["sessionID", "requestID", "answers"],
  15215. "additionalProperties": false
  15216. },
  15217. "QuestionRejected": {
  15218. "type": "object",
  15219. "properties": {
  15220. "sessionID": {
  15221. "type": "string",
  15222. "pattern": "^ses"
  15223. },
  15224. "requestID": {
  15225. "type": "string",
  15226. "pattern": "^que"
  15227. }
  15228. },
  15229. "required": ["sessionID", "requestID"],
  15230. "additionalProperties": false
  15231. },
  15232. "OAuth": {
  15233. "type": "object",
  15234. "properties": {
  15235. "type": {
  15236. "type": "string",
  15237. "enum": ["oauth"]
  15238. },
  15239. "refresh": {
  15240. "type": "string"
  15241. },
  15242. "access": {
  15243. "type": "string"
  15244. },
  15245. "expires": {
  15246. "type": "integer",
  15247. "minimum": 0
  15248. },
  15249. "accountId": {
  15250. "type": "string"
  15251. },
  15252. "enterpriseUrl": {
  15253. "type": "string"
  15254. }
  15255. },
  15256. "required": ["type", "refresh", "access", "expires"],
  15257. "additionalProperties": false
  15258. },
  15259. "ApiAuth": {
  15260. "type": "object",
  15261. "properties": {
  15262. "type": {
  15263. "type": "string",
  15264. "enum": ["api"]
  15265. },
  15266. "key": {
  15267. "type": "string"
  15268. },
  15269. "metadata": {
  15270. "type": "object",
  15271. "additionalProperties": {
  15272. "type": "string"
  15273. }
  15274. }
  15275. },
  15276. "required": ["type", "key"],
  15277. "additionalProperties": false
  15278. },
  15279. "WellKnownAuth": {
  15280. "type": "object",
  15281. "properties": {
  15282. "type": {
  15283. "type": "string",
  15284. "enum": ["wellknown"]
  15285. },
  15286. "key": {
  15287. "type": "string"
  15288. },
  15289. "token": {
  15290. "type": "string"
  15291. }
  15292. },
  15293. "required": ["type", "key", "token"],
  15294. "additionalProperties": false
  15295. },
  15296. "Auth": {
  15297. "anyOf": [
  15298. {
  15299. "$ref": "#/components/schemas/OAuth"
  15300. },
  15301. {
  15302. "$ref": "#/components/schemas/ApiAuth"
  15303. },
  15304. {
  15305. "$ref": "#/components/schemas/WellKnownAuth"
  15306. }
  15307. ]
  15308. },
  15309. "effect_HttpApiError_BadRequest": {
  15310. "type": "object",
  15311. "properties": {
  15312. "_tag": {
  15313. "type": "string",
  15314. "enum": ["BadRequest"]
  15315. }
  15316. },
  15317. "required": ["_tag"],
  15318. "additionalProperties": false
  15319. },
  15320. "InvalidRequestError": {
  15321. "type": "object",
  15322. "properties": {
  15323. "_tag": {
  15324. "type": "string",
  15325. "enum": ["InvalidRequestError"]
  15326. },
  15327. "message": {
  15328. "type": "string"
  15329. },
  15330. "kind": {
  15331. "type": "string"
  15332. },
  15333. "field": {
  15334. "type": "string"
  15335. }
  15336. },
  15337. "required": ["_tag", "message"],
  15338. "additionalProperties": false
  15339. },
  15340. "MoveSessionError": {
  15341. "type": "object",
  15342. "properties": {
  15343. "name": {
  15344. "type": "string",
  15345. "enum": ["MoveSessionError"]
  15346. },
  15347. "data": {
  15348. "type": "object",
  15349. "properties": {
  15350. "message": {
  15351. "type": "string"
  15352. }
  15353. },
  15354. "required": ["message"],
  15355. "additionalProperties": false
  15356. }
  15357. },
  15358. "required": ["name", "data"],
  15359. "additionalProperties": false
  15360. },
  15361. "SnapshotFileDiff": {
  15362. "type": "object",
  15363. "properties": {
  15364. "file": {
  15365. "type": "string"
  15366. },
  15367. "patch": {
  15368. "type": "string"
  15369. },
  15370. "additions": {
  15371. "type": "number"
  15372. },
  15373. "deletions": {
  15374. "type": "number"
  15375. },
  15376. "status": {
  15377. "type": "string",
  15378. "enum": ["added", "deleted", "modified"]
  15379. }
  15380. },
  15381. "required": ["additions", "deletions"],
  15382. "additionalProperties": false
  15383. },
  15384. "PermissionAction": {
  15385. "type": "string",
  15386. "enum": ["allow", "deny", "ask"]
  15387. },
  15388. "PermissionRule": {
  15389. "type": "object",
  15390. "properties": {
  15391. "permission": {
  15392. "type": "string"
  15393. },
  15394. "pattern": {
  15395. "type": "string"
  15396. },
  15397. "action": {
  15398. "$ref": "#/components/schemas/PermissionAction"
  15399. }
  15400. },
  15401. "required": ["permission", "pattern", "action"],
  15402. "additionalProperties": false
  15403. },
  15404. "PermissionRuleset": {
  15405. "type": "array",
  15406. "items": {
  15407. "$ref": "#/components/schemas/PermissionRule"
  15408. }
  15409. },
  15410. "Session": {
  15411. "type": "object",
  15412. "properties": {
  15413. "id": {
  15414. "type": "string",
  15415. "pattern": "^ses"
  15416. },
  15417. "slug": {
  15418. "type": "string"
  15419. },
  15420. "projectID": {
  15421. "type": "string"
  15422. },
  15423. "workspaceID": {
  15424. "type": "string",
  15425. "pattern": "^wrk"
  15426. },
  15427. "directory": {
  15428. "type": "string"
  15429. },
  15430. "path": {
  15431. "type": "string"
  15432. },
  15433. "parentID": {
  15434. "type": "string",
  15435. "pattern": "^ses"
  15436. },
  15437. "summary": {
  15438. "type": "object",
  15439. "properties": {
  15440. "additions": {
  15441. "type": "number"
  15442. },
  15443. "deletions": {
  15444. "type": "number"
  15445. },
  15446. "files": {
  15447. "type": "number"
  15448. },
  15449. "diffs": {
  15450. "type": "array",
  15451. "items": {
  15452. "$ref": "#/components/schemas/SnapshotFileDiff"
  15453. }
  15454. }
  15455. },
  15456. "required": ["additions", "deletions", "files"],
  15457. "additionalProperties": false
  15458. },
  15459. "cost": {
  15460. "type": "number"
  15461. },
  15462. "tokens": {
  15463. "type": "object",
  15464. "properties": {
  15465. "input": {
  15466. "type": "number"
  15467. },
  15468. "output": {
  15469. "type": "number"
  15470. },
  15471. "reasoning": {
  15472. "type": "number"
  15473. },
  15474. "cache": {
  15475. "type": "object",
  15476. "properties": {
  15477. "read": {
  15478. "type": "number"
  15479. },
  15480. "write": {
  15481. "type": "number"
  15482. }
  15483. },
  15484. "required": ["read", "write"],
  15485. "additionalProperties": false
  15486. }
  15487. },
  15488. "required": ["input", "output", "reasoning", "cache"],
  15489. "additionalProperties": false
  15490. },
  15491. "share": {
  15492. "type": "object",
  15493. "properties": {
  15494. "url": {
  15495. "type": "string"
  15496. }
  15497. },
  15498. "required": ["url"],
  15499. "additionalProperties": false
  15500. },
  15501. "title": {
  15502. "type": "string"
  15503. },
  15504. "agent": {
  15505. "type": "string"
  15506. },
  15507. "model": {
  15508. "type": "object",
  15509. "properties": {
  15510. "id": {
  15511. "type": "string"
  15512. },
  15513. "providerID": {
  15514. "type": "string"
  15515. },
  15516. "variant": {
  15517. "type": "string"
  15518. }
  15519. },
  15520. "required": ["id", "providerID"],
  15521. "additionalProperties": false
  15522. },
  15523. "version": {
  15524. "type": "string"
  15525. },
  15526. "metadata": {
  15527. "type": "object"
  15528. },
  15529. "time": {
  15530. "type": "object",
  15531. "properties": {
  15532. "created": {
  15533. "type": "integer",
  15534. "minimum": 0
  15535. },
  15536. "updated": {
  15537. "type": "integer",
  15538. "minimum": 0
  15539. },
  15540. "compacting": {
  15541. "type": "integer",
  15542. "minimum": 0
  15543. },
  15544. "archived": {
  15545. "type": "number"
  15546. }
  15547. },
  15548. "required": ["created", "updated"],
  15549. "additionalProperties": false
  15550. },
  15551. "permission": {
  15552. "$ref": "#/components/schemas/PermissionRuleset"
  15553. },
  15554. "revert": {
  15555. "type": "object",
  15556. "properties": {
  15557. "messageID": {
  15558. "type": "string",
  15559. "pattern": "^msg"
  15560. },
  15561. "partID": {
  15562. "type": "string",
  15563. "pattern": "^prt"
  15564. },
  15565. "snapshot": {
  15566. "type": "string"
  15567. },
  15568. "diff": {
  15569. "type": "string"
  15570. }
  15571. },
  15572. "required": ["messageID"],
  15573. "additionalProperties": false
  15574. }
  15575. },
  15576. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15577. "additionalProperties": false
  15578. },
  15579. "OutputFormatText": {
  15580. "type": "object",
  15581. "properties": {
  15582. "type": {
  15583. "type": "string",
  15584. "enum": ["text"]
  15585. }
  15586. },
  15587. "required": ["type"],
  15588. "additionalProperties": false
  15589. },
  15590. "JSONSchema": {
  15591. "type": "object"
  15592. },
  15593. "OutputFormatJsonSchema": {
  15594. "type": "object",
  15595. "properties": {
  15596. "type": {
  15597. "type": "string",
  15598. "enum": ["json_schema"]
  15599. },
  15600. "schema": {
  15601. "$ref": "#/components/schemas/JSONSchema"
  15602. },
  15603. "retryCount": {
  15604. "type": "integer",
  15605. "minimum": 0
  15606. }
  15607. },
  15608. "required": ["type", "schema"],
  15609. "additionalProperties": false
  15610. },
  15611. "OutputFormat": {
  15612. "anyOf": [
  15613. {
  15614. "$ref": "#/components/schemas/OutputFormatText"
  15615. },
  15616. {
  15617. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15618. }
  15619. ]
  15620. },
  15621. "UserMessage": {
  15622. "type": "object",
  15623. "properties": {
  15624. "id": {
  15625. "type": "string",
  15626. "pattern": "^msg"
  15627. },
  15628. "sessionID": {
  15629. "type": "string",
  15630. "pattern": "^ses"
  15631. },
  15632. "role": {
  15633. "type": "string",
  15634. "enum": ["user"]
  15635. },
  15636. "time": {
  15637. "type": "object",
  15638. "properties": {
  15639. "created": {
  15640. "type": "number",
  15641. "minimum": 0
  15642. }
  15643. },
  15644. "required": ["created"],
  15645. "additionalProperties": false
  15646. },
  15647. "format": {
  15648. "$ref": "#/components/schemas/OutputFormat"
  15649. },
  15650. "summary": {
  15651. "type": "object",
  15652. "properties": {
  15653. "title": {
  15654. "type": "string"
  15655. },
  15656. "body": {
  15657. "type": "string"
  15658. },
  15659. "diffs": {
  15660. "type": "array",
  15661. "items": {
  15662. "$ref": "#/components/schemas/SnapshotFileDiff"
  15663. }
  15664. }
  15665. },
  15666. "required": ["diffs"],
  15667. "additionalProperties": false
  15668. },
  15669. "agent": {
  15670. "type": "string"
  15671. },
  15672. "model": {
  15673. "type": "object",
  15674. "properties": {
  15675. "providerID": {
  15676. "type": "string"
  15677. },
  15678. "modelID": {
  15679. "type": "string"
  15680. },
  15681. "variant": {
  15682. "type": "string"
  15683. }
  15684. },
  15685. "required": ["providerID", "modelID"],
  15686. "additionalProperties": false
  15687. },
  15688. "system": {
  15689. "type": "string"
  15690. },
  15691. "tools": {
  15692. "type": "object",
  15693. "additionalProperties": {
  15694. "type": "boolean"
  15695. }
  15696. }
  15697. },
  15698. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15699. "additionalProperties": false
  15700. },
  15701. "ProviderAuthError": {
  15702. "type": "object",
  15703. "properties": {
  15704. "name": {
  15705. "type": "string",
  15706. "enum": ["ProviderAuthError"]
  15707. },
  15708. "data": {
  15709. "type": "object",
  15710. "properties": {
  15711. "providerID": {
  15712. "type": "string"
  15713. },
  15714. "message": {
  15715. "type": "string"
  15716. }
  15717. },
  15718. "required": ["providerID", "message"],
  15719. "additionalProperties": false
  15720. }
  15721. },
  15722. "required": ["name", "data"],
  15723. "additionalProperties": false
  15724. },
  15725. "UnknownError": {
  15726. "type": "object",
  15727. "properties": {
  15728. "name": {
  15729. "type": "string",
  15730. "enum": ["UnknownError"]
  15731. },
  15732. "data": {
  15733. "type": "object",
  15734. "properties": {
  15735. "message": {
  15736. "type": "string"
  15737. },
  15738. "ref": {
  15739. "type": "string"
  15740. }
  15741. },
  15742. "required": ["message"],
  15743. "additionalProperties": false
  15744. }
  15745. },
  15746. "required": ["name", "data"],
  15747. "additionalProperties": false
  15748. },
  15749. "MessageOutputLengthError": {
  15750. "type": "object",
  15751. "properties": {
  15752. "name": {
  15753. "type": "string",
  15754. "enum": ["MessageOutputLengthError"]
  15755. },
  15756. "data": {
  15757. "type": "object",
  15758. "properties": {}
  15759. }
  15760. },
  15761. "required": ["name", "data"],
  15762. "additionalProperties": false
  15763. },
  15764. "MessageAbortedError": {
  15765. "type": "object",
  15766. "properties": {
  15767. "name": {
  15768. "type": "string",
  15769. "enum": ["MessageAbortedError"]
  15770. },
  15771. "data": {
  15772. "type": "object",
  15773. "properties": {
  15774. "message": {
  15775. "type": "string"
  15776. }
  15777. },
  15778. "required": ["message"],
  15779. "additionalProperties": false
  15780. }
  15781. },
  15782. "required": ["name", "data"],
  15783. "additionalProperties": false
  15784. },
  15785. "StructuredOutputError": {
  15786. "type": "object",
  15787. "properties": {
  15788. "name": {
  15789. "type": "string",
  15790. "enum": ["StructuredOutputError"]
  15791. },
  15792. "data": {
  15793. "type": "object",
  15794. "properties": {
  15795. "message": {
  15796. "type": "string"
  15797. },
  15798. "retries": {
  15799. "type": "integer",
  15800. "minimum": 0
  15801. }
  15802. },
  15803. "required": ["message", "retries"],
  15804. "additionalProperties": false
  15805. }
  15806. },
  15807. "required": ["name", "data"],
  15808. "additionalProperties": false
  15809. },
  15810. "ContextOverflowError": {
  15811. "type": "object",
  15812. "properties": {
  15813. "name": {
  15814. "type": "string",
  15815. "enum": ["ContextOverflowError"]
  15816. },
  15817. "data": {
  15818. "type": "object",
  15819. "properties": {
  15820. "message": {
  15821. "type": "string"
  15822. },
  15823. "responseBody": {
  15824. "type": "string"
  15825. }
  15826. },
  15827. "required": ["message"],
  15828. "additionalProperties": false
  15829. }
  15830. },
  15831. "required": ["name", "data"],
  15832. "additionalProperties": false
  15833. },
  15834. "ContentFilterError": {
  15835. "type": "object",
  15836. "properties": {
  15837. "name": {
  15838. "type": "string",
  15839. "enum": ["ContentFilterError"]
  15840. },
  15841. "data": {
  15842. "type": "object",
  15843. "properties": {
  15844. "message": {
  15845. "type": "string"
  15846. }
  15847. },
  15848. "required": ["message"],
  15849. "additionalProperties": false
  15850. }
  15851. },
  15852. "required": ["name", "data"],
  15853. "additionalProperties": false
  15854. },
  15855. "APIError": {
  15856. "type": "object",
  15857. "properties": {
  15858. "name": {
  15859. "type": "string",
  15860. "enum": ["APIError"]
  15861. },
  15862. "data": {
  15863. "type": "object",
  15864. "properties": {
  15865. "message": {
  15866. "type": "string"
  15867. },
  15868. "statusCode": {
  15869. "type": "integer",
  15870. "minimum": 0
  15871. },
  15872. "isRetryable": {
  15873. "type": "boolean"
  15874. },
  15875. "responseHeaders": {
  15876. "type": "object",
  15877. "additionalProperties": {
  15878. "type": "string"
  15879. }
  15880. },
  15881. "responseBody": {
  15882. "type": "string"
  15883. },
  15884. "metadata": {
  15885. "type": "object",
  15886. "additionalProperties": {
  15887. "type": "string"
  15888. }
  15889. }
  15890. },
  15891. "required": ["message", "isRetryable"],
  15892. "additionalProperties": false
  15893. }
  15894. },
  15895. "required": ["name", "data"],
  15896. "additionalProperties": false
  15897. },
  15898. "AssistantMessage": {
  15899. "type": "object",
  15900. "properties": {
  15901. "id": {
  15902. "type": "string",
  15903. "pattern": "^msg"
  15904. },
  15905. "sessionID": {
  15906. "type": "string",
  15907. "pattern": "^ses"
  15908. },
  15909. "role": {
  15910. "type": "string",
  15911. "enum": ["assistant"]
  15912. },
  15913. "time": {
  15914. "type": "object",
  15915. "properties": {
  15916. "created": {
  15917. "type": "integer",
  15918. "minimum": 0
  15919. },
  15920. "completed": {
  15921. "type": "integer",
  15922. "minimum": 0
  15923. }
  15924. },
  15925. "required": ["created"],
  15926. "additionalProperties": false
  15927. },
  15928. "error": {
  15929. "anyOf": [
  15930. {
  15931. "$ref": "#/components/schemas/ProviderAuthError"
  15932. },
  15933. {
  15934. "$ref": "#/components/schemas/UnknownError"
  15935. },
  15936. {
  15937. "$ref": "#/components/schemas/MessageOutputLengthError"
  15938. },
  15939. {
  15940. "$ref": "#/components/schemas/MessageAbortedError"
  15941. },
  15942. {
  15943. "$ref": "#/components/schemas/StructuredOutputError"
  15944. },
  15945. {
  15946. "$ref": "#/components/schemas/ContextOverflowError"
  15947. },
  15948. {
  15949. "$ref": "#/components/schemas/ContentFilterError"
  15950. },
  15951. {
  15952. "$ref": "#/components/schemas/APIError"
  15953. }
  15954. ]
  15955. },
  15956. "parentID": {
  15957. "type": "string",
  15958. "pattern": "^msg"
  15959. },
  15960. "modelID": {
  15961. "type": "string"
  15962. },
  15963. "providerID": {
  15964. "type": "string"
  15965. },
  15966. "mode": {
  15967. "type": "string"
  15968. },
  15969. "agent": {
  15970. "type": "string"
  15971. },
  15972. "path": {
  15973. "type": "object",
  15974. "properties": {
  15975. "cwd": {
  15976. "type": "string"
  15977. },
  15978. "root": {
  15979. "type": "string"
  15980. }
  15981. },
  15982. "required": ["cwd", "root"],
  15983. "additionalProperties": false
  15984. },
  15985. "summary": {
  15986. "type": "boolean"
  15987. },
  15988. "cost": {
  15989. "type": "number"
  15990. },
  15991. "tokens": {
  15992. "type": "object",
  15993. "properties": {
  15994. "total": {
  15995. "type": "number"
  15996. },
  15997. "input": {
  15998. "type": "number"
  15999. },
  16000. "output": {
  16001. "type": "number"
  16002. },
  16003. "reasoning": {
  16004. "type": "number"
  16005. },
  16006. "cache": {
  16007. "type": "object",
  16008. "properties": {
  16009. "read": {
  16010. "type": "number"
  16011. },
  16012. "write": {
  16013. "type": "number"
  16014. }
  16015. },
  16016. "required": ["read", "write"],
  16017. "additionalProperties": false
  16018. }
  16019. },
  16020. "required": ["input", "output", "reasoning", "cache"],
  16021. "additionalProperties": false
  16022. },
  16023. "structured": {},
  16024. "variant": {
  16025. "type": "string"
  16026. },
  16027. "finish": {
  16028. "type": "string"
  16029. }
  16030. },
  16031. "required": [
  16032. "id",
  16033. "sessionID",
  16034. "role",
  16035. "time",
  16036. "parentID",
  16037. "modelID",
  16038. "providerID",
  16039. "mode",
  16040. "agent",
  16041. "path",
  16042. "cost",
  16043. "tokens"
  16044. ],
  16045. "additionalProperties": false
  16046. },
  16047. "Message": {
  16048. "anyOf": [
  16049. {
  16050. "$ref": "#/components/schemas/UserMessage"
  16051. },
  16052. {
  16053. "$ref": "#/components/schemas/AssistantMessage"
  16054. }
  16055. ]
  16056. },
  16057. "TextPart": {
  16058. "type": "object",
  16059. "properties": {
  16060. "id": {
  16061. "type": "string",
  16062. "pattern": "^prt"
  16063. },
  16064. "sessionID": {
  16065. "type": "string",
  16066. "pattern": "^ses"
  16067. },
  16068. "messageID": {
  16069. "type": "string",
  16070. "pattern": "^msg"
  16071. },
  16072. "type": {
  16073. "type": "string",
  16074. "enum": ["text"]
  16075. },
  16076. "text": {
  16077. "type": "string"
  16078. },
  16079. "synthetic": {
  16080. "type": "boolean"
  16081. },
  16082. "ignored": {
  16083. "type": "boolean"
  16084. },
  16085. "time": {
  16086. "type": "object",
  16087. "properties": {
  16088. "start": {
  16089. "type": "integer",
  16090. "minimum": 0
  16091. },
  16092. "end": {
  16093. "type": "integer",
  16094. "minimum": 0
  16095. }
  16096. },
  16097. "required": ["start"],
  16098. "additionalProperties": false
  16099. },
  16100. "metadata": {
  16101. "type": "object"
  16102. }
  16103. },
  16104. "required": ["id", "sessionID", "messageID", "type", "text"],
  16105. "additionalProperties": false
  16106. },
  16107. "SubtaskPart": {
  16108. "type": "object",
  16109. "properties": {
  16110. "id": {
  16111. "type": "string",
  16112. "pattern": "^prt"
  16113. },
  16114. "sessionID": {
  16115. "type": "string",
  16116. "pattern": "^ses"
  16117. },
  16118. "messageID": {
  16119. "type": "string",
  16120. "pattern": "^msg"
  16121. },
  16122. "type": {
  16123. "type": "string",
  16124. "enum": ["subtask"]
  16125. },
  16126. "prompt": {
  16127. "type": "string"
  16128. },
  16129. "description": {
  16130. "type": "string"
  16131. },
  16132. "agent": {
  16133. "type": "string"
  16134. },
  16135. "model": {
  16136. "type": "object",
  16137. "properties": {
  16138. "providerID": {
  16139. "type": "string"
  16140. },
  16141. "modelID": {
  16142. "type": "string"
  16143. }
  16144. },
  16145. "required": ["providerID", "modelID"],
  16146. "additionalProperties": false
  16147. },
  16148. "command": {
  16149. "type": "string"
  16150. }
  16151. },
  16152. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16153. "additionalProperties": false
  16154. },
  16155. "ReasoningPart": {
  16156. "type": "object",
  16157. "properties": {
  16158. "id": {
  16159. "type": "string",
  16160. "pattern": "^prt"
  16161. },
  16162. "sessionID": {
  16163. "type": "string",
  16164. "pattern": "^ses"
  16165. },
  16166. "messageID": {
  16167. "type": "string",
  16168. "pattern": "^msg"
  16169. },
  16170. "type": {
  16171. "type": "string",
  16172. "enum": ["reasoning"]
  16173. },
  16174. "text": {
  16175. "type": "string"
  16176. },
  16177. "metadata": {
  16178. "type": "object"
  16179. },
  16180. "time": {
  16181. "type": "object",
  16182. "properties": {
  16183. "start": {
  16184. "type": "integer",
  16185. "minimum": 0
  16186. },
  16187. "end": {
  16188. "type": "integer",
  16189. "minimum": 0
  16190. }
  16191. },
  16192. "required": ["start"],
  16193. "additionalProperties": false
  16194. }
  16195. },
  16196. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16197. "additionalProperties": false
  16198. },
  16199. "FilePartSourceText": {
  16200. "type": "object",
  16201. "properties": {
  16202. "value": {
  16203. "type": "string"
  16204. },
  16205. "start": {
  16206. "type": "number"
  16207. },
  16208. "end": {
  16209. "type": "number"
  16210. }
  16211. },
  16212. "required": ["value", "start", "end"],
  16213. "additionalProperties": false
  16214. },
  16215. "FileSource": {
  16216. "type": "object",
  16217. "properties": {
  16218. "text": {
  16219. "$ref": "#/components/schemas/FilePartSourceText"
  16220. },
  16221. "type": {
  16222. "type": "string",
  16223. "enum": ["file"]
  16224. },
  16225. "path": {
  16226. "type": "string"
  16227. }
  16228. },
  16229. "required": ["text", "type", "path"],
  16230. "additionalProperties": false
  16231. },
  16232. "Range": {
  16233. "type": "object",
  16234. "properties": {
  16235. "start": {
  16236. "type": "object",
  16237. "properties": {
  16238. "line": {
  16239. "type": "integer",
  16240. "minimum": 0
  16241. },
  16242. "character": {
  16243. "type": "integer",
  16244. "minimum": 0
  16245. }
  16246. },
  16247. "required": ["line", "character"],
  16248. "additionalProperties": false
  16249. },
  16250. "end": {
  16251. "type": "object",
  16252. "properties": {
  16253. "line": {
  16254. "type": "integer",
  16255. "minimum": 0
  16256. },
  16257. "character": {
  16258. "type": "integer",
  16259. "minimum": 0
  16260. }
  16261. },
  16262. "required": ["line", "character"],
  16263. "additionalProperties": false
  16264. }
  16265. },
  16266. "required": ["start", "end"],
  16267. "additionalProperties": false
  16268. },
  16269. "SymbolSource": {
  16270. "type": "object",
  16271. "properties": {
  16272. "text": {
  16273. "$ref": "#/components/schemas/FilePartSourceText"
  16274. },
  16275. "type": {
  16276. "type": "string",
  16277. "enum": ["symbol"]
  16278. },
  16279. "path": {
  16280. "type": "string"
  16281. },
  16282. "range": {
  16283. "$ref": "#/components/schemas/Range"
  16284. },
  16285. "name": {
  16286. "type": "string"
  16287. },
  16288. "kind": {
  16289. "type": "integer",
  16290. "minimum": 0
  16291. }
  16292. },
  16293. "required": ["text", "type", "path", "range", "name", "kind"],
  16294. "additionalProperties": false
  16295. },
  16296. "ResourceSource": {
  16297. "type": "object",
  16298. "properties": {
  16299. "text": {
  16300. "$ref": "#/components/schemas/FilePartSourceText"
  16301. },
  16302. "type": {
  16303. "type": "string",
  16304. "enum": ["resource"]
  16305. },
  16306. "clientName": {
  16307. "type": "string"
  16308. },
  16309. "uri": {
  16310. "type": "string"
  16311. }
  16312. },
  16313. "required": ["text", "type", "clientName", "uri"],
  16314. "additionalProperties": false
  16315. },
  16316. "FilePartSource": {
  16317. "anyOf": [
  16318. {
  16319. "$ref": "#/components/schemas/FileSource"
  16320. },
  16321. {
  16322. "$ref": "#/components/schemas/SymbolSource"
  16323. },
  16324. {
  16325. "$ref": "#/components/schemas/ResourceSource"
  16326. }
  16327. ]
  16328. },
  16329. "FilePart": {
  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": ["file"]
  16347. },
  16348. "mime": {
  16349. "type": "string"
  16350. },
  16351. "filename": {
  16352. "type": "string"
  16353. },
  16354. "url": {
  16355. "type": "string"
  16356. },
  16357. "source": {
  16358. "$ref": "#/components/schemas/FilePartSource"
  16359. }
  16360. },
  16361. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16362. "additionalProperties": false
  16363. },
  16364. "ToolStatePending": {
  16365. "type": "object",
  16366. "properties": {
  16367. "status": {
  16368. "type": "string",
  16369. "enum": ["pending"]
  16370. },
  16371. "input": {
  16372. "type": "object"
  16373. },
  16374. "raw": {
  16375. "type": "string"
  16376. }
  16377. },
  16378. "required": ["status", "input", "raw"],
  16379. "additionalProperties": false
  16380. },
  16381. "ToolStateRunning": {
  16382. "type": "object",
  16383. "properties": {
  16384. "status": {
  16385. "type": "string",
  16386. "enum": ["running"]
  16387. },
  16388. "input": {
  16389. "type": "object"
  16390. },
  16391. "title": {
  16392. "type": "string"
  16393. },
  16394. "metadata": {
  16395. "type": "object"
  16396. },
  16397. "time": {
  16398. "type": "object",
  16399. "properties": {
  16400. "start": {
  16401. "type": "integer",
  16402. "minimum": 0
  16403. }
  16404. },
  16405. "required": ["start"],
  16406. "additionalProperties": false
  16407. }
  16408. },
  16409. "required": ["status", "input", "time"],
  16410. "additionalProperties": false
  16411. },
  16412. "ToolStateCompleted": {
  16413. "type": "object",
  16414. "properties": {
  16415. "status": {
  16416. "type": "string",
  16417. "enum": ["completed"]
  16418. },
  16419. "input": {
  16420. "type": "object"
  16421. },
  16422. "output": {
  16423. "type": "string"
  16424. },
  16425. "title": {
  16426. "type": "string"
  16427. },
  16428. "metadata": {
  16429. "type": "object"
  16430. },
  16431. "time": {
  16432. "type": "object",
  16433. "properties": {
  16434. "start": {
  16435. "type": "integer",
  16436. "minimum": 0
  16437. },
  16438. "end": {
  16439. "type": "integer",
  16440. "minimum": 0
  16441. },
  16442. "compacted": {
  16443. "type": "integer",
  16444. "minimum": 0
  16445. }
  16446. },
  16447. "required": ["start", "end"],
  16448. "additionalProperties": false
  16449. },
  16450. "attachments": {
  16451. "type": "array",
  16452. "items": {
  16453. "$ref": "#/components/schemas/FilePart"
  16454. }
  16455. }
  16456. },
  16457. "required": ["status", "input", "output", "title", "metadata", "time"],
  16458. "additionalProperties": false
  16459. },
  16460. "ToolStateError": {
  16461. "type": "object",
  16462. "properties": {
  16463. "status": {
  16464. "type": "string",
  16465. "enum": ["error"]
  16466. },
  16467. "input": {
  16468. "type": "object"
  16469. },
  16470. "error": {
  16471. "type": "string"
  16472. },
  16473. "metadata": {
  16474. "type": "object"
  16475. },
  16476. "time": {
  16477. "type": "object",
  16478. "properties": {
  16479. "start": {
  16480. "type": "integer",
  16481. "minimum": 0
  16482. },
  16483. "end": {
  16484. "type": "integer",
  16485. "minimum": 0
  16486. }
  16487. },
  16488. "required": ["start", "end"],
  16489. "additionalProperties": false
  16490. }
  16491. },
  16492. "required": ["status", "input", "error", "time"],
  16493. "additionalProperties": false
  16494. },
  16495. "ToolState": {
  16496. "anyOf": [
  16497. {
  16498. "$ref": "#/components/schemas/ToolStatePending"
  16499. },
  16500. {
  16501. "$ref": "#/components/schemas/ToolStateRunning"
  16502. },
  16503. {
  16504. "$ref": "#/components/schemas/ToolStateCompleted"
  16505. },
  16506. {
  16507. "$ref": "#/components/schemas/ToolStateError"
  16508. }
  16509. ]
  16510. },
  16511. "ToolPart": {
  16512. "type": "object",
  16513. "properties": {
  16514. "id": {
  16515. "type": "string",
  16516. "pattern": "^prt"
  16517. },
  16518. "sessionID": {
  16519. "type": "string",
  16520. "pattern": "^ses"
  16521. },
  16522. "messageID": {
  16523. "type": "string",
  16524. "pattern": "^msg"
  16525. },
  16526. "type": {
  16527. "type": "string",
  16528. "enum": ["tool"]
  16529. },
  16530. "callID": {
  16531. "type": "string"
  16532. },
  16533. "tool": {
  16534. "type": "string"
  16535. },
  16536. "state": {
  16537. "$ref": "#/components/schemas/ToolState"
  16538. },
  16539. "metadata": {
  16540. "type": "object"
  16541. }
  16542. },
  16543. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16544. "additionalProperties": false
  16545. },
  16546. "StepStartPart": {
  16547. "type": "object",
  16548. "properties": {
  16549. "id": {
  16550. "type": "string",
  16551. "pattern": "^prt"
  16552. },
  16553. "sessionID": {
  16554. "type": "string",
  16555. "pattern": "^ses"
  16556. },
  16557. "messageID": {
  16558. "type": "string",
  16559. "pattern": "^msg"
  16560. },
  16561. "type": {
  16562. "type": "string",
  16563. "enum": ["step-start"]
  16564. },
  16565. "snapshot": {
  16566. "type": "string"
  16567. }
  16568. },
  16569. "required": ["id", "sessionID", "messageID", "type"],
  16570. "additionalProperties": false
  16571. },
  16572. "StepFinishPart": {
  16573. "type": "object",
  16574. "properties": {
  16575. "id": {
  16576. "type": "string",
  16577. "pattern": "^prt"
  16578. },
  16579. "sessionID": {
  16580. "type": "string",
  16581. "pattern": "^ses"
  16582. },
  16583. "messageID": {
  16584. "type": "string",
  16585. "pattern": "^msg"
  16586. },
  16587. "type": {
  16588. "type": "string",
  16589. "enum": ["step-finish"]
  16590. },
  16591. "reason": {
  16592. "type": "string"
  16593. },
  16594. "snapshot": {
  16595. "type": "string"
  16596. },
  16597. "cost": {
  16598. "type": "number"
  16599. },
  16600. "tokens": {
  16601. "type": "object",
  16602. "properties": {
  16603. "total": {
  16604. "type": "number"
  16605. },
  16606. "input": {
  16607. "type": "number"
  16608. },
  16609. "output": {
  16610. "type": "number"
  16611. },
  16612. "reasoning": {
  16613. "type": "number"
  16614. },
  16615. "cache": {
  16616. "type": "object",
  16617. "properties": {
  16618. "read": {
  16619. "type": "number"
  16620. },
  16621. "write": {
  16622. "type": "number"
  16623. }
  16624. },
  16625. "required": ["read", "write"],
  16626. "additionalProperties": false
  16627. }
  16628. },
  16629. "required": ["input", "output", "reasoning", "cache"],
  16630. "additionalProperties": false
  16631. }
  16632. },
  16633. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16634. "additionalProperties": false
  16635. },
  16636. "SnapshotPart": {
  16637. "type": "object",
  16638. "properties": {
  16639. "id": {
  16640. "type": "string",
  16641. "pattern": "^prt"
  16642. },
  16643. "sessionID": {
  16644. "type": "string",
  16645. "pattern": "^ses"
  16646. },
  16647. "messageID": {
  16648. "type": "string",
  16649. "pattern": "^msg"
  16650. },
  16651. "type": {
  16652. "type": "string",
  16653. "enum": ["snapshot"]
  16654. },
  16655. "snapshot": {
  16656. "type": "string"
  16657. }
  16658. },
  16659. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16660. "additionalProperties": false
  16661. },
  16662. "PatchPart": {
  16663. "type": "object",
  16664. "properties": {
  16665. "id": {
  16666. "type": "string",
  16667. "pattern": "^prt"
  16668. },
  16669. "sessionID": {
  16670. "type": "string",
  16671. "pattern": "^ses"
  16672. },
  16673. "messageID": {
  16674. "type": "string",
  16675. "pattern": "^msg"
  16676. },
  16677. "type": {
  16678. "type": "string",
  16679. "enum": ["patch"]
  16680. },
  16681. "hash": {
  16682. "type": "string"
  16683. },
  16684. "files": {
  16685. "type": "array",
  16686. "items": {
  16687. "type": "string"
  16688. }
  16689. }
  16690. },
  16691. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16692. "additionalProperties": false
  16693. },
  16694. "AgentPart": {
  16695. "type": "object",
  16696. "properties": {
  16697. "id": {
  16698. "type": "string",
  16699. "pattern": "^prt"
  16700. },
  16701. "sessionID": {
  16702. "type": "string",
  16703. "pattern": "^ses"
  16704. },
  16705. "messageID": {
  16706. "type": "string",
  16707. "pattern": "^msg"
  16708. },
  16709. "type": {
  16710. "type": "string",
  16711. "enum": ["agent"]
  16712. },
  16713. "name": {
  16714. "type": "string"
  16715. },
  16716. "source": {
  16717. "type": "object",
  16718. "properties": {
  16719. "value": {
  16720. "type": "string"
  16721. },
  16722. "start": {
  16723. "type": "integer",
  16724. "minimum": 0
  16725. },
  16726. "end": {
  16727. "type": "integer",
  16728. "minimum": 0
  16729. }
  16730. },
  16731. "required": ["value", "start", "end"],
  16732. "additionalProperties": false
  16733. }
  16734. },
  16735. "required": ["id", "sessionID", "messageID", "type", "name"],
  16736. "additionalProperties": false
  16737. },
  16738. "RetryPart": {
  16739. "type": "object",
  16740. "properties": {
  16741. "id": {
  16742. "type": "string",
  16743. "pattern": "^prt"
  16744. },
  16745. "sessionID": {
  16746. "type": "string",
  16747. "pattern": "^ses"
  16748. },
  16749. "messageID": {
  16750. "type": "string",
  16751. "pattern": "^msg"
  16752. },
  16753. "type": {
  16754. "type": "string",
  16755. "enum": ["retry"]
  16756. },
  16757. "attempt": {
  16758. "type": "integer",
  16759. "minimum": 0
  16760. },
  16761. "error": {
  16762. "$ref": "#/components/schemas/APIError"
  16763. },
  16764. "time": {
  16765. "type": "object",
  16766. "properties": {
  16767. "created": {
  16768. "type": "integer",
  16769. "minimum": 0
  16770. }
  16771. },
  16772. "required": ["created"],
  16773. "additionalProperties": false
  16774. }
  16775. },
  16776. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16777. "additionalProperties": false
  16778. },
  16779. "CompactionPart": {
  16780. "type": "object",
  16781. "properties": {
  16782. "id": {
  16783. "type": "string",
  16784. "pattern": "^prt"
  16785. },
  16786. "sessionID": {
  16787. "type": "string",
  16788. "pattern": "^ses"
  16789. },
  16790. "messageID": {
  16791. "type": "string",
  16792. "pattern": "^msg"
  16793. },
  16794. "type": {
  16795. "type": "string",
  16796. "enum": ["compaction"]
  16797. },
  16798. "auto": {
  16799. "type": "boolean"
  16800. },
  16801. "overflow": {
  16802. "type": "boolean"
  16803. },
  16804. "tail_start_id": {
  16805. "type": "string",
  16806. "pattern": "^msg"
  16807. }
  16808. },
  16809. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16810. "additionalProperties": false
  16811. },
  16812. "Part": {
  16813. "anyOf": [
  16814. {
  16815. "$ref": "#/components/schemas/TextPart"
  16816. },
  16817. {
  16818. "$ref": "#/components/schemas/SubtaskPart"
  16819. },
  16820. {
  16821. "$ref": "#/components/schemas/ReasoningPart"
  16822. },
  16823. {
  16824. "$ref": "#/components/schemas/FilePart"
  16825. },
  16826. {
  16827. "$ref": "#/components/schemas/ToolPart"
  16828. },
  16829. {
  16830. "$ref": "#/components/schemas/StepStartPart"
  16831. },
  16832. {
  16833. "$ref": "#/components/schemas/StepFinishPart"
  16834. },
  16835. {
  16836. "$ref": "#/components/schemas/SnapshotPart"
  16837. },
  16838. {
  16839. "$ref": "#/components/schemas/PatchPart"
  16840. },
  16841. {
  16842. "$ref": "#/components/schemas/AgentPart"
  16843. },
  16844. {
  16845. "$ref": "#/components/schemas/RetryPart"
  16846. },
  16847. {
  16848. "$ref": "#/components/schemas/CompactionPart"
  16849. }
  16850. ]
  16851. },
  16852. "Prompt": {
  16853. "type": "object",
  16854. "properties": {
  16855. "text": {
  16856. "type": "string"
  16857. },
  16858. "files": {
  16859. "type": "array",
  16860. "items": {
  16861. "$ref": "#/components/schemas/PromptFileAttachment"
  16862. }
  16863. },
  16864. "agents": {
  16865. "type": "array",
  16866. "items": {
  16867. "$ref": "#/components/schemas/PromptAgentAttachment"
  16868. }
  16869. }
  16870. },
  16871. "required": ["text"],
  16872. "additionalProperties": false
  16873. },
  16874. "Pty": {
  16875. "type": "object",
  16876. "properties": {
  16877. "id": {
  16878. "type": "string",
  16879. "pattern": "^pty"
  16880. },
  16881. "title": {
  16882. "type": "string"
  16883. },
  16884. "command": {
  16885. "type": "string"
  16886. },
  16887. "args": {
  16888. "type": "array",
  16889. "items": {
  16890. "type": "string"
  16891. }
  16892. },
  16893. "cwd": {
  16894. "type": "string"
  16895. },
  16896. "status": {
  16897. "type": "string",
  16898. "enum": ["running", "exited"]
  16899. },
  16900. "pid": {
  16901. "type": "integer",
  16902. "minimum": 0
  16903. },
  16904. "exitCode": {
  16905. "type": "integer",
  16906. "minimum": 0
  16907. }
  16908. },
  16909. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16910. "additionalProperties": false
  16911. },
  16912. "Todo": {
  16913. "type": "object",
  16914. "properties": {
  16915. "content": {
  16916. "type": "string",
  16917. "description": "Brief description of the task"
  16918. },
  16919. "status": {
  16920. "type": "string",
  16921. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16922. },
  16923. "priority": {
  16924. "type": "string",
  16925. "description": "Priority level of the task: high, medium, low"
  16926. }
  16927. },
  16928. "required": ["content", "status", "priority"],
  16929. "additionalProperties": false
  16930. },
  16931. "SessionStatus": {
  16932. "anyOf": [
  16933. {
  16934. "type": "object",
  16935. "properties": {
  16936. "type": {
  16937. "type": "string",
  16938. "enum": ["idle"]
  16939. }
  16940. },
  16941. "required": ["type"],
  16942. "additionalProperties": false
  16943. },
  16944. {
  16945. "type": "object",
  16946. "properties": {
  16947. "type": {
  16948. "type": "string",
  16949. "enum": ["retry"]
  16950. },
  16951. "attempt": {
  16952. "type": "integer",
  16953. "minimum": 0
  16954. },
  16955. "message": {
  16956. "type": "string"
  16957. },
  16958. "action": {
  16959. "type": "object",
  16960. "properties": {
  16961. "reason": {
  16962. "type": "string"
  16963. },
  16964. "provider": {
  16965. "type": "string"
  16966. },
  16967. "title": {
  16968. "type": "string"
  16969. },
  16970. "message": {
  16971. "type": "string"
  16972. },
  16973. "label": {
  16974. "type": "string"
  16975. },
  16976. "link": {
  16977. "type": "string"
  16978. }
  16979. },
  16980. "required": ["reason", "provider", "title", "message", "label"],
  16981. "additionalProperties": false
  16982. },
  16983. "next": {
  16984. "type": "integer",
  16985. "minimum": 0
  16986. }
  16987. },
  16988. "required": ["type", "attempt", "message", "next"],
  16989. "additionalProperties": false
  16990. },
  16991. {
  16992. "type": "object",
  16993. "properties": {
  16994. "type": {
  16995. "type": "string",
  16996. "enum": ["busy"]
  16997. }
  16998. },
  16999. "required": ["type"],
  17000. "additionalProperties": false
  17001. }
  17002. ]
  17003. },
  17004. "QuestionOption": {
  17005. "type": "object",
  17006. "properties": {
  17007. "label": {
  17008. "type": "string",
  17009. "description": "Display text (1-5 words, concise)"
  17010. },
  17011. "description": {
  17012. "type": "string",
  17013. "description": "Explanation of choice"
  17014. }
  17015. },
  17016. "required": ["label", "description"],
  17017. "additionalProperties": false
  17018. },
  17019. "QuestionInfo": {
  17020. "type": "object",
  17021. "properties": {
  17022. "question": {
  17023. "type": "string",
  17024. "description": "Complete question"
  17025. },
  17026. "header": {
  17027. "type": "string",
  17028. "description": "Very short label (max 30 chars)"
  17029. },
  17030. "options": {
  17031. "type": "array",
  17032. "items": {
  17033. "$ref": "#/components/schemas/QuestionOption"
  17034. },
  17035. "description": "Available choices"
  17036. },
  17037. "multiple": {
  17038. "type": "boolean"
  17039. },
  17040. "custom": {
  17041. "type": "boolean"
  17042. }
  17043. },
  17044. "required": ["question", "header", "options"],
  17045. "additionalProperties": false
  17046. },
  17047. "QuestionTool": {
  17048. "type": "object",
  17049. "properties": {
  17050. "messageID": {
  17051. "type": "string",
  17052. "pattern": "^msg"
  17053. },
  17054. "callID": {
  17055. "type": "string"
  17056. }
  17057. },
  17058. "required": ["messageID", "callID"],
  17059. "additionalProperties": false
  17060. },
  17061. "QuestionAnswer": {
  17062. "type": "array",
  17063. "items": {
  17064. "type": "string"
  17065. }
  17066. },
  17067. "GlobalEvent": {
  17068. "type": "object",
  17069. "properties": {
  17070. "directory": {
  17071. "type": "string"
  17072. },
  17073. "project": {
  17074. "type": "string"
  17075. },
  17076. "workspace": {
  17077. "type": "string"
  17078. },
  17079. "payload": {
  17080. "anyOf": [
  17081. {
  17082. "type": "object",
  17083. "properties": {
  17084. "id": {
  17085. "type": "string",
  17086. "pattern": "^evt_"
  17087. },
  17088. "type": {
  17089. "type": "string",
  17090. "enum": ["models-dev.refreshed"]
  17091. },
  17092. "properties": {
  17093. "type": "object",
  17094. "properties": {}
  17095. }
  17096. },
  17097. "required": ["id", "type", "properties"],
  17098. "additionalProperties": false
  17099. },
  17100. {
  17101. "type": "object",
  17102. "properties": {
  17103. "id": {
  17104. "type": "string",
  17105. "pattern": "^evt_"
  17106. },
  17107. "type": {
  17108. "type": "string",
  17109. "enum": ["integration.updated"]
  17110. },
  17111. "properties": {
  17112. "type": "object",
  17113. "properties": {}
  17114. }
  17115. },
  17116. "required": ["id", "type", "properties"],
  17117. "additionalProperties": false
  17118. },
  17119. {
  17120. "type": "object",
  17121. "properties": {
  17122. "id": {
  17123. "type": "string",
  17124. "pattern": "^evt_"
  17125. },
  17126. "type": {
  17127. "type": "string",
  17128. "enum": ["integration.connection.updated"]
  17129. },
  17130. "properties": {
  17131. "type": "object",
  17132. "properties": {
  17133. "integrationID": {
  17134. "type": "string"
  17135. }
  17136. },
  17137. "required": ["integrationID"],
  17138. "additionalProperties": false
  17139. }
  17140. },
  17141. "required": ["id", "type", "properties"],
  17142. "additionalProperties": false
  17143. },
  17144. {
  17145. "type": "object",
  17146. "properties": {
  17147. "id": {
  17148. "type": "string",
  17149. "pattern": "^evt_"
  17150. },
  17151. "type": {
  17152. "type": "string",
  17153. "enum": ["catalog.updated"]
  17154. },
  17155. "properties": {
  17156. "type": "object",
  17157. "properties": {}
  17158. }
  17159. },
  17160. "required": ["id", "type", "properties"],
  17161. "additionalProperties": false
  17162. },
  17163. {
  17164. "type": "object",
  17165. "properties": {
  17166. "id": {
  17167. "type": "string",
  17168. "pattern": "^evt_"
  17169. },
  17170. "type": {
  17171. "type": "string",
  17172. "enum": ["session.created"]
  17173. },
  17174. "properties": {
  17175. "type": "object",
  17176. "properties": {
  17177. "sessionID": {
  17178. "type": "string",
  17179. "pattern": "^ses"
  17180. },
  17181. "info": {
  17182. "$ref": "#/components/schemas/Session"
  17183. }
  17184. },
  17185. "required": ["sessionID", "info"],
  17186. "additionalProperties": false
  17187. }
  17188. },
  17189. "required": ["id", "type", "properties"],
  17190. "additionalProperties": false
  17191. },
  17192. {
  17193. "type": "object",
  17194. "properties": {
  17195. "id": {
  17196. "type": "string",
  17197. "pattern": "^evt_"
  17198. },
  17199. "type": {
  17200. "type": "string",
  17201. "enum": ["session.updated"]
  17202. },
  17203. "properties": {
  17204. "type": "object",
  17205. "properties": {
  17206. "sessionID": {
  17207. "type": "string",
  17208. "pattern": "^ses"
  17209. },
  17210. "info": {
  17211. "$ref": "#/components/schemas/Session"
  17212. }
  17213. },
  17214. "required": ["sessionID", "info"],
  17215. "additionalProperties": false
  17216. }
  17217. },
  17218. "required": ["id", "type", "properties"],
  17219. "additionalProperties": false
  17220. },
  17221. {
  17222. "type": "object",
  17223. "properties": {
  17224. "id": {
  17225. "type": "string",
  17226. "pattern": "^evt_"
  17227. },
  17228. "type": {
  17229. "type": "string",
  17230. "enum": ["session.deleted"]
  17231. },
  17232. "properties": {
  17233. "type": "object",
  17234. "properties": {
  17235. "sessionID": {
  17236. "type": "string",
  17237. "pattern": "^ses"
  17238. },
  17239. "info": {
  17240. "$ref": "#/components/schemas/Session"
  17241. }
  17242. },
  17243. "required": ["sessionID", "info"],
  17244. "additionalProperties": false
  17245. }
  17246. },
  17247. "required": ["id", "type", "properties"],
  17248. "additionalProperties": false
  17249. },
  17250. {
  17251. "type": "object",
  17252. "properties": {
  17253. "id": {
  17254. "type": "string",
  17255. "pattern": "^evt_"
  17256. },
  17257. "type": {
  17258. "type": "string",
  17259. "enum": ["message.updated"]
  17260. },
  17261. "properties": {
  17262. "type": "object",
  17263. "properties": {
  17264. "sessionID": {
  17265. "type": "string",
  17266. "pattern": "^ses"
  17267. },
  17268. "info": {
  17269. "$ref": "#/components/schemas/Message"
  17270. }
  17271. },
  17272. "required": ["sessionID", "info"],
  17273. "additionalProperties": false
  17274. }
  17275. },
  17276. "required": ["id", "type", "properties"],
  17277. "additionalProperties": false
  17278. },
  17279. {
  17280. "type": "object",
  17281. "properties": {
  17282. "id": {
  17283. "type": "string",
  17284. "pattern": "^evt_"
  17285. },
  17286. "type": {
  17287. "type": "string",
  17288. "enum": ["message.removed"]
  17289. },
  17290. "properties": {
  17291. "type": "object",
  17292. "properties": {
  17293. "sessionID": {
  17294. "type": "string",
  17295. "pattern": "^ses"
  17296. },
  17297. "messageID": {
  17298. "type": "string",
  17299. "pattern": "^msg"
  17300. }
  17301. },
  17302. "required": ["sessionID", "messageID"],
  17303. "additionalProperties": false
  17304. }
  17305. },
  17306. "required": ["id", "type", "properties"],
  17307. "additionalProperties": false
  17308. },
  17309. {
  17310. "type": "object",
  17311. "properties": {
  17312. "id": {
  17313. "type": "string",
  17314. "pattern": "^evt_"
  17315. },
  17316. "type": {
  17317. "type": "string",
  17318. "enum": ["message.part.updated"]
  17319. },
  17320. "properties": {
  17321. "type": "object",
  17322. "properties": {
  17323. "sessionID": {
  17324. "type": "string",
  17325. "pattern": "^ses"
  17326. },
  17327. "part": {
  17328. "$ref": "#/components/schemas/Part"
  17329. },
  17330. "time": {
  17331. "type": "number"
  17332. }
  17333. },
  17334. "required": ["sessionID", "part", "time"],
  17335. "additionalProperties": false
  17336. }
  17337. },
  17338. "required": ["id", "type", "properties"],
  17339. "additionalProperties": false
  17340. },
  17341. {
  17342. "type": "object",
  17343. "properties": {
  17344. "id": {
  17345. "type": "string",
  17346. "pattern": "^evt_"
  17347. },
  17348. "type": {
  17349. "type": "string",
  17350. "enum": ["message.part.removed"]
  17351. },
  17352. "properties": {
  17353. "type": "object",
  17354. "properties": {
  17355. "sessionID": {
  17356. "type": "string",
  17357. "pattern": "^ses"
  17358. },
  17359. "messageID": {
  17360. "type": "string",
  17361. "pattern": "^msg"
  17362. },
  17363. "partID": {
  17364. "type": "string",
  17365. "pattern": "^prt"
  17366. }
  17367. },
  17368. "required": ["sessionID", "messageID", "partID"],
  17369. "additionalProperties": false
  17370. }
  17371. },
  17372. "required": ["id", "type", "properties"],
  17373. "additionalProperties": false
  17374. },
  17375. {
  17376. "type": "object",
  17377. "properties": {
  17378. "id": {
  17379. "type": "string",
  17380. "pattern": "^evt_"
  17381. },
  17382. "type": {
  17383. "type": "string",
  17384. "enum": ["session.next.agent.switched"]
  17385. },
  17386. "properties": {
  17387. "type": "object",
  17388. "properties": {
  17389. "timestamp": {
  17390. "type": "number"
  17391. },
  17392. "sessionID": {
  17393. "type": "string",
  17394. "pattern": "^ses"
  17395. },
  17396. "messageID": {
  17397. "type": "string",
  17398. "pattern": "^msg_"
  17399. },
  17400. "agent": {
  17401. "type": "string"
  17402. }
  17403. },
  17404. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17405. "additionalProperties": false
  17406. }
  17407. },
  17408. "required": ["id", "type", "properties"],
  17409. "additionalProperties": false
  17410. },
  17411. {
  17412. "type": "object",
  17413. "properties": {
  17414. "id": {
  17415. "type": "string",
  17416. "pattern": "^evt_"
  17417. },
  17418. "type": {
  17419. "type": "string",
  17420. "enum": ["session.next.model.switched"]
  17421. },
  17422. "properties": {
  17423. "type": "object",
  17424. "properties": {
  17425. "timestamp": {
  17426. "type": "number"
  17427. },
  17428. "sessionID": {
  17429. "type": "string",
  17430. "pattern": "^ses"
  17431. },
  17432. "messageID": {
  17433. "type": "string",
  17434. "pattern": "^msg_"
  17435. },
  17436. "model": {
  17437. "type": "object",
  17438. "properties": {
  17439. "id": {
  17440. "type": "string"
  17441. },
  17442. "providerID": {
  17443. "type": "string"
  17444. },
  17445. "variant": {
  17446. "type": "string"
  17447. }
  17448. },
  17449. "required": ["id", "providerID"],
  17450. "additionalProperties": false
  17451. }
  17452. },
  17453. "required": ["timestamp", "sessionID", "messageID", "model"],
  17454. "additionalProperties": false
  17455. }
  17456. },
  17457. "required": ["id", "type", "properties"],
  17458. "additionalProperties": false
  17459. },
  17460. {
  17461. "type": "object",
  17462. "properties": {
  17463. "id": {
  17464. "type": "string",
  17465. "pattern": "^evt_"
  17466. },
  17467. "type": {
  17468. "type": "string",
  17469. "enum": ["session.next.moved"]
  17470. },
  17471. "properties": {
  17472. "type": "object",
  17473. "properties": {
  17474. "timestamp": {
  17475. "type": "number"
  17476. },
  17477. "sessionID": {
  17478. "type": "string",
  17479. "pattern": "^ses"
  17480. },
  17481. "location": {
  17482. "$ref": "#/components/schemas/LocationRef"
  17483. },
  17484. "subdirectory": {
  17485. "type": "string"
  17486. }
  17487. },
  17488. "required": ["timestamp", "sessionID", "location"],
  17489. "additionalProperties": false
  17490. }
  17491. },
  17492. "required": ["id", "type", "properties"],
  17493. "additionalProperties": false
  17494. },
  17495. {
  17496. "type": "object",
  17497. "properties": {
  17498. "id": {
  17499. "type": "string",
  17500. "pattern": "^evt_"
  17501. },
  17502. "type": {
  17503. "type": "string",
  17504. "enum": ["session.next.prompted"]
  17505. },
  17506. "properties": {
  17507. "type": "object",
  17508. "properties": {
  17509. "timestamp": {
  17510. "type": "number"
  17511. },
  17512. "sessionID": {
  17513. "type": "string",
  17514. "pattern": "^ses"
  17515. },
  17516. "messageID": {
  17517. "type": "string",
  17518. "pattern": "^msg_"
  17519. },
  17520. "prompt": {
  17521. "$ref": "#/components/schemas/Prompt"
  17522. },
  17523. "delivery": {
  17524. "type": "string",
  17525. "enum": ["steer", "queue"]
  17526. }
  17527. },
  17528. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17529. "additionalProperties": false
  17530. }
  17531. },
  17532. "required": ["id", "type", "properties"],
  17533. "additionalProperties": false
  17534. },
  17535. {
  17536. "type": "object",
  17537. "properties": {
  17538. "id": {
  17539. "type": "string",
  17540. "pattern": "^evt_"
  17541. },
  17542. "type": {
  17543. "type": "string",
  17544. "enum": ["session.next.prompt.admitted"]
  17545. },
  17546. "properties": {
  17547. "type": "object",
  17548. "properties": {
  17549. "timestamp": {
  17550. "type": "number"
  17551. },
  17552. "sessionID": {
  17553. "type": "string",
  17554. "pattern": "^ses"
  17555. },
  17556. "messageID": {
  17557. "type": "string",
  17558. "pattern": "^msg_"
  17559. },
  17560. "prompt": {
  17561. "$ref": "#/components/schemas/Prompt"
  17562. },
  17563. "delivery": {
  17564. "type": "string",
  17565. "enum": ["steer", "queue"]
  17566. }
  17567. },
  17568. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17569. "additionalProperties": false
  17570. }
  17571. },
  17572. "required": ["id", "type", "properties"],
  17573. "additionalProperties": false
  17574. },
  17575. {
  17576. "type": "object",
  17577. "properties": {
  17578. "id": {
  17579. "type": "string",
  17580. "pattern": "^evt_"
  17581. },
  17582. "type": {
  17583. "type": "string",
  17584. "enum": ["session.next.context.updated"]
  17585. },
  17586. "properties": {
  17587. "type": "object",
  17588. "properties": {
  17589. "timestamp": {
  17590. "type": "number"
  17591. },
  17592. "sessionID": {
  17593. "type": "string",
  17594. "pattern": "^ses"
  17595. },
  17596. "messageID": {
  17597. "type": "string",
  17598. "pattern": "^msg_"
  17599. },
  17600. "text": {
  17601. "type": "string"
  17602. }
  17603. },
  17604. "required": ["timestamp", "sessionID", "messageID", "text"],
  17605. "additionalProperties": false
  17606. }
  17607. },
  17608. "required": ["id", "type", "properties"],
  17609. "additionalProperties": false
  17610. },
  17611. {
  17612. "type": "object",
  17613. "properties": {
  17614. "id": {
  17615. "type": "string",
  17616. "pattern": "^evt_"
  17617. },
  17618. "type": {
  17619. "type": "string",
  17620. "enum": ["session.next.synthetic"]
  17621. },
  17622. "properties": {
  17623. "type": "object",
  17624. "properties": {
  17625. "timestamp": {
  17626. "type": "number"
  17627. },
  17628. "sessionID": {
  17629. "type": "string",
  17630. "pattern": "^ses"
  17631. },
  17632. "messageID": {
  17633. "type": "string",
  17634. "pattern": "^msg_"
  17635. },
  17636. "text": {
  17637. "type": "string"
  17638. }
  17639. },
  17640. "required": ["timestamp", "sessionID", "messageID", "text"],
  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.shell.started"]
  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. "callID": {
  17673. "type": "string"
  17674. },
  17675. "command": {
  17676. "type": "string"
  17677. }
  17678. },
  17679. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17680. "additionalProperties": false
  17681. }
  17682. },
  17683. "required": ["id", "type", "properties"],
  17684. "additionalProperties": false
  17685. },
  17686. {
  17687. "type": "object",
  17688. "properties": {
  17689. "id": {
  17690. "type": "string",
  17691. "pattern": "^evt_"
  17692. },
  17693. "type": {
  17694. "type": "string",
  17695. "enum": ["session.next.shell.ended"]
  17696. },
  17697. "properties": {
  17698. "type": "object",
  17699. "properties": {
  17700. "timestamp": {
  17701. "type": "number"
  17702. },
  17703. "sessionID": {
  17704. "type": "string",
  17705. "pattern": "^ses"
  17706. },
  17707. "callID": {
  17708. "type": "string"
  17709. },
  17710. "output": {
  17711. "type": "string"
  17712. }
  17713. },
  17714. "required": ["timestamp", "sessionID", "callID", "output"],
  17715. "additionalProperties": false
  17716. }
  17717. },
  17718. "required": ["id", "type", "properties"],
  17719. "additionalProperties": false
  17720. },
  17721. {
  17722. "type": "object",
  17723. "properties": {
  17724. "id": {
  17725. "type": "string",
  17726. "pattern": "^evt_"
  17727. },
  17728. "type": {
  17729. "type": "string",
  17730. "enum": ["session.next.step.started"]
  17731. },
  17732. "properties": {
  17733. "type": "object",
  17734. "properties": {
  17735. "timestamp": {
  17736. "type": "number"
  17737. },
  17738. "sessionID": {
  17739. "type": "string",
  17740. "pattern": "^ses"
  17741. },
  17742. "assistantMessageID": {
  17743. "type": "string",
  17744. "pattern": "^msg_"
  17745. },
  17746. "agent": {
  17747. "type": "string"
  17748. },
  17749. "model": {
  17750. "type": "object",
  17751. "properties": {
  17752. "id": {
  17753. "type": "string"
  17754. },
  17755. "providerID": {
  17756. "type": "string"
  17757. },
  17758. "variant": {
  17759. "type": "string"
  17760. }
  17761. },
  17762. "required": ["id", "providerID"],
  17763. "additionalProperties": false
  17764. },
  17765. "snapshot": {
  17766. "type": "string"
  17767. }
  17768. },
  17769. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17770. "additionalProperties": false
  17771. }
  17772. },
  17773. "required": ["id", "type", "properties"],
  17774. "additionalProperties": false
  17775. },
  17776. {
  17777. "type": "object",
  17778. "properties": {
  17779. "id": {
  17780. "type": "string",
  17781. "pattern": "^evt_"
  17782. },
  17783. "type": {
  17784. "type": "string",
  17785. "enum": ["session.next.step.ended"]
  17786. },
  17787. "properties": {
  17788. "type": "object",
  17789. "properties": {
  17790. "timestamp": {
  17791. "type": "number"
  17792. },
  17793. "sessionID": {
  17794. "type": "string",
  17795. "pattern": "^ses"
  17796. },
  17797. "assistantMessageID": {
  17798. "type": "string",
  17799. "pattern": "^msg_"
  17800. },
  17801. "finish": {
  17802. "type": "string"
  17803. },
  17804. "cost": {
  17805. "type": "number"
  17806. },
  17807. "tokens": {
  17808. "type": "object",
  17809. "properties": {
  17810. "input": {
  17811. "type": "number"
  17812. },
  17813. "output": {
  17814. "type": "number"
  17815. },
  17816. "reasoning": {
  17817. "type": "number"
  17818. },
  17819. "cache": {
  17820. "type": "object",
  17821. "properties": {
  17822. "read": {
  17823. "type": "number"
  17824. },
  17825. "write": {
  17826. "type": "number"
  17827. }
  17828. },
  17829. "required": ["read", "write"],
  17830. "additionalProperties": false
  17831. }
  17832. },
  17833. "required": ["input", "output", "reasoning", "cache"],
  17834. "additionalProperties": false
  17835. },
  17836. "snapshot": {
  17837. "type": "string"
  17838. },
  17839. "files": {
  17840. "type": "array",
  17841. "items": {
  17842. "type": "string"
  17843. }
  17844. }
  17845. },
  17846. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17847. "additionalProperties": false
  17848. }
  17849. },
  17850. "required": ["id", "type", "properties"],
  17851. "additionalProperties": false
  17852. },
  17853. {
  17854. "type": "object",
  17855. "properties": {
  17856. "id": {
  17857. "type": "string",
  17858. "pattern": "^evt_"
  17859. },
  17860. "type": {
  17861. "type": "string",
  17862. "enum": ["session.next.step.failed"]
  17863. },
  17864. "properties": {
  17865. "type": "object",
  17866. "properties": {
  17867. "timestamp": {
  17868. "type": "number"
  17869. },
  17870. "sessionID": {
  17871. "type": "string",
  17872. "pattern": "^ses"
  17873. },
  17874. "assistantMessageID": {
  17875. "type": "string",
  17876. "pattern": "^msg_"
  17877. },
  17878. "error": {
  17879. "$ref": "#/components/schemas/SessionErrorUnknown"
  17880. }
  17881. },
  17882. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17883. "additionalProperties": false
  17884. }
  17885. },
  17886. "required": ["id", "type", "properties"],
  17887. "additionalProperties": false
  17888. },
  17889. {
  17890. "type": "object",
  17891. "properties": {
  17892. "id": {
  17893. "type": "string",
  17894. "pattern": "^evt_"
  17895. },
  17896. "type": {
  17897. "type": "string",
  17898. "enum": ["session.next.text.started"]
  17899. },
  17900. "properties": {
  17901. "type": "object",
  17902. "properties": {
  17903. "timestamp": {
  17904. "type": "number"
  17905. },
  17906. "sessionID": {
  17907. "type": "string",
  17908. "pattern": "^ses"
  17909. },
  17910. "assistantMessageID": {
  17911. "type": "string",
  17912. "pattern": "^msg_"
  17913. },
  17914. "textID": {
  17915. "type": "string"
  17916. }
  17917. },
  17918. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17919. "additionalProperties": false
  17920. }
  17921. },
  17922. "required": ["id", "type", "properties"],
  17923. "additionalProperties": false
  17924. },
  17925. {
  17926. "type": "object",
  17927. "properties": {
  17928. "id": {
  17929. "type": "string",
  17930. "pattern": "^evt_"
  17931. },
  17932. "type": {
  17933. "type": "string",
  17934. "enum": ["session.next.text.delta"]
  17935. },
  17936. "properties": {
  17937. "type": "object",
  17938. "properties": {
  17939. "timestamp": {
  17940. "type": "number"
  17941. },
  17942. "sessionID": {
  17943. "type": "string",
  17944. "pattern": "^ses"
  17945. },
  17946. "assistantMessageID": {
  17947. "type": "string",
  17948. "pattern": "^msg_"
  17949. },
  17950. "textID": {
  17951. "type": "string"
  17952. },
  17953. "delta": {
  17954. "type": "string"
  17955. }
  17956. },
  17957. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17958. "additionalProperties": false
  17959. }
  17960. },
  17961. "required": ["id", "type", "properties"],
  17962. "additionalProperties": false
  17963. },
  17964. {
  17965. "type": "object",
  17966. "properties": {
  17967. "id": {
  17968. "type": "string",
  17969. "pattern": "^evt_"
  17970. },
  17971. "type": {
  17972. "type": "string",
  17973. "enum": ["session.next.text.ended"]
  17974. },
  17975. "properties": {
  17976. "type": "object",
  17977. "properties": {
  17978. "timestamp": {
  17979. "type": "number"
  17980. },
  17981. "sessionID": {
  17982. "type": "string",
  17983. "pattern": "^ses"
  17984. },
  17985. "assistantMessageID": {
  17986. "type": "string",
  17987. "pattern": "^msg_"
  17988. },
  17989. "textID": {
  17990. "type": "string"
  17991. },
  17992. "text": {
  17993. "type": "string"
  17994. }
  17995. },
  17996. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17997. "additionalProperties": false
  17998. }
  17999. },
  18000. "required": ["id", "type", "properties"],
  18001. "additionalProperties": false
  18002. },
  18003. {
  18004. "type": "object",
  18005. "properties": {
  18006. "id": {
  18007. "type": "string",
  18008. "pattern": "^evt_"
  18009. },
  18010. "type": {
  18011. "type": "string",
  18012. "enum": ["session.next.reasoning.started"]
  18013. },
  18014. "properties": {
  18015. "type": "object",
  18016. "properties": {
  18017. "timestamp": {
  18018. "type": "number"
  18019. },
  18020. "sessionID": {
  18021. "type": "string",
  18022. "pattern": "^ses"
  18023. },
  18024. "assistantMessageID": {
  18025. "type": "string",
  18026. "pattern": "^msg_"
  18027. },
  18028. "reasoningID": {
  18029. "type": "string"
  18030. },
  18031. "providerMetadata": {
  18032. "type": "object",
  18033. "additionalProperties": {
  18034. "type": "object"
  18035. }
  18036. }
  18037. },
  18038. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  18039. "additionalProperties": false
  18040. }
  18041. },
  18042. "required": ["id", "type", "properties"],
  18043. "additionalProperties": false
  18044. },
  18045. {
  18046. "type": "object",
  18047. "properties": {
  18048. "id": {
  18049. "type": "string",
  18050. "pattern": "^evt_"
  18051. },
  18052. "type": {
  18053. "type": "string",
  18054. "enum": ["session.next.reasoning.delta"]
  18055. },
  18056. "properties": {
  18057. "type": "object",
  18058. "properties": {
  18059. "timestamp": {
  18060. "type": "number"
  18061. },
  18062. "sessionID": {
  18063. "type": "string",
  18064. "pattern": "^ses"
  18065. },
  18066. "assistantMessageID": {
  18067. "type": "string",
  18068. "pattern": "^msg_"
  18069. },
  18070. "reasoningID": {
  18071. "type": "string"
  18072. },
  18073. "delta": {
  18074. "type": "string"
  18075. }
  18076. },
  18077. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18078. "additionalProperties": false
  18079. }
  18080. },
  18081. "required": ["id", "type", "properties"],
  18082. "additionalProperties": false
  18083. },
  18084. {
  18085. "type": "object",
  18086. "properties": {
  18087. "id": {
  18088. "type": "string",
  18089. "pattern": "^evt_"
  18090. },
  18091. "type": {
  18092. "type": "string",
  18093. "enum": ["session.next.reasoning.ended"]
  18094. },
  18095. "properties": {
  18096. "type": "object",
  18097. "properties": {
  18098. "timestamp": {
  18099. "type": "number"
  18100. },
  18101. "sessionID": {
  18102. "type": "string",
  18103. "pattern": "^ses"
  18104. },
  18105. "assistantMessageID": {
  18106. "type": "string",
  18107. "pattern": "^msg_"
  18108. },
  18109. "reasoningID": {
  18110. "type": "string"
  18111. },
  18112. "text": {
  18113. "type": "string"
  18114. },
  18115. "providerMetadata": {
  18116. "type": "object",
  18117. "additionalProperties": {
  18118. "type": "object"
  18119. }
  18120. }
  18121. },
  18122. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  18123. "additionalProperties": false
  18124. }
  18125. },
  18126. "required": ["id", "type", "properties"],
  18127. "additionalProperties": false
  18128. },
  18129. {
  18130. "type": "object",
  18131. "properties": {
  18132. "id": {
  18133. "type": "string",
  18134. "pattern": "^evt_"
  18135. },
  18136. "type": {
  18137. "type": "string",
  18138. "enum": ["session.next.tool.input.started"]
  18139. },
  18140. "properties": {
  18141. "type": "object",
  18142. "properties": {
  18143. "timestamp": {
  18144. "type": "number"
  18145. },
  18146. "sessionID": {
  18147. "type": "string",
  18148. "pattern": "^ses"
  18149. },
  18150. "assistantMessageID": {
  18151. "type": "string",
  18152. "pattern": "^msg_"
  18153. },
  18154. "callID": {
  18155. "type": "string"
  18156. },
  18157. "name": {
  18158. "type": "string"
  18159. }
  18160. },
  18161. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18162. "additionalProperties": false
  18163. }
  18164. },
  18165. "required": ["id", "type", "properties"],
  18166. "additionalProperties": false
  18167. },
  18168. {
  18169. "type": "object",
  18170. "properties": {
  18171. "id": {
  18172. "type": "string",
  18173. "pattern": "^evt_"
  18174. },
  18175. "type": {
  18176. "type": "string",
  18177. "enum": ["session.next.tool.input.delta"]
  18178. },
  18179. "properties": {
  18180. "type": "object",
  18181. "properties": {
  18182. "timestamp": {
  18183. "type": "number"
  18184. },
  18185. "sessionID": {
  18186. "type": "string",
  18187. "pattern": "^ses"
  18188. },
  18189. "assistantMessageID": {
  18190. "type": "string",
  18191. "pattern": "^msg_"
  18192. },
  18193. "callID": {
  18194. "type": "string"
  18195. },
  18196. "delta": {
  18197. "type": "string"
  18198. }
  18199. },
  18200. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18201. "additionalProperties": false
  18202. }
  18203. },
  18204. "required": ["id", "type", "properties"],
  18205. "additionalProperties": false
  18206. },
  18207. {
  18208. "type": "object",
  18209. "properties": {
  18210. "id": {
  18211. "type": "string",
  18212. "pattern": "^evt_"
  18213. },
  18214. "type": {
  18215. "type": "string",
  18216. "enum": ["session.next.tool.input.ended"]
  18217. },
  18218. "properties": {
  18219. "type": "object",
  18220. "properties": {
  18221. "timestamp": {
  18222. "type": "number"
  18223. },
  18224. "sessionID": {
  18225. "type": "string",
  18226. "pattern": "^ses"
  18227. },
  18228. "assistantMessageID": {
  18229. "type": "string",
  18230. "pattern": "^msg_"
  18231. },
  18232. "callID": {
  18233. "type": "string"
  18234. },
  18235. "text": {
  18236. "type": "string"
  18237. }
  18238. },
  18239. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18240. "additionalProperties": false
  18241. }
  18242. },
  18243. "required": ["id", "type", "properties"],
  18244. "additionalProperties": false
  18245. },
  18246. {
  18247. "type": "object",
  18248. "properties": {
  18249. "id": {
  18250. "type": "string",
  18251. "pattern": "^evt_"
  18252. },
  18253. "type": {
  18254. "type": "string",
  18255. "enum": ["session.next.tool.called"]
  18256. },
  18257. "properties": {
  18258. "type": "object",
  18259. "properties": {
  18260. "timestamp": {
  18261. "type": "number"
  18262. },
  18263. "sessionID": {
  18264. "type": "string",
  18265. "pattern": "^ses"
  18266. },
  18267. "assistantMessageID": {
  18268. "type": "string",
  18269. "pattern": "^msg_"
  18270. },
  18271. "callID": {
  18272. "type": "string"
  18273. },
  18274. "tool": {
  18275. "type": "string"
  18276. },
  18277. "input": {
  18278. "type": "object"
  18279. },
  18280. "provider": {
  18281. "type": "object",
  18282. "properties": {
  18283. "executed": {
  18284. "type": "boolean"
  18285. },
  18286. "metadata": {
  18287. "type": "object",
  18288. "additionalProperties": {
  18289. "type": "object"
  18290. }
  18291. }
  18292. },
  18293. "required": ["executed"],
  18294. "additionalProperties": false
  18295. }
  18296. },
  18297. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18298. "additionalProperties": false
  18299. }
  18300. },
  18301. "required": ["id", "type", "properties"],
  18302. "additionalProperties": false
  18303. },
  18304. {
  18305. "type": "object",
  18306. "properties": {
  18307. "id": {
  18308. "type": "string",
  18309. "pattern": "^evt_"
  18310. },
  18311. "type": {
  18312. "type": "string",
  18313. "enum": ["session.next.tool.progress"]
  18314. },
  18315. "properties": {
  18316. "type": "object",
  18317. "properties": {
  18318. "timestamp": {
  18319. "type": "number"
  18320. },
  18321. "sessionID": {
  18322. "type": "string",
  18323. "pattern": "^ses"
  18324. },
  18325. "assistantMessageID": {
  18326. "type": "string",
  18327. "pattern": "^msg_"
  18328. },
  18329. "callID": {
  18330. "type": "string"
  18331. },
  18332. "structured": {
  18333. "type": "object"
  18334. },
  18335. "content": {
  18336. "type": "array",
  18337. "items": {
  18338. "anyOf": [
  18339. {
  18340. "$ref": "#/components/schemas/ToolTextContent"
  18341. },
  18342. {
  18343. "$ref": "#/components/schemas/ToolFileContent"
  18344. }
  18345. ]
  18346. }
  18347. }
  18348. },
  18349. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18350. "additionalProperties": false
  18351. }
  18352. },
  18353. "required": ["id", "type", "properties"],
  18354. "additionalProperties": false
  18355. },
  18356. {
  18357. "type": "object",
  18358. "properties": {
  18359. "id": {
  18360. "type": "string",
  18361. "pattern": "^evt_"
  18362. },
  18363. "type": {
  18364. "type": "string",
  18365. "enum": ["session.next.tool.success"]
  18366. },
  18367. "properties": {
  18368. "type": "object",
  18369. "properties": {
  18370. "timestamp": {
  18371. "type": "number"
  18372. },
  18373. "sessionID": {
  18374. "type": "string",
  18375. "pattern": "^ses"
  18376. },
  18377. "assistantMessageID": {
  18378. "type": "string",
  18379. "pattern": "^msg_"
  18380. },
  18381. "callID": {
  18382. "type": "string"
  18383. },
  18384. "structured": {
  18385. "type": "object"
  18386. },
  18387. "content": {
  18388. "type": "array",
  18389. "items": {
  18390. "anyOf": [
  18391. {
  18392. "$ref": "#/components/schemas/ToolTextContent"
  18393. },
  18394. {
  18395. "$ref": "#/components/schemas/ToolFileContent"
  18396. }
  18397. ]
  18398. }
  18399. },
  18400. "outputPaths": {
  18401. "type": "array",
  18402. "items": {
  18403. "type": "string"
  18404. }
  18405. },
  18406. "result": {},
  18407. "provider": {
  18408. "type": "object",
  18409. "properties": {
  18410. "executed": {
  18411. "type": "boolean"
  18412. },
  18413. "metadata": {
  18414. "type": "object",
  18415. "additionalProperties": {
  18416. "type": "object"
  18417. }
  18418. }
  18419. },
  18420. "required": ["executed"],
  18421. "additionalProperties": false
  18422. }
  18423. },
  18424. "required": [
  18425. "timestamp",
  18426. "sessionID",
  18427. "assistantMessageID",
  18428. "callID",
  18429. "structured",
  18430. "content",
  18431. "provider"
  18432. ],
  18433. "additionalProperties": false
  18434. }
  18435. },
  18436. "required": ["id", "type", "properties"],
  18437. "additionalProperties": false
  18438. },
  18439. {
  18440. "type": "object",
  18441. "properties": {
  18442. "id": {
  18443. "type": "string",
  18444. "pattern": "^evt_"
  18445. },
  18446. "type": {
  18447. "type": "string",
  18448. "enum": ["session.next.tool.failed"]
  18449. },
  18450. "properties": {
  18451. "type": "object",
  18452. "properties": {
  18453. "timestamp": {
  18454. "type": "number"
  18455. },
  18456. "sessionID": {
  18457. "type": "string",
  18458. "pattern": "^ses"
  18459. },
  18460. "assistantMessageID": {
  18461. "type": "string",
  18462. "pattern": "^msg_"
  18463. },
  18464. "callID": {
  18465. "type": "string"
  18466. },
  18467. "error": {
  18468. "$ref": "#/components/schemas/SessionErrorUnknown"
  18469. },
  18470. "result": {},
  18471. "provider": {
  18472. "type": "object",
  18473. "properties": {
  18474. "executed": {
  18475. "type": "boolean"
  18476. },
  18477. "metadata": {
  18478. "type": "object",
  18479. "additionalProperties": {
  18480. "type": "object"
  18481. }
  18482. }
  18483. },
  18484. "required": ["executed"],
  18485. "additionalProperties": false
  18486. }
  18487. },
  18488. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18489. "additionalProperties": false
  18490. }
  18491. },
  18492. "required": ["id", "type", "properties"],
  18493. "additionalProperties": false
  18494. },
  18495. {
  18496. "type": "object",
  18497. "properties": {
  18498. "id": {
  18499. "type": "string",
  18500. "pattern": "^evt_"
  18501. },
  18502. "type": {
  18503. "type": "string",
  18504. "enum": ["session.next.retried"]
  18505. },
  18506. "properties": {
  18507. "type": "object",
  18508. "properties": {
  18509. "timestamp": {
  18510. "type": "number"
  18511. },
  18512. "sessionID": {
  18513. "type": "string",
  18514. "pattern": "^ses"
  18515. },
  18516. "attempt": {
  18517. "type": "number"
  18518. },
  18519. "error": {
  18520. "$ref": "#/components/schemas/SessionNextRetry_error"
  18521. }
  18522. },
  18523. "required": ["timestamp", "sessionID", "attempt", "error"],
  18524. "additionalProperties": false
  18525. }
  18526. },
  18527. "required": ["id", "type", "properties"],
  18528. "additionalProperties": false
  18529. },
  18530. {
  18531. "type": "object",
  18532. "properties": {
  18533. "id": {
  18534. "type": "string",
  18535. "pattern": "^evt_"
  18536. },
  18537. "type": {
  18538. "type": "string",
  18539. "enum": ["session.next.compaction.started"]
  18540. },
  18541. "properties": {
  18542. "type": "object",
  18543. "properties": {
  18544. "timestamp": {
  18545. "type": "number"
  18546. },
  18547. "sessionID": {
  18548. "type": "string",
  18549. "pattern": "^ses"
  18550. },
  18551. "messageID": {
  18552. "type": "string",
  18553. "pattern": "^msg_"
  18554. },
  18555. "reason": {
  18556. "type": "string",
  18557. "enum": ["auto", "manual"]
  18558. }
  18559. },
  18560. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18561. "additionalProperties": false
  18562. }
  18563. },
  18564. "required": ["id", "type", "properties"],
  18565. "additionalProperties": false
  18566. },
  18567. {
  18568. "type": "object",
  18569. "properties": {
  18570. "id": {
  18571. "type": "string",
  18572. "pattern": "^evt_"
  18573. },
  18574. "type": {
  18575. "type": "string",
  18576. "enum": ["session.next.compaction.delta"]
  18577. },
  18578. "properties": {
  18579. "type": "object",
  18580. "properties": {
  18581. "timestamp": {
  18582. "type": "number"
  18583. },
  18584. "sessionID": {
  18585. "type": "string",
  18586. "pattern": "^ses"
  18587. },
  18588. "messageID": {
  18589. "type": "string",
  18590. "pattern": "^msg_"
  18591. },
  18592. "text": {
  18593. "type": "string"
  18594. }
  18595. },
  18596. "required": ["timestamp", "sessionID", "messageID", "text"],
  18597. "additionalProperties": false
  18598. }
  18599. },
  18600. "required": ["id", "type", "properties"],
  18601. "additionalProperties": false
  18602. },
  18603. {
  18604. "type": "object",
  18605. "properties": {
  18606. "id": {
  18607. "type": "string",
  18608. "pattern": "^evt_"
  18609. },
  18610. "type": {
  18611. "type": "string",
  18612. "enum": ["session.next.compaction.ended"]
  18613. },
  18614. "properties": {
  18615. "type": "object",
  18616. "properties": {
  18617. "timestamp": {
  18618. "type": "number"
  18619. },
  18620. "sessionID": {
  18621. "type": "string",
  18622. "pattern": "^ses"
  18623. },
  18624. "messageID": {
  18625. "type": "string",
  18626. "pattern": "^msg_"
  18627. },
  18628. "reason": {
  18629. "type": "string",
  18630. "enum": ["auto", "manual"]
  18631. },
  18632. "text": {
  18633. "type": "string"
  18634. },
  18635. "recent": {
  18636. "type": "string"
  18637. }
  18638. },
  18639. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18640. "additionalProperties": false
  18641. }
  18642. },
  18643. "required": ["id", "type", "properties"],
  18644. "additionalProperties": false
  18645. },
  18646. {
  18647. "type": "object",
  18648. "properties": {
  18649. "id": {
  18650. "type": "string",
  18651. "pattern": "^evt_"
  18652. },
  18653. "type": {
  18654. "type": "string",
  18655. "enum": ["session.next.revert.staged"]
  18656. },
  18657. "properties": {
  18658. "type": "object",
  18659. "properties": {
  18660. "timestamp": {
  18661. "type": "number"
  18662. },
  18663. "sessionID": {
  18664. "type": "string",
  18665. "pattern": "^ses"
  18666. },
  18667. "revert": {
  18668. "type": "object",
  18669. "properties": {
  18670. "messageID": {
  18671. "type": "string",
  18672. "pattern": "^msg_"
  18673. },
  18674. "partID": {
  18675. "type": "string"
  18676. },
  18677. "snapshot": {
  18678. "type": "string"
  18679. },
  18680. "diff": {
  18681. "type": "string"
  18682. },
  18683. "files": {
  18684. "type": "array",
  18685. "items": {
  18686. "$ref": "#/components/schemas/FileDiff"
  18687. }
  18688. }
  18689. },
  18690. "required": ["messageID"],
  18691. "additionalProperties": false
  18692. }
  18693. },
  18694. "required": ["timestamp", "sessionID", "revert"],
  18695. "additionalProperties": false
  18696. }
  18697. },
  18698. "required": ["id", "type", "properties"],
  18699. "additionalProperties": false
  18700. },
  18701. {
  18702. "type": "object",
  18703. "properties": {
  18704. "id": {
  18705. "type": "string",
  18706. "pattern": "^evt_"
  18707. },
  18708. "type": {
  18709. "type": "string",
  18710. "enum": ["session.next.revert.cleared"]
  18711. },
  18712. "properties": {
  18713. "type": "object",
  18714. "properties": {
  18715. "timestamp": {
  18716. "type": "number"
  18717. },
  18718. "sessionID": {
  18719. "type": "string",
  18720. "pattern": "^ses"
  18721. }
  18722. },
  18723. "required": ["timestamp", "sessionID"],
  18724. "additionalProperties": false
  18725. }
  18726. },
  18727. "required": ["id", "type", "properties"],
  18728. "additionalProperties": false
  18729. },
  18730. {
  18731. "type": "object",
  18732. "properties": {
  18733. "id": {
  18734. "type": "string",
  18735. "pattern": "^evt_"
  18736. },
  18737. "type": {
  18738. "type": "string",
  18739. "enum": ["session.next.revert.committed"]
  18740. },
  18741. "properties": {
  18742. "type": "object",
  18743. "properties": {
  18744. "timestamp": {
  18745. "type": "number"
  18746. },
  18747. "sessionID": {
  18748. "type": "string",
  18749. "pattern": "^ses"
  18750. },
  18751. "messageID": {
  18752. "type": "string",
  18753. "pattern": "^msg_"
  18754. }
  18755. },
  18756. "required": ["timestamp", "sessionID", "messageID"],
  18757. "additionalProperties": false
  18758. }
  18759. },
  18760. "required": ["id", "type", "properties"],
  18761. "additionalProperties": false
  18762. },
  18763. {
  18764. "type": "object",
  18765. "properties": {
  18766. "id": {
  18767. "type": "string",
  18768. "pattern": "^evt_"
  18769. },
  18770. "type": {
  18771. "type": "string",
  18772. "enum": ["message.part.delta"]
  18773. },
  18774. "properties": {
  18775. "type": "object",
  18776. "properties": {
  18777. "sessionID": {
  18778. "type": "string",
  18779. "pattern": "^ses"
  18780. },
  18781. "messageID": {
  18782. "type": "string",
  18783. "pattern": "^msg"
  18784. },
  18785. "partID": {
  18786. "type": "string",
  18787. "pattern": "^prt"
  18788. },
  18789. "field": {
  18790. "type": "string"
  18791. },
  18792. "delta": {
  18793. "type": "string"
  18794. }
  18795. },
  18796. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18797. "additionalProperties": false
  18798. }
  18799. },
  18800. "required": ["id", "type", "properties"],
  18801. "additionalProperties": false
  18802. },
  18803. {
  18804. "type": "object",
  18805. "properties": {
  18806. "id": {
  18807. "type": "string",
  18808. "pattern": "^evt_"
  18809. },
  18810. "type": {
  18811. "type": "string",
  18812. "enum": ["session.diff"]
  18813. },
  18814. "properties": {
  18815. "type": "object",
  18816. "properties": {
  18817. "sessionID": {
  18818. "type": "string",
  18819. "pattern": "^ses"
  18820. },
  18821. "diff": {
  18822. "type": "array",
  18823. "items": {
  18824. "$ref": "#/components/schemas/SnapshotFileDiff"
  18825. }
  18826. }
  18827. },
  18828. "required": ["sessionID", "diff"],
  18829. "additionalProperties": false
  18830. }
  18831. },
  18832. "required": ["id", "type", "properties"],
  18833. "additionalProperties": false
  18834. },
  18835. {
  18836. "type": "object",
  18837. "properties": {
  18838. "id": {
  18839. "type": "string",
  18840. "pattern": "^evt_"
  18841. },
  18842. "type": {
  18843. "type": "string",
  18844. "enum": ["session.error"]
  18845. },
  18846. "properties": {
  18847. "type": "object",
  18848. "properties": {
  18849. "sessionID": {
  18850. "type": "string",
  18851. "pattern": "^ses"
  18852. },
  18853. "error": {
  18854. "anyOf": [
  18855. {
  18856. "$ref": "#/components/schemas/ProviderAuthError"
  18857. },
  18858. {
  18859. "$ref": "#/components/schemas/UnknownError"
  18860. },
  18861. {
  18862. "$ref": "#/components/schemas/MessageOutputLengthError"
  18863. },
  18864. {
  18865. "$ref": "#/components/schemas/MessageAbortedError"
  18866. },
  18867. {
  18868. "$ref": "#/components/schemas/StructuredOutputError"
  18869. },
  18870. {
  18871. "$ref": "#/components/schemas/ContextOverflowError"
  18872. },
  18873. {
  18874. "$ref": "#/components/schemas/ContentFilterError"
  18875. },
  18876. {
  18877. "$ref": "#/components/schemas/APIError"
  18878. }
  18879. ]
  18880. }
  18881. },
  18882. "additionalProperties": false
  18883. }
  18884. },
  18885. "required": ["id", "type", "properties"],
  18886. "additionalProperties": false
  18887. },
  18888. {
  18889. "type": "object",
  18890. "properties": {
  18891. "id": {
  18892. "type": "string",
  18893. "pattern": "^evt_"
  18894. },
  18895. "type": {
  18896. "type": "string",
  18897. "enum": ["installation.updated"]
  18898. },
  18899. "properties": {
  18900. "type": "object",
  18901. "properties": {
  18902. "version": {
  18903. "type": "string"
  18904. }
  18905. },
  18906. "required": ["version"],
  18907. "additionalProperties": false
  18908. }
  18909. },
  18910. "required": ["id", "type", "properties"],
  18911. "additionalProperties": false
  18912. },
  18913. {
  18914. "type": "object",
  18915. "properties": {
  18916. "id": {
  18917. "type": "string",
  18918. "pattern": "^evt_"
  18919. },
  18920. "type": {
  18921. "type": "string",
  18922. "enum": ["installation.update-available"]
  18923. },
  18924. "properties": {
  18925. "type": "object",
  18926. "properties": {
  18927. "version": {
  18928. "type": "string"
  18929. }
  18930. },
  18931. "required": ["version"],
  18932. "additionalProperties": false
  18933. }
  18934. },
  18935. "required": ["id", "type", "properties"],
  18936. "additionalProperties": false
  18937. },
  18938. {
  18939. "type": "object",
  18940. "properties": {
  18941. "id": {
  18942. "type": "string",
  18943. "pattern": "^evt_"
  18944. },
  18945. "type": {
  18946. "type": "string",
  18947. "enum": ["file.edited"]
  18948. },
  18949. "properties": {
  18950. "type": "object",
  18951. "properties": {
  18952. "file": {
  18953. "type": "string"
  18954. }
  18955. },
  18956. "required": ["file"],
  18957. "additionalProperties": false
  18958. }
  18959. },
  18960. "required": ["id", "type", "properties"],
  18961. "additionalProperties": false
  18962. },
  18963. {
  18964. "type": "object",
  18965. "properties": {
  18966. "id": {
  18967. "type": "string",
  18968. "pattern": "^evt_"
  18969. },
  18970. "type": {
  18971. "type": "string",
  18972. "enum": ["reference.updated"]
  18973. },
  18974. "properties": {
  18975. "type": "object",
  18976. "properties": {}
  18977. }
  18978. },
  18979. "required": ["id", "type", "properties"],
  18980. "additionalProperties": false
  18981. },
  18982. {
  18983. "type": "object",
  18984. "properties": {
  18985. "id": {
  18986. "type": "string",
  18987. "pattern": "^evt_"
  18988. },
  18989. "type": {
  18990. "type": "string",
  18991. "enum": ["permission.v2.asked"]
  18992. },
  18993. "properties": {
  18994. "type": "object",
  18995. "properties": {
  18996. "id": {
  18997. "type": "string",
  18998. "pattern": "^per"
  18999. },
  19000. "sessionID": {
  19001. "type": "string",
  19002. "pattern": "^ses"
  19003. },
  19004. "action": {
  19005. "type": "string"
  19006. },
  19007. "resources": {
  19008. "type": "array",
  19009. "items": {
  19010. "type": "string"
  19011. }
  19012. },
  19013. "save": {
  19014. "type": "array",
  19015. "items": {
  19016. "type": "string"
  19017. }
  19018. },
  19019. "metadata": {
  19020. "type": "object"
  19021. },
  19022. "source": {
  19023. "$ref": "#/components/schemas/PermissionV2Source"
  19024. }
  19025. },
  19026. "required": ["id", "sessionID", "action", "resources"],
  19027. "additionalProperties": false
  19028. }
  19029. },
  19030. "required": ["id", "type", "properties"],
  19031. "additionalProperties": false
  19032. },
  19033. {
  19034. "type": "object",
  19035. "properties": {
  19036. "id": {
  19037. "type": "string",
  19038. "pattern": "^evt_"
  19039. },
  19040. "type": {
  19041. "type": "string",
  19042. "enum": ["permission.v2.replied"]
  19043. },
  19044. "properties": {
  19045. "type": "object",
  19046. "properties": {
  19047. "sessionID": {
  19048. "type": "string",
  19049. "pattern": "^ses"
  19050. },
  19051. "requestID": {
  19052. "type": "string",
  19053. "pattern": "^per"
  19054. },
  19055. "reply": {
  19056. "$ref": "#/components/schemas/PermissionV2Reply"
  19057. }
  19058. },
  19059. "required": ["sessionID", "requestID", "reply"],
  19060. "additionalProperties": false
  19061. }
  19062. },
  19063. "required": ["id", "type", "properties"],
  19064. "additionalProperties": false
  19065. },
  19066. {
  19067. "type": "object",
  19068. "properties": {
  19069. "id": {
  19070. "type": "string",
  19071. "pattern": "^evt_"
  19072. },
  19073. "type": {
  19074. "type": "string",
  19075. "enum": ["plugin.added"]
  19076. },
  19077. "properties": {
  19078. "type": "object",
  19079. "properties": {
  19080. "id": {
  19081. "type": "string"
  19082. }
  19083. },
  19084. "required": ["id"],
  19085. "additionalProperties": false
  19086. }
  19087. },
  19088. "required": ["id", "type", "properties"],
  19089. "additionalProperties": false
  19090. },
  19091. {
  19092. "type": "object",
  19093. "properties": {
  19094. "id": {
  19095. "type": "string",
  19096. "pattern": "^evt_"
  19097. },
  19098. "type": {
  19099. "type": "string",
  19100. "enum": ["project.directories.updated"]
  19101. },
  19102. "properties": {
  19103. "type": "object",
  19104. "properties": {
  19105. "projectID": {
  19106. "type": "string"
  19107. }
  19108. },
  19109. "required": ["projectID"],
  19110. "additionalProperties": false
  19111. }
  19112. },
  19113. "required": ["id", "type", "properties"],
  19114. "additionalProperties": false
  19115. },
  19116. {
  19117. "type": "object",
  19118. "properties": {
  19119. "id": {
  19120. "type": "string",
  19121. "pattern": "^evt_"
  19122. },
  19123. "type": {
  19124. "type": "string",
  19125. "enum": ["file.watcher.updated"]
  19126. },
  19127. "properties": {
  19128. "type": "object",
  19129. "properties": {
  19130. "file": {
  19131. "type": "string"
  19132. },
  19133. "event": {
  19134. "type": "string",
  19135. "enum": ["add", "change", "unlink"]
  19136. }
  19137. },
  19138. "required": ["file", "event"],
  19139. "additionalProperties": false
  19140. }
  19141. },
  19142. "required": ["id", "type", "properties"],
  19143. "additionalProperties": false
  19144. },
  19145. {
  19146. "type": "object",
  19147. "properties": {
  19148. "id": {
  19149. "type": "string",
  19150. "pattern": "^evt_"
  19151. },
  19152. "type": {
  19153. "type": "string",
  19154. "enum": ["pty.created"]
  19155. },
  19156. "properties": {
  19157. "type": "object",
  19158. "properties": {
  19159. "info": {
  19160. "$ref": "#/components/schemas/Pty"
  19161. }
  19162. },
  19163. "required": ["info"],
  19164. "additionalProperties": false
  19165. }
  19166. },
  19167. "required": ["id", "type", "properties"],
  19168. "additionalProperties": false
  19169. },
  19170. {
  19171. "type": "object",
  19172. "properties": {
  19173. "id": {
  19174. "type": "string",
  19175. "pattern": "^evt_"
  19176. },
  19177. "type": {
  19178. "type": "string",
  19179. "enum": ["pty.updated"]
  19180. },
  19181. "properties": {
  19182. "type": "object",
  19183. "properties": {
  19184. "info": {
  19185. "$ref": "#/components/schemas/Pty"
  19186. }
  19187. },
  19188. "required": ["info"],
  19189. "additionalProperties": false
  19190. }
  19191. },
  19192. "required": ["id", "type", "properties"],
  19193. "additionalProperties": false
  19194. },
  19195. {
  19196. "type": "object",
  19197. "properties": {
  19198. "id": {
  19199. "type": "string",
  19200. "pattern": "^evt_"
  19201. },
  19202. "type": {
  19203. "type": "string",
  19204. "enum": ["pty.exited"]
  19205. },
  19206. "properties": {
  19207. "type": "object",
  19208. "properties": {
  19209. "id": {
  19210. "type": "string",
  19211. "pattern": "^pty"
  19212. },
  19213. "exitCode": {
  19214. "type": "integer",
  19215. "minimum": 0
  19216. }
  19217. },
  19218. "required": ["id", "exitCode"],
  19219. "additionalProperties": false
  19220. }
  19221. },
  19222. "required": ["id", "type", "properties"],
  19223. "additionalProperties": false
  19224. },
  19225. {
  19226. "type": "object",
  19227. "properties": {
  19228. "id": {
  19229. "type": "string",
  19230. "pattern": "^evt_"
  19231. },
  19232. "type": {
  19233. "type": "string",
  19234. "enum": ["pty.deleted"]
  19235. },
  19236. "properties": {
  19237. "type": "object",
  19238. "properties": {
  19239. "id": {
  19240. "type": "string",
  19241. "pattern": "^pty"
  19242. }
  19243. },
  19244. "required": ["id"],
  19245. "additionalProperties": false
  19246. }
  19247. },
  19248. "required": ["id", "type", "properties"],
  19249. "additionalProperties": false
  19250. },
  19251. {
  19252. "type": "object",
  19253. "properties": {
  19254. "id": {
  19255. "type": "string",
  19256. "pattern": "^evt_"
  19257. },
  19258. "type": {
  19259. "type": "string",
  19260. "enum": ["question.v2.asked"]
  19261. },
  19262. "properties": {
  19263. "type": "object",
  19264. "properties": {
  19265. "id": {
  19266. "type": "string",
  19267. "pattern": "^que"
  19268. },
  19269. "sessionID": {
  19270. "type": "string",
  19271. "pattern": "^ses"
  19272. },
  19273. "questions": {
  19274. "type": "array",
  19275. "items": {
  19276. "$ref": "#/components/schemas/QuestionV2Info"
  19277. },
  19278. "description": "Questions to ask"
  19279. },
  19280. "tool": {
  19281. "$ref": "#/components/schemas/QuestionV2Tool"
  19282. }
  19283. },
  19284. "required": ["id", "sessionID", "questions"],
  19285. "additionalProperties": false
  19286. }
  19287. },
  19288. "required": ["id", "type", "properties"],
  19289. "additionalProperties": false
  19290. },
  19291. {
  19292. "type": "object",
  19293. "properties": {
  19294. "id": {
  19295. "type": "string",
  19296. "pattern": "^evt_"
  19297. },
  19298. "type": {
  19299. "type": "string",
  19300. "enum": ["question.v2.replied"]
  19301. },
  19302. "properties": {
  19303. "type": "object",
  19304. "properties": {
  19305. "sessionID": {
  19306. "type": "string",
  19307. "pattern": "^ses"
  19308. },
  19309. "requestID": {
  19310. "type": "string",
  19311. "pattern": "^que"
  19312. },
  19313. "answers": {
  19314. "type": "array",
  19315. "items": {
  19316. "$ref": "#/components/schemas/QuestionV2Answer"
  19317. }
  19318. }
  19319. },
  19320. "required": ["sessionID", "requestID", "answers"],
  19321. "additionalProperties": false
  19322. }
  19323. },
  19324. "required": ["id", "type", "properties"],
  19325. "additionalProperties": false
  19326. },
  19327. {
  19328. "type": "object",
  19329. "properties": {
  19330. "id": {
  19331. "type": "string",
  19332. "pattern": "^evt_"
  19333. },
  19334. "type": {
  19335. "type": "string",
  19336. "enum": ["question.v2.rejected"]
  19337. },
  19338. "properties": {
  19339. "type": "object",
  19340. "properties": {
  19341. "sessionID": {
  19342. "type": "string",
  19343. "pattern": "^ses"
  19344. },
  19345. "requestID": {
  19346. "type": "string",
  19347. "pattern": "^que"
  19348. }
  19349. },
  19350. "required": ["sessionID", "requestID"],
  19351. "additionalProperties": false
  19352. }
  19353. },
  19354. "required": ["id", "type", "properties"],
  19355. "additionalProperties": false
  19356. },
  19357. {
  19358. "type": "object",
  19359. "properties": {
  19360. "id": {
  19361. "type": "string",
  19362. "pattern": "^evt_"
  19363. },
  19364. "type": {
  19365. "type": "string",
  19366. "enum": ["todo.updated"]
  19367. },
  19368. "properties": {
  19369. "type": "object",
  19370. "properties": {
  19371. "sessionID": {
  19372. "type": "string",
  19373. "pattern": "^ses"
  19374. },
  19375. "todos": {
  19376. "type": "array",
  19377. "items": {
  19378. "$ref": "#/components/schemas/Todo"
  19379. }
  19380. }
  19381. },
  19382. "required": ["sessionID", "todos"],
  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": ["lsp.updated"]
  19399. },
  19400. "properties": {
  19401. "type": "object",
  19402. "properties": {}
  19403. }
  19404. },
  19405. "required": ["id", "type", "properties"],
  19406. "additionalProperties": false
  19407. },
  19408. {
  19409. "type": "object",
  19410. "properties": {
  19411. "id": {
  19412. "type": "string",
  19413. "pattern": "^evt_"
  19414. },
  19415. "type": {
  19416. "type": "string",
  19417. "enum": ["permission.asked"]
  19418. },
  19419. "properties": {
  19420. "type": "object",
  19421. "properties": {
  19422. "id": {
  19423. "type": "string",
  19424. "pattern": "^per"
  19425. },
  19426. "sessionID": {
  19427. "type": "string",
  19428. "pattern": "^ses"
  19429. },
  19430. "permission": {
  19431. "type": "string"
  19432. },
  19433. "patterns": {
  19434. "type": "array",
  19435. "items": {
  19436. "type": "string"
  19437. }
  19438. },
  19439. "metadata": {
  19440. "type": "object"
  19441. },
  19442. "always": {
  19443. "type": "array",
  19444. "items": {
  19445. "type": "string"
  19446. }
  19447. },
  19448. "tool": {
  19449. "type": "object",
  19450. "properties": {
  19451. "messageID": {
  19452. "type": "string"
  19453. },
  19454. "callID": {
  19455. "type": "string"
  19456. }
  19457. },
  19458. "required": ["messageID", "callID"],
  19459. "additionalProperties": false
  19460. }
  19461. },
  19462. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19463. "additionalProperties": false
  19464. }
  19465. },
  19466. "required": ["id", "type", "properties"],
  19467. "additionalProperties": false
  19468. },
  19469. {
  19470. "type": "object",
  19471. "properties": {
  19472. "id": {
  19473. "type": "string",
  19474. "pattern": "^evt_"
  19475. },
  19476. "type": {
  19477. "type": "string",
  19478. "enum": ["permission.replied"]
  19479. },
  19480. "properties": {
  19481. "type": "object",
  19482. "properties": {
  19483. "sessionID": {
  19484. "type": "string",
  19485. "pattern": "^ses"
  19486. },
  19487. "requestID": {
  19488. "type": "string",
  19489. "pattern": "^per"
  19490. },
  19491. "reply": {
  19492. "type": "string",
  19493. "enum": ["once", "always", "reject"]
  19494. }
  19495. },
  19496. "required": ["sessionID", "requestID", "reply"],
  19497. "additionalProperties": false
  19498. }
  19499. },
  19500. "required": ["id", "type", "properties"],
  19501. "additionalProperties": false
  19502. },
  19503. {
  19504. "type": "object",
  19505. "properties": {
  19506. "id": {
  19507. "type": "string",
  19508. "pattern": "^evt_"
  19509. },
  19510. "type": {
  19511. "type": "string",
  19512. "enum": ["tui.prompt.append"]
  19513. },
  19514. "properties": {
  19515. "type": "object",
  19516. "properties": {
  19517. "text": {
  19518. "type": "string"
  19519. }
  19520. },
  19521. "required": ["text"],
  19522. "additionalProperties": false
  19523. }
  19524. },
  19525. "required": ["id", "type", "properties"],
  19526. "additionalProperties": false
  19527. },
  19528. {
  19529. "type": "object",
  19530. "properties": {
  19531. "id": {
  19532. "type": "string",
  19533. "pattern": "^evt_"
  19534. },
  19535. "type": {
  19536. "type": "string",
  19537. "enum": ["tui.command.execute"]
  19538. },
  19539. "properties": {
  19540. "type": "object",
  19541. "properties": {
  19542. "command": {
  19543. "anyOf": [
  19544. {
  19545. "type": "string",
  19546. "enum": [
  19547. "session.list",
  19548. "session.new",
  19549. "session.share",
  19550. "session.interrupt",
  19551. "session.compact",
  19552. "session.page.up",
  19553. "session.page.down",
  19554. "session.line.up",
  19555. "session.line.down",
  19556. "session.half.page.up",
  19557. "session.half.page.down",
  19558. "session.first",
  19559. "session.last",
  19560. "prompt.clear",
  19561. "prompt.submit",
  19562. "agent.cycle"
  19563. ]
  19564. },
  19565. {
  19566. "type": "string"
  19567. }
  19568. ]
  19569. }
  19570. },
  19571. "required": ["command"],
  19572. "additionalProperties": false
  19573. }
  19574. },
  19575. "required": ["id", "type", "properties"],
  19576. "additionalProperties": false
  19577. },
  19578. {
  19579. "type": "object",
  19580. "properties": {
  19581. "id": {
  19582. "type": "string",
  19583. "pattern": "^evt_"
  19584. },
  19585. "type": {
  19586. "type": "string",
  19587. "enum": ["tui.toast.show"]
  19588. },
  19589. "properties": {
  19590. "type": "object",
  19591. "properties": {
  19592. "title": {
  19593. "type": "string"
  19594. },
  19595. "message": {
  19596. "type": "string"
  19597. },
  19598. "variant": {
  19599. "type": "string",
  19600. "enum": ["info", "success", "warning", "error"]
  19601. },
  19602. "duration": {
  19603. "type": "integer",
  19604. "exclusiveMinimum": 0
  19605. }
  19606. },
  19607. "required": ["message", "variant"],
  19608. "additionalProperties": false
  19609. }
  19610. },
  19611. "required": ["id", "type", "properties"],
  19612. "additionalProperties": false
  19613. },
  19614. {
  19615. "type": "object",
  19616. "properties": {
  19617. "id": {
  19618. "type": "string",
  19619. "pattern": "^evt_"
  19620. },
  19621. "type": {
  19622. "type": "string",
  19623. "enum": ["tui.session.select"]
  19624. },
  19625. "properties": {
  19626. "type": "object",
  19627. "properties": {
  19628. "sessionID": {
  19629. "type": "string",
  19630. "pattern": "^ses",
  19631. "description": "Session ID to navigate to"
  19632. }
  19633. },
  19634. "required": ["sessionID"],
  19635. "additionalProperties": false
  19636. }
  19637. },
  19638. "required": ["id", "type", "properties"],
  19639. "additionalProperties": false
  19640. },
  19641. {
  19642. "type": "object",
  19643. "properties": {
  19644. "id": {
  19645. "type": "string",
  19646. "pattern": "^evt_"
  19647. },
  19648. "type": {
  19649. "type": "string",
  19650. "enum": ["mcp.tools.changed"]
  19651. },
  19652. "properties": {
  19653. "type": "object",
  19654. "properties": {
  19655. "server": {
  19656. "type": "string"
  19657. }
  19658. },
  19659. "required": ["server"],
  19660. "additionalProperties": false
  19661. }
  19662. },
  19663. "required": ["id", "type", "properties"],
  19664. "additionalProperties": false
  19665. },
  19666. {
  19667. "type": "object",
  19668. "properties": {
  19669. "id": {
  19670. "type": "string",
  19671. "pattern": "^evt_"
  19672. },
  19673. "type": {
  19674. "type": "string",
  19675. "enum": ["mcp.browser.open.failed"]
  19676. },
  19677. "properties": {
  19678. "type": "object",
  19679. "properties": {
  19680. "mcpName": {
  19681. "type": "string"
  19682. },
  19683. "url": {
  19684. "type": "string"
  19685. }
  19686. },
  19687. "required": ["mcpName", "url"],
  19688. "additionalProperties": false
  19689. }
  19690. },
  19691. "required": ["id", "type", "properties"],
  19692. "additionalProperties": false
  19693. },
  19694. {
  19695. "type": "object",
  19696. "properties": {
  19697. "id": {
  19698. "type": "string",
  19699. "pattern": "^evt_"
  19700. },
  19701. "type": {
  19702. "type": "string",
  19703. "enum": ["command.executed"]
  19704. },
  19705. "properties": {
  19706. "type": "object",
  19707. "properties": {
  19708. "name": {
  19709. "type": "string"
  19710. },
  19711. "sessionID": {
  19712. "type": "string",
  19713. "pattern": "^ses"
  19714. },
  19715. "arguments": {
  19716. "type": "string"
  19717. },
  19718. "messageID": {
  19719. "type": "string",
  19720. "pattern": "^msg"
  19721. }
  19722. },
  19723. "required": ["name", "sessionID", "arguments", "messageID"],
  19724. "additionalProperties": false
  19725. }
  19726. },
  19727. "required": ["id", "type", "properties"],
  19728. "additionalProperties": false
  19729. },
  19730. {
  19731. "type": "object",
  19732. "properties": {
  19733. "id": {
  19734. "type": "string",
  19735. "pattern": "^evt_"
  19736. },
  19737. "type": {
  19738. "type": "string",
  19739. "enum": ["project.updated"]
  19740. },
  19741. "properties": {
  19742. "type": "object",
  19743. "properties": {
  19744. "id": {
  19745. "type": "string"
  19746. },
  19747. "worktree": {
  19748. "type": "string"
  19749. },
  19750. "vcs": {
  19751. "type": "string",
  19752. "enum": ["git"]
  19753. },
  19754. "name": {
  19755. "type": "string"
  19756. },
  19757. "icon": {
  19758. "type": "object",
  19759. "properties": {
  19760. "url": {
  19761. "type": "string"
  19762. },
  19763. "override": {
  19764. "type": "string"
  19765. },
  19766. "color": {
  19767. "type": "string"
  19768. }
  19769. },
  19770. "additionalProperties": false
  19771. },
  19772. "commands": {
  19773. "type": "object",
  19774. "properties": {
  19775. "start": {
  19776. "type": "string",
  19777. "description": "Startup script to run when creating a new workspace (worktree)"
  19778. }
  19779. },
  19780. "additionalProperties": false
  19781. },
  19782. "time": {
  19783. "type": "object",
  19784. "properties": {
  19785. "created": {
  19786. "type": "integer",
  19787. "minimum": 0
  19788. },
  19789. "updated": {
  19790. "type": "integer",
  19791. "minimum": 0
  19792. },
  19793. "initialized": {
  19794. "type": "integer",
  19795. "minimum": 0
  19796. }
  19797. },
  19798. "required": ["created", "updated"],
  19799. "additionalProperties": false
  19800. },
  19801. "sandboxes": {
  19802. "type": "array",
  19803. "items": {
  19804. "type": "string"
  19805. }
  19806. }
  19807. },
  19808. "required": ["id", "worktree", "time", "sandboxes"],
  19809. "additionalProperties": false
  19810. }
  19811. },
  19812. "required": ["id", "type", "properties"],
  19813. "additionalProperties": false
  19814. },
  19815. {
  19816. "type": "object",
  19817. "properties": {
  19818. "id": {
  19819. "type": "string",
  19820. "pattern": "^evt_"
  19821. },
  19822. "type": {
  19823. "type": "string",
  19824. "enum": ["session.status"]
  19825. },
  19826. "properties": {
  19827. "type": "object",
  19828. "properties": {
  19829. "sessionID": {
  19830. "type": "string",
  19831. "pattern": "^ses"
  19832. },
  19833. "status": {
  19834. "$ref": "#/components/schemas/SessionStatus"
  19835. }
  19836. },
  19837. "required": ["sessionID", "status"],
  19838. "additionalProperties": false
  19839. }
  19840. },
  19841. "required": ["id", "type", "properties"],
  19842. "additionalProperties": false
  19843. },
  19844. {
  19845. "type": "object",
  19846. "properties": {
  19847. "id": {
  19848. "type": "string",
  19849. "pattern": "^evt_"
  19850. },
  19851. "type": {
  19852. "type": "string",
  19853. "enum": ["session.idle"]
  19854. },
  19855. "properties": {
  19856. "type": "object",
  19857. "properties": {
  19858. "sessionID": {
  19859. "type": "string",
  19860. "pattern": "^ses"
  19861. }
  19862. },
  19863. "required": ["sessionID"],
  19864. "additionalProperties": false
  19865. }
  19866. },
  19867. "required": ["id", "type", "properties"],
  19868. "additionalProperties": false
  19869. },
  19870. {
  19871. "type": "object",
  19872. "properties": {
  19873. "id": {
  19874. "type": "string",
  19875. "pattern": "^evt_"
  19876. },
  19877. "type": {
  19878. "type": "string",
  19879. "enum": ["question.asked"]
  19880. },
  19881. "properties": {
  19882. "type": "object",
  19883. "properties": {
  19884. "id": {
  19885. "type": "string",
  19886. "pattern": "^que"
  19887. },
  19888. "sessionID": {
  19889. "type": "string",
  19890. "pattern": "^ses"
  19891. },
  19892. "questions": {
  19893. "type": "array",
  19894. "items": {
  19895. "$ref": "#/components/schemas/QuestionInfo"
  19896. },
  19897. "description": "Questions to ask"
  19898. },
  19899. "tool": {
  19900. "$ref": "#/components/schemas/QuestionTool"
  19901. }
  19902. },
  19903. "required": ["id", "sessionID", "questions"],
  19904. "additionalProperties": false
  19905. }
  19906. },
  19907. "required": ["id", "type", "properties"],
  19908. "additionalProperties": false
  19909. },
  19910. {
  19911. "type": "object",
  19912. "properties": {
  19913. "id": {
  19914. "type": "string",
  19915. "pattern": "^evt_"
  19916. },
  19917. "type": {
  19918. "type": "string",
  19919. "enum": ["question.replied"]
  19920. },
  19921. "properties": {
  19922. "type": "object",
  19923. "properties": {
  19924. "sessionID": {
  19925. "type": "string",
  19926. "pattern": "^ses"
  19927. },
  19928. "requestID": {
  19929. "type": "string",
  19930. "pattern": "^que"
  19931. },
  19932. "answers": {
  19933. "type": "array",
  19934. "items": {
  19935. "$ref": "#/components/schemas/QuestionAnswer"
  19936. }
  19937. }
  19938. },
  19939. "required": ["sessionID", "requestID", "answers"],
  19940. "additionalProperties": false
  19941. }
  19942. },
  19943. "required": ["id", "type", "properties"],
  19944. "additionalProperties": false
  19945. },
  19946. {
  19947. "type": "object",
  19948. "properties": {
  19949. "id": {
  19950. "type": "string",
  19951. "pattern": "^evt_"
  19952. },
  19953. "type": {
  19954. "type": "string",
  19955. "enum": ["question.rejected"]
  19956. },
  19957. "properties": {
  19958. "type": "object",
  19959. "properties": {
  19960. "sessionID": {
  19961. "type": "string",
  19962. "pattern": "^ses"
  19963. },
  19964. "requestID": {
  19965. "type": "string",
  19966. "pattern": "^que"
  19967. }
  19968. },
  19969. "required": ["sessionID", "requestID"],
  19970. "additionalProperties": false
  19971. }
  19972. },
  19973. "required": ["id", "type", "properties"],
  19974. "additionalProperties": false
  19975. },
  19976. {
  19977. "type": "object",
  19978. "properties": {
  19979. "id": {
  19980. "type": "string",
  19981. "pattern": "^evt_"
  19982. },
  19983. "type": {
  19984. "type": "string",
  19985. "enum": ["session.compacted"]
  19986. },
  19987. "properties": {
  19988. "type": "object",
  19989. "properties": {
  19990. "sessionID": {
  19991. "type": "string",
  19992. "pattern": "^ses"
  19993. }
  19994. },
  19995. "required": ["sessionID"],
  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": ["vcs.branch.updated"]
  20012. },
  20013. "properties": {
  20014. "type": "object",
  20015. "properties": {
  20016. "branch": {
  20017. "type": "string"
  20018. }
  20019. },
  20020. "additionalProperties": false
  20021. }
  20022. },
  20023. "required": ["id", "type", "properties"],
  20024. "additionalProperties": false
  20025. },
  20026. {
  20027. "type": "object",
  20028. "properties": {
  20029. "id": {
  20030. "type": "string",
  20031. "pattern": "^evt_"
  20032. },
  20033. "type": {
  20034. "type": "string",
  20035. "enum": ["workspace.ready"]
  20036. },
  20037. "properties": {
  20038. "type": "object",
  20039. "properties": {
  20040. "name": {
  20041. "type": "string"
  20042. }
  20043. },
  20044. "required": ["name"],
  20045. "additionalProperties": false
  20046. }
  20047. },
  20048. "required": ["id", "type", "properties"],
  20049. "additionalProperties": false
  20050. },
  20051. {
  20052. "type": "object",
  20053. "properties": {
  20054. "id": {
  20055. "type": "string",
  20056. "pattern": "^evt_"
  20057. },
  20058. "type": {
  20059. "type": "string",
  20060. "enum": ["workspace.failed"]
  20061. },
  20062. "properties": {
  20063. "type": "object",
  20064. "properties": {
  20065. "message": {
  20066. "type": "string"
  20067. }
  20068. },
  20069. "required": ["message"],
  20070. "additionalProperties": false
  20071. }
  20072. },
  20073. "required": ["id", "type", "properties"],
  20074. "additionalProperties": false
  20075. },
  20076. {
  20077. "type": "object",
  20078. "properties": {
  20079. "id": {
  20080. "type": "string",
  20081. "pattern": "^evt_"
  20082. },
  20083. "type": {
  20084. "type": "string",
  20085. "enum": ["workspace.status"]
  20086. },
  20087. "properties": {
  20088. "type": "object",
  20089. "properties": {
  20090. "workspaceID": {
  20091. "type": "string",
  20092. "pattern": "^wrk"
  20093. },
  20094. "status": {
  20095. "type": "string",
  20096. "enum": ["connected", "connecting", "disconnected", "error"]
  20097. }
  20098. },
  20099. "required": ["workspaceID", "status"],
  20100. "additionalProperties": false
  20101. }
  20102. },
  20103. "required": ["id", "type", "properties"],
  20104. "additionalProperties": false
  20105. },
  20106. {
  20107. "type": "object",
  20108. "properties": {
  20109. "id": {
  20110. "type": "string",
  20111. "pattern": "^evt_"
  20112. },
  20113. "type": {
  20114. "type": "string",
  20115. "enum": ["worktree.ready"]
  20116. },
  20117. "properties": {
  20118. "type": "object",
  20119. "properties": {
  20120. "name": {
  20121. "type": "string"
  20122. },
  20123. "branch": {
  20124. "type": "string"
  20125. }
  20126. },
  20127. "required": ["name"],
  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": ["worktree.failed"]
  20144. },
  20145. "properties": {
  20146. "type": "object",
  20147. "properties": {
  20148. "message": {
  20149. "type": "string"
  20150. }
  20151. },
  20152. "required": ["message"],
  20153. "additionalProperties": false
  20154. }
  20155. },
  20156. "required": ["id", "type", "properties"],
  20157. "additionalProperties": false
  20158. },
  20159. {
  20160. "type": "object",
  20161. "properties": {
  20162. "id": {
  20163. "type": "string",
  20164. "pattern": "^evt_"
  20165. },
  20166. "type": {
  20167. "type": "string",
  20168. "enum": ["server.connected"]
  20169. },
  20170. "properties": {
  20171. "type": "object",
  20172. "properties": {}
  20173. }
  20174. },
  20175. "required": ["id", "type", "properties"],
  20176. "additionalProperties": false
  20177. },
  20178. {
  20179. "type": "object",
  20180. "properties": {
  20181. "id": {
  20182. "type": "string",
  20183. "pattern": "^evt_"
  20184. },
  20185. "type": {
  20186. "type": "string",
  20187. "enum": ["global.disposed"]
  20188. },
  20189. "properties": {
  20190. "type": "object",
  20191. "properties": {}
  20192. }
  20193. },
  20194. "required": ["id", "type", "properties"],
  20195. "additionalProperties": false
  20196. },
  20197. {
  20198. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20199. },
  20200. {
  20201. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20202. },
  20203. {
  20204. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20205. },
  20206. {
  20207. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20208. },
  20209. {
  20210. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20211. },
  20212. {
  20213. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20214. },
  20215. {
  20216. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20217. },
  20218. {
  20219. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20220. },
  20221. {
  20222. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20223. },
  20224. {
  20225. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20226. },
  20227. {
  20228. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20229. },
  20230. {
  20231. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20232. },
  20233. {
  20234. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20235. },
  20236. {
  20237. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20238. },
  20239. {
  20240. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20241. },
  20242. {
  20243. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20244. },
  20245. {
  20246. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20247. },
  20248. {
  20249. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20250. },
  20251. {
  20252. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20253. },
  20254. {
  20255. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20256. },
  20257. {
  20258. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20259. },
  20260. {
  20261. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20262. },
  20263. {
  20264. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20265. },
  20266. {
  20267. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20268. },
  20269. {
  20270. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20271. },
  20272. {
  20273. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20274. },
  20275. {
  20276. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20277. },
  20278. {
  20279. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20280. },
  20281. {
  20282. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20283. },
  20284. {
  20285. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20286. },
  20287. {
  20288. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20289. },
  20290. {
  20291. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20292. },
  20293. {
  20294. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20295. },
  20296. {
  20297. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20298. },
  20299. {
  20300. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20301. },
  20302. {
  20303. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20304. }
  20305. ]
  20306. }
  20307. },
  20308. "required": ["directory", "payload"],
  20309. "additionalProperties": false
  20310. },
  20311. "LogLevel": {
  20312. "type": "string",
  20313. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20314. "description": "Log level"
  20315. },
  20316. "ServerConfig": {
  20317. "type": "object",
  20318. "properties": {
  20319. "port": {
  20320. "type": "integer",
  20321. "exclusiveMinimum": 0
  20322. },
  20323. "hostname": {
  20324. "type": "string"
  20325. },
  20326. "mdns": {
  20327. "type": "boolean"
  20328. },
  20329. "mdnsDomain": {
  20330. "type": "string"
  20331. },
  20332. "cors": {
  20333. "type": "array",
  20334. "items": {
  20335. "type": "string"
  20336. }
  20337. }
  20338. },
  20339. "additionalProperties": false,
  20340. "description": "Server configuration for opencode serve and web commands"
  20341. },
  20342. "PermissionActionConfig": {
  20343. "type": "string",
  20344. "enum": ["ask", "allow", "deny"]
  20345. },
  20346. "PermissionObjectConfig": {
  20347. "type": "object",
  20348. "additionalProperties": {
  20349. "$ref": "#/components/schemas/PermissionActionConfig"
  20350. }
  20351. },
  20352. "PermissionRuleConfig": {
  20353. "anyOf": [
  20354. {
  20355. "$ref": "#/components/schemas/PermissionActionConfig"
  20356. },
  20357. {
  20358. "$ref": "#/components/schemas/PermissionObjectConfig"
  20359. }
  20360. ]
  20361. },
  20362. "PermissionConfig": {
  20363. "anyOf": [
  20364. {
  20365. "$ref": "#/components/schemas/PermissionActionConfig"
  20366. },
  20367. {
  20368. "type": "object",
  20369. "properties": {
  20370. "read": {
  20371. "$ref": "#/components/schemas/PermissionRuleConfig"
  20372. },
  20373. "edit": {
  20374. "$ref": "#/components/schemas/PermissionRuleConfig"
  20375. },
  20376. "glob": {
  20377. "$ref": "#/components/schemas/PermissionRuleConfig"
  20378. },
  20379. "grep": {
  20380. "$ref": "#/components/schemas/PermissionRuleConfig"
  20381. },
  20382. "list": {
  20383. "$ref": "#/components/schemas/PermissionRuleConfig"
  20384. },
  20385. "bash": {
  20386. "$ref": "#/components/schemas/PermissionRuleConfig"
  20387. },
  20388. "task": {
  20389. "$ref": "#/components/schemas/PermissionRuleConfig"
  20390. },
  20391. "external_directory": {
  20392. "$ref": "#/components/schemas/PermissionRuleConfig"
  20393. },
  20394. "todowrite": {
  20395. "$ref": "#/components/schemas/PermissionActionConfig"
  20396. },
  20397. "question": {
  20398. "$ref": "#/components/schemas/PermissionActionConfig"
  20399. },
  20400. "webfetch": {
  20401. "$ref": "#/components/schemas/PermissionActionConfig"
  20402. },
  20403. "websearch": {
  20404. "$ref": "#/components/schemas/PermissionActionConfig"
  20405. },
  20406. "lsp": {
  20407. "$ref": "#/components/schemas/PermissionRuleConfig"
  20408. },
  20409. "doom_loop": {
  20410. "$ref": "#/components/schemas/PermissionActionConfig"
  20411. },
  20412. "skill": {
  20413. "$ref": "#/components/schemas/PermissionRuleConfig"
  20414. }
  20415. },
  20416. "additionalProperties": {
  20417. "$ref": "#/components/schemas/PermissionRuleConfig"
  20418. }
  20419. }
  20420. ]
  20421. },
  20422. "AgentConfig": {
  20423. "type": "object",
  20424. "properties": {
  20425. "model": {
  20426. "type": "string"
  20427. },
  20428. "variant": {
  20429. "type": "string"
  20430. },
  20431. "temperature": {
  20432. "type": "number"
  20433. },
  20434. "top_p": {
  20435. "type": "number"
  20436. },
  20437. "prompt": {
  20438. "type": "string"
  20439. },
  20440. "tools": {
  20441. "type": "object",
  20442. "additionalProperties": {
  20443. "type": "boolean"
  20444. }
  20445. },
  20446. "disable": {
  20447. "type": "boolean"
  20448. },
  20449. "description": {
  20450. "type": "string"
  20451. },
  20452. "mode": {
  20453. "type": "string",
  20454. "enum": ["subagent", "primary", "all"]
  20455. },
  20456. "hidden": {
  20457. "type": "boolean"
  20458. },
  20459. "options": {
  20460. "type": "object"
  20461. },
  20462. "color": {
  20463. "anyOf": [
  20464. {
  20465. "type": "string",
  20466. "pattern": "^#[0-9a-fA-F]{6}$"
  20467. },
  20468. {
  20469. "type": "string",
  20470. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20471. }
  20472. ],
  20473. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20474. },
  20475. "steps": {
  20476. "type": "integer",
  20477. "exclusiveMinimum": 0
  20478. },
  20479. "maxSteps": {
  20480. "type": "integer",
  20481. "exclusiveMinimum": 0
  20482. },
  20483. "permission": {
  20484. "$ref": "#/components/schemas/PermissionConfig"
  20485. }
  20486. },
  20487. "additionalProperties": {}
  20488. },
  20489. "ProviderConfig": {
  20490. "type": "object",
  20491. "properties": {
  20492. "api": {
  20493. "type": "string"
  20494. },
  20495. "name": {
  20496. "type": "string"
  20497. },
  20498. "env": {
  20499. "type": "array",
  20500. "items": {
  20501. "type": "string"
  20502. }
  20503. },
  20504. "id": {
  20505. "type": "string"
  20506. },
  20507. "npm": {
  20508. "type": "string"
  20509. },
  20510. "whitelist": {
  20511. "type": "array",
  20512. "items": {
  20513. "type": "string"
  20514. }
  20515. },
  20516. "blacklist": {
  20517. "type": "array",
  20518. "items": {
  20519. "type": "string"
  20520. }
  20521. },
  20522. "options": {
  20523. "type": "object",
  20524. "properties": {
  20525. "apiKey": {
  20526. "type": "string"
  20527. },
  20528. "baseURL": {
  20529. "type": "string"
  20530. },
  20531. "enterpriseUrl": {
  20532. "type": "string"
  20533. },
  20534. "setCacheKey": {
  20535. "type": "boolean"
  20536. },
  20537. "timeout": {
  20538. "anyOf": [
  20539. {
  20540. "type": "integer",
  20541. "exclusiveMinimum": 0
  20542. },
  20543. {
  20544. "type": "boolean",
  20545. "enum": [false]
  20546. }
  20547. ],
  20548. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20549. },
  20550. "headerTimeout": {
  20551. "anyOf": [
  20552. {
  20553. "type": "integer",
  20554. "exclusiveMinimum": 0
  20555. },
  20556. {
  20557. "type": "boolean",
  20558. "enum": [false]
  20559. }
  20560. ],
  20561. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20562. },
  20563. "chunkTimeout": {
  20564. "type": "integer",
  20565. "exclusiveMinimum": 0
  20566. }
  20567. },
  20568. "additionalProperties": {}
  20569. },
  20570. "models": {
  20571. "type": "object",
  20572. "additionalProperties": {
  20573. "type": "object",
  20574. "properties": {
  20575. "id": {
  20576. "type": "string"
  20577. },
  20578. "name": {
  20579. "type": "string"
  20580. },
  20581. "family": {
  20582. "type": "string"
  20583. },
  20584. "release_date": {
  20585. "type": "string"
  20586. },
  20587. "attachment": {
  20588. "type": "boolean"
  20589. },
  20590. "reasoning": {
  20591. "type": "boolean"
  20592. },
  20593. "temperature": {
  20594. "type": "boolean"
  20595. },
  20596. "tool_call": {
  20597. "type": "boolean"
  20598. },
  20599. "interleaved": {
  20600. "anyOf": [
  20601. {
  20602. "type": "boolean",
  20603. "enum": [true]
  20604. },
  20605. {
  20606. "type": "object",
  20607. "properties": {
  20608. "field": {
  20609. "type": "string",
  20610. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20611. }
  20612. },
  20613. "required": ["field"],
  20614. "additionalProperties": false
  20615. }
  20616. ]
  20617. },
  20618. "cost": {
  20619. "type": "object",
  20620. "properties": {
  20621. "input": {
  20622. "type": "number"
  20623. },
  20624. "output": {
  20625. "type": "number"
  20626. },
  20627. "cache_read": {
  20628. "type": "number"
  20629. },
  20630. "cache_write": {
  20631. "type": "number"
  20632. },
  20633. "context_over_200k": {
  20634. "type": "object",
  20635. "properties": {
  20636. "input": {
  20637. "type": "number"
  20638. },
  20639. "output": {
  20640. "type": "number"
  20641. },
  20642. "cache_read": {
  20643. "type": "number"
  20644. },
  20645. "cache_write": {
  20646. "type": "number"
  20647. }
  20648. },
  20649. "required": ["input", "output"],
  20650. "additionalProperties": false
  20651. }
  20652. },
  20653. "required": ["input", "output"],
  20654. "additionalProperties": false
  20655. },
  20656. "limit": {
  20657. "type": "object",
  20658. "properties": {
  20659. "context": {
  20660. "type": "number"
  20661. },
  20662. "input": {
  20663. "type": "number"
  20664. },
  20665. "output": {
  20666. "type": "number"
  20667. }
  20668. },
  20669. "required": ["context", "output"],
  20670. "additionalProperties": false
  20671. },
  20672. "modalities": {
  20673. "type": "object",
  20674. "properties": {
  20675. "input": {
  20676. "type": "array",
  20677. "items": {
  20678. "type": "string",
  20679. "enum": ["text", "audio", "image", "video", "pdf"]
  20680. }
  20681. },
  20682. "output": {
  20683. "type": "array",
  20684. "items": {
  20685. "type": "string",
  20686. "enum": ["text", "audio", "image", "video", "pdf"]
  20687. }
  20688. }
  20689. },
  20690. "additionalProperties": false
  20691. },
  20692. "experimental": {
  20693. "type": "boolean"
  20694. },
  20695. "status": {
  20696. "type": "string",
  20697. "enum": ["alpha", "beta", "deprecated", "active"]
  20698. },
  20699. "provider": {
  20700. "type": "object",
  20701. "properties": {
  20702. "npm": {
  20703. "type": "string"
  20704. },
  20705. "api": {
  20706. "type": "string"
  20707. }
  20708. },
  20709. "additionalProperties": false
  20710. },
  20711. "options": {
  20712. "type": "object"
  20713. },
  20714. "headers": {
  20715. "type": "object",
  20716. "additionalProperties": {
  20717. "type": "string"
  20718. }
  20719. },
  20720. "variants": {
  20721. "type": "object",
  20722. "additionalProperties": {
  20723. "type": "object",
  20724. "properties": {
  20725. "disabled": {
  20726. "type": "boolean"
  20727. }
  20728. },
  20729. "additionalProperties": {}
  20730. },
  20731. "description": "Variant-specific configuration"
  20732. }
  20733. },
  20734. "additionalProperties": false
  20735. }
  20736. }
  20737. },
  20738. "additionalProperties": false
  20739. },
  20740. "McpLocalConfig": {
  20741. "type": "object",
  20742. "properties": {
  20743. "type": {
  20744. "type": "string",
  20745. "enum": ["local"],
  20746. "description": "Type of MCP server connection"
  20747. },
  20748. "command": {
  20749. "type": "array",
  20750. "items": {
  20751. "type": "string"
  20752. },
  20753. "description": "Command and arguments to run the MCP server"
  20754. },
  20755. "cwd": {
  20756. "type": "string"
  20757. },
  20758. "environment": {
  20759. "type": "object",
  20760. "additionalProperties": {
  20761. "type": "string"
  20762. }
  20763. },
  20764. "enabled": {
  20765. "type": "boolean"
  20766. },
  20767. "timeout": {
  20768. "type": "integer",
  20769. "exclusiveMinimum": 0
  20770. }
  20771. },
  20772. "required": ["type", "command"],
  20773. "additionalProperties": false
  20774. },
  20775. "McpOAuthConfig": {
  20776. "type": "object",
  20777. "properties": {
  20778. "clientId": {
  20779. "type": "string"
  20780. },
  20781. "clientSecret": {
  20782. "type": "string"
  20783. },
  20784. "scope": {
  20785. "type": "string"
  20786. },
  20787. "callbackPort": {
  20788. "type": "integer",
  20789. "minimum": 1,
  20790. "maximum": 65535
  20791. },
  20792. "redirectUri": {
  20793. "type": "string"
  20794. }
  20795. },
  20796. "additionalProperties": false
  20797. },
  20798. "McpRemoteConfig": {
  20799. "type": "object",
  20800. "properties": {
  20801. "type": {
  20802. "type": "string",
  20803. "enum": ["remote"],
  20804. "description": "Type of MCP server connection"
  20805. },
  20806. "url": {
  20807. "type": "string",
  20808. "description": "URL of the remote MCP server"
  20809. },
  20810. "enabled": {
  20811. "type": "boolean"
  20812. },
  20813. "headers": {
  20814. "type": "object",
  20815. "additionalProperties": {
  20816. "type": "string"
  20817. }
  20818. },
  20819. "oauth": {
  20820. "anyOf": [
  20821. {
  20822. "$ref": "#/components/schemas/McpOAuthConfig"
  20823. },
  20824. {
  20825. "type": "boolean",
  20826. "enum": [false]
  20827. }
  20828. ],
  20829. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20830. },
  20831. "timeout": {
  20832. "type": "integer",
  20833. "exclusiveMinimum": 0
  20834. }
  20835. },
  20836. "required": ["type", "url"],
  20837. "additionalProperties": false
  20838. },
  20839. "LayoutConfig": {
  20840. "type": "string",
  20841. "enum": ["auto", "stretch"],
  20842. "description": "@deprecated Always uses stretch layout."
  20843. },
  20844. "ImageAttachmentConfig": {
  20845. "type": "object",
  20846. "properties": {
  20847. "auto_resize": {
  20848. "type": "boolean"
  20849. },
  20850. "max_width": {
  20851. "type": "integer",
  20852. "exclusiveMinimum": 0
  20853. },
  20854. "max_height": {
  20855. "type": "integer",
  20856. "exclusiveMinimum": 0
  20857. },
  20858. "max_base64_bytes": {
  20859. "type": "integer",
  20860. "exclusiveMinimum": 0
  20861. }
  20862. },
  20863. "additionalProperties": false
  20864. },
  20865. "AttachmentConfig": {
  20866. "type": "object",
  20867. "properties": {
  20868. "image": {
  20869. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20870. }
  20871. },
  20872. "additionalProperties": false
  20873. },
  20874. "Config": {
  20875. "type": "object",
  20876. "properties": {
  20877. "$schema": {
  20878. "type": "string"
  20879. },
  20880. "shell": {
  20881. "type": "string"
  20882. },
  20883. "logLevel": {
  20884. "$ref": "#/components/schemas/LogLevel"
  20885. },
  20886. "server": {
  20887. "$ref": "#/components/schemas/ServerConfig"
  20888. },
  20889. "command": {
  20890. "type": "object",
  20891. "additionalProperties": {
  20892. "type": "object",
  20893. "properties": {
  20894. "template": {
  20895. "type": "string"
  20896. },
  20897. "description": {
  20898. "type": "string"
  20899. },
  20900. "agent": {
  20901. "type": "string"
  20902. },
  20903. "model": {
  20904. "type": "string"
  20905. },
  20906. "variant": {
  20907. "type": "string"
  20908. },
  20909. "subtask": {
  20910. "type": "boolean"
  20911. }
  20912. },
  20913. "required": ["template"],
  20914. "additionalProperties": false
  20915. }
  20916. },
  20917. "skills": {
  20918. "type": "object",
  20919. "properties": {
  20920. "paths": {
  20921. "type": "array",
  20922. "items": {
  20923. "type": "string"
  20924. }
  20925. },
  20926. "urls": {
  20927. "type": "array",
  20928. "items": {
  20929. "type": "string"
  20930. }
  20931. }
  20932. },
  20933. "additionalProperties": false
  20934. },
  20935. "references": {
  20936. "type": "object",
  20937. "additionalProperties": {
  20938. "anyOf": [
  20939. {
  20940. "type": "string"
  20941. },
  20942. {
  20943. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20944. },
  20945. {
  20946. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20947. }
  20948. ]
  20949. }
  20950. },
  20951. "reference": {
  20952. "type": "object",
  20953. "additionalProperties": {
  20954. "anyOf": [
  20955. {
  20956. "type": "string"
  20957. },
  20958. {
  20959. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20960. },
  20961. {
  20962. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20963. }
  20964. ]
  20965. }
  20966. },
  20967. "watcher": {
  20968. "type": "object",
  20969. "properties": {
  20970. "ignore": {
  20971. "type": "array",
  20972. "items": {
  20973. "type": "string"
  20974. }
  20975. }
  20976. },
  20977. "additionalProperties": false
  20978. },
  20979. "snapshot": {
  20980. "type": "boolean"
  20981. },
  20982. "plugin": {
  20983. "type": "array",
  20984. "items": {
  20985. "anyOf": [
  20986. {
  20987. "type": "string"
  20988. },
  20989. {
  20990. "type": "array",
  20991. "prefixItems": [
  20992. {
  20993. "type": "string"
  20994. },
  20995. {
  20996. "type": "object"
  20997. }
  20998. ],
  20999. "maxItems": 2,
  21000. "minItems": 2
  21001. }
  21002. ]
  21003. }
  21004. },
  21005. "share": {
  21006. "type": "string",
  21007. "enum": ["manual", "auto", "disabled"]
  21008. },
  21009. "autoshare": {
  21010. "type": "boolean"
  21011. },
  21012. "autoupdate": {
  21013. "anyOf": [
  21014. {
  21015. "type": "boolean"
  21016. },
  21017. {
  21018. "type": "string",
  21019. "enum": ["notify"]
  21020. }
  21021. ],
  21022. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21023. },
  21024. "disabled_providers": {
  21025. "type": "array",
  21026. "items": {
  21027. "type": "string"
  21028. }
  21029. },
  21030. "enabled_providers": {
  21031. "type": "array",
  21032. "items": {
  21033. "type": "string"
  21034. }
  21035. },
  21036. "model": {
  21037. "type": "string"
  21038. },
  21039. "small_model": {
  21040. "type": "string"
  21041. },
  21042. "default_agent": {
  21043. "type": "string"
  21044. },
  21045. "username": {
  21046. "type": "string"
  21047. },
  21048. "mode": {
  21049. "type": "object",
  21050. "properties": {
  21051. "build": {
  21052. "$ref": "#/components/schemas/AgentConfig"
  21053. },
  21054. "plan": {
  21055. "$ref": "#/components/schemas/AgentConfig"
  21056. }
  21057. },
  21058. "additionalProperties": {
  21059. "$ref": "#/components/schemas/AgentConfig"
  21060. }
  21061. },
  21062. "agent": {
  21063. "type": "object",
  21064. "properties": {
  21065. "plan": {
  21066. "$ref": "#/components/schemas/AgentConfig"
  21067. },
  21068. "build": {
  21069. "$ref": "#/components/schemas/AgentConfig"
  21070. },
  21071. "general": {
  21072. "$ref": "#/components/schemas/AgentConfig"
  21073. },
  21074. "explore": {
  21075. "$ref": "#/components/schemas/AgentConfig"
  21076. },
  21077. "title": {
  21078. "$ref": "#/components/schemas/AgentConfig"
  21079. },
  21080. "summary": {
  21081. "$ref": "#/components/schemas/AgentConfig"
  21082. },
  21083. "compaction": {
  21084. "$ref": "#/components/schemas/AgentConfig"
  21085. }
  21086. },
  21087. "additionalProperties": {
  21088. "$ref": "#/components/schemas/AgentConfig"
  21089. }
  21090. },
  21091. "provider": {
  21092. "type": "object",
  21093. "additionalProperties": {
  21094. "$ref": "#/components/schemas/ProviderConfig"
  21095. }
  21096. },
  21097. "mcp": {
  21098. "type": "object",
  21099. "additionalProperties": {
  21100. "anyOf": [
  21101. {
  21102. "$ref": "#/components/schemas/McpLocalConfig"
  21103. },
  21104. {
  21105. "$ref": "#/components/schemas/McpRemoteConfig"
  21106. },
  21107. {
  21108. "type": "object",
  21109. "properties": {
  21110. "enabled": {
  21111. "type": "boolean"
  21112. }
  21113. },
  21114. "required": ["enabled"],
  21115. "additionalProperties": false
  21116. }
  21117. ]
  21118. }
  21119. },
  21120. "formatter": {
  21121. "anyOf": [
  21122. {
  21123. "type": "boolean"
  21124. },
  21125. {
  21126. "type": "object",
  21127. "additionalProperties": {
  21128. "type": "object",
  21129. "properties": {
  21130. "disabled": {
  21131. "type": "boolean"
  21132. },
  21133. "command": {
  21134. "type": "array",
  21135. "items": {
  21136. "type": "string"
  21137. }
  21138. },
  21139. "environment": {
  21140. "type": "object",
  21141. "additionalProperties": {
  21142. "type": "string"
  21143. }
  21144. },
  21145. "extensions": {
  21146. "type": "array",
  21147. "items": {
  21148. "type": "string"
  21149. }
  21150. }
  21151. },
  21152. "additionalProperties": false
  21153. }
  21154. }
  21155. ],
  21156. "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."
  21157. },
  21158. "lsp": {
  21159. "anyOf": [
  21160. {
  21161. "type": "boolean"
  21162. },
  21163. {
  21164. "type": "object",
  21165. "additionalProperties": {
  21166. "anyOf": [
  21167. {
  21168. "type": "object",
  21169. "properties": {
  21170. "disabled": {
  21171. "type": "boolean",
  21172. "enum": [true]
  21173. }
  21174. },
  21175. "required": ["disabled"],
  21176. "additionalProperties": false
  21177. },
  21178. {
  21179. "type": "object",
  21180. "properties": {
  21181. "command": {
  21182. "type": "array",
  21183. "items": {
  21184. "type": "string"
  21185. }
  21186. },
  21187. "extensions": {
  21188. "type": "array",
  21189. "items": {
  21190. "type": "string"
  21191. }
  21192. },
  21193. "disabled": {
  21194. "type": "boolean"
  21195. },
  21196. "env": {
  21197. "type": "object",
  21198. "additionalProperties": {
  21199. "type": "string"
  21200. }
  21201. },
  21202. "initialization": {
  21203. "type": "object"
  21204. }
  21205. },
  21206. "required": ["command"],
  21207. "additionalProperties": false
  21208. }
  21209. ]
  21210. }
  21211. }
  21212. ],
  21213. "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."
  21214. },
  21215. "instructions": {
  21216. "type": "array",
  21217. "items": {
  21218. "type": "string"
  21219. }
  21220. },
  21221. "layout": {
  21222. "$ref": "#/components/schemas/LayoutConfig"
  21223. },
  21224. "permission": {
  21225. "$ref": "#/components/schemas/PermissionConfig"
  21226. },
  21227. "tools": {
  21228. "type": "object",
  21229. "additionalProperties": {
  21230. "type": "boolean"
  21231. }
  21232. },
  21233. "attachment": {
  21234. "$ref": "#/components/schemas/AttachmentConfig"
  21235. },
  21236. "enterprise": {
  21237. "type": "object",
  21238. "properties": {
  21239. "url": {
  21240. "type": "string"
  21241. }
  21242. },
  21243. "additionalProperties": false
  21244. },
  21245. "tool_output": {
  21246. "type": "object",
  21247. "properties": {
  21248. "max_lines": {
  21249. "type": "integer",
  21250. "exclusiveMinimum": 0
  21251. },
  21252. "max_bytes": {
  21253. "type": "integer",
  21254. "exclusiveMinimum": 0
  21255. }
  21256. },
  21257. "additionalProperties": false
  21258. },
  21259. "compaction": {
  21260. "type": "object",
  21261. "properties": {
  21262. "auto": {
  21263. "type": "boolean"
  21264. },
  21265. "prune": {
  21266. "type": "boolean"
  21267. },
  21268. "tail_turns": {
  21269. "type": "integer",
  21270. "minimum": 0
  21271. },
  21272. "preserve_recent_tokens": {
  21273. "type": "integer",
  21274. "minimum": 0
  21275. },
  21276. "reserved": {
  21277. "type": "integer",
  21278. "minimum": 0
  21279. }
  21280. },
  21281. "additionalProperties": false
  21282. },
  21283. "experimental": {
  21284. "type": "object",
  21285. "properties": {
  21286. "disable_paste_summary": {
  21287. "type": "boolean"
  21288. },
  21289. "batch_tool": {
  21290. "type": "boolean"
  21291. },
  21292. "openTelemetry": {
  21293. "type": "boolean"
  21294. },
  21295. "primary_tools": {
  21296. "type": "array",
  21297. "items": {
  21298. "type": "string"
  21299. }
  21300. },
  21301. "continue_loop_on_deny": {
  21302. "type": "boolean"
  21303. },
  21304. "mcp_timeout": {
  21305. "type": "integer",
  21306. "exclusiveMinimum": 0
  21307. },
  21308. "policies": {
  21309. "type": "array",
  21310. "items": {
  21311. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21312. }
  21313. }
  21314. },
  21315. "additionalProperties": false
  21316. }
  21317. },
  21318. "additionalProperties": false
  21319. },
  21320. "Model": {
  21321. "type": "object",
  21322. "properties": {
  21323. "id": {
  21324. "type": "string"
  21325. },
  21326. "providerID": {
  21327. "type": "string"
  21328. },
  21329. "api": {
  21330. "type": "object",
  21331. "properties": {
  21332. "id": {
  21333. "type": "string"
  21334. },
  21335. "url": {
  21336. "type": "string"
  21337. },
  21338. "npm": {
  21339. "type": "string"
  21340. }
  21341. },
  21342. "required": ["id", "url", "npm"],
  21343. "additionalProperties": false
  21344. },
  21345. "name": {
  21346. "type": "string"
  21347. },
  21348. "family": {
  21349. "type": "string"
  21350. },
  21351. "capabilities": {
  21352. "type": "object",
  21353. "properties": {
  21354. "temperature": {
  21355. "type": "boolean"
  21356. },
  21357. "reasoning": {
  21358. "type": "boolean"
  21359. },
  21360. "attachment": {
  21361. "type": "boolean"
  21362. },
  21363. "toolcall": {
  21364. "type": "boolean"
  21365. },
  21366. "input": {
  21367. "type": "object",
  21368. "properties": {
  21369. "text": {
  21370. "type": "boolean"
  21371. },
  21372. "audio": {
  21373. "type": "boolean"
  21374. },
  21375. "image": {
  21376. "type": "boolean"
  21377. },
  21378. "video": {
  21379. "type": "boolean"
  21380. },
  21381. "pdf": {
  21382. "type": "boolean"
  21383. }
  21384. },
  21385. "required": ["text", "audio", "image", "video", "pdf"],
  21386. "additionalProperties": false
  21387. },
  21388. "output": {
  21389. "type": "object",
  21390. "properties": {
  21391. "text": {
  21392. "type": "boolean"
  21393. },
  21394. "audio": {
  21395. "type": "boolean"
  21396. },
  21397. "image": {
  21398. "type": "boolean"
  21399. },
  21400. "video": {
  21401. "type": "boolean"
  21402. },
  21403. "pdf": {
  21404. "type": "boolean"
  21405. }
  21406. },
  21407. "required": ["text", "audio", "image", "video", "pdf"],
  21408. "additionalProperties": false
  21409. },
  21410. "interleaved": {
  21411. "anyOf": [
  21412. {
  21413. "type": "boolean"
  21414. },
  21415. {
  21416. "type": "object",
  21417. "properties": {
  21418. "field": {
  21419. "type": "string",
  21420. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21421. }
  21422. },
  21423. "required": ["field"],
  21424. "additionalProperties": false
  21425. }
  21426. ]
  21427. }
  21428. },
  21429. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21430. "additionalProperties": false
  21431. },
  21432. "cost": {
  21433. "type": "object",
  21434. "properties": {
  21435. "input": {
  21436. "type": "number"
  21437. },
  21438. "output": {
  21439. "type": "number"
  21440. },
  21441. "cache": {
  21442. "type": "object",
  21443. "properties": {
  21444. "read": {
  21445. "type": "number"
  21446. },
  21447. "write": {
  21448. "type": "number"
  21449. }
  21450. },
  21451. "required": ["read", "write"],
  21452. "additionalProperties": false
  21453. },
  21454. "tiers": {
  21455. "type": "array",
  21456. "items": {
  21457. "type": "object",
  21458. "properties": {
  21459. "input": {
  21460. "type": "number"
  21461. },
  21462. "output": {
  21463. "type": "number"
  21464. },
  21465. "cache": {
  21466. "type": "object",
  21467. "properties": {
  21468. "read": {
  21469. "type": "number"
  21470. },
  21471. "write": {
  21472. "type": "number"
  21473. }
  21474. },
  21475. "required": ["read", "write"],
  21476. "additionalProperties": false
  21477. },
  21478. "tier": {
  21479. "type": "object",
  21480. "properties": {
  21481. "type": {
  21482. "type": "string",
  21483. "enum": ["context"]
  21484. },
  21485. "size": {
  21486. "type": "number"
  21487. }
  21488. },
  21489. "required": ["type", "size"],
  21490. "additionalProperties": false
  21491. }
  21492. },
  21493. "required": ["input", "output", "cache", "tier"],
  21494. "additionalProperties": false
  21495. }
  21496. },
  21497. "experimentalOver200K": {
  21498. "type": "object",
  21499. "properties": {
  21500. "input": {
  21501. "type": "number"
  21502. },
  21503. "output": {
  21504. "type": "number"
  21505. },
  21506. "cache": {
  21507. "type": "object",
  21508. "properties": {
  21509. "read": {
  21510. "type": "number"
  21511. },
  21512. "write": {
  21513. "type": "number"
  21514. }
  21515. },
  21516. "required": ["read", "write"],
  21517. "additionalProperties": false
  21518. }
  21519. },
  21520. "required": ["input", "output", "cache"],
  21521. "additionalProperties": false
  21522. }
  21523. },
  21524. "required": ["input", "output", "cache"],
  21525. "additionalProperties": false
  21526. },
  21527. "limit": {
  21528. "type": "object",
  21529. "properties": {
  21530. "context": {
  21531. "type": "number"
  21532. },
  21533. "input": {
  21534. "type": "number"
  21535. },
  21536. "output": {
  21537. "type": "number"
  21538. }
  21539. },
  21540. "required": ["context", "output"],
  21541. "additionalProperties": false
  21542. },
  21543. "status": {
  21544. "type": "string",
  21545. "enum": ["alpha", "beta", "deprecated", "active"]
  21546. },
  21547. "options": {
  21548. "type": "object"
  21549. },
  21550. "headers": {
  21551. "type": "object",
  21552. "additionalProperties": {
  21553. "type": "string"
  21554. }
  21555. },
  21556. "release_date": {
  21557. "type": "string"
  21558. },
  21559. "variants": {
  21560. "type": "object",
  21561. "additionalProperties": {
  21562. "type": "object"
  21563. }
  21564. }
  21565. },
  21566. "required": [
  21567. "id",
  21568. "providerID",
  21569. "api",
  21570. "name",
  21571. "capabilities",
  21572. "cost",
  21573. "limit",
  21574. "status",
  21575. "options",
  21576. "headers",
  21577. "release_date"
  21578. ],
  21579. "additionalProperties": false
  21580. },
  21581. "Provider": {
  21582. "type": "object",
  21583. "properties": {
  21584. "id": {
  21585. "type": "string"
  21586. },
  21587. "name": {
  21588. "type": "string"
  21589. },
  21590. "source": {
  21591. "type": "string",
  21592. "enum": ["env", "config", "custom", "api"]
  21593. },
  21594. "env": {
  21595. "type": "array",
  21596. "items": {
  21597. "type": "string"
  21598. }
  21599. },
  21600. "key": {
  21601. "type": "string"
  21602. },
  21603. "options": {
  21604. "type": "object"
  21605. },
  21606. "models": {
  21607. "type": "object",
  21608. "additionalProperties": {
  21609. "$ref": "#/components/schemas/Model"
  21610. }
  21611. }
  21612. },
  21613. "required": ["id", "name", "source", "env", "options", "models"],
  21614. "additionalProperties": false
  21615. },
  21616. "ExperimentalCapabilities": {
  21617. "type": "object",
  21618. "properties": {
  21619. "backgroundSubagents": {
  21620. "type": "boolean"
  21621. }
  21622. },
  21623. "required": ["backgroundSubagents"],
  21624. "additionalProperties": false
  21625. },
  21626. "ConsoleState": {
  21627. "type": "object",
  21628. "properties": {
  21629. "consoleManagedProviders": {
  21630. "type": "array",
  21631. "items": {
  21632. "type": "string"
  21633. }
  21634. },
  21635. "activeOrgName": {
  21636. "type": "string"
  21637. },
  21638. "switchableOrgCount": {
  21639. "type": "integer",
  21640. "minimum": 0
  21641. }
  21642. },
  21643. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21644. "additionalProperties": false
  21645. },
  21646. "effect_HttpApiError_InternalServerError": {
  21647. "type": "object",
  21648. "properties": {
  21649. "_tag": {
  21650. "type": "string",
  21651. "enum": ["InternalServerError"]
  21652. }
  21653. },
  21654. "required": ["_tag"],
  21655. "additionalProperties": false
  21656. },
  21657. "ToolListItem": {
  21658. "type": "object",
  21659. "properties": {
  21660. "id": {
  21661. "type": "string"
  21662. },
  21663. "description": {
  21664. "type": "string"
  21665. },
  21666. "parameters": {}
  21667. },
  21668. "required": ["id", "description", "parameters"],
  21669. "additionalProperties": false
  21670. },
  21671. "ToolList": {
  21672. "type": "array",
  21673. "items": {
  21674. "$ref": "#/components/schemas/ToolListItem"
  21675. }
  21676. },
  21677. "ToolIDs": {
  21678. "type": "array",
  21679. "items": {
  21680. "type": "string"
  21681. }
  21682. },
  21683. "WorktreeError": {
  21684. "type": "object",
  21685. "properties": {
  21686. "name": {
  21687. "type": "string",
  21688. "enum": [
  21689. "WorktreeNotGitError",
  21690. "WorktreeNameGenerationFailedError",
  21691. "WorktreeCreateFailedError",
  21692. "WorktreeStartCommandFailedError",
  21693. "WorktreeRemoveFailedError",
  21694. "WorktreeResetFailedError",
  21695. "WorktreeListFailedError"
  21696. ]
  21697. },
  21698. "data": {
  21699. "type": "object",
  21700. "properties": {
  21701. "message": {
  21702. "type": "string"
  21703. }
  21704. },
  21705. "required": ["message"],
  21706. "additionalProperties": false
  21707. }
  21708. },
  21709. "required": ["name", "data"],
  21710. "additionalProperties": false
  21711. },
  21712. "WorktreeCreateInput": {
  21713. "type": "object",
  21714. "properties": {
  21715. "name": {
  21716. "type": "string"
  21717. },
  21718. "startCommand": {
  21719. "type": "string",
  21720. "description": "Additional startup script to run after the project's start command"
  21721. }
  21722. },
  21723. "additionalProperties": false
  21724. },
  21725. "Worktree": {
  21726. "type": "object",
  21727. "properties": {
  21728. "name": {
  21729. "type": "string"
  21730. },
  21731. "branch": {
  21732. "type": "string"
  21733. },
  21734. "directory": {
  21735. "type": "string"
  21736. }
  21737. },
  21738. "required": ["name", "directory"],
  21739. "additionalProperties": false
  21740. },
  21741. "WorktreeRemoveInput": {
  21742. "type": "object",
  21743. "properties": {
  21744. "directory": {
  21745. "type": "string"
  21746. }
  21747. },
  21748. "required": ["directory"],
  21749. "additionalProperties": false
  21750. },
  21751. "WorktreeResetInput": {
  21752. "type": "object",
  21753. "properties": {
  21754. "directory": {
  21755. "type": "string"
  21756. }
  21757. },
  21758. "required": ["directory"],
  21759. "additionalProperties": false
  21760. },
  21761. "ProjectSummary": {
  21762. "type": "object",
  21763. "properties": {
  21764. "id": {
  21765. "type": "string"
  21766. },
  21767. "name": {
  21768. "type": "string"
  21769. },
  21770. "worktree": {
  21771. "type": "string"
  21772. }
  21773. },
  21774. "required": ["id", "worktree"],
  21775. "additionalProperties": false
  21776. },
  21777. "GlobalSession": {
  21778. "type": "object",
  21779. "properties": {
  21780. "id": {
  21781. "type": "string",
  21782. "pattern": "^ses"
  21783. },
  21784. "slug": {
  21785. "type": "string"
  21786. },
  21787. "projectID": {
  21788. "type": "string"
  21789. },
  21790. "workspaceID": {
  21791. "type": "string",
  21792. "pattern": "^wrk"
  21793. },
  21794. "directory": {
  21795. "type": "string"
  21796. },
  21797. "path": {
  21798. "type": "string"
  21799. },
  21800. "parentID": {
  21801. "type": "string",
  21802. "pattern": "^ses"
  21803. },
  21804. "summary": {
  21805. "type": "object",
  21806. "properties": {
  21807. "additions": {
  21808. "type": "number"
  21809. },
  21810. "deletions": {
  21811. "type": "number"
  21812. },
  21813. "files": {
  21814. "type": "number"
  21815. },
  21816. "diffs": {
  21817. "type": "array",
  21818. "items": {
  21819. "$ref": "#/components/schemas/SnapshotFileDiff"
  21820. }
  21821. }
  21822. },
  21823. "required": ["additions", "deletions", "files"],
  21824. "additionalProperties": false
  21825. },
  21826. "cost": {
  21827. "type": "number"
  21828. },
  21829. "tokens": {
  21830. "type": "object",
  21831. "properties": {
  21832. "input": {
  21833. "type": "number"
  21834. },
  21835. "output": {
  21836. "type": "number"
  21837. },
  21838. "reasoning": {
  21839. "type": "number"
  21840. },
  21841. "cache": {
  21842. "type": "object",
  21843. "properties": {
  21844. "read": {
  21845. "type": "number"
  21846. },
  21847. "write": {
  21848. "type": "number"
  21849. }
  21850. },
  21851. "required": ["read", "write"],
  21852. "additionalProperties": false
  21853. }
  21854. },
  21855. "required": ["input", "output", "reasoning", "cache"],
  21856. "additionalProperties": false
  21857. },
  21858. "share": {
  21859. "type": "object",
  21860. "properties": {
  21861. "url": {
  21862. "type": "string"
  21863. }
  21864. },
  21865. "required": ["url"],
  21866. "additionalProperties": false
  21867. },
  21868. "title": {
  21869. "type": "string"
  21870. },
  21871. "agent": {
  21872. "type": "string"
  21873. },
  21874. "model": {
  21875. "type": "object",
  21876. "properties": {
  21877. "id": {
  21878. "type": "string"
  21879. },
  21880. "providerID": {
  21881. "type": "string"
  21882. },
  21883. "variant": {
  21884. "type": "string"
  21885. }
  21886. },
  21887. "required": ["id", "providerID"],
  21888. "additionalProperties": false
  21889. },
  21890. "version": {
  21891. "type": "string"
  21892. },
  21893. "metadata": {
  21894. "type": "object"
  21895. },
  21896. "time": {
  21897. "type": "object",
  21898. "properties": {
  21899. "created": {
  21900. "type": "integer",
  21901. "minimum": 0
  21902. },
  21903. "updated": {
  21904. "type": "integer",
  21905. "minimum": 0
  21906. },
  21907. "compacting": {
  21908. "type": "integer",
  21909. "minimum": 0
  21910. },
  21911. "archived": {
  21912. "type": "number"
  21913. }
  21914. },
  21915. "required": ["created", "updated"],
  21916. "additionalProperties": false
  21917. },
  21918. "permission": {
  21919. "$ref": "#/components/schemas/PermissionRuleset"
  21920. },
  21921. "revert": {
  21922. "type": "object",
  21923. "properties": {
  21924. "messageID": {
  21925. "type": "string",
  21926. "pattern": "^msg"
  21927. },
  21928. "partID": {
  21929. "type": "string",
  21930. "pattern": "^prt"
  21931. },
  21932. "snapshot": {
  21933. "type": "string"
  21934. },
  21935. "diff": {
  21936. "type": "string"
  21937. }
  21938. },
  21939. "required": ["messageID"],
  21940. "additionalProperties": false
  21941. },
  21942. "project": {
  21943. "anyOf": [
  21944. {
  21945. "$ref": "#/components/schemas/ProjectSummary"
  21946. },
  21947. {
  21948. "type": "null"
  21949. }
  21950. ]
  21951. }
  21952. },
  21953. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21954. "additionalProperties": false
  21955. },
  21956. "McpResource": {
  21957. "type": "object",
  21958. "properties": {
  21959. "name": {
  21960. "type": "string"
  21961. },
  21962. "uri": {
  21963. "type": "string"
  21964. },
  21965. "description": {
  21966. "type": "string"
  21967. },
  21968. "mimeType": {
  21969. "type": "string"
  21970. },
  21971. "client": {
  21972. "type": "string"
  21973. }
  21974. },
  21975. "required": ["name", "uri", "client"],
  21976. "additionalProperties": false
  21977. },
  21978. "Symbol": {
  21979. "type": "object",
  21980. "properties": {
  21981. "name": {
  21982. "type": "string"
  21983. },
  21984. "kind": {
  21985. "type": "integer",
  21986. "minimum": 0
  21987. },
  21988. "location": {
  21989. "type": "object",
  21990. "properties": {
  21991. "uri": {
  21992. "type": "string"
  21993. },
  21994. "range": {
  21995. "$ref": "#/components/schemas/Range"
  21996. }
  21997. },
  21998. "required": ["uri", "range"],
  21999. "additionalProperties": false
  22000. }
  22001. },
  22002. "required": ["name", "kind", "location"],
  22003. "additionalProperties": false
  22004. },
  22005. "FileNode": {
  22006. "type": "object",
  22007. "properties": {
  22008. "name": {
  22009. "type": "string"
  22010. },
  22011. "path": {
  22012. "type": "string"
  22013. },
  22014. "absolute": {
  22015. "type": "string"
  22016. },
  22017. "type": {
  22018. "type": "string",
  22019. "enum": ["file", "directory"]
  22020. },
  22021. "ignored": {
  22022. "type": "boolean"
  22023. }
  22024. },
  22025. "required": ["name", "path", "absolute", "type", "ignored"],
  22026. "additionalProperties": false
  22027. },
  22028. "FileContent": {
  22029. "type": "object",
  22030. "properties": {
  22031. "type": {
  22032. "type": "string",
  22033. "enum": ["text", "binary"]
  22034. },
  22035. "content": {
  22036. "type": "string"
  22037. },
  22038. "diff": {
  22039. "type": "string"
  22040. },
  22041. "patch": {
  22042. "type": "object",
  22043. "properties": {
  22044. "oldFileName": {
  22045. "type": "string"
  22046. },
  22047. "newFileName": {
  22048. "type": "string"
  22049. },
  22050. "oldHeader": {
  22051. "type": "string"
  22052. },
  22053. "newHeader": {
  22054. "type": "string"
  22055. },
  22056. "hunks": {
  22057. "type": "array",
  22058. "items": {
  22059. "type": "object",
  22060. "properties": {
  22061. "oldStart": {
  22062. "type": "integer",
  22063. "minimum": 0
  22064. },
  22065. "oldLines": {
  22066. "type": "integer",
  22067. "minimum": 0
  22068. },
  22069. "newStart": {
  22070. "type": "integer",
  22071. "minimum": 0
  22072. },
  22073. "newLines": {
  22074. "type": "integer",
  22075. "minimum": 0
  22076. },
  22077. "lines": {
  22078. "type": "array",
  22079. "items": {
  22080. "type": "string"
  22081. }
  22082. }
  22083. },
  22084. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22085. "additionalProperties": false
  22086. }
  22087. },
  22088. "index": {
  22089. "type": "string"
  22090. }
  22091. },
  22092. "required": ["oldFileName", "newFileName", "hunks"],
  22093. "additionalProperties": false
  22094. },
  22095. "encoding": {
  22096. "type": "string",
  22097. "enum": ["base64"]
  22098. },
  22099. "mimeType": {
  22100. "type": "string"
  22101. }
  22102. },
  22103. "required": ["type", "content"],
  22104. "additionalProperties": false
  22105. },
  22106. "File": {
  22107. "type": "object",
  22108. "properties": {
  22109. "path": {
  22110. "type": "string"
  22111. },
  22112. "added": {
  22113. "type": "integer",
  22114. "minimum": 0
  22115. },
  22116. "removed": {
  22117. "type": "integer",
  22118. "minimum": 0
  22119. },
  22120. "status": {
  22121. "type": "string",
  22122. "enum": ["added", "deleted", "modified"]
  22123. }
  22124. },
  22125. "required": ["path", "added", "removed", "status"],
  22126. "additionalProperties": false
  22127. },
  22128. "Path": {
  22129. "type": "object",
  22130. "properties": {
  22131. "home": {
  22132. "type": "string"
  22133. },
  22134. "state": {
  22135. "type": "string"
  22136. },
  22137. "config": {
  22138. "type": "string"
  22139. },
  22140. "worktree": {
  22141. "type": "string"
  22142. },
  22143. "directory": {
  22144. "type": "string"
  22145. }
  22146. },
  22147. "required": ["home", "state", "config", "worktree", "directory"],
  22148. "additionalProperties": false
  22149. },
  22150. "VcsInfo": {
  22151. "type": "object",
  22152. "properties": {
  22153. "branch": {
  22154. "type": "string"
  22155. },
  22156. "default_branch": {
  22157. "type": "string"
  22158. }
  22159. },
  22160. "additionalProperties": false
  22161. },
  22162. "VcsFileStatus": {
  22163. "type": "object",
  22164. "properties": {
  22165. "file": {
  22166. "type": "string"
  22167. },
  22168. "additions": {
  22169. "type": "number"
  22170. },
  22171. "deletions": {
  22172. "type": "number"
  22173. },
  22174. "status": {
  22175. "type": "string",
  22176. "enum": ["added", "deleted", "modified"]
  22177. }
  22178. },
  22179. "required": ["file", "additions", "deletions", "status"],
  22180. "additionalProperties": false
  22181. },
  22182. "VcsFileDiff": {
  22183. "type": "object",
  22184. "properties": {
  22185. "file": {
  22186. "type": "string"
  22187. },
  22188. "patch": {
  22189. "type": "string"
  22190. },
  22191. "additions": {
  22192. "type": "number"
  22193. },
  22194. "deletions": {
  22195. "type": "number"
  22196. },
  22197. "status": {
  22198. "type": "string",
  22199. "enum": ["added", "deleted", "modified"]
  22200. }
  22201. },
  22202. "required": ["file", "additions", "deletions"],
  22203. "additionalProperties": false
  22204. },
  22205. "VcsApplyError": {
  22206. "type": "object",
  22207. "properties": {
  22208. "name": {
  22209. "type": "string",
  22210. "enum": ["VcsApplyError"]
  22211. },
  22212. "data": {
  22213. "type": "object",
  22214. "properties": {
  22215. "message": {
  22216. "type": "string"
  22217. },
  22218. "reason": {
  22219. "type": "string",
  22220. "enum": ["non-git", "not-clean"]
  22221. }
  22222. },
  22223. "required": ["message", "reason"],
  22224. "additionalProperties": false
  22225. }
  22226. },
  22227. "required": ["name", "data"],
  22228. "additionalProperties": false
  22229. },
  22230. "Command": {
  22231. "type": "object",
  22232. "properties": {
  22233. "name": {
  22234. "type": "string"
  22235. },
  22236. "description": {
  22237. "type": "string"
  22238. },
  22239. "agent": {
  22240. "type": "string"
  22241. },
  22242. "model": {
  22243. "type": "string"
  22244. },
  22245. "source": {
  22246. "type": "string",
  22247. "enum": ["command", "mcp", "skill"]
  22248. },
  22249. "template": {
  22250. "type": "string"
  22251. },
  22252. "subtask": {
  22253. "type": "boolean"
  22254. },
  22255. "hints": {
  22256. "type": "array",
  22257. "items": {
  22258. "type": "string"
  22259. }
  22260. }
  22261. },
  22262. "required": ["name", "template", "hints"],
  22263. "additionalProperties": false
  22264. },
  22265. "Agent": {
  22266. "type": "object",
  22267. "properties": {
  22268. "name": {
  22269. "type": "string"
  22270. },
  22271. "description": {
  22272. "type": "string"
  22273. },
  22274. "mode": {
  22275. "type": "string",
  22276. "enum": ["subagent", "primary", "all"]
  22277. },
  22278. "native": {
  22279. "type": "boolean"
  22280. },
  22281. "hidden": {
  22282. "type": "boolean"
  22283. },
  22284. "topP": {
  22285. "type": "number"
  22286. },
  22287. "temperature": {
  22288. "type": "number"
  22289. },
  22290. "color": {
  22291. "type": "string"
  22292. },
  22293. "permission": {
  22294. "$ref": "#/components/schemas/PermissionRuleset"
  22295. },
  22296. "model": {
  22297. "type": "object",
  22298. "properties": {
  22299. "modelID": {
  22300. "type": "string"
  22301. },
  22302. "providerID": {
  22303. "type": "string"
  22304. }
  22305. },
  22306. "required": ["modelID", "providerID"],
  22307. "additionalProperties": false
  22308. },
  22309. "variant": {
  22310. "type": "string"
  22311. },
  22312. "prompt": {
  22313. "type": "string"
  22314. },
  22315. "options": {
  22316. "type": "object"
  22317. },
  22318. "steps": {
  22319. "type": "number"
  22320. }
  22321. },
  22322. "required": ["name", "mode", "permission", "options"],
  22323. "additionalProperties": false
  22324. },
  22325. "LSPStatus": {
  22326. "type": "object",
  22327. "properties": {
  22328. "id": {
  22329. "type": "string"
  22330. },
  22331. "name": {
  22332. "type": "string"
  22333. },
  22334. "root": {
  22335. "type": "string"
  22336. },
  22337. "status": {
  22338. "type": "string",
  22339. "enum": ["connected", "error"]
  22340. }
  22341. },
  22342. "required": ["id", "name", "root", "status"],
  22343. "additionalProperties": false
  22344. },
  22345. "FormatterStatus": {
  22346. "type": "object",
  22347. "properties": {
  22348. "name": {
  22349. "type": "string"
  22350. },
  22351. "extensions": {
  22352. "type": "array",
  22353. "items": {
  22354. "type": "string"
  22355. }
  22356. },
  22357. "enabled": {
  22358. "type": "boolean"
  22359. }
  22360. },
  22361. "required": ["name", "extensions", "enabled"],
  22362. "additionalProperties": false
  22363. },
  22364. "MCPStatusConnected": {
  22365. "type": "object",
  22366. "properties": {
  22367. "status": {
  22368. "type": "string",
  22369. "enum": ["connected"]
  22370. }
  22371. },
  22372. "required": ["status"],
  22373. "additionalProperties": false
  22374. },
  22375. "MCPStatusDisabled": {
  22376. "type": "object",
  22377. "properties": {
  22378. "status": {
  22379. "type": "string",
  22380. "enum": ["disabled"]
  22381. }
  22382. },
  22383. "required": ["status"],
  22384. "additionalProperties": false
  22385. },
  22386. "MCPStatusFailed": {
  22387. "type": "object",
  22388. "properties": {
  22389. "status": {
  22390. "type": "string",
  22391. "enum": ["failed"]
  22392. },
  22393. "error": {
  22394. "type": "string"
  22395. }
  22396. },
  22397. "required": ["status", "error"],
  22398. "additionalProperties": false
  22399. },
  22400. "MCPStatusNeedsAuth": {
  22401. "type": "object",
  22402. "properties": {
  22403. "status": {
  22404. "type": "string",
  22405. "enum": ["needs_auth"]
  22406. }
  22407. },
  22408. "required": ["status"],
  22409. "additionalProperties": false
  22410. },
  22411. "MCPStatusNeedsClientRegistration": {
  22412. "type": "object",
  22413. "properties": {
  22414. "status": {
  22415. "type": "string",
  22416. "enum": ["needs_client_registration"]
  22417. },
  22418. "error": {
  22419. "type": "string"
  22420. }
  22421. },
  22422. "required": ["status", "error"],
  22423. "additionalProperties": false
  22424. },
  22425. "MCPStatus": {
  22426. "anyOf": [
  22427. {
  22428. "$ref": "#/components/schemas/MCPStatusConnected"
  22429. },
  22430. {
  22431. "$ref": "#/components/schemas/MCPStatusDisabled"
  22432. },
  22433. {
  22434. "$ref": "#/components/schemas/MCPStatusFailed"
  22435. },
  22436. {
  22437. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22438. },
  22439. {
  22440. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22441. }
  22442. ]
  22443. },
  22444. "McpUnsupportedOAuthError": {
  22445. "type": "object",
  22446. "properties": {
  22447. "error": {
  22448. "type": "string"
  22449. }
  22450. },
  22451. "required": ["error"],
  22452. "additionalProperties": false
  22453. },
  22454. "McpServerNotFoundError": {
  22455. "type": "object",
  22456. "properties": {
  22457. "_tag": {
  22458. "type": "string",
  22459. "enum": ["McpServerNotFoundError"]
  22460. },
  22461. "name": {
  22462. "type": "string"
  22463. },
  22464. "message": {
  22465. "type": "string"
  22466. }
  22467. },
  22468. "required": ["_tag", "name", "message"],
  22469. "additionalProperties": false
  22470. },
  22471. "Project": {
  22472. "type": "object",
  22473. "properties": {
  22474. "id": {
  22475. "type": "string"
  22476. },
  22477. "worktree": {
  22478. "type": "string"
  22479. },
  22480. "vcs": {
  22481. "type": "string",
  22482. "enum": ["git"]
  22483. },
  22484. "name": {
  22485. "type": "string"
  22486. },
  22487. "icon": {
  22488. "type": "object",
  22489. "properties": {
  22490. "url": {
  22491. "type": "string"
  22492. },
  22493. "override": {
  22494. "type": "string"
  22495. },
  22496. "color": {
  22497. "type": "string"
  22498. }
  22499. },
  22500. "additionalProperties": false
  22501. },
  22502. "commands": {
  22503. "type": "object",
  22504. "properties": {
  22505. "start": {
  22506. "type": "string",
  22507. "description": "Startup script to run when creating a new workspace (worktree)"
  22508. }
  22509. },
  22510. "additionalProperties": false
  22511. },
  22512. "time": {
  22513. "type": "object",
  22514. "properties": {
  22515. "created": {
  22516. "type": "integer",
  22517. "minimum": 0
  22518. },
  22519. "updated": {
  22520. "type": "integer",
  22521. "minimum": 0
  22522. },
  22523. "initialized": {
  22524. "type": "integer",
  22525. "minimum": 0
  22526. }
  22527. },
  22528. "required": ["created", "updated"],
  22529. "additionalProperties": false
  22530. },
  22531. "sandboxes": {
  22532. "type": "array",
  22533. "items": {
  22534. "type": "string"
  22535. }
  22536. }
  22537. },
  22538. "required": ["id", "worktree", "time", "sandboxes"],
  22539. "additionalProperties": false
  22540. },
  22541. "ProjectNotFoundError": {
  22542. "type": "object",
  22543. "properties": {
  22544. "_tag": {
  22545. "type": "string",
  22546. "enum": ["ProjectNotFoundError"]
  22547. },
  22548. "projectID": {
  22549. "type": "string"
  22550. },
  22551. "message": {
  22552. "type": "string"
  22553. }
  22554. },
  22555. "required": ["_tag", "projectID", "message"],
  22556. "additionalProperties": false
  22557. },
  22558. "PtyNotFoundError": {
  22559. "type": "object",
  22560. "properties": {
  22561. "_tag": {
  22562. "type": "string",
  22563. "enum": ["PtyNotFoundError"]
  22564. },
  22565. "ptyID": {
  22566. "type": "string"
  22567. },
  22568. "message": {
  22569. "type": "string"
  22570. }
  22571. },
  22572. "required": ["_tag", "ptyID", "message"],
  22573. "additionalProperties": false
  22574. },
  22575. "PtyForbiddenError": {
  22576. "type": "object",
  22577. "properties": {
  22578. "_tag": {
  22579. "type": "string",
  22580. "enum": ["PtyForbiddenError"]
  22581. },
  22582. "message": {
  22583. "type": "string"
  22584. }
  22585. },
  22586. "required": ["_tag", "message"],
  22587. "additionalProperties": false
  22588. },
  22589. "QuestionRequest": {
  22590. "type": "object",
  22591. "properties": {
  22592. "id": {
  22593. "type": "string",
  22594. "pattern": "^que"
  22595. },
  22596. "sessionID": {
  22597. "type": "string",
  22598. "pattern": "^ses"
  22599. },
  22600. "questions": {
  22601. "type": "array",
  22602. "items": {
  22603. "$ref": "#/components/schemas/QuestionInfo"
  22604. },
  22605. "description": "Questions to ask"
  22606. },
  22607. "tool": {
  22608. "$ref": "#/components/schemas/QuestionTool"
  22609. }
  22610. },
  22611. "required": ["id", "sessionID", "questions"],
  22612. "additionalProperties": false
  22613. },
  22614. "QuestionNotFoundError": {
  22615. "type": "object",
  22616. "properties": {
  22617. "_tag": {
  22618. "type": "string",
  22619. "enum": ["QuestionNotFoundError"]
  22620. },
  22621. "requestID": {
  22622. "type": "string"
  22623. },
  22624. "message": {
  22625. "type": "string"
  22626. }
  22627. },
  22628. "required": ["_tag", "requestID", "message"],
  22629. "additionalProperties": false
  22630. },
  22631. "PermissionRequest": {
  22632. "type": "object",
  22633. "properties": {
  22634. "id": {
  22635. "type": "string",
  22636. "pattern": "^per"
  22637. },
  22638. "sessionID": {
  22639. "type": "string",
  22640. "pattern": "^ses"
  22641. },
  22642. "permission": {
  22643. "type": "string"
  22644. },
  22645. "patterns": {
  22646. "type": "array",
  22647. "items": {
  22648. "type": "string"
  22649. }
  22650. },
  22651. "metadata": {
  22652. "type": "object"
  22653. },
  22654. "always": {
  22655. "type": "array",
  22656. "items": {
  22657. "type": "string"
  22658. }
  22659. },
  22660. "tool": {
  22661. "type": "object",
  22662. "properties": {
  22663. "messageID": {
  22664. "type": "string"
  22665. },
  22666. "callID": {
  22667. "type": "string"
  22668. }
  22669. },
  22670. "required": ["messageID", "callID"],
  22671. "additionalProperties": false
  22672. }
  22673. },
  22674. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22675. "additionalProperties": false
  22676. },
  22677. "PermissionNotFoundError": {
  22678. "type": "object",
  22679. "properties": {
  22680. "_tag": {
  22681. "type": "string",
  22682. "enum": ["PermissionNotFoundError"]
  22683. },
  22684. "requestID": {
  22685. "type": "string"
  22686. },
  22687. "message": {
  22688. "type": "string"
  22689. }
  22690. },
  22691. "required": ["_tag", "requestID", "message"],
  22692. "additionalProperties": false
  22693. },
  22694. "ProviderAuthMethod": {
  22695. "type": "object",
  22696. "properties": {
  22697. "type": {
  22698. "type": "string",
  22699. "enum": ["oauth", "api"]
  22700. },
  22701. "label": {
  22702. "type": "string"
  22703. },
  22704. "prompts": {
  22705. "type": "array",
  22706. "items": {
  22707. "anyOf": [
  22708. {
  22709. "type": "object",
  22710. "properties": {
  22711. "type": {
  22712. "type": "string",
  22713. "enum": ["text"]
  22714. },
  22715. "key": {
  22716. "type": "string"
  22717. },
  22718. "message": {
  22719. "type": "string"
  22720. },
  22721. "placeholder": {
  22722. "type": "string"
  22723. },
  22724. "when": {
  22725. "type": "object",
  22726. "properties": {
  22727. "key": {
  22728. "type": "string"
  22729. },
  22730. "op": {
  22731. "type": "string",
  22732. "enum": ["eq", "neq"]
  22733. },
  22734. "value": {
  22735. "type": "string"
  22736. }
  22737. },
  22738. "required": ["key", "op", "value"],
  22739. "additionalProperties": false
  22740. }
  22741. },
  22742. "required": ["type", "key", "message"],
  22743. "additionalProperties": false
  22744. },
  22745. {
  22746. "type": "object",
  22747. "properties": {
  22748. "type": {
  22749. "type": "string",
  22750. "enum": ["select"]
  22751. },
  22752. "key": {
  22753. "type": "string"
  22754. },
  22755. "message": {
  22756. "type": "string"
  22757. },
  22758. "options": {
  22759. "type": "array",
  22760. "items": {
  22761. "type": "object",
  22762. "properties": {
  22763. "label": {
  22764. "type": "string"
  22765. },
  22766. "value": {
  22767. "type": "string"
  22768. },
  22769. "hint": {
  22770. "type": "string"
  22771. }
  22772. },
  22773. "required": ["label", "value"],
  22774. "additionalProperties": false
  22775. }
  22776. },
  22777. "when": {
  22778. "type": "object",
  22779. "properties": {
  22780. "key": {
  22781. "type": "string"
  22782. },
  22783. "op": {
  22784. "type": "string",
  22785. "enum": ["eq", "neq"]
  22786. },
  22787. "value": {
  22788. "type": "string"
  22789. }
  22790. },
  22791. "required": ["key", "op", "value"],
  22792. "additionalProperties": false
  22793. }
  22794. },
  22795. "required": ["type", "key", "message", "options"],
  22796. "additionalProperties": false
  22797. }
  22798. ]
  22799. }
  22800. }
  22801. },
  22802. "required": ["type", "label"],
  22803. "additionalProperties": false
  22804. },
  22805. "ProviderAuthAuthorization": {
  22806. "type": "object",
  22807. "properties": {
  22808. "url": {
  22809. "type": "string"
  22810. },
  22811. "method": {
  22812. "type": "string",
  22813. "enum": ["auto", "code"]
  22814. },
  22815. "instructions": {
  22816. "type": "string"
  22817. }
  22818. },
  22819. "required": ["url", "method", "instructions"],
  22820. "additionalProperties": false
  22821. },
  22822. "ProviderAuthError1": {
  22823. "type": "object",
  22824. "properties": {
  22825. "name": {
  22826. "type": "string",
  22827. "enum": [
  22828. "BadRequest",
  22829. "ProviderAuthOauthMissing",
  22830. "ProviderAuthOauthCodeMissing",
  22831. "ProviderAuthOauthCallbackFailed",
  22832. "ProviderAuthValidationFailed"
  22833. ]
  22834. },
  22835. "data": {
  22836. "type": "object",
  22837. "properties": {
  22838. "providerID": {
  22839. "type": "string"
  22840. },
  22841. "field": {
  22842. "type": "string"
  22843. },
  22844. "message": {
  22845. "type": "string"
  22846. },
  22847. "kind": {
  22848. "type": "string"
  22849. }
  22850. },
  22851. "additionalProperties": false
  22852. }
  22853. },
  22854. "required": ["name", "data"],
  22855. "additionalProperties": false
  22856. },
  22857. "NotFoundError": {
  22858. "type": "object",
  22859. "required": ["name", "data"],
  22860. "properties": {
  22861. "name": {
  22862. "type": "string",
  22863. "enum": ["NotFoundError"]
  22864. },
  22865. "data": {
  22866. "type": "object",
  22867. "required": ["message"],
  22868. "properties": {
  22869. "message": {
  22870. "type": "string"
  22871. }
  22872. }
  22873. }
  22874. }
  22875. },
  22876. "TextPartInput": {
  22877. "type": "object",
  22878. "properties": {
  22879. "id": {
  22880. "type": "string",
  22881. "pattern": "^prt"
  22882. },
  22883. "type": {
  22884. "type": "string",
  22885. "enum": ["text"]
  22886. },
  22887. "text": {
  22888. "type": "string"
  22889. },
  22890. "synthetic": {
  22891. "type": "boolean"
  22892. },
  22893. "ignored": {
  22894. "type": "boolean"
  22895. },
  22896. "time": {
  22897. "type": "object",
  22898. "properties": {
  22899. "start": {
  22900. "type": "integer",
  22901. "minimum": 0
  22902. },
  22903. "end": {
  22904. "type": "integer",
  22905. "minimum": 0
  22906. }
  22907. },
  22908. "required": ["start"],
  22909. "additionalProperties": false
  22910. },
  22911. "metadata": {
  22912. "type": "object"
  22913. }
  22914. },
  22915. "required": ["type", "text"],
  22916. "additionalProperties": false
  22917. },
  22918. "FilePartInput": {
  22919. "type": "object",
  22920. "properties": {
  22921. "id": {
  22922. "type": "string",
  22923. "pattern": "^prt"
  22924. },
  22925. "type": {
  22926. "type": "string",
  22927. "enum": ["file"]
  22928. },
  22929. "mime": {
  22930. "type": "string"
  22931. },
  22932. "filename": {
  22933. "type": "string"
  22934. },
  22935. "url": {
  22936. "type": "string"
  22937. },
  22938. "source": {
  22939. "$ref": "#/components/schemas/FilePartSource"
  22940. }
  22941. },
  22942. "required": ["type", "mime", "url"],
  22943. "additionalProperties": false
  22944. },
  22945. "AgentPartInput": {
  22946. "type": "object",
  22947. "properties": {
  22948. "id": {
  22949. "type": "string",
  22950. "pattern": "^prt"
  22951. },
  22952. "type": {
  22953. "type": "string",
  22954. "enum": ["agent"]
  22955. },
  22956. "name": {
  22957. "type": "string"
  22958. },
  22959. "source": {
  22960. "type": "object",
  22961. "properties": {
  22962. "value": {
  22963. "type": "string"
  22964. },
  22965. "start": {
  22966. "type": "integer",
  22967. "minimum": 0
  22968. },
  22969. "end": {
  22970. "type": "integer",
  22971. "minimum": 0
  22972. }
  22973. },
  22974. "required": ["value", "start", "end"],
  22975. "additionalProperties": false
  22976. }
  22977. },
  22978. "required": ["type", "name"],
  22979. "additionalProperties": false
  22980. },
  22981. "SubtaskPartInput": {
  22982. "type": "object",
  22983. "properties": {
  22984. "id": {
  22985. "type": "string",
  22986. "pattern": "^prt"
  22987. },
  22988. "type": {
  22989. "type": "string",
  22990. "enum": ["subtask"]
  22991. },
  22992. "prompt": {
  22993. "type": "string"
  22994. },
  22995. "description": {
  22996. "type": "string"
  22997. },
  22998. "agent": {
  22999. "type": "string"
  23000. },
  23001. "model": {
  23002. "type": "object",
  23003. "properties": {
  23004. "providerID": {
  23005. "type": "string"
  23006. },
  23007. "modelID": {
  23008. "type": "string"
  23009. }
  23010. },
  23011. "required": ["providerID", "modelID"],
  23012. "additionalProperties": false
  23013. },
  23014. "command": {
  23015. "type": "string"
  23016. }
  23017. },
  23018. "required": ["type", "prompt", "description", "agent"],
  23019. "additionalProperties": false
  23020. },
  23021. "SessionBusyError": {
  23022. "type": "object",
  23023. "properties": {
  23024. "_tag": {
  23025. "type": "string",
  23026. "enum": ["SessionBusyError"]
  23027. },
  23028. "sessionID": {
  23029. "type": "string"
  23030. },
  23031. "message": {
  23032. "type": "string"
  23033. }
  23034. },
  23035. "required": ["_tag", "sessionID", "message"],
  23036. "additionalProperties": false
  23037. },
  23038. "EventTuiPromptAppend": {
  23039. "type": "object",
  23040. "properties": {
  23041. "type": {
  23042. "type": "string",
  23043. "enum": ["tui.prompt.append"]
  23044. },
  23045. "properties": {
  23046. "type": "object",
  23047. "properties": {
  23048. "text": {
  23049. "type": "string"
  23050. }
  23051. },
  23052. "required": ["text"],
  23053. "additionalProperties": false
  23054. }
  23055. },
  23056. "required": ["type", "properties"],
  23057. "additionalProperties": false
  23058. },
  23059. "EventTuiCommandExecute": {
  23060. "type": "object",
  23061. "properties": {
  23062. "type": {
  23063. "type": "string",
  23064. "enum": ["tui.command.execute"]
  23065. },
  23066. "properties": {
  23067. "type": "object",
  23068. "properties": {
  23069. "command": {
  23070. "anyOf": [
  23071. {
  23072. "type": "string",
  23073. "enum": [
  23074. "session.list",
  23075. "session.new",
  23076. "session.share",
  23077. "session.interrupt",
  23078. "session.compact",
  23079. "session.page.up",
  23080. "session.page.down",
  23081. "session.line.up",
  23082. "session.line.down",
  23083. "session.half.page.up",
  23084. "session.half.page.down",
  23085. "session.first",
  23086. "session.last",
  23087. "prompt.clear",
  23088. "prompt.submit",
  23089. "agent.cycle"
  23090. ]
  23091. },
  23092. {
  23093. "type": "string"
  23094. }
  23095. ]
  23096. }
  23097. },
  23098. "required": ["command"],
  23099. "additionalProperties": false
  23100. }
  23101. },
  23102. "required": ["type", "properties"],
  23103. "additionalProperties": false
  23104. },
  23105. "EventTuiToastShow": {
  23106. "type": "object",
  23107. "properties": {
  23108. "type": {
  23109. "type": "string",
  23110. "enum": ["tui.toast.show"]
  23111. },
  23112. "properties": {
  23113. "type": "object",
  23114. "properties": {
  23115. "title": {
  23116. "type": "string"
  23117. },
  23118. "message": {
  23119. "type": "string"
  23120. },
  23121. "variant": {
  23122. "type": "string",
  23123. "enum": ["info", "success", "warning", "error"]
  23124. },
  23125. "duration": {
  23126. "type": "integer",
  23127. "exclusiveMinimum": 0
  23128. }
  23129. },
  23130. "required": ["message", "variant"],
  23131. "additionalProperties": false
  23132. }
  23133. },
  23134. "required": ["type", "properties"],
  23135. "additionalProperties": false
  23136. },
  23137. "EventTuiSessionSelect": {
  23138. "type": "object",
  23139. "properties": {
  23140. "type": {
  23141. "type": "string",
  23142. "enum": ["tui.session.select"]
  23143. },
  23144. "properties": {
  23145. "type": "object",
  23146. "properties": {
  23147. "sessionID": {
  23148. "type": "string",
  23149. "pattern": "^ses",
  23150. "description": "Session ID to navigate to"
  23151. }
  23152. },
  23153. "required": ["sessionID"],
  23154. "additionalProperties": false
  23155. }
  23156. },
  23157. "required": ["type", "properties"],
  23158. "additionalProperties": false
  23159. },
  23160. "Workspace": {
  23161. "type": "object",
  23162. "properties": {
  23163. "id": {
  23164. "type": "string",
  23165. "pattern": "^wrk"
  23166. },
  23167. "type": {
  23168. "type": "string"
  23169. },
  23170. "name": {
  23171. "type": "string"
  23172. },
  23173. "branch": {
  23174. "anyOf": [
  23175. {
  23176. "type": "string"
  23177. },
  23178. {
  23179. "type": "null"
  23180. }
  23181. ]
  23182. },
  23183. "directory": {
  23184. "anyOf": [
  23185. {
  23186. "type": "string"
  23187. },
  23188. {
  23189. "type": "null"
  23190. }
  23191. ]
  23192. },
  23193. "extra": {
  23194. "anyOf": [
  23195. {},
  23196. {
  23197. "type": "null"
  23198. }
  23199. ]
  23200. },
  23201. "projectID": {
  23202. "type": "string"
  23203. },
  23204. "timeUsed": {
  23205. "anyOf": [
  23206. {
  23207. "type": "number"
  23208. },
  23209. {
  23210. "type": "string",
  23211. "enum": ["NaN"]
  23212. },
  23213. {
  23214. "type": "string",
  23215. "enum": ["Infinity"]
  23216. },
  23217. {
  23218. "type": "string",
  23219. "enum": ["-Infinity"]
  23220. },
  23221. {
  23222. "type": "string",
  23223. "enum": ["Infinity", "-Infinity", "NaN"]
  23224. }
  23225. ]
  23226. }
  23227. },
  23228. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23229. "additionalProperties": false
  23230. },
  23231. "WorkspaceCreateError": {
  23232. "type": "object",
  23233. "properties": {
  23234. "name": {
  23235. "type": "string",
  23236. "enum": ["WorkspaceCreateError"]
  23237. },
  23238. "data": {
  23239. "type": "object",
  23240. "properties": {
  23241. "message": {
  23242. "type": "string"
  23243. }
  23244. },
  23245. "required": ["message"],
  23246. "additionalProperties": false
  23247. }
  23248. },
  23249. "required": ["name", "data"],
  23250. "additionalProperties": false
  23251. },
  23252. "WorkspaceWarpError": {
  23253. "type": "object",
  23254. "properties": {
  23255. "name": {
  23256. "type": "string",
  23257. "enum": ["WorkspaceWarpError"]
  23258. },
  23259. "data": {
  23260. "type": "object",
  23261. "properties": {
  23262. "message": {
  23263. "type": "string"
  23264. }
  23265. },
  23266. "required": ["message"],
  23267. "additionalProperties": false
  23268. }
  23269. },
  23270. "required": ["name", "data"],
  23271. "additionalProperties": false
  23272. },
  23273. "UnauthorizedError": {
  23274. "type": "object",
  23275. "properties": {
  23276. "_tag": {
  23277. "type": "string",
  23278. "enum": ["UnauthorizedError"]
  23279. },
  23280. "message": {
  23281. "type": "string"
  23282. }
  23283. },
  23284. "required": ["_tag", "message"],
  23285. "additionalProperties": false
  23286. },
  23287. "SessionsResponse": {
  23288. "type": "object",
  23289. "properties": {
  23290. "data": {
  23291. "type": "array",
  23292. "items": {
  23293. "$ref": "#/components/schemas/SessionV2Info"
  23294. }
  23295. },
  23296. "cursor": {
  23297. "type": "object",
  23298. "properties": {
  23299. "previous": {
  23300. "type": "string"
  23301. },
  23302. "next": {
  23303. "type": "string"
  23304. }
  23305. },
  23306. "additionalProperties": false
  23307. }
  23308. },
  23309. "required": ["data", "cursor"],
  23310. "additionalProperties": false
  23311. },
  23312. "InvalidCursorError": {
  23313. "type": "object",
  23314. "properties": {
  23315. "_tag": {
  23316. "type": "string",
  23317. "enum": ["InvalidCursorError"]
  23318. },
  23319. "message": {
  23320. "type": "string"
  23321. }
  23322. },
  23323. "required": ["_tag", "message"],
  23324. "additionalProperties": false
  23325. },
  23326. "SessionNotFoundError": {
  23327. "type": "object",
  23328. "properties": {
  23329. "_tag": {
  23330. "type": "string",
  23331. "enum": ["SessionNotFoundError"]
  23332. },
  23333. "sessionID": {
  23334. "type": "string"
  23335. },
  23336. "message": {
  23337. "type": "string"
  23338. }
  23339. },
  23340. "required": ["_tag", "sessionID", "message"],
  23341. "additionalProperties": false
  23342. },
  23343. "ConflictError": {
  23344. "type": "object",
  23345. "properties": {
  23346. "_tag": {
  23347. "type": "string",
  23348. "enum": ["ConflictError"]
  23349. },
  23350. "message": {
  23351. "type": "string"
  23352. },
  23353. "resource": {
  23354. "type": "string"
  23355. }
  23356. },
  23357. "required": ["_tag", "message"],
  23358. "additionalProperties": false
  23359. },
  23360. "ServiceUnavailableError": {
  23361. "type": "object",
  23362. "properties": {
  23363. "_tag": {
  23364. "type": "string",
  23365. "enum": ["ServiceUnavailableError"]
  23366. },
  23367. "message": {
  23368. "type": "string"
  23369. },
  23370. "service": {
  23371. "type": "string"
  23372. }
  23373. },
  23374. "required": ["_tag", "message"],
  23375. "additionalProperties": false
  23376. },
  23377. "MessageNotFoundError": {
  23378. "type": "object",
  23379. "properties": {
  23380. "_tag": {
  23381. "type": "string",
  23382. "enum": ["MessageNotFoundError"]
  23383. },
  23384. "sessionID": {
  23385. "type": "string"
  23386. },
  23387. "messageID": {
  23388. "type": "string"
  23389. },
  23390. "message": {
  23391. "type": "string"
  23392. }
  23393. },
  23394. "required": ["_tag", "sessionID", "messageID", "message"],
  23395. "additionalProperties": false
  23396. },
  23397. "UnknownError1": {
  23398. "type": "object",
  23399. "properties": {
  23400. "_tag": {
  23401. "type": "string",
  23402. "enum": ["UnknownError"]
  23403. },
  23404. "message": {
  23405. "type": "string"
  23406. },
  23407. "ref": {
  23408. "type": "string"
  23409. }
  23410. },
  23411. "required": ["_tag", "message"],
  23412. "additionalProperties": false
  23413. },
  23414. "SessionMessagesResponse": {
  23415. "type": "object",
  23416. "properties": {
  23417. "data": {
  23418. "type": "array",
  23419. "items": {
  23420. "$ref": "#/components/schemas/SessionMessage"
  23421. }
  23422. },
  23423. "cursor": {
  23424. "type": "object",
  23425. "properties": {
  23426. "previous": {
  23427. "type": "string"
  23428. },
  23429. "next": {
  23430. "type": "string"
  23431. }
  23432. },
  23433. "additionalProperties": false
  23434. }
  23435. },
  23436. "required": ["data", "cursor"],
  23437. "additionalProperties": false
  23438. },
  23439. "ProviderNotFoundError": {
  23440. "type": "object",
  23441. "properties": {
  23442. "_tag": {
  23443. "type": "string",
  23444. "enum": ["ProviderNotFoundError"]
  23445. },
  23446. "providerID": {
  23447. "type": "string"
  23448. },
  23449. "message": {
  23450. "type": "string"
  23451. }
  23452. },
  23453. "required": ["_tag", "providerID", "message"],
  23454. "additionalProperties": false
  23455. },
  23456. "V2Event": {
  23457. "anyOf": [
  23458. {
  23459. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23460. },
  23461. {
  23462. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23463. },
  23464. {
  23465. "$ref": "#/components/schemas/V2EventIntegrationConnectionUpdated"
  23466. },
  23467. {
  23468. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23469. },
  23470. {
  23471. "$ref": "#/components/schemas/V2EventSessionCreated"
  23472. },
  23473. {
  23474. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23475. },
  23476. {
  23477. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23478. },
  23479. {
  23480. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23481. },
  23482. {
  23483. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23484. },
  23485. {
  23486. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23487. },
  23488. {
  23489. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23490. },
  23491. {
  23492. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23493. },
  23494. {
  23495. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23496. },
  23497. {
  23498. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23499. },
  23500. {
  23501. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23502. },
  23503. {
  23504. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23505. },
  23506. {
  23507. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23508. },
  23509. {
  23510. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23511. },
  23512. {
  23513. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23514. },
  23515. {
  23516. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23517. },
  23518. {
  23519. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23520. },
  23521. {
  23522. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23523. },
  23524. {
  23525. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23526. },
  23527. {
  23528. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23529. },
  23530. {
  23531. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23532. },
  23533. {
  23534. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23535. },
  23536. {
  23537. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23538. },
  23539. {
  23540. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23541. },
  23542. {
  23543. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23544. },
  23545. {
  23546. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23547. },
  23548. {
  23549. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23550. },
  23551. {
  23552. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23553. },
  23554. {
  23555. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23556. },
  23557. {
  23558. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23559. },
  23560. {
  23561. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23562. },
  23563. {
  23564. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23565. },
  23566. {
  23567. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23568. },
  23569. {
  23570. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23571. },
  23572. {
  23573. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23574. },
  23575. {
  23576. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23577. },
  23578. {
  23579. "$ref": "#/components/schemas/V2EventSessionNextRevertStaged"
  23580. },
  23581. {
  23582. "$ref": "#/components/schemas/V2EventSessionNextRevertCleared"
  23583. },
  23584. {
  23585. "$ref": "#/components/schemas/V2EventSessionNextRevertCommitted"
  23586. },
  23587. {
  23588. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23589. },
  23590. {
  23591. "$ref": "#/components/schemas/V2EventSessionDiff"
  23592. },
  23593. {
  23594. "$ref": "#/components/schemas/V2EventSessionError"
  23595. },
  23596. {
  23597. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23598. },
  23599. {
  23600. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23601. },
  23602. {
  23603. "$ref": "#/components/schemas/V2EventFileEdited"
  23604. },
  23605. {
  23606. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23607. },
  23608. {
  23609. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23610. },
  23611. {
  23612. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23613. },
  23614. {
  23615. "$ref": "#/components/schemas/V2EventPluginAdded"
  23616. },
  23617. {
  23618. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23619. },
  23620. {
  23621. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23622. },
  23623. {
  23624. "$ref": "#/components/schemas/V2EventPtyCreated"
  23625. },
  23626. {
  23627. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23628. },
  23629. {
  23630. "$ref": "#/components/schemas/V2EventPtyExited"
  23631. },
  23632. {
  23633. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23634. },
  23635. {
  23636. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23637. },
  23638. {
  23639. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23640. },
  23641. {
  23642. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23643. },
  23644. {
  23645. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23646. },
  23647. {
  23648. "$ref": "#/components/schemas/V2EventLspUpdated"
  23649. },
  23650. {
  23651. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23652. },
  23653. {
  23654. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23655. },
  23656. {
  23657. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23658. },
  23659. {
  23660. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23661. },
  23662. {
  23663. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23664. },
  23665. {
  23666. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23667. },
  23668. {
  23669. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23670. },
  23671. {
  23672. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23673. },
  23674. {
  23675. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23676. },
  23677. {
  23678. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23679. },
  23680. {
  23681. "$ref": "#/components/schemas/V2EventSessionStatus"
  23682. },
  23683. {
  23684. "$ref": "#/components/schemas/V2EventSessionIdle"
  23685. },
  23686. {
  23687. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23688. },
  23689. {
  23690. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23691. },
  23692. {
  23693. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23694. },
  23695. {
  23696. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23697. },
  23698. {
  23699. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23700. },
  23701. {
  23702. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23703. },
  23704. {
  23705. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23706. },
  23707. {
  23708. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23709. },
  23710. {
  23711. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23712. },
  23713. {
  23714. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23715. },
  23716. {
  23717. "$ref": "#/components/schemas/V2EventServerConnected"
  23718. },
  23719. {
  23720. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23721. }
  23722. ]
  23723. },
  23724. "ForbiddenError": {
  23725. "type": "object",
  23726. "properties": {
  23727. "_tag": {
  23728. "type": "string",
  23729. "enum": ["ForbiddenError"]
  23730. },
  23731. "message": {
  23732. "type": "string"
  23733. }
  23734. },
  23735. "required": ["_tag", "message"],
  23736. "additionalProperties": false
  23737. },
  23738. "ProjectCopyError": {
  23739. "type": "object",
  23740. "properties": {
  23741. "name": {
  23742. "type": "string",
  23743. "enum": ["ProjectCopyError"]
  23744. },
  23745. "data": {
  23746. "type": "object",
  23747. "properties": {
  23748. "message": {
  23749. "type": "string"
  23750. },
  23751. "forceRequired": {
  23752. "type": "boolean"
  23753. }
  23754. },
  23755. "required": ["message"],
  23756. "additionalProperties": false
  23757. }
  23758. },
  23759. "required": ["name", "data"],
  23760. "additionalProperties": false
  23761. },
  23762. "effect_HttpApiError_Forbidden": {
  23763. "type": "object",
  23764. "properties": {
  23765. "_tag": {
  23766. "type": "string",
  23767. "enum": ["Forbidden"]
  23768. }
  23769. },
  23770. "required": ["_tag"],
  23771. "additionalProperties": false
  23772. },
  23773. "Event.tui.prompt.append": {
  23774. "type": "object",
  23775. "properties": {
  23776. "id": {
  23777. "type": "string",
  23778. "pattern": "^evt_"
  23779. },
  23780. "type": {
  23781. "type": "string",
  23782. "enum": ["tui.prompt.append"]
  23783. },
  23784. "properties": {
  23785. "type": "object",
  23786. "properties": {
  23787. "text": {
  23788. "type": "string"
  23789. }
  23790. },
  23791. "required": ["text"],
  23792. "additionalProperties": false
  23793. }
  23794. },
  23795. "required": ["id", "type", "properties"],
  23796. "additionalProperties": false
  23797. },
  23798. "Event.tui.command.execute": {
  23799. "type": "object",
  23800. "properties": {
  23801. "id": {
  23802. "type": "string",
  23803. "pattern": "^evt_"
  23804. },
  23805. "type": {
  23806. "type": "string",
  23807. "enum": ["tui.command.execute"]
  23808. },
  23809. "properties": {
  23810. "type": "object",
  23811. "properties": {
  23812. "command": {
  23813. "anyOf": [
  23814. {
  23815. "type": "string",
  23816. "enum": [
  23817. "session.list",
  23818. "session.new",
  23819. "session.share",
  23820. "session.interrupt",
  23821. "session.compact",
  23822. "session.page.up",
  23823. "session.page.down",
  23824. "session.line.up",
  23825. "session.line.down",
  23826. "session.half.page.up",
  23827. "session.half.page.down",
  23828. "session.first",
  23829. "session.last",
  23830. "prompt.clear",
  23831. "prompt.submit",
  23832. "agent.cycle"
  23833. ]
  23834. },
  23835. {
  23836. "type": "string"
  23837. }
  23838. ]
  23839. }
  23840. },
  23841. "required": ["command"],
  23842. "additionalProperties": false
  23843. }
  23844. },
  23845. "required": ["id", "type", "properties"],
  23846. "additionalProperties": false
  23847. },
  23848. "Event.tui.toast.show": {
  23849. "type": "object",
  23850. "properties": {
  23851. "id": {
  23852. "type": "string",
  23853. "pattern": "^evt_"
  23854. },
  23855. "type": {
  23856. "type": "string",
  23857. "enum": ["tui.toast.show"]
  23858. },
  23859. "properties": {
  23860. "type": "object",
  23861. "properties": {
  23862. "title": {
  23863. "type": "string"
  23864. },
  23865. "message": {
  23866. "type": "string"
  23867. },
  23868. "variant": {
  23869. "type": "string",
  23870. "enum": ["info", "success", "warning", "error"]
  23871. },
  23872. "duration": {
  23873. "type": "integer",
  23874. "exclusiveMinimum": 0
  23875. }
  23876. },
  23877. "required": ["message", "variant"],
  23878. "additionalProperties": false
  23879. }
  23880. },
  23881. "required": ["id", "type", "properties"],
  23882. "additionalProperties": false
  23883. },
  23884. "Event.tui.session.select": {
  23885. "type": "object",
  23886. "properties": {
  23887. "id": {
  23888. "type": "string",
  23889. "pattern": "^evt_"
  23890. },
  23891. "type": {
  23892. "type": "string",
  23893. "enum": ["tui.session.select"]
  23894. },
  23895. "properties": {
  23896. "type": "object",
  23897. "properties": {
  23898. "sessionID": {
  23899. "type": "string",
  23900. "pattern": "^ses",
  23901. "description": "Session ID to navigate to"
  23902. }
  23903. },
  23904. "required": ["sessionID"],
  23905. "additionalProperties": false
  23906. }
  23907. },
  23908. "required": ["id", "type", "properties"],
  23909. "additionalProperties": false
  23910. },
  23911. "CredentialValue": {
  23912. "anyOf": [
  23913. {
  23914. "$ref": "#/components/schemas/CredentialOAuth"
  23915. },
  23916. {
  23917. "$ref": "#/components/schemas/CredentialKey"
  23918. }
  23919. ]
  23920. },
  23921. "IntegrationInputs": {
  23922. "type": "object",
  23923. "additionalProperties": {
  23924. "type": "string"
  23925. }
  23926. },
  23927. "IntegrationMethod": {
  23928. "anyOf": [
  23929. {
  23930. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  23931. },
  23932. {
  23933. "$ref": "#/components/schemas/IntegrationKeyMethod"
  23934. },
  23935. {
  23936. "$ref": "#/components/schemas/IntegrationEnvMethod"
  23937. }
  23938. ]
  23939. },
  23940. "IntegrationRef": {
  23941. "type": "object",
  23942. "properties": {
  23943. "id": {
  23944. "type": "string"
  23945. },
  23946. "name": {
  23947. "type": "string"
  23948. }
  23949. },
  23950. "required": ["id", "name"],
  23951. "additionalProperties": false
  23952. },
  23953. "SkillV2Source": {
  23954. "anyOf": [
  23955. {
  23956. "$ref": "#/components/schemas/SkillV2DirectorySource"
  23957. },
  23958. {
  23959. "$ref": "#/components/schemas/SkillV2UrlSource"
  23960. },
  23961. {
  23962. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  23963. }
  23964. ]
  23965. },
  23966. "MoveSessionDestination": {
  23967. "type": "object",
  23968. "properties": {
  23969. "directory": {
  23970. "type": "string"
  23971. }
  23972. },
  23973. "required": ["directory"],
  23974. "additionalProperties": false
  23975. },
  23976. "LocationRef": {
  23977. "type": "object",
  23978. "properties": {
  23979. "directory": {
  23980. "type": "string"
  23981. },
  23982. "workspaceID": {
  23983. "type": "string",
  23984. "pattern": "^wrk"
  23985. }
  23986. },
  23987. "required": ["directory"],
  23988. "additionalProperties": false
  23989. },
  23990. "PromptSource": {
  23991. "type": "object",
  23992. "properties": {
  23993. "start": {
  23994. "type": "number"
  23995. },
  23996. "end": {
  23997. "type": "number"
  23998. },
  23999. "text": {
  24000. "type": "string"
  24001. }
  24002. },
  24003. "required": ["start", "end", "text"],
  24004. "additionalProperties": false
  24005. },
  24006. "PromptFileAttachment": {
  24007. "type": "object",
  24008. "properties": {
  24009. "uri": {
  24010. "type": "string"
  24011. },
  24012. "mime": {
  24013. "type": "string"
  24014. },
  24015. "name": {
  24016. "type": "string"
  24017. },
  24018. "description": {
  24019. "type": "string"
  24020. },
  24021. "source": {
  24022. "$ref": "#/components/schemas/PromptSource"
  24023. }
  24024. },
  24025. "required": ["uri", "mime"],
  24026. "additionalProperties": false
  24027. },
  24028. "PromptAgentAttachment": {
  24029. "type": "object",
  24030. "properties": {
  24031. "name": {
  24032. "type": "string"
  24033. },
  24034. "source": {
  24035. "$ref": "#/components/schemas/PromptSource"
  24036. }
  24037. },
  24038. "required": ["name"],
  24039. "additionalProperties": false
  24040. },
  24041. "SessionErrorUnknown": {
  24042. "type": "object",
  24043. "properties": {
  24044. "type": {
  24045. "type": "string",
  24046. "enum": ["unknown"]
  24047. },
  24048. "message": {
  24049. "type": "string"
  24050. }
  24051. },
  24052. "required": ["type", "message"],
  24053. "additionalProperties": false
  24054. },
  24055. "ToolTextContent": {
  24056. "type": "object",
  24057. "properties": {
  24058. "type": {
  24059. "type": "string",
  24060. "enum": ["text"]
  24061. },
  24062. "text": {
  24063. "type": "string"
  24064. }
  24065. },
  24066. "required": ["type", "text"],
  24067. "additionalProperties": false
  24068. },
  24069. "ToolFileContent": {
  24070. "type": "object",
  24071. "properties": {
  24072. "type": {
  24073. "type": "string",
  24074. "enum": ["file"]
  24075. },
  24076. "uri": {
  24077. "type": "string"
  24078. },
  24079. "mime": {
  24080. "type": "string"
  24081. },
  24082. "name": {
  24083. "type": "string"
  24084. }
  24085. },
  24086. "required": ["type", "uri", "mime"],
  24087. "additionalProperties": false
  24088. },
  24089. "SessionNextRetry_error": {
  24090. "type": "object",
  24091. "properties": {
  24092. "message": {
  24093. "type": "string"
  24094. },
  24095. "statusCode": {
  24096. "type": "number"
  24097. },
  24098. "isRetryable": {
  24099. "type": "boolean"
  24100. },
  24101. "responseHeaders": {
  24102. "type": "object",
  24103. "additionalProperties": {
  24104. "type": "string"
  24105. }
  24106. },
  24107. "responseBody": {
  24108. "type": "string"
  24109. },
  24110. "metadata": {
  24111. "type": "object",
  24112. "additionalProperties": {
  24113. "type": "string"
  24114. }
  24115. }
  24116. },
  24117. "required": ["message", "isRetryable"],
  24118. "additionalProperties": false
  24119. },
  24120. "FileDiff": {
  24121. "type": "object",
  24122. "properties": {
  24123. "path": {
  24124. "type": "string"
  24125. },
  24126. "status": {
  24127. "type": "string",
  24128. "enum": ["added", "modified", "deleted"]
  24129. },
  24130. "additions": {
  24131. "type": "integer",
  24132. "minimum": 0
  24133. },
  24134. "deletions": {
  24135. "type": "integer",
  24136. "minimum": 0
  24137. },
  24138. "patch": {
  24139. "type": "string"
  24140. }
  24141. },
  24142. "required": ["path", "status", "additions", "deletions", "patch"],
  24143. "additionalProperties": false
  24144. },
  24145. "PermissionV2Source": {
  24146. "type": "object",
  24147. "properties": {
  24148. "type": {
  24149. "type": "string",
  24150. "enum": ["tool"]
  24151. },
  24152. "messageID": {
  24153. "type": "string"
  24154. },
  24155. "callID": {
  24156. "type": "string"
  24157. }
  24158. },
  24159. "required": ["type", "messageID", "callID"],
  24160. "additionalProperties": false
  24161. },
  24162. "PermissionV2Reply": {
  24163. "type": "string",
  24164. "enum": ["once", "always", "reject"]
  24165. },
  24166. "QuestionV2Option": {
  24167. "type": "object",
  24168. "properties": {
  24169. "label": {
  24170. "type": "string",
  24171. "description": "Display text (1-5 words, concise)"
  24172. },
  24173. "description": {
  24174. "type": "string",
  24175. "description": "Explanation of choice"
  24176. }
  24177. },
  24178. "required": ["label", "description"],
  24179. "additionalProperties": false
  24180. },
  24181. "QuestionV2Info": {
  24182. "type": "object",
  24183. "properties": {
  24184. "question": {
  24185. "type": "string",
  24186. "description": "Complete question"
  24187. },
  24188. "header": {
  24189. "type": "string",
  24190. "description": "Very short label (max 30 chars)"
  24191. },
  24192. "options": {
  24193. "type": "array",
  24194. "items": {
  24195. "$ref": "#/components/schemas/QuestionV2Option"
  24196. },
  24197. "description": "Available choices"
  24198. },
  24199. "multiple": {
  24200. "type": "boolean"
  24201. },
  24202. "custom": {
  24203. "type": "boolean"
  24204. }
  24205. },
  24206. "required": ["question", "header", "options"],
  24207. "additionalProperties": false
  24208. },
  24209. "QuestionV2Tool": {
  24210. "type": "object",
  24211. "properties": {
  24212. "messageID": {
  24213. "type": "string"
  24214. },
  24215. "callID": {
  24216. "type": "string"
  24217. }
  24218. },
  24219. "required": ["messageID", "callID"],
  24220. "additionalProperties": false
  24221. },
  24222. "QuestionV2Answer": {
  24223. "type": "array",
  24224. "items": {
  24225. "type": "string"
  24226. }
  24227. },
  24228. "EventServerInstanceDisposed": {
  24229. "type": "object",
  24230. "properties": {
  24231. "id": {
  24232. "type": "string"
  24233. },
  24234. "type": {
  24235. "type": "string",
  24236. "enum": ["server.instance.disposed"]
  24237. },
  24238. "properties": {
  24239. "type": "object",
  24240. "properties": {
  24241. "directory": {
  24242. "type": "string"
  24243. }
  24244. },
  24245. "required": ["directory"],
  24246. "additionalProperties": false
  24247. }
  24248. },
  24249. "required": ["id", "type", "properties"],
  24250. "additionalProperties": false
  24251. },
  24252. "SyncEventSessionCreated": {
  24253. "type": "object",
  24254. "properties": {
  24255. "type": {
  24256. "type": "string",
  24257. "enum": ["sync"]
  24258. },
  24259. "id": {
  24260. "type": "string",
  24261. "pattern": "^evt_"
  24262. },
  24263. "syncEvent": {
  24264. "type": "object",
  24265. "properties": {
  24266. "type": {
  24267. "type": "string",
  24268. "enum": ["session.created.1"]
  24269. },
  24270. "id": {
  24271. "type": "string",
  24272. "pattern": "^evt_"
  24273. },
  24274. "seq": {
  24275. "type": "number"
  24276. },
  24277. "aggregateID": {
  24278. "type": "string"
  24279. },
  24280. "data": {
  24281. "type": "object",
  24282. "properties": {
  24283. "sessionID": {
  24284. "type": "string",
  24285. "pattern": "^ses"
  24286. },
  24287. "info": {
  24288. "$ref": "#/components/schemas/Session"
  24289. }
  24290. },
  24291. "required": ["sessionID", "info"],
  24292. "additionalProperties": false
  24293. }
  24294. },
  24295. "required": ["type", "id", "seq", "aggregateID", "data"],
  24296. "additionalProperties": false
  24297. }
  24298. },
  24299. "required": ["type", "id", "syncEvent"],
  24300. "additionalProperties": false
  24301. },
  24302. "SyncEventSessionUpdated": {
  24303. "type": "object",
  24304. "properties": {
  24305. "type": {
  24306. "type": "string",
  24307. "enum": ["sync"]
  24308. },
  24309. "id": {
  24310. "type": "string",
  24311. "pattern": "^evt_"
  24312. },
  24313. "syncEvent": {
  24314. "type": "object",
  24315. "properties": {
  24316. "type": {
  24317. "type": "string",
  24318. "enum": ["session.updated.1"]
  24319. },
  24320. "id": {
  24321. "type": "string",
  24322. "pattern": "^evt_"
  24323. },
  24324. "seq": {
  24325. "type": "number"
  24326. },
  24327. "aggregateID": {
  24328. "type": "string"
  24329. },
  24330. "data": {
  24331. "type": "object",
  24332. "properties": {
  24333. "sessionID": {
  24334. "type": "string",
  24335. "pattern": "^ses"
  24336. },
  24337. "info": {
  24338. "$ref": "#/components/schemas/Session"
  24339. }
  24340. },
  24341. "required": ["sessionID", "info"],
  24342. "additionalProperties": false
  24343. }
  24344. },
  24345. "required": ["type", "id", "seq", "aggregateID", "data"],
  24346. "additionalProperties": false
  24347. }
  24348. },
  24349. "required": ["type", "id", "syncEvent"],
  24350. "additionalProperties": false
  24351. },
  24352. "SyncEventSessionDeleted": {
  24353. "type": "object",
  24354. "properties": {
  24355. "type": {
  24356. "type": "string",
  24357. "enum": ["sync"]
  24358. },
  24359. "id": {
  24360. "type": "string",
  24361. "pattern": "^evt_"
  24362. },
  24363. "syncEvent": {
  24364. "type": "object",
  24365. "properties": {
  24366. "type": {
  24367. "type": "string",
  24368. "enum": ["session.deleted.1"]
  24369. },
  24370. "id": {
  24371. "type": "string",
  24372. "pattern": "^evt_"
  24373. },
  24374. "seq": {
  24375. "type": "number"
  24376. },
  24377. "aggregateID": {
  24378. "type": "string"
  24379. },
  24380. "data": {
  24381. "type": "object",
  24382. "properties": {
  24383. "sessionID": {
  24384. "type": "string",
  24385. "pattern": "^ses"
  24386. },
  24387. "info": {
  24388. "$ref": "#/components/schemas/Session"
  24389. }
  24390. },
  24391. "required": ["sessionID", "info"],
  24392. "additionalProperties": false
  24393. }
  24394. },
  24395. "required": ["type", "id", "seq", "aggregateID", "data"],
  24396. "additionalProperties": false
  24397. }
  24398. },
  24399. "required": ["type", "id", "syncEvent"],
  24400. "additionalProperties": false
  24401. },
  24402. "SyncEventMessageUpdated": {
  24403. "type": "object",
  24404. "properties": {
  24405. "type": {
  24406. "type": "string",
  24407. "enum": ["sync"]
  24408. },
  24409. "id": {
  24410. "type": "string",
  24411. "pattern": "^evt_"
  24412. },
  24413. "syncEvent": {
  24414. "type": "object",
  24415. "properties": {
  24416. "type": {
  24417. "type": "string",
  24418. "enum": ["message.updated.1"]
  24419. },
  24420. "id": {
  24421. "type": "string",
  24422. "pattern": "^evt_"
  24423. },
  24424. "seq": {
  24425. "type": "number"
  24426. },
  24427. "aggregateID": {
  24428. "type": "string"
  24429. },
  24430. "data": {
  24431. "type": "object",
  24432. "properties": {
  24433. "sessionID": {
  24434. "type": "string",
  24435. "pattern": "^ses"
  24436. },
  24437. "info": {
  24438. "$ref": "#/components/schemas/Message"
  24439. }
  24440. },
  24441. "required": ["sessionID", "info"],
  24442. "additionalProperties": false
  24443. }
  24444. },
  24445. "required": ["type", "id", "seq", "aggregateID", "data"],
  24446. "additionalProperties": false
  24447. }
  24448. },
  24449. "required": ["type", "id", "syncEvent"],
  24450. "additionalProperties": false
  24451. },
  24452. "SyncEventMessageRemoved": {
  24453. "type": "object",
  24454. "properties": {
  24455. "type": {
  24456. "type": "string",
  24457. "enum": ["sync"]
  24458. },
  24459. "id": {
  24460. "type": "string",
  24461. "pattern": "^evt_"
  24462. },
  24463. "syncEvent": {
  24464. "type": "object",
  24465. "properties": {
  24466. "type": {
  24467. "type": "string",
  24468. "enum": ["message.removed.1"]
  24469. },
  24470. "id": {
  24471. "type": "string",
  24472. "pattern": "^evt_"
  24473. },
  24474. "seq": {
  24475. "type": "number"
  24476. },
  24477. "aggregateID": {
  24478. "type": "string"
  24479. },
  24480. "data": {
  24481. "type": "object",
  24482. "properties": {
  24483. "sessionID": {
  24484. "type": "string",
  24485. "pattern": "^ses"
  24486. },
  24487. "messageID": {
  24488. "type": "string",
  24489. "pattern": "^msg"
  24490. }
  24491. },
  24492. "required": ["sessionID", "messageID"],
  24493. "additionalProperties": false
  24494. }
  24495. },
  24496. "required": ["type", "id", "seq", "aggregateID", "data"],
  24497. "additionalProperties": false
  24498. }
  24499. },
  24500. "required": ["type", "id", "syncEvent"],
  24501. "additionalProperties": false
  24502. },
  24503. "SyncEventMessagePartUpdated": {
  24504. "type": "object",
  24505. "properties": {
  24506. "type": {
  24507. "type": "string",
  24508. "enum": ["sync"]
  24509. },
  24510. "id": {
  24511. "type": "string",
  24512. "pattern": "^evt_"
  24513. },
  24514. "syncEvent": {
  24515. "type": "object",
  24516. "properties": {
  24517. "type": {
  24518. "type": "string",
  24519. "enum": ["message.part.updated.1"]
  24520. },
  24521. "id": {
  24522. "type": "string",
  24523. "pattern": "^evt_"
  24524. },
  24525. "seq": {
  24526. "type": "number"
  24527. },
  24528. "aggregateID": {
  24529. "type": "string"
  24530. },
  24531. "data": {
  24532. "type": "object",
  24533. "properties": {
  24534. "sessionID": {
  24535. "type": "string",
  24536. "pattern": "^ses"
  24537. },
  24538. "part": {
  24539. "$ref": "#/components/schemas/Part"
  24540. },
  24541. "time": {
  24542. "type": "number"
  24543. }
  24544. },
  24545. "required": ["sessionID", "part", "time"],
  24546. "additionalProperties": false
  24547. }
  24548. },
  24549. "required": ["type", "id", "seq", "aggregateID", "data"],
  24550. "additionalProperties": false
  24551. }
  24552. },
  24553. "required": ["type", "id", "syncEvent"],
  24554. "additionalProperties": false
  24555. },
  24556. "SyncEventMessagePartRemoved": {
  24557. "type": "object",
  24558. "properties": {
  24559. "type": {
  24560. "type": "string",
  24561. "enum": ["sync"]
  24562. },
  24563. "id": {
  24564. "type": "string",
  24565. "pattern": "^evt_"
  24566. },
  24567. "syncEvent": {
  24568. "type": "object",
  24569. "properties": {
  24570. "type": {
  24571. "type": "string",
  24572. "enum": ["message.part.removed.1"]
  24573. },
  24574. "id": {
  24575. "type": "string",
  24576. "pattern": "^evt_"
  24577. },
  24578. "seq": {
  24579. "type": "number"
  24580. },
  24581. "aggregateID": {
  24582. "type": "string"
  24583. },
  24584. "data": {
  24585. "type": "object",
  24586. "properties": {
  24587. "sessionID": {
  24588. "type": "string",
  24589. "pattern": "^ses"
  24590. },
  24591. "messageID": {
  24592. "type": "string",
  24593. "pattern": "^msg"
  24594. },
  24595. "partID": {
  24596. "type": "string",
  24597. "pattern": "^prt"
  24598. }
  24599. },
  24600. "required": ["sessionID", "messageID", "partID"],
  24601. "additionalProperties": false
  24602. }
  24603. },
  24604. "required": ["type", "id", "seq", "aggregateID", "data"],
  24605. "additionalProperties": false
  24606. }
  24607. },
  24608. "required": ["type", "id", "syncEvent"],
  24609. "additionalProperties": false
  24610. },
  24611. "SyncEventSessionNextAgentSwitched": {
  24612. "type": "object",
  24613. "properties": {
  24614. "type": {
  24615. "type": "string",
  24616. "enum": ["sync"]
  24617. },
  24618. "id": {
  24619. "type": "string",
  24620. "pattern": "^evt_"
  24621. },
  24622. "syncEvent": {
  24623. "type": "object",
  24624. "properties": {
  24625. "type": {
  24626. "type": "string",
  24627. "enum": ["session.next.agent.switched.1"]
  24628. },
  24629. "id": {
  24630. "type": "string",
  24631. "pattern": "^evt_"
  24632. },
  24633. "seq": {
  24634. "type": "number"
  24635. },
  24636. "aggregateID": {
  24637. "type": "string"
  24638. },
  24639. "data": {
  24640. "type": "object",
  24641. "properties": {
  24642. "timestamp": {
  24643. "type": "number"
  24644. },
  24645. "sessionID": {
  24646. "type": "string",
  24647. "pattern": "^ses"
  24648. },
  24649. "messageID": {
  24650. "type": "string",
  24651. "pattern": "^msg_"
  24652. },
  24653. "agent": {
  24654. "type": "string"
  24655. }
  24656. },
  24657. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24658. "additionalProperties": false
  24659. }
  24660. },
  24661. "required": ["type", "id", "seq", "aggregateID", "data"],
  24662. "additionalProperties": false
  24663. }
  24664. },
  24665. "required": ["type", "id", "syncEvent"],
  24666. "additionalProperties": false
  24667. },
  24668. "SyncEventSessionNextModelSwitched": {
  24669. "type": "object",
  24670. "properties": {
  24671. "type": {
  24672. "type": "string",
  24673. "enum": ["sync"]
  24674. },
  24675. "id": {
  24676. "type": "string",
  24677. "pattern": "^evt_"
  24678. },
  24679. "syncEvent": {
  24680. "type": "object",
  24681. "properties": {
  24682. "type": {
  24683. "type": "string",
  24684. "enum": ["session.next.model.switched.1"]
  24685. },
  24686. "id": {
  24687. "type": "string",
  24688. "pattern": "^evt_"
  24689. },
  24690. "seq": {
  24691. "type": "number"
  24692. },
  24693. "aggregateID": {
  24694. "type": "string"
  24695. },
  24696. "data": {
  24697. "type": "object",
  24698. "properties": {
  24699. "timestamp": {
  24700. "type": "number"
  24701. },
  24702. "sessionID": {
  24703. "type": "string",
  24704. "pattern": "^ses"
  24705. },
  24706. "messageID": {
  24707. "type": "string",
  24708. "pattern": "^msg_"
  24709. },
  24710. "model": {
  24711. "type": "object",
  24712. "properties": {
  24713. "id": {
  24714. "type": "string"
  24715. },
  24716. "providerID": {
  24717. "type": "string"
  24718. },
  24719. "variant": {
  24720. "type": "string"
  24721. }
  24722. },
  24723. "required": ["id", "providerID"],
  24724. "additionalProperties": false
  24725. }
  24726. },
  24727. "required": ["timestamp", "sessionID", "messageID", "model"],
  24728. "additionalProperties": false
  24729. }
  24730. },
  24731. "required": ["type", "id", "seq", "aggregateID", "data"],
  24732. "additionalProperties": false
  24733. }
  24734. },
  24735. "required": ["type", "id", "syncEvent"],
  24736. "additionalProperties": false
  24737. },
  24738. "SyncEventSessionNextMoved": {
  24739. "type": "object",
  24740. "properties": {
  24741. "type": {
  24742. "type": "string",
  24743. "enum": ["sync"]
  24744. },
  24745. "id": {
  24746. "type": "string",
  24747. "pattern": "^evt_"
  24748. },
  24749. "syncEvent": {
  24750. "type": "object",
  24751. "properties": {
  24752. "type": {
  24753. "type": "string",
  24754. "enum": ["session.next.moved.1"]
  24755. },
  24756. "id": {
  24757. "type": "string",
  24758. "pattern": "^evt_"
  24759. },
  24760. "seq": {
  24761. "type": "number"
  24762. },
  24763. "aggregateID": {
  24764. "type": "string"
  24765. },
  24766. "data": {
  24767. "type": "object",
  24768. "properties": {
  24769. "timestamp": {
  24770. "type": "number"
  24771. },
  24772. "sessionID": {
  24773. "type": "string",
  24774. "pattern": "^ses"
  24775. },
  24776. "location": {
  24777. "$ref": "#/components/schemas/LocationRef"
  24778. },
  24779. "subdirectory": {
  24780. "type": "string"
  24781. }
  24782. },
  24783. "required": ["timestamp", "sessionID", "location"],
  24784. "additionalProperties": false
  24785. }
  24786. },
  24787. "required": ["type", "id", "seq", "aggregateID", "data"],
  24788. "additionalProperties": false
  24789. }
  24790. },
  24791. "required": ["type", "id", "syncEvent"],
  24792. "additionalProperties": false
  24793. },
  24794. "SyncEventSessionNextPrompted": {
  24795. "type": "object",
  24796. "properties": {
  24797. "type": {
  24798. "type": "string",
  24799. "enum": ["sync"]
  24800. },
  24801. "id": {
  24802. "type": "string",
  24803. "pattern": "^evt_"
  24804. },
  24805. "syncEvent": {
  24806. "type": "object",
  24807. "properties": {
  24808. "type": {
  24809. "type": "string",
  24810. "enum": ["session.next.prompted.1"]
  24811. },
  24812. "id": {
  24813. "type": "string",
  24814. "pattern": "^evt_"
  24815. },
  24816. "seq": {
  24817. "type": "number"
  24818. },
  24819. "aggregateID": {
  24820. "type": "string"
  24821. },
  24822. "data": {
  24823. "type": "object",
  24824. "properties": {
  24825. "timestamp": {
  24826. "type": "number"
  24827. },
  24828. "sessionID": {
  24829. "type": "string",
  24830. "pattern": "^ses"
  24831. },
  24832. "messageID": {
  24833. "type": "string",
  24834. "pattern": "^msg_"
  24835. },
  24836. "prompt": {
  24837. "$ref": "#/components/schemas/Prompt"
  24838. },
  24839. "delivery": {
  24840. "type": "string",
  24841. "enum": ["steer", "queue"]
  24842. }
  24843. },
  24844. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24845. "additionalProperties": false
  24846. }
  24847. },
  24848. "required": ["type", "id", "seq", "aggregateID", "data"],
  24849. "additionalProperties": false
  24850. }
  24851. },
  24852. "required": ["type", "id", "syncEvent"],
  24853. "additionalProperties": false
  24854. },
  24855. "SyncEventSessionNextPromptAdmitted": {
  24856. "type": "object",
  24857. "properties": {
  24858. "type": {
  24859. "type": "string",
  24860. "enum": ["sync"]
  24861. },
  24862. "id": {
  24863. "type": "string",
  24864. "pattern": "^evt_"
  24865. },
  24866. "syncEvent": {
  24867. "type": "object",
  24868. "properties": {
  24869. "type": {
  24870. "type": "string",
  24871. "enum": ["session.next.prompt.admitted.1"]
  24872. },
  24873. "id": {
  24874. "type": "string",
  24875. "pattern": "^evt_"
  24876. },
  24877. "seq": {
  24878. "type": "number"
  24879. },
  24880. "aggregateID": {
  24881. "type": "string"
  24882. },
  24883. "data": {
  24884. "type": "object",
  24885. "properties": {
  24886. "timestamp": {
  24887. "type": "number"
  24888. },
  24889. "sessionID": {
  24890. "type": "string",
  24891. "pattern": "^ses"
  24892. },
  24893. "messageID": {
  24894. "type": "string",
  24895. "pattern": "^msg_"
  24896. },
  24897. "prompt": {
  24898. "$ref": "#/components/schemas/Prompt"
  24899. },
  24900. "delivery": {
  24901. "type": "string",
  24902. "enum": ["steer", "queue"]
  24903. }
  24904. },
  24905. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24906. "additionalProperties": false
  24907. }
  24908. },
  24909. "required": ["type", "id", "seq", "aggregateID", "data"],
  24910. "additionalProperties": false
  24911. }
  24912. },
  24913. "required": ["type", "id", "syncEvent"],
  24914. "additionalProperties": false
  24915. },
  24916. "SyncEventSessionNextContextUpdated": {
  24917. "type": "object",
  24918. "properties": {
  24919. "type": {
  24920. "type": "string",
  24921. "enum": ["sync"]
  24922. },
  24923. "id": {
  24924. "type": "string",
  24925. "pattern": "^evt_"
  24926. },
  24927. "syncEvent": {
  24928. "type": "object",
  24929. "properties": {
  24930. "type": {
  24931. "type": "string",
  24932. "enum": ["session.next.context.updated.1"]
  24933. },
  24934. "id": {
  24935. "type": "string",
  24936. "pattern": "^evt_"
  24937. },
  24938. "seq": {
  24939. "type": "number"
  24940. },
  24941. "aggregateID": {
  24942. "type": "string"
  24943. },
  24944. "data": {
  24945. "type": "object",
  24946. "properties": {
  24947. "timestamp": {
  24948. "type": "number"
  24949. },
  24950. "sessionID": {
  24951. "type": "string",
  24952. "pattern": "^ses"
  24953. },
  24954. "messageID": {
  24955. "type": "string",
  24956. "pattern": "^msg_"
  24957. },
  24958. "text": {
  24959. "type": "string"
  24960. }
  24961. },
  24962. "required": ["timestamp", "sessionID", "messageID", "text"],
  24963. "additionalProperties": false
  24964. }
  24965. },
  24966. "required": ["type", "id", "seq", "aggregateID", "data"],
  24967. "additionalProperties": false
  24968. }
  24969. },
  24970. "required": ["type", "id", "syncEvent"],
  24971. "additionalProperties": false
  24972. },
  24973. "SyncEventSessionNextSynthetic": {
  24974. "type": "object",
  24975. "properties": {
  24976. "type": {
  24977. "type": "string",
  24978. "enum": ["sync"]
  24979. },
  24980. "id": {
  24981. "type": "string",
  24982. "pattern": "^evt_"
  24983. },
  24984. "syncEvent": {
  24985. "type": "object",
  24986. "properties": {
  24987. "type": {
  24988. "type": "string",
  24989. "enum": ["session.next.synthetic.1"]
  24990. },
  24991. "id": {
  24992. "type": "string",
  24993. "pattern": "^evt_"
  24994. },
  24995. "seq": {
  24996. "type": "number"
  24997. },
  24998. "aggregateID": {
  24999. "type": "string"
  25000. },
  25001. "data": {
  25002. "type": "object",
  25003. "properties": {
  25004. "timestamp": {
  25005. "type": "number"
  25006. },
  25007. "sessionID": {
  25008. "type": "string",
  25009. "pattern": "^ses"
  25010. },
  25011. "messageID": {
  25012. "type": "string",
  25013. "pattern": "^msg_"
  25014. },
  25015. "text": {
  25016. "type": "string"
  25017. }
  25018. },
  25019. "required": ["timestamp", "sessionID", "messageID", "text"],
  25020. "additionalProperties": false
  25021. }
  25022. },
  25023. "required": ["type", "id", "seq", "aggregateID", "data"],
  25024. "additionalProperties": false
  25025. }
  25026. },
  25027. "required": ["type", "id", "syncEvent"],
  25028. "additionalProperties": false
  25029. },
  25030. "SyncEventSessionNextShellStarted": {
  25031. "type": "object",
  25032. "properties": {
  25033. "type": {
  25034. "type": "string",
  25035. "enum": ["sync"]
  25036. },
  25037. "id": {
  25038. "type": "string",
  25039. "pattern": "^evt_"
  25040. },
  25041. "syncEvent": {
  25042. "type": "object",
  25043. "properties": {
  25044. "type": {
  25045. "type": "string",
  25046. "enum": ["session.next.shell.started.1"]
  25047. },
  25048. "id": {
  25049. "type": "string",
  25050. "pattern": "^evt_"
  25051. },
  25052. "seq": {
  25053. "type": "number"
  25054. },
  25055. "aggregateID": {
  25056. "type": "string"
  25057. },
  25058. "data": {
  25059. "type": "object",
  25060. "properties": {
  25061. "timestamp": {
  25062. "type": "number"
  25063. },
  25064. "sessionID": {
  25065. "type": "string",
  25066. "pattern": "^ses"
  25067. },
  25068. "messageID": {
  25069. "type": "string",
  25070. "pattern": "^msg_"
  25071. },
  25072. "callID": {
  25073. "type": "string"
  25074. },
  25075. "command": {
  25076. "type": "string"
  25077. }
  25078. },
  25079. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25080. "additionalProperties": false
  25081. }
  25082. },
  25083. "required": ["type", "id", "seq", "aggregateID", "data"],
  25084. "additionalProperties": false
  25085. }
  25086. },
  25087. "required": ["type", "id", "syncEvent"],
  25088. "additionalProperties": false
  25089. },
  25090. "SyncEventSessionNextShellEnded": {
  25091. "type": "object",
  25092. "properties": {
  25093. "type": {
  25094. "type": "string",
  25095. "enum": ["sync"]
  25096. },
  25097. "id": {
  25098. "type": "string",
  25099. "pattern": "^evt_"
  25100. },
  25101. "syncEvent": {
  25102. "type": "object",
  25103. "properties": {
  25104. "type": {
  25105. "type": "string",
  25106. "enum": ["session.next.shell.ended.1"]
  25107. },
  25108. "id": {
  25109. "type": "string",
  25110. "pattern": "^evt_"
  25111. },
  25112. "seq": {
  25113. "type": "number"
  25114. },
  25115. "aggregateID": {
  25116. "type": "string"
  25117. },
  25118. "data": {
  25119. "type": "object",
  25120. "properties": {
  25121. "timestamp": {
  25122. "type": "number"
  25123. },
  25124. "sessionID": {
  25125. "type": "string",
  25126. "pattern": "^ses"
  25127. },
  25128. "callID": {
  25129. "type": "string"
  25130. },
  25131. "output": {
  25132. "type": "string"
  25133. }
  25134. },
  25135. "required": ["timestamp", "sessionID", "callID", "output"],
  25136. "additionalProperties": false
  25137. }
  25138. },
  25139. "required": ["type", "id", "seq", "aggregateID", "data"],
  25140. "additionalProperties": false
  25141. }
  25142. },
  25143. "required": ["type", "id", "syncEvent"],
  25144. "additionalProperties": false
  25145. },
  25146. "SyncEventSessionNextStepStarted": {
  25147. "type": "object",
  25148. "properties": {
  25149. "type": {
  25150. "type": "string",
  25151. "enum": ["sync"]
  25152. },
  25153. "id": {
  25154. "type": "string",
  25155. "pattern": "^evt_"
  25156. },
  25157. "syncEvent": {
  25158. "type": "object",
  25159. "properties": {
  25160. "type": {
  25161. "type": "string",
  25162. "enum": ["session.next.step.started.1"]
  25163. },
  25164. "id": {
  25165. "type": "string",
  25166. "pattern": "^evt_"
  25167. },
  25168. "seq": {
  25169. "type": "number"
  25170. },
  25171. "aggregateID": {
  25172. "type": "string"
  25173. },
  25174. "data": {
  25175. "type": "object",
  25176. "properties": {
  25177. "timestamp": {
  25178. "type": "number"
  25179. },
  25180. "sessionID": {
  25181. "type": "string",
  25182. "pattern": "^ses"
  25183. },
  25184. "assistantMessageID": {
  25185. "type": "string",
  25186. "pattern": "^msg_"
  25187. },
  25188. "agent": {
  25189. "type": "string"
  25190. },
  25191. "model": {
  25192. "type": "object",
  25193. "properties": {
  25194. "id": {
  25195. "type": "string"
  25196. },
  25197. "providerID": {
  25198. "type": "string"
  25199. },
  25200. "variant": {
  25201. "type": "string"
  25202. }
  25203. },
  25204. "required": ["id", "providerID"],
  25205. "additionalProperties": false
  25206. },
  25207. "snapshot": {
  25208. "type": "string"
  25209. }
  25210. },
  25211. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25212. "additionalProperties": false
  25213. }
  25214. },
  25215. "required": ["type", "id", "seq", "aggregateID", "data"],
  25216. "additionalProperties": false
  25217. }
  25218. },
  25219. "required": ["type", "id", "syncEvent"],
  25220. "additionalProperties": false
  25221. },
  25222. "SyncEventSessionNextStepEnded": {
  25223. "type": "object",
  25224. "properties": {
  25225. "type": {
  25226. "type": "string",
  25227. "enum": ["sync"]
  25228. },
  25229. "id": {
  25230. "type": "string",
  25231. "pattern": "^evt_"
  25232. },
  25233. "syncEvent": {
  25234. "type": "object",
  25235. "properties": {
  25236. "type": {
  25237. "type": "string",
  25238. "enum": ["session.next.step.ended.2"]
  25239. },
  25240. "id": {
  25241. "type": "string",
  25242. "pattern": "^evt_"
  25243. },
  25244. "seq": {
  25245. "type": "number"
  25246. },
  25247. "aggregateID": {
  25248. "type": "string"
  25249. },
  25250. "data": {
  25251. "type": "object",
  25252. "properties": {
  25253. "timestamp": {
  25254. "type": "number"
  25255. },
  25256. "sessionID": {
  25257. "type": "string",
  25258. "pattern": "^ses"
  25259. },
  25260. "assistantMessageID": {
  25261. "type": "string",
  25262. "pattern": "^msg_"
  25263. },
  25264. "finish": {
  25265. "type": "string"
  25266. },
  25267. "cost": {
  25268. "type": "number"
  25269. },
  25270. "tokens": {
  25271. "type": "object",
  25272. "properties": {
  25273. "input": {
  25274. "type": "number"
  25275. },
  25276. "output": {
  25277. "type": "number"
  25278. },
  25279. "reasoning": {
  25280. "type": "number"
  25281. },
  25282. "cache": {
  25283. "type": "object",
  25284. "properties": {
  25285. "read": {
  25286. "type": "number"
  25287. },
  25288. "write": {
  25289. "type": "number"
  25290. }
  25291. },
  25292. "required": ["read", "write"],
  25293. "additionalProperties": false
  25294. }
  25295. },
  25296. "required": ["input", "output", "reasoning", "cache"],
  25297. "additionalProperties": false
  25298. },
  25299. "snapshot": {
  25300. "type": "string"
  25301. },
  25302. "files": {
  25303. "type": "array",
  25304. "items": {
  25305. "type": "string"
  25306. }
  25307. }
  25308. },
  25309. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25310. "additionalProperties": false
  25311. }
  25312. },
  25313. "required": ["type", "id", "seq", "aggregateID", "data"],
  25314. "additionalProperties": false
  25315. }
  25316. },
  25317. "required": ["type", "id", "syncEvent"],
  25318. "additionalProperties": false
  25319. },
  25320. "SyncEventSessionNextStepFailed": {
  25321. "type": "object",
  25322. "properties": {
  25323. "type": {
  25324. "type": "string",
  25325. "enum": ["sync"]
  25326. },
  25327. "id": {
  25328. "type": "string",
  25329. "pattern": "^evt_"
  25330. },
  25331. "syncEvent": {
  25332. "type": "object",
  25333. "properties": {
  25334. "type": {
  25335. "type": "string",
  25336. "enum": ["session.next.step.failed.2"]
  25337. },
  25338. "id": {
  25339. "type": "string",
  25340. "pattern": "^evt_"
  25341. },
  25342. "seq": {
  25343. "type": "number"
  25344. },
  25345. "aggregateID": {
  25346. "type": "string"
  25347. },
  25348. "data": {
  25349. "type": "object",
  25350. "properties": {
  25351. "timestamp": {
  25352. "type": "number"
  25353. },
  25354. "sessionID": {
  25355. "type": "string",
  25356. "pattern": "^ses"
  25357. },
  25358. "assistantMessageID": {
  25359. "type": "string",
  25360. "pattern": "^msg_"
  25361. },
  25362. "error": {
  25363. "$ref": "#/components/schemas/SessionErrorUnknown"
  25364. }
  25365. },
  25366. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25367. "additionalProperties": false
  25368. }
  25369. },
  25370. "required": ["type", "id", "seq", "aggregateID", "data"],
  25371. "additionalProperties": false
  25372. }
  25373. },
  25374. "required": ["type", "id", "syncEvent"],
  25375. "additionalProperties": false
  25376. },
  25377. "SyncEventSessionNextTextStarted": {
  25378. "type": "object",
  25379. "properties": {
  25380. "type": {
  25381. "type": "string",
  25382. "enum": ["sync"]
  25383. },
  25384. "id": {
  25385. "type": "string",
  25386. "pattern": "^evt_"
  25387. },
  25388. "syncEvent": {
  25389. "type": "object",
  25390. "properties": {
  25391. "type": {
  25392. "type": "string",
  25393. "enum": ["session.next.text.started.1"]
  25394. },
  25395. "id": {
  25396. "type": "string",
  25397. "pattern": "^evt_"
  25398. },
  25399. "seq": {
  25400. "type": "number"
  25401. },
  25402. "aggregateID": {
  25403. "type": "string"
  25404. },
  25405. "data": {
  25406. "type": "object",
  25407. "properties": {
  25408. "timestamp": {
  25409. "type": "number"
  25410. },
  25411. "sessionID": {
  25412. "type": "string",
  25413. "pattern": "^ses"
  25414. },
  25415. "assistantMessageID": {
  25416. "type": "string",
  25417. "pattern": "^msg_"
  25418. },
  25419. "textID": {
  25420. "type": "string"
  25421. }
  25422. },
  25423. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25424. "additionalProperties": false
  25425. }
  25426. },
  25427. "required": ["type", "id", "seq", "aggregateID", "data"],
  25428. "additionalProperties": false
  25429. }
  25430. },
  25431. "required": ["type", "id", "syncEvent"],
  25432. "additionalProperties": false
  25433. },
  25434. "SyncEventSessionNextTextEnded": {
  25435. "type": "object",
  25436. "properties": {
  25437. "type": {
  25438. "type": "string",
  25439. "enum": ["sync"]
  25440. },
  25441. "id": {
  25442. "type": "string",
  25443. "pattern": "^evt_"
  25444. },
  25445. "syncEvent": {
  25446. "type": "object",
  25447. "properties": {
  25448. "type": {
  25449. "type": "string",
  25450. "enum": ["session.next.text.ended.1"]
  25451. },
  25452. "id": {
  25453. "type": "string",
  25454. "pattern": "^evt_"
  25455. },
  25456. "seq": {
  25457. "type": "number"
  25458. },
  25459. "aggregateID": {
  25460. "type": "string"
  25461. },
  25462. "data": {
  25463. "type": "object",
  25464. "properties": {
  25465. "timestamp": {
  25466. "type": "number"
  25467. },
  25468. "sessionID": {
  25469. "type": "string",
  25470. "pattern": "^ses"
  25471. },
  25472. "assistantMessageID": {
  25473. "type": "string",
  25474. "pattern": "^msg_"
  25475. },
  25476. "textID": {
  25477. "type": "string"
  25478. },
  25479. "text": {
  25480. "type": "string"
  25481. }
  25482. },
  25483. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25484. "additionalProperties": false
  25485. }
  25486. },
  25487. "required": ["type", "id", "seq", "aggregateID", "data"],
  25488. "additionalProperties": false
  25489. }
  25490. },
  25491. "required": ["type", "id", "syncEvent"],
  25492. "additionalProperties": false
  25493. },
  25494. "SyncEventSessionNextReasoningStarted": {
  25495. "type": "object",
  25496. "properties": {
  25497. "type": {
  25498. "type": "string",
  25499. "enum": ["sync"]
  25500. },
  25501. "id": {
  25502. "type": "string",
  25503. "pattern": "^evt_"
  25504. },
  25505. "syncEvent": {
  25506. "type": "object",
  25507. "properties": {
  25508. "type": {
  25509. "type": "string",
  25510. "enum": ["session.next.reasoning.started.1"]
  25511. },
  25512. "id": {
  25513. "type": "string",
  25514. "pattern": "^evt_"
  25515. },
  25516. "seq": {
  25517. "type": "number"
  25518. },
  25519. "aggregateID": {
  25520. "type": "string"
  25521. },
  25522. "data": {
  25523. "type": "object",
  25524. "properties": {
  25525. "timestamp": {
  25526. "type": "number"
  25527. },
  25528. "sessionID": {
  25529. "type": "string",
  25530. "pattern": "^ses"
  25531. },
  25532. "assistantMessageID": {
  25533. "type": "string",
  25534. "pattern": "^msg_"
  25535. },
  25536. "reasoningID": {
  25537. "type": "string"
  25538. },
  25539. "providerMetadata": {
  25540. "type": "object",
  25541. "additionalProperties": {
  25542. "type": "object"
  25543. }
  25544. }
  25545. },
  25546. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25547. "additionalProperties": false
  25548. }
  25549. },
  25550. "required": ["type", "id", "seq", "aggregateID", "data"],
  25551. "additionalProperties": false
  25552. }
  25553. },
  25554. "required": ["type", "id", "syncEvent"],
  25555. "additionalProperties": false
  25556. },
  25557. "SyncEventSessionNextReasoningEnded": {
  25558. "type": "object",
  25559. "properties": {
  25560. "type": {
  25561. "type": "string",
  25562. "enum": ["sync"]
  25563. },
  25564. "id": {
  25565. "type": "string",
  25566. "pattern": "^evt_"
  25567. },
  25568. "syncEvent": {
  25569. "type": "object",
  25570. "properties": {
  25571. "type": {
  25572. "type": "string",
  25573. "enum": ["session.next.reasoning.ended.1"]
  25574. },
  25575. "id": {
  25576. "type": "string",
  25577. "pattern": "^evt_"
  25578. },
  25579. "seq": {
  25580. "type": "number"
  25581. },
  25582. "aggregateID": {
  25583. "type": "string"
  25584. },
  25585. "data": {
  25586. "type": "object",
  25587. "properties": {
  25588. "timestamp": {
  25589. "type": "number"
  25590. },
  25591. "sessionID": {
  25592. "type": "string",
  25593. "pattern": "^ses"
  25594. },
  25595. "assistantMessageID": {
  25596. "type": "string",
  25597. "pattern": "^msg_"
  25598. },
  25599. "reasoningID": {
  25600. "type": "string"
  25601. },
  25602. "text": {
  25603. "type": "string"
  25604. },
  25605. "providerMetadata": {
  25606. "type": "object",
  25607. "additionalProperties": {
  25608. "type": "object"
  25609. }
  25610. }
  25611. },
  25612. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25613. "additionalProperties": false
  25614. }
  25615. },
  25616. "required": ["type", "id", "seq", "aggregateID", "data"],
  25617. "additionalProperties": false
  25618. }
  25619. },
  25620. "required": ["type", "id", "syncEvent"],
  25621. "additionalProperties": false
  25622. },
  25623. "SyncEventSessionNextToolInputStarted": {
  25624. "type": "object",
  25625. "properties": {
  25626. "type": {
  25627. "type": "string",
  25628. "enum": ["sync"]
  25629. },
  25630. "id": {
  25631. "type": "string",
  25632. "pattern": "^evt_"
  25633. },
  25634. "syncEvent": {
  25635. "type": "object",
  25636. "properties": {
  25637. "type": {
  25638. "type": "string",
  25639. "enum": ["session.next.tool.input.started.1"]
  25640. },
  25641. "id": {
  25642. "type": "string",
  25643. "pattern": "^evt_"
  25644. },
  25645. "seq": {
  25646. "type": "number"
  25647. },
  25648. "aggregateID": {
  25649. "type": "string"
  25650. },
  25651. "data": {
  25652. "type": "object",
  25653. "properties": {
  25654. "timestamp": {
  25655. "type": "number"
  25656. },
  25657. "sessionID": {
  25658. "type": "string",
  25659. "pattern": "^ses"
  25660. },
  25661. "assistantMessageID": {
  25662. "type": "string",
  25663. "pattern": "^msg_"
  25664. },
  25665. "callID": {
  25666. "type": "string"
  25667. },
  25668. "name": {
  25669. "type": "string"
  25670. }
  25671. },
  25672. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25673. "additionalProperties": false
  25674. }
  25675. },
  25676. "required": ["type", "id", "seq", "aggregateID", "data"],
  25677. "additionalProperties": false
  25678. }
  25679. },
  25680. "required": ["type", "id", "syncEvent"],
  25681. "additionalProperties": false
  25682. },
  25683. "SyncEventSessionNextToolInputEnded": {
  25684. "type": "object",
  25685. "properties": {
  25686. "type": {
  25687. "type": "string",
  25688. "enum": ["sync"]
  25689. },
  25690. "id": {
  25691. "type": "string",
  25692. "pattern": "^evt_"
  25693. },
  25694. "syncEvent": {
  25695. "type": "object",
  25696. "properties": {
  25697. "type": {
  25698. "type": "string",
  25699. "enum": ["session.next.tool.input.ended.1"]
  25700. },
  25701. "id": {
  25702. "type": "string",
  25703. "pattern": "^evt_"
  25704. },
  25705. "seq": {
  25706. "type": "number"
  25707. },
  25708. "aggregateID": {
  25709. "type": "string"
  25710. },
  25711. "data": {
  25712. "type": "object",
  25713. "properties": {
  25714. "timestamp": {
  25715. "type": "number"
  25716. },
  25717. "sessionID": {
  25718. "type": "string",
  25719. "pattern": "^ses"
  25720. },
  25721. "assistantMessageID": {
  25722. "type": "string",
  25723. "pattern": "^msg_"
  25724. },
  25725. "callID": {
  25726. "type": "string"
  25727. },
  25728. "text": {
  25729. "type": "string"
  25730. }
  25731. },
  25732. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25733. "additionalProperties": false
  25734. }
  25735. },
  25736. "required": ["type", "id", "seq", "aggregateID", "data"],
  25737. "additionalProperties": false
  25738. }
  25739. },
  25740. "required": ["type", "id", "syncEvent"],
  25741. "additionalProperties": false
  25742. },
  25743. "SyncEventSessionNextToolCalled": {
  25744. "type": "object",
  25745. "properties": {
  25746. "type": {
  25747. "type": "string",
  25748. "enum": ["sync"]
  25749. },
  25750. "id": {
  25751. "type": "string",
  25752. "pattern": "^evt_"
  25753. },
  25754. "syncEvent": {
  25755. "type": "object",
  25756. "properties": {
  25757. "type": {
  25758. "type": "string",
  25759. "enum": ["session.next.tool.called.1"]
  25760. },
  25761. "id": {
  25762. "type": "string",
  25763. "pattern": "^evt_"
  25764. },
  25765. "seq": {
  25766. "type": "number"
  25767. },
  25768. "aggregateID": {
  25769. "type": "string"
  25770. },
  25771. "data": {
  25772. "type": "object",
  25773. "properties": {
  25774. "timestamp": {
  25775. "type": "number"
  25776. },
  25777. "sessionID": {
  25778. "type": "string",
  25779. "pattern": "^ses"
  25780. },
  25781. "assistantMessageID": {
  25782. "type": "string",
  25783. "pattern": "^msg_"
  25784. },
  25785. "callID": {
  25786. "type": "string"
  25787. },
  25788. "tool": {
  25789. "type": "string"
  25790. },
  25791. "input": {
  25792. "type": "object"
  25793. },
  25794. "provider": {
  25795. "type": "object",
  25796. "properties": {
  25797. "executed": {
  25798. "type": "boolean"
  25799. },
  25800. "metadata": {
  25801. "type": "object",
  25802. "additionalProperties": {
  25803. "type": "object"
  25804. }
  25805. }
  25806. },
  25807. "required": ["executed"],
  25808. "additionalProperties": false
  25809. }
  25810. },
  25811. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25812. "additionalProperties": false
  25813. }
  25814. },
  25815. "required": ["type", "id", "seq", "aggregateID", "data"],
  25816. "additionalProperties": false
  25817. }
  25818. },
  25819. "required": ["type", "id", "syncEvent"],
  25820. "additionalProperties": false
  25821. },
  25822. "SyncEventSessionNextToolProgress": {
  25823. "type": "object",
  25824. "properties": {
  25825. "type": {
  25826. "type": "string",
  25827. "enum": ["sync"]
  25828. },
  25829. "id": {
  25830. "type": "string",
  25831. "pattern": "^evt_"
  25832. },
  25833. "syncEvent": {
  25834. "type": "object",
  25835. "properties": {
  25836. "type": {
  25837. "type": "string",
  25838. "enum": ["session.next.tool.progress.1"]
  25839. },
  25840. "id": {
  25841. "type": "string",
  25842. "pattern": "^evt_"
  25843. },
  25844. "seq": {
  25845. "type": "number"
  25846. },
  25847. "aggregateID": {
  25848. "type": "string"
  25849. },
  25850. "data": {
  25851. "type": "object",
  25852. "properties": {
  25853. "timestamp": {
  25854. "type": "number"
  25855. },
  25856. "sessionID": {
  25857. "type": "string",
  25858. "pattern": "^ses"
  25859. },
  25860. "assistantMessageID": {
  25861. "type": "string",
  25862. "pattern": "^msg_"
  25863. },
  25864. "callID": {
  25865. "type": "string"
  25866. },
  25867. "structured": {
  25868. "type": "object"
  25869. },
  25870. "content": {
  25871. "type": "array",
  25872. "items": {
  25873. "anyOf": [
  25874. {
  25875. "$ref": "#/components/schemas/ToolTextContent"
  25876. },
  25877. {
  25878. "$ref": "#/components/schemas/ToolFileContent"
  25879. }
  25880. ]
  25881. }
  25882. }
  25883. },
  25884. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25885. "additionalProperties": false
  25886. }
  25887. },
  25888. "required": ["type", "id", "seq", "aggregateID", "data"],
  25889. "additionalProperties": false
  25890. }
  25891. },
  25892. "required": ["type", "id", "syncEvent"],
  25893. "additionalProperties": false
  25894. },
  25895. "SyncEventSessionNextToolSuccess": {
  25896. "type": "object",
  25897. "properties": {
  25898. "type": {
  25899. "type": "string",
  25900. "enum": ["sync"]
  25901. },
  25902. "id": {
  25903. "type": "string",
  25904. "pattern": "^evt_"
  25905. },
  25906. "syncEvent": {
  25907. "type": "object",
  25908. "properties": {
  25909. "type": {
  25910. "type": "string",
  25911. "enum": ["session.next.tool.success.1"]
  25912. },
  25913. "id": {
  25914. "type": "string",
  25915. "pattern": "^evt_"
  25916. },
  25917. "seq": {
  25918. "type": "number"
  25919. },
  25920. "aggregateID": {
  25921. "type": "string"
  25922. },
  25923. "data": {
  25924. "type": "object",
  25925. "properties": {
  25926. "timestamp": {
  25927. "type": "number"
  25928. },
  25929. "sessionID": {
  25930. "type": "string",
  25931. "pattern": "^ses"
  25932. },
  25933. "assistantMessageID": {
  25934. "type": "string",
  25935. "pattern": "^msg_"
  25936. },
  25937. "callID": {
  25938. "type": "string"
  25939. },
  25940. "structured": {
  25941. "type": "object"
  25942. },
  25943. "content": {
  25944. "type": "array",
  25945. "items": {
  25946. "anyOf": [
  25947. {
  25948. "$ref": "#/components/schemas/ToolTextContent"
  25949. },
  25950. {
  25951. "$ref": "#/components/schemas/ToolFileContent"
  25952. }
  25953. ]
  25954. }
  25955. },
  25956. "outputPaths": {
  25957. "type": "array",
  25958. "items": {
  25959. "type": "string"
  25960. }
  25961. },
  25962. "result": {},
  25963. "provider": {
  25964. "type": "object",
  25965. "properties": {
  25966. "executed": {
  25967. "type": "boolean"
  25968. },
  25969. "metadata": {
  25970. "type": "object",
  25971. "additionalProperties": {
  25972. "type": "object"
  25973. }
  25974. }
  25975. },
  25976. "required": ["executed"],
  25977. "additionalProperties": false
  25978. }
  25979. },
  25980. "required": [
  25981. "timestamp",
  25982. "sessionID",
  25983. "assistantMessageID",
  25984. "callID",
  25985. "structured",
  25986. "content",
  25987. "provider"
  25988. ],
  25989. "additionalProperties": false
  25990. }
  25991. },
  25992. "required": ["type", "id", "seq", "aggregateID", "data"],
  25993. "additionalProperties": false
  25994. }
  25995. },
  25996. "required": ["type", "id", "syncEvent"],
  25997. "additionalProperties": false
  25998. },
  25999. "SyncEventSessionNextToolFailed": {
  26000. "type": "object",
  26001. "properties": {
  26002. "type": {
  26003. "type": "string",
  26004. "enum": ["sync"]
  26005. },
  26006. "id": {
  26007. "type": "string",
  26008. "pattern": "^evt_"
  26009. },
  26010. "syncEvent": {
  26011. "type": "object",
  26012. "properties": {
  26013. "type": {
  26014. "type": "string",
  26015. "enum": ["session.next.tool.failed.1"]
  26016. },
  26017. "id": {
  26018. "type": "string",
  26019. "pattern": "^evt_"
  26020. },
  26021. "seq": {
  26022. "type": "number"
  26023. },
  26024. "aggregateID": {
  26025. "type": "string"
  26026. },
  26027. "data": {
  26028. "type": "object",
  26029. "properties": {
  26030. "timestamp": {
  26031. "type": "number"
  26032. },
  26033. "sessionID": {
  26034. "type": "string",
  26035. "pattern": "^ses"
  26036. },
  26037. "assistantMessageID": {
  26038. "type": "string",
  26039. "pattern": "^msg_"
  26040. },
  26041. "callID": {
  26042. "type": "string"
  26043. },
  26044. "error": {
  26045. "$ref": "#/components/schemas/SessionErrorUnknown"
  26046. },
  26047. "result": {},
  26048. "provider": {
  26049. "type": "object",
  26050. "properties": {
  26051. "executed": {
  26052. "type": "boolean"
  26053. },
  26054. "metadata": {
  26055. "type": "object",
  26056. "additionalProperties": {
  26057. "type": "object"
  26058. }
  26059. }
  26060. },
  26061. "required": ["executed"],
  26062. "additionalProperties": false
  26063. }
  26064. },
  26065. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26066. "additionalProperties": false
  26067. }
  26068. },
  26069. "required": ["type", "id", "seq", "aggregateID", "data"],
  26070. "additionalProperties": false
  26071. }
  26072. },
  26073. "required": ["type", "id", "syncEvent"],
  26074. "additionalProperties": false
  26075. },
  26076. "SyncEventSessionNextRetried": {
  26077. "type": "object",
  26078. "properties": {
  26079. "type": {
  26080. "type": "string",
  26081. "enum": ["sync"]
  26082. },
  26083. "id": {
  26084. "type": "string",
  26085. "pattern": "^evt_"
  26086. },
  26087. "syncEvent": {
  26088. "type": "object",
  26089. "properties": {
  26090. "type": {
  26091. "type": "string",
  26092. "enum": ["session.next.retried.1"]
  26093. },
  26094. "id": {
  26095. "type": "string",
  26096. "pattern": "^evt_"
  26097. },
  26098. "seq": {
  26099. "type": "number"
  26100. },
  26101. "aggregateID": {
  26102. "type": "string"
  26103. },
  26104. "data": {
  26105. "type": "object",
  26106. "properties": {
  26107. "timestamp": {
  26108. "type": "number"
  26109. },
  26110. "sessionID": {
  26111. "type": "string",
  26112. "pattern": "^ses"
  26113. },
  26114. "attempt": {
  26115. "type": "number"
  26116. },
  26117. "error": {
  26118. "$ref": "#/components/schemas/SessionNextRetry_error"
  26119. }
  26120. },
  26121. "required": ["timestamp", "sessionID", "attempt", "error"],
  26122. "additionalProperties": false
  26123. }
  26124. },
  26125. "required": ["type", "id", "seq", "aggregateID", "data"],
  26126. "additionalProperties": false
  26127. }
  26128. },
  26129. "required": ["type", "id", "syncEvent"],
  26130. "additionalProperties": false
  26131. },
  26132. "SyncEventSessionNextCompactionStarted": {
  26133. "type": "object",
  26134. "properties": {
  26135. "type": {
  26136. "type": "string",
  26137. "enum": ["sync"]
  26138. },
  26139. "id": {
  26140. "type": "string",
  26141. "pattern": "^evt_"
  26142. },
  26143. "syncEvent": {
  26144. "type": "object",
  26145. "properties": {
  26146. "type": {
  26147. "type": "string",
  26148. "enum": ["session.next.compaction.started.1"]
  26149. },
  26150. "id": {
  26151. "type": "string",
  26152. "pattern": "^evt_"
  26153. },
  26154. "seq": {
  26155. "type": "number"
  26156. },
  26157. "aggregateID": {
  26158. "type": "string"
  26159. },
  26160. "data": {
  26161. "type": "object",
  26162. "properties": {
  26163. "timestamp": {
  26164. "type": "number"
  26165. },
  26166. "sessionID": {
  26167. "type": "string",
  26168. "pattern": "^ses"
  26169. },
  26170. "messageID": {
  26171. "type": "string",
  26172. "pattern": "^msg_"
  26173. },
  26174. "reason": {
  26175. "type": "string",
  26176. "enum": ["auto", "manual"]
  26177. }
  26178. },
  26179. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26180. "additionalProperties": false
  26181. }
  26182. },
  26183. "required": ["type", "id", "seq", "aggregateID", "data"],
  26184. "additionalProperties": false
  26185. }
  26186. },
  26187. "required": ["type", "id", "syncEvent"],
  26188. "additionalProperties": false
  26189. },
  26190. "SyncEventSessionNextCompactionEnded": {
  26191. "type": "object",
  26192. "properties": {
  26193. "type": {
  26194. "type": "string",
  26195. "enum": ["sync"]
  26196. },
  26197. "id": {
  26198. "type": "string",
  26199. "pattern": "^evt_"
  26200. },
  26201. "syncEvent": {
  26202. "type": "object",
  26203. "properties": {
  26204. "type": {
  26205. "type": "string",
  26206. "enum": ["session.next.compaction.ended.1"]
  26207. },
  26208. "id": {
  26209. "type": "string",
  26210. "pattern": "^evt_"
  26211. },
  26212. "seq": {
  26213. "type": "number"
  26214. },
  26215. "aggregateID": {
  26216. "type": "string"
  26217. },
  26218. "data": {
  26219. "type": "object",
  26220. "properties": {
  26221. "timestamp": {
  26222. "type": "number"
  26223. },
  26224. "sessionID": {
  26225. "type": "string",
  26226. "pattern": "^ses"
  26227. },
  26228. "messageID": {
  26229. "type": "string",
  26230. "pattern": "^msg_"
  26231. },
  26232. "reason": {
  26233. "type": "string",
  26234. "enum": ["auto", "manual"]
  26235. },
  26236. "text": {
  26237. "type": "string"
  26238. },
  26239. "recent": {
  26240. "type": "string"
  26241. }
  26242. },
  26243. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26244. "additionalProperties": false
  26245. }
  26246. },
  26247. "required": ["type", "id", "seq", "aggregateID", "data"],
  26248. "additionalProperties": false
  26249. }
  26250. },
  26251. "required": ["type", "id", "syncEvent"],
  26252. "additionalProperties": false
  26253. },
  26254. "SyncEventSessionNextRevertStaged": {
  26255. "type": "object",
  26256. "properties": {
  26257. "type": {
  26258. "type": "string",
  26259. "enum": ["sync"]
  26260. },
  26261. "id": {
  26262. "type": "string",
  26263. "pattern": "^evt_"
  26264. },
  26265. "syncEvent": {
  26266. "type": "object",
  26267. "properties": {
  26268. "type": {
  26269. "type": "string",
  26270. "enum": ["session.next.revert.staged.1"]
  26271. },
  26272. "id": {
  26273. "type": "string",
  26274. "pattern": "^evt_"
  26275. },
  26276. "seq": {
  26277. "type": "number"
  26278. },
  26279. "aggregateID": {
  26280. "type": "string"
  26281. },
  26282. "data": {
  26283. "type": "object",
  26284. "properties": {
  26285. "timestamp": {
  26286. "type": "number"
  26287. },
  26288. "sessionID": {
  26289. "type": "string",
  26290. "pattern": "^ses"
  26291. },
  26292. "revert": {
  26293. "type": "object",
  26294. "properties": {
  26295. "messageID": {
  26296. "type": "string",
  26297. "pattern": "^msg_"
  26298. },
  26299. "partID": {
  26300. "type": "string"
  26301. },
  26302. "snapshot": {
  26303. "type": "string"
  26304. },
  26305. "diff": {
  26306. "type": "string"
  26307. },
  26308. "files": {
  26309. "type": "array",
  26310. "items": {
  26311. "$ref": "#/components/schemas/FileDiff"
  26312. }
  26313. }
  26314. },
  26315. "required": ["messageID"],
  26316. "additionalProperties": false
  26317. }
  26318. },
  26319. "required": ["timestamp", "sessionID", "revert"],
  26320. "additionalProperties": false
  26321. }
  26322. },
  26323. "required": ["type", "id", "seq", "aggregateID", "data"],
  26324. "additionalProperties": false
  26325. }
  26326. },
  26327. "required": ["type", "id", "syncEvent"],
  26328. "additionalProperties": false
  26329. },
  26330. "SyncEventSessionNextRevertCleared": {
  26331. "type": "object",
  26332. "properties": {
  26333. "type": {
  26334. "type": "string",
  26335. "enum": ["sync"]
  26336. },
  26337. "id": {
  26338. "type": "string",
  26339. "pattern": "^evt_"
  26340. },
  26341. "syncEvent": {
  26342. "type": "object",
  26343. "properties": {
  26344. "type": {
  26345. "type": "string",
  26346. "enum": ["session.next.revert.cleared.1"]
  26347. },
  26348. "id": {
  26349. "type": "string",
  26350. "pattern": "^evt_"
  26351. },
  26352. "seq": {
  26353. "type": "number"
  26354. },
  26355. "aggregateID": {
  26356. "type": "string"
  26357. },
  26358. "data": {
  26359. "type": "object",
  26360. "properties": {
  26361. "timestamp": {
  26362. "type": "number"
  26363. },
  26364. "sessionID": {
  26365. "type": "string",
  26366. "pattern": "^ses"
  26367. }
  26368. },
  26369. "required": ["timestamp", "sessionID"],
  26370. "additionalProperties": false
  26371. }
  26372. },
  26373. "required": ["type", "id", "seq", "aggregateID", "data"],
  26374. "additionalProperties": false
  26375. }
  26376. },
  26377. "required": ["type", "id", "syncEvent"],
  26378. "additionalProperties": false
  26379. },
  26380. "SyncEventSessionNextRevertCommitted": {
  26381. "type": "object",
  26382. "properties": {
  26383. "type": {
  26384. "type": "string",
  26385. "enum": ["sync"]
  26386. },
  26387. "id": {
  26388. "type": "string",
  26389. "pattern": "^evt_"
  26390. },
  26391. "syncEvent": {
  26392. "type": "object",
  26393. "properties": {
  26394. "type": {
  26395. "type": "string",
  26396. "enum": ["session.next.revert.committed.1"]
  26397. },
  26398. "id": {
  26399. "type": "string",
  26400. "pattern": "^evt_"
  26401. },
  26402. "seq": {
  26403. "type": "number"
  26404. },
  26405. "aggregateID": {
  26406. "type": "string"
  26407. },
  26408. "data": {
  26409. "type": "object",
  26410. "properties": {
  26411. "timestamp": {
  26412. "type": "number"
  26413. },
  26414. "sessionID": {
  26415. "type": "string",
  26416. "pattern": "^ses"
  26417. },
  26418. "messageID": {
  26419. "type": "string",
  26420. "pattern": "^msg_"
  26421. }
  26422. },
  26423. "required": ["timestamp", "sessionID", "messageID"],
  26424. "additionalProperties": false
  26425. }
  26426. },
  26427. "required": ["type", "id", "seq", "aggregateID", "data"],
  26428. "additionalProperties": false
  26429. }
  26430. },
  26431. "required": ["type", "id", "syncEvent"],
  26432. "additionalProperties": false
  26433. },
  26434. "ConfigV2ReferenceGit": {
  26435. "type": "object",
  26436. "properties": {
  26437. "repository": {
  26438. "type": "string"
  26439. },
  26440. "branch": {
  26441. "type": "string"
  26442. },
  26443. "description": {
  26444. "type": "string"
  26445. },
  26446. "hidden": {
  26447. "type": "boolean"
  26448. }
  26449. },
  26450. "required": ["repository"],
  26451. "additionalProperties": false
  26452. },
  26453. "ConfigV2ReferenceLocal": {
  26454. "type": "object",
  26455. "properties": {
  26456. "path": {
  26457. "type": "string"
  26458. },
  26459. "description": {
  26460. "type": "string"
  26461. },
  26462. "hidden": {
  26463. "type": "boolean"
  26464. }
  26465. },
  26466. "required": ["path"],
  26467. "additionalProperties": false
  26468. },
  26469. "PolicyEffect": {
  26470. "type": "string",
  26471. "enum": ["allow", "deny"]
  26472. },
  26473. "ConfigV2ExperimentalPolicy": {
  26474. "type": "object",
  26475. "properties": {
  26476. "action": {
  26477. "type": "string",
  26478. "enum": ["provider.use"]
  26479. },
  26480. "effect": {
  26481. "$ref": "#/components/schemas/PolicyEffect"
  26482. },
  26483. "resource": {
  26484. "type": "string"
  26485. }
  26486. },
  26487. "required": ["action", "effect", "resource"],
  26488. "additionalProperties": false
  26489. },
  26490. "ProjectDirectories": {
  26491. "type": "array",
  26492. "items": {
  26493. "type": "object",
  26494. "properties": {
  26495. "directory": {
  26496. "type": "string"
  26497. },
  26498. "strategy": {
  26499. "type": "string"
  26500. }
  26501. },
  26502. "required": ["directory"],
  26503. "additionalProperties": false
  26504. }
  26505. },
  26506. "LocationInfo": {
  26507. "type": "object",
  26508. "properties": {
  26509. "directory": {
  26510. "type": "string"
  26511. },
  26512. "workspaceID": {
  26513. "type": "string",
  26514. "pattern": "^wrk"
  26515. },
  26516. "project": {
  26517. "type": "object",
  26518. "properties": {
  26519. "id": {
  26520. "type": "string"
  26521. },
  26522. "directory": {
  26523. "type": "string"
  26524. }
  26525. },
  26526. "required": ["id", "directory"],
  26527. "additionalProperties": false
  26528. }
  26529. },
  26530. "required": ["directory", "project"],
  26531. "additionalProperties": false
  26532. },
  26533. "PermissionV2Effect": {
  26534. "type": "string",
  26535. "enum": ["allow", "deny", "ask"]
  26536. },
  26537. "PermissionV2Rule": {
  26538. "type": "object",
  26539. "properties": {
  26540. "action": {
  26541. "type": "string"
  26542. },
  26543. "resource": {
  26544. "type": "string"
  26545. },
  26546. "effect": {
  26547. "$ref": "#/components/schemas/PermissionV2Effect"
  26548. }
  26549. },
  26550. "required": ["action", "resource", "effect"],
  26551. "additionalProperties": false
  26552. },
  26553. "PermissionV2Ruleset": {
  26554. "type": "array",
  26555. "items": {
  26556. "$ref": "#/components/schemas/PermissionV2Rule"
  26557. }
  26558. },
  26559. "AgentV2Info": {
  26560. "type": "object",
  26561. "properties": {
  26562. "id": {
  26563. "type": "string"
  26564. },
  26565. "model": {
  26566. "type": "object",
  26567. "properties": {
  26568. "id": {
  26569. "type": "string"
  26570. },
  26571. "providerID": {
  26572. "type": "string"
  26573. },
  26574. "variant": {
  26575. "type": "string"
  26576. }
  26577. },
  26578. "required": ["id", "providerID"],
  26579. "additionalProperties": false
  26580. },
  26581. "request": {
  26582. "type": "object",
  26583. "properties": {
  26584. "headers": {
  26585. "type": "object",
  26586. "additionalProperties": {
  26587. "type": "string"
  26588. }
  26589. },
  26590. "body": {
  26591. "type": "object"
  26592. }
  26593. },
  26594. "required": ["headers", "body"],
  26595. "additionalProperties": false
  26596. },
  26597. "system": {
  26598. "type": "string"
  26599. },
  26600. "description": {
  26601. "type": "string"
  26602. },
  26603. "mode": {
  26604. "type": "string",
  26605. "enum": ["subagent", "primary", "all"]
  26606. },
  26607. "hidden": {
  26608. "type": "boolean"
  26609. },
  26610. "color": {
  26611. "anyOf": [
  26612. {
  26613. "type": "string",
  26614. "pattern": "^#[0-9a-fA-F]{6}$"
  26615. },
  26616. {
  26617. "type": "string",
  26618. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  26619. }
  26620. ]
  26621. },
  26622. "steps": {
  26623. "type": "integer",
  26624. "exclusiveMinimum": 0
  26625. },
  26626. "permissions": {
  26627. "$ref": "#/components/schemas/PermissionV2Ruleset"
  26628. }
  26629. },
  26630. "required": ["id", "request", "mode", "hidden", "permissions"],
  26631. "additionalProperties": false
  26632. },
  26633. "SessionV2Info": {
  26634. "type": "object",
  26635. "properties": {
  26636. "id": {
  26637. "type": "string",
  26638. "pattern": "^ses"
  26639. },
  26640. "parentID": {
  26641. "type": "string",
  26642. "pattern": "^ses"
  26643. },
  26644. "projectID": {
  26645. "type": "string"
  26646. },
  26647. "agent": {
  26648. "type": "string"
  26649. },
  26650. "model": {
  26651. "type": "object",
  26652. "properties": {
  26653. "id": {
  26654. "type": "string"
  26655. },
  26656. "providerID": {
  26657. "type": "string"
  26658. },
  26659. "variant": {
  26660. "type": "string"
  26661. }
  26662. },
  26663. "required": ["id", "providerID"],
  26664. "additionalProperties": false
  26665. },
  26666. "cost": {
  26667. "type": "number"
  26668. },
  26669. "tokens": {
  26670. "type": "object",
  26671. "properties": {
  26672. "input": {
  26673. "type": "number"
  26674. },
  26675. "output": {
  26676. "type": "number"
  26677. },
  26678. "reasoning": {
  26679. "type": "number"
  26680. },
  26681. "cache": {
  26682. "type": "object",
  26683. "properties": {
  26684. "read": {
  26685. "type": "number"
  26686. },
  26687. "write": {
  26688. "type": "number"
  26689. }
  26690. },
  26691. "required": ["read", "write"],
  26692. "additionalProperties": false
  26693. }
  26694. },
  26695. "required": ["input", "output", "reasoning", "cache"],
  26696. "additionalProperties": false
  26697. },
  26698. "time": {
  26699. "type": "object",
  26700. "properties": {
  26701. "created": {
  26702. "type": "number"
  26703. },
  26704. "updated": {
  26705. "type": "number"
  26706. },
  26707. "archived": {
  26708. "type": "number"
  26709. }
  26710. },
  26711. "required": ["created", "updated"],
  26712. "additionalProperties": false
  26713. },
  26714. "title": {
  26715. "type": "string"
  26716. },
  26717. "location": {
  26718. "$ref": "#/components/schemas/LocationRef"
  26719. },
  26720. "subpath": {
  26721. "type": "string"
  26722. },
  26723. "revert": {
  26724. "type": "object",
  26725. "properties": {
  26726. "messageID": {
  26727. "type": "string",
  26728. "pattern": "^msg_"
  26729. },
  26730. "partID": {
  26731. "type": "string"
  26732. },
  26733. "snapshot": {
  26734. "type": "string"
  26735. },
  26736. "diff": {
  26737. "type": "string"
  26738. },
  26739. "files": {
  26740. "type": "array",
  26741. "items": {
  26742. "$ref": "#/components/schemas/FileDiff"
  26743. }
  26744. }
  26745. },
  26746. "required": ["messageID"],
  26747. "additionalProperties": false
  26748. }
  26749. },
  26750. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26751. "additionalProperties": false
  26752. },
  26753. "SessionInputAdmitted": {
  26754. "type": "object",
  26755. "properties": {
  26756. "admittedSeq": {
  26757. "type": "integer",
  26758. "minimum": 0
  26759. },
  26760. "id": {
  26761. "type": "string",
  26762. "pattern": "^msg_"
  26763. },
  26764. "sessionID": {
  26765. "type": "string",
  26766. "pattern": "^ses"
  26767. },
  26768. "prompt": {
  26769. "$ref": "#/components/schemas/Prompt"
  26770. },
  26771. "delivery": {
  26772. "type": "string",
  26773. "enum": ["steer", "queue"]
  26774. },
  26775. "timeCreated": {
  26776. "type": "number"
  26777. },
  26778. "promotedSeq": {
  26779. "type": "integer",
  26780. "minimum": 0
  26781. }
  26782. },
  26783. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26784. "additionalProperties": false
  26785. },
  26786. "SessionMessageAgentSwitched": {
  26787. "type": "object",
  26788. "properties": {
  26789. "id": {
  26790. "type": "string",
  26791. "pattern": "^msg_"
  26792. },
  26793. "metadata": {
  26794. "type": "object"
  26795. },
  26796. "time": {
  26797. "type": "object",
  26798. "properties": {
  26799. "created": {
  26800. "type": "number"
  26801. }
  26802. },
  26803. "required": ["created"],
  26804. "additionalProperties": false
  26805. },
  26806. "type": {
  26807. "type": "string",
  26808. "enum": ["agent-switched"]
  26809. },
  26810. "agent": {
  26811. "type": "string"
  26812. }
  26813. },
  26814. "required": ["id", "time", "type", "agent"],
  26815. "additionalProperties": false
  26816. },
  26817. "SessionMessageModelSwitched": {
  26818. "type": "object",
  26819. "properties": {
  26820. "id": {
  26821. "type": "string",
  26822. "pattern": "^msg_"
  26823. },
  26824. "metadata": {
  26825. "type": "object"
  26826. },
  26827. "time": {
  26828. "type": "object",
  26829. "properties": {
  26830. "created": {
  26831. "type": "number"
  26832. }
  26833. },
  26834. "required": ["created"],
  26835. "additionalProperties": false
  26836. },
  26837. "type": {
  26838. "type": "string",
  26839. "enum": ["model-switched"]
  26840. },
  26841. "model": {
  26842. "type": "object",
  26843. "properties": {
  26844. "id": {
  26845. "type": "string"
  26846. },
  26847. "providerID": {
  26848. "type": "string"
  26849. },
  26850. "variant": {
  26851. "type": "string"
  26852. }
  26853. },
  26854. "required": ["id", "providerID"],
  26855. "additionalProperties": false
  26856. }
  26857. },
  26858. "required": ["id", "time", "type", "model"],
  26859. "additionalProperties": false
  26860. },
  26861. "SessionMessageUser": {
  26862. "type": "object",
  26863. "properties": {
  26864. "id": {
  26865. "type": "string",
  26866. "pattern": "^msg_"
  26867. },
  26868. "metadata": {
  26869. "type": "object"
  26870. },
  26871. "time": {
  26872. "type": "object",
  26873. "properties": {
  26874. "created": {
  26875. "type": "number"
  26876. }
  26877. },
  26878. "required": ["created"],
  26879. "additionalProperties": false
  26880. },
  26881. "text": {
  26882. "type": "string"
  26883. },
  26884. "files": {
  26885. "type": "array",
  26886. "items": {
  26887. "$ref": "#/components/schemas/PromptFileAttachment"
  26888. }
  26889. },
  26890. "agents": {
  26891. "type": "array",
  26892. "items": {
  26893. "$ref": "#/components/schemas/PromptAgentAttachment"
  26894. }
  26895. },
  26896. "type": {
  26897. "type": "string",
  26898. "enum": ["user"]
  26899. }
  26900. },
  26901. "required": ["id", "time", "text", "type"],
  26902. "additionalProperties": false
  26903. },
  26904. "SessionMessageSynthetic": {
  26905. "type": "object",
  26906. "properties": {
  26907. "id": {
  26908. "type": "string",
  26909. "pattern": "^msg_"
  26910. },
  26911. "metadata": {
  26912. "type": "object"
  26913. },
  26914. "time": {
  26915. "type": "object",
  26916. "properties": {
  26917. "created": {
  26918. "type": "number"
  26919. }
  26920. },
  26921. "required": ["created"],
  26922. "additionalProperties": false
  26923. },
  26924. "sessionID": {
  26925. "type": "string",
  26926. "pattern": "^ses"
  26927. },
  26928. "text": {
  26929. "type": "string"
  26930. },
  26931. "type": {
  26932. "type": "string",
  26933. "enum": ["synthetic"]
  26934. }
  26935. },
  26936. "required": ["id", "time", "sessionID", "text", "type"],
  26937. "additionalProperties": false
  26938. },
  26939. "SessionMessageSystem": {
  26940. "type": "object",
  26941. "properties": {
  26942. "id": {
  26943. "type": "string",
  26944. "pattern": "^msg_"
  26945. },
  26946. "metadata": {
  26947. "type": "object"
  26948. },
  26949. "time": {
  26950. "type": "object",
  26951. "properties": {
  26952. "created": {
  26953. "type": "number"
  26954. }
  26955. },
  26956. "required": ["created"],
  26957. "additionalProperties": false
  26958. },
  26959. "type": {
  26960. "type": "string",
  26961. "enum": ["system"]
  26962. },
  26963. "text": {
  26964. "type": "string"
  26965. }
  26966. },
  26967. "required": ["id", "time", "type", "text"],
  26968. "additionalProperties": false
  26969. },
  26970. "SessionMessageShell": {
  26971. "type": "object",
  26972. "properties": {
  26973. "id": {
  26974. "type": "string",
  26975. "pattern": "^msg_"
  26976. },
  26977. "metadata": {
  26978. "type": "object"
  26979. },
  26980. "time": {
  26981. "type": "object",
  26982. "properties": {
  26983. "created": {
  26984. "type": "number"
  26985. },
  26986. "completed": {
  26987. "type": "number"
  26988. }
  26989. },
  26990. "required": ["created"],
  26991. "additionalProperties": false
  26992. },
  26993. "type": {
  26994. "type": "string",
  26995. "enum": ["shell"]
  26996. },
  26997. "callID": {
  26998. "type": "string"
  26999. },
  27000. "command": {
  27001. "type": "string"
  27002. },
  27003. "output": {
  27004. "type": "string"
  27005. }
  27006. },
  27007. "required": ["id", "time", "type", "callID", "command", "output"],
  27008. "additionalProperties": false
  27009. },
  27010. "SessionMessageAssistantText": {
  27011. "type": "object",
  27012. "properties": {
  27013. "type": {
  27014. "type": "string",
  27015. "enum": ["text"]
  27016. },
  27017. "id": {
  27018. "type": "string"
  27019. },
  27020. "text": {
  27021. "type": "string"
  27022. }
  27023. },
  27024. "required": ["type", "id", "text"],
  27025. "additionalProperties": false
  27026. },
  27027. "SessionMessageAssistantReasoning": {
  27028. "type": "object",
  27029. "properties": {
  27030. "type": {
  27031. "type": "string",
  27032. "enum": ["reasoning"]
  27033. },
  27034. "id": {
  27035. "type": "string"
  27036. },
  27037. "text": {
  27038. "type": "string"
  27039. },
  27040. "providerMetadata": {
  27041. "type": "object",
  27042. "additionalProperties": {
  27043. "type": "object"
  27044. }
  27045. }
  27046. },
  27047. "required": ["type", "id", "text"],
  27048. "additionalProperties": false
  27049. },
  27050. "SessionMessageToolStatePending": {
  27051. "type": "object",
  27052. "properties": {
  27053. "status": {
  27054. "type": "string",
  27055. "enum": ["pending"]
  27056. },
  27057. "input": {
  27058. "type": "string"
  27059. }
  27060. },
  27061. "required": ["status", "input"],
  27062. "additionalProperties": false
  27063. },
  27064. "SessionMessageToolStateRunning": {
  27065. "type": "object",
  27066. "properties": {
  27067. "status": {
  27068. "type": "string",
  27069. "enum": ["running"]
  27070. },
  27071. "input": {
  27072. "type": "object"
  27073. },
  27074. "structured": {
  27075. "type": "object"
  27076. },
  27077. "content": {
  27078. "type": "array",
  27079. "items": {
  27080. "anyOf": [
  27081. {
  27082. "$ref": "#/components/schemas/ToolTextContent"
  27083. },
  27084. {
  27085. "$ref": "#/components/schemas/ToolFileContent"
  27086. }
  27087. ]
  27088. }
  27089. }
  27090. },
  27091. "required": ["status", "input", "structured", "content"],
  27092. "additionalProperties": false
  27093. },
  27094. "SessionMessageToolStateCompleted": {
  27095. "type": "object",
  27096. "properties": {
  27097. "status": {
  27098. "type": "string",
  27099. "enum": ["completed"]
  27100. },
  27101. "input": {
  27102. "type": "object"
  27103. },
  27104. "attachments": {
  27105. "type": "array",
  27106. "items": {
  27107. "$ref": "#/components/schemas/PromptFileAttachment"
  27108. }
  27109. },
  27110. "content": {
  27111. "type": "array",
  27112. "items": {
  27113. "anyOf": [
  27114. {
  27115. "$ref": "#/components/schemas/ToolTextContent"
  27116. },
  27117. {
  27118. "$ref": "#/components/schemas/ToolFileContent"
  27119. }
  27120. ]
  27121. }
  27122. },
  27123. "outputPaths": {
  27124. "type": "array",
  27125. "items": {
  27126. "type": "string"
  27127. }
  27128. },
  27129. "structured": {
  27130. "type": "object"
  27131. },
  27132. "result": {}
  27133. },
  27134. "required": ["status", "input", "content", "structured"],
  27135. "additionalProperties": false
  27136. },
  27137. "SessionMessageToolStateError": {
  27138. "type": "object",
  27139. "properties": {
  27140. "status": {
  27141. "type": "string",
  27142. "enum": ["error"]
  27143. },
  27144. "input": {
  27145. "type": "object"
  27146. },
  27147. "content": {
  27148. "type": "array",
  27149. "items": {
  27150. "anyOf": [
  27151. {
  27152. "$ref": "#/components/schemas/ToolTextContent"
  27153. },
  27154. {
  27155. "$ref": "#/components/schemas/ToolFileContent"
  27156. }
  27157. ]
  27158. }
  27159. },
  27160. "structured": {
  27161. "type": "object"
  27162. },
  27163. "error": {
  27164. "$ref": "#/components/schemas/SessionErrorUnknown"
  27165. },
  27166. "result": {}
  27167. },
  27168. "required": ["status", "input", "content", "structured", "error"],
  27169. "additionalProperties": false
  27170. },
  27171. "SessionMessageAssistantTool": {
  27172. "type": "object",
  27173. "properties": {
  27174. "type": {
  27175. "type": "string",
  27176. "enum": ["tool"]
  27177. },
  27178. "id": {
  27179. "type": "string"
  27180. },
  27181. "name": {
  27182. "type": "string"
  27183. },
  27184. "provider": {
  27185. "type": "object",
  27186. "properties": {
  27187. "executed": {
  27188. "type": "boolean"
  27189. },
  27190. "metadata": {
  27191. "type": "object",
  27192. "additionalProperties": {
  27193. "type": "object"
  27194. }
  27195. },
  27196. "resultMetadata": {
  27197. "type": "object",
  27198. "additionalProperties": {
  27199. "type": "object"
  27200. }
  27201. }
  27202. },
  27203. "required": ["executed"],
  27204. "additionalProperties": false
  27205. },
  27206. "state": {
  27207. "anyOf": [
  27208. {
  27209. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27210. },
  27211. {
  27212. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27213. },
  27214. {
  27215. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27216. },
  27217. {
  27218. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27219. }
  27220. ]
  27221. },
  27222. "time": {
  27223. "type": "object",
  27224. "properties": {
  27225. "created": {
  27226. "type": "number"
  27227. },
  27228. "ran": {
  27229. "type": "number"
  27230. },
  27231. "completed": {
  27232. "type": "number"
  27233. },
  27234. "pruned": {
  27235. "type": "number"
  27236. }
  27237. },
  27238. "required": ["created"],
  27239. "additionalProperties": false
  27240. }
  27241. },
  27242. "required": ["type", "id", "name", "state", "time"],
  27243. "additionalProperties": false
  27244. },
  27245. "SessionMessageAssistant": {
  27246. "type": "object",
  27247. "properties": {
  27248. "id": {
  27249. "type": "string",
  27250. "pattern": "^msg_"
  27251. },
  27252. "metadata": {
  27253. "type": "object"
  27254. },
  27255. "time": {
  27256. "type": "object",
  27257. "properties": {
  27258. "created": {
  27259. "type": "number"
  27260. },
  27261. "completed": {
  27262. "type": "number"
  27263. }
  27264. },
  27265. "required": ["created"],
  27266. "additionalProperties": false
  27267. },
  27268. "type": {
  27269. "type": "string",
  27270. "enum": ["assistant"]
  27271. },
  27272. "agent": {
  27273. "type": "string"
  27274. },
  27275. "model": {
  27276. "type": "object",
  27277. "properties": {
  27278. "id": {
  27279. "type": "string"
  27280. },
  27281. "providerID": {
  27282. "type": "string"
  27283. },
  27284. "variant": {
  27285. "type": "string"
  27286. }
  27287. },
  27288. "required": ["id", "providerID"],
  27289. "additionalProperties": false
  27290. },
  27291. "content": {
  27292. "type": "array",
  27293. "items": {
  27294. "anyOf": [
  27295. {
  27296. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27297. },
  27298. {
  27299. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27300. },
  27301. {
  27302. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27303. }
  27304. ]
  27305. }
  27306. },
  27307. "snapshot": {
  27308. "type": "object",
  27309. "properties": {
  27310. "start": {
  27311. "type": "string"
  27312. },
  27313. "end": {
  27314. "type": "string"
  27315. },
  27316. "files": {
  27317. "type": "array",
  27318. "items": {
  27319. "type": "string"
  27320. }
  27321. }
  27322. },
  27323. "additionalProperties": false
  27324. },
  27325. "finish": {
  27326. "type": "string"
  27327. },
  27328. "cost": {
  27329. "type": "number"
  27330. },
  27331. "tokens": {
  27332. "type": "object",
  27333. "properties": {
  27334. "input": {
  27335. "type": "number"
  27336. },
  27337. "output": {
  27338. "type": "number"
  27339. },
  27340. "reasoning": {
  27341. "type": "number"
  27342. },
  27343. "cache": {
  27344. "type": "object",
  27345. "properties": {
  27346. "read": {
  27347. "type": "number"
  27348. },
  27349. "write": {
  27350. "type": "number"
  27351. }
  27352. },
  27353. "required": ["read", "write"],
  27354. "additionalProperties": false
  27355. }
  27356. },
  27357. "required": ["input", "output", "reasoning", "cache"],
  27358. "additionalProperties": false
  27359. },
  27360. "error": {
  27361. "$ref": "#/components/schemas/SessionErrorUnknown"
  27362. }
  27363. },
  27364. "required": ["id", "time", "type", "agent", "model", "content"],
  27365. "additionalProperties": false
  27366. },
  27367. "SessionMessageCompaction": {
  27368. "type": "object",
  27369. "properties": {
  27370. "type": {
  27371. "type": "string",
  27372. "enum": ["compaction"]
  27373. },
  27374. "reason": {
  27375. "type": "string",
  27376. "enum": ["auto", "manual"]
  27377. },
  27378. "summary": {
  27379. "type": "string"
  27380. },
  27381. "recent": {
  27382. "type": "string"
  27383. },
  27384. "id": {
  27385. "type": "string",
  27386. "pattern": "^msg_"
  27387. },
  27388. "metadata": {
  27389. "type": "object"
  27390. },
  27391. "time": {
  27392. "type": "object",
  27393. "properties": {
  27394. "created": {
  27395. "type": "number"
  27396. }
  27397. },
  27398. "required": ["created"],
  27399. "additionalProperties": false
  27400. }
  27401. },
  27402. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27403. "additionalProperties": false
  27404. },
  27405. "SessionMessage": {
  27406. "anyOf": [
  27407. {
  27408. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27409. },
  27410. {
  27411. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27412. },
  27413. {
  27414. "$ref": "#/components/schemas/SessionMessageUser"
  27415. },
  27416. {
  27417. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27418. },
  27419. {
  27420. "$ref": "#/components/schemas/SessionMessageSystem"
  27421. },
  27422. {
  27423. "$ref": "#/components/schemas/SessionMessageShell"
  27424. },
  27425. {
  27426. "$ref": "#/components/schemas/SessionMessageAssistant"
  27427. },
  27428. {
  27429. "$ref": "#/components/schemas/SessionMessageCompaction"
  27430. }
  27431. ]
  27432. },
  27433. "ModelV2Info": {
  27434. "type": "object",
  27435. "properties": {
  27436. "id": {
  27437. "type": "string"
  27438. },
  27439. "providerID": {
  27440. "type": "string"
  27441. },
  27442. "family": {
  27443. "type": "string"
  27444. },
  27445. "name": {
  27446. "type": "string"
  27447. },
  27448. "api": {
  27449. "anyOf": [
  27450. {
  27451. "type": "object",
  27452. "properties": {
  27453. "id": {
  27454. "type": "string"
  27455. },
  27456. "type": {
  27457. "type": "string",
  27458. "enum": ["aisdk"]
  27459. },
  27460. "package": {
  27461. "type": "string"
  27462. },
  27463. "url": {
  27464. "type": "string"
  27465. },
  27466. "settings": {
  27467. "type": "object"
  27468. }
  27469. },
  27470. "required": ["id", "type", "package"],
  27471. "additionalProperties": false
  27472. },
  27473. {
  27474. "type": "object",
  27475. "properties": {
  27476. "id": {
  27477. "type": "string"
  27478. },
  27479. "type": {
  27480. "type": "string",
  27481. "enum": ["native"]
  27482. },
  27483. "url": {
  27484. "type": "string"
  27485. },
  27486. "settings": {
  27487. "type": "object"
  27488. }
  27489. },
  27490. "required": ["id", "type", "settings"],
  27491. "additionalProperties": false
  27492. }
  27493. ]
  27494. },
  27495. "capabilities": {
  27496. "type": "object",
  27497. "properties": {
  27498. "tools": {
  27499. "type": "boolean"
  27500. },
  27501. "input": {
  27502. "type": "array",
  27503. "items": {
  27504. "type": "string"
  27505. }
  27506. },
  27507. "output": {
  27508. "type": "array",
  27509. "items": {
  27510. "type": "string"
  27511. }
  27512. }
  27513. },
  27514. "required": ["tools", "input", "output"],
  27515. "additionalProperties": false
  27516. },
  27517. "request": {
  27518. "type": "object",
  27519. "properties": {
  27520. "headers": {
  27521. "type": "object",
  27522. "additionalProperties": {
  27523. "type": "string"
  27524. }
  27525. },
  27526. "body": {
  27527. "type": "object"
  27528. },
  27529. "variant": {
  27530. "type": "string"
  27531. }
  27532. },
  27533. "required": ["headers", "body"],
  27534. "additionalProperties": false
  27535. },
  27536. "variants": {
  27537. "type": "array",
  27538. "items": {
  27539. "type": "object",
  27540. "properties": {
  27541. "id": {
  27542. "type": "string"
  27543. },
  27544. "headers": {
  27545. "type": "object",
  27546. "additionalProperties": {
  27547. "type": "string"
  27548. }
  27549. },
  27550. "body": {
  27551. "type": "object"
  27552. }
  27553. },
  27554. "required": ["id", "headers", "body"],
  27555. "additionalProperties": false
  27556. }
  27557. },
  27558. "time": {
  27559. "type": "object",
  27560. "properties": {
  27561. "released": {
  27562. "type": "number"
  27563. }
  27564. },
  27565. "required": ["released"],
  27566. "additionalProperties": false
  27567. },
  27568. "cost": {
  27569. "type": "array",
  27570. "items": {
  27571. "type": "object",
  27572. "properties": {
  27573. "tier": {
  27574. "type": "object",
  27575. "properties": {
  27576. "type": {
  27577. "type": "string",
  27578. "enum": ["context"]
  27579. },
  27580. "size": {
  27581. "type": "integer"
  27582. }
  27583. },
  27584. "required": ["type", "size"],
  27585. "additionalProperties": false
  27586. },
  27587. "input": {
  27588. "type": "number"
  27589. },
  27590. "output": {
  27591. "type": "number"
  27592. },
  27593. "cache": {
  27594. "type": "object",
  27595. "properties": {
  27596. "read": {
  27597. "type": "number"
  27598. },
  27599. "write": {
  27600. "type": "number"
  27601. }
  27602. },
  27603. "required": ["read", "write"],
  27604. "additionalProperties": false
  27605. }
  27606. },
  27607. "required": ["input", "output", "cache"],
  27608. "additionalProperties": false
  27609. }
  27610. },
  27611. "status": {
  27612. "type": "string",
  27613. "enum": ["alpha", "beta", "deprecated", "active"]
  27614. },
  27615. "enabled": {
  27616. "type": "boolean"
  27617. },
  27618. "limit": {
  27619. "type": "object",
  27620. "properties": {
  27621. "context": {
  27622. "type": "integer"
  27623. },
  27624. "input": {
  27625. "type": "integer"
  27626. },
  27627. "output": {
  27628. "type": "integer"
  27629. }
  27630. },
  27631. "required": ["context", "output"],
  27632. "additionalProperties": false
  27633. }
  27634. },
  27635. "required": [
  27636. "id",
  27637. "providerID",
  27638. "name",
  27639. "api",
  27640. "capabilities",
  27641. "request",
  27642. "variants",
  27643. "time",
  27644. "cost",
  27645. "status",
  27646. "enabled",
  27647. "limit"
  27648. ],
  27649. "additionalProperties": false
  27650. },
  27651. "ProviderV2Info": {
  27652. "type": "object",
  27653. "properties": {
  27654. "id": {
  27655. "type": "string"
  27656. },
  27657. "integrationID": {
  27658. "type": "string"
  27659. },
  27660. "name": {
  27661. "type": "string"
  27662. },
  27663. "disabled": {
  27664. "type": "boolean"
  27665. },
  27666. "api": {
  27667. "anyOf": [
  27668. {
  27669. "type": "object",
  27670. "properties": {
  27671. "type": {
  27672. "type": "string",
  27673. "enum": ["aisdk"]
  27674. },
  27675. "package": {
  27676. "type": "string"
  27677. },
  27678. "url": {
  27679. "type": "string"
  27680. },
  27681. "settings": {
  27682. "type": "object"
  27683. }
  27684. },
  27685. "required": ["type", "package"],
  27686. "additionalProperties": false
  27687. },
  27688. {
  27689. "type": "object",
  27690. "properties": {
  27691. "type": {
  27692. "type": "string",
  27693. "enum": ["native"]
  27694. },
  27695. "url": {
  27696. "type": "string"
  27697. },
  27698. "settings": {
  27699. "type": "object"
  27700. }
  27701. },
  27702. "required": ["type", "settings"],
  27703. "additionalProperties": false
  27704. }
  27705. ]
  27706. },
  27707. "request": {
  27708. "type": "object",
  27709. "properties": {
  27710. "headers": {
  27711. "type": "object",
  27712. "additionalProperties": {
  27713. "type": "string"
  27714. }
  27715. },
  27716. "body": {
  27717. "type": "object"
  27718. }
  27719. },
  27720. "required": ["headers", "body"],
  27721. "additionalProperties": false
  27722. }
  27723. },
  27724. "required": ["id", "name", "api", "request"],
  27725. "additionalProperties": false
  27726. },
  27727. "IntegrationWhen": {
  27728. "type": "object",
  27729. "properties": {
  27730. "key": {
  27731. "type": "string"
  27732. },
  27733. "op": {
  27734. "type": "string",
  27735. "enum": ["eq", "neq"]
  27736. },
  27737. "value": {
  27738. "type": "string"
  27739. }
  27740. },
  27741. "required": ["key", "op", "value"],
  27742. "additionalProperties": false
  27743. },
  27744. "IntegrationTextPrompt": {
  27745. "type": "object",
  27746. "properties": {
  27747. "type": {
  27748. "type": "string",
  27749. "enum": ["text"]
  27750. },
  27751. "key": {
  27752. "type": "string"
  27753. },
  27754. "message": {
  27755. "type": "string"
  27756. },
  27757. "placeholder": {
  27758. "type": "string"
  27759. },
  27760. "when": {
  27761. "$ref": "#/components/schemas/IntegrationWhen"
  27762. }
  27763. },
  27764. "required": ["type", "key", "message"],
  27765. "additionalProperties": false
  27766. },
  27767. "IntegrationSelectPrompt": {
  27768. "type": "object",
  27769. "properties": {
  27770. "type": {
  27771. "type": "string",
  27772. "enum": ["select"]
  27773. },
  27774. "key": {
  27775. "type": "string"
  27776. },
  27777. "message": {
  27778. "type": "string"
  27779. },
  27780. "options": {
  27781. "type": "array",
  27782. "items": {
  27783. "type": "object",
  27784. "properties": {
  27785. "label": {
  27786. "type": "string"
  27787. },
  27788. "value": {
  27789. "type": "string"
  27790. },
  27791. "hint": {
  27792. "type": "string"
  27793. }
  27794. },
  27795. "required": ["label", "value"],
  27796. "additionalProperties": false
  27797. }
  27798. },
  27799. "when": {
  27800. "$ref": "#/components/schemas/IntegrationWhen"
  27801. }
  27802. },
  27803. "required": ["type", "key", "message", "options"],
  27804. "additionalProperties": false
  27805. },
  27806. "IntegrationOAuthMethod": {
  27807. "type": "object",
  27808. "properties": {
  27809. "id": {
  27810. "type": "string"
  27811. },
  27812. "type": {
  27813. "type": "string",
  27814. "enum": ["oauth"]
  27815. },
  27816. "label": {
  27817. "type": "string"
  27818. },
  27819. "prompts": {
  27820. "type": "array",
  27821. "items": {
  27822. "anyOf": [
  27823. {
  27824. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27825. },
  27826. {
  27827. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27828. }
  27829. ]
  27830. }
  27831. }
  27832. },
  27833. "required": ["id", "type", "label"],
  27834. "additionalProperties": false
  27835. },
  27836. "IntegrationKeyMethod": {
  27837. "type": "object",
  27838. "properties": {
  27839. "type": {
  27840. "type": "string",
  27841. "enum": ["key"]
  27842. },
  27843. "label": {
  27844. "type": "string"
  27845. }
  27846. },
  27847. "required": ["type"],
  27848. "additionalProperties": false
  27849. },
  27850. "IntegrationEnvMethod": {
  27851. "type": "object",
  27852. "properties": {
  27853. "type": {
  27854. "type": "string",
  27855. "enum": ["env"]
  27856. },
  27857. "names": {
  27858. "type": "array",
  27859. "items": {
  27860. "type": "string"
  27861. }
  27862. }
  27863. },
  27864. "required": ["type", "names"],
  27865. "additionalProperties": false
  27866. },
  27867. "ConnectionCredentialInfo": {
  27868. "type": "object",
  27869. "properties": {
  27870. "type": {
  27871. "type": "string",
  27872. "enum": ["credential"]
  27873. },
  27874. "id": {
  27875. "type": "string"
  27876. },
  27877. "label": {
  27878. "type": "string"
  27879. }
  27880. },
  27881. "required": ["type", "id", "label"],
  27882. "additionalProperties": false
  27883. },
  27884. "ConnectionEnvInfo": {
  27885. "type": "object",
  27886. "properties": {
  27887. "type": {
  27888. "type": "string",
  27889. "enum": ["env"]
  27890. },
  27891. "name": {
  27892. "type": "string"
  27893. }
  27894. },
  27895. "required": ["type", "name"],
  27896. "additionalProperties": false
  27897. },
  27898. "ConnectionInfo": {
  27899. "anyOf": [
  27900. {
  27901. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27902. },
  27903. {
  27904. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27905. }
  27906. ]
  27907. },
  27908. "IntegrationInfo": {
  27909. "type": "object",
  27910. "properties": {
  27911. "id": {
  27912. "type": "string"
  27913. },
  27914. "name": {
  27915. "type": "string"
  27916. },
  27917. "methods": {
  27918. "type": "array",
  27919. "items": {
  27920. "$ref": "#/components/schemas/IntegrationMethod"
  27921. }
  27922. },
  27923. "connections": {
  27924. "type": "array",
  27925. "items": {
  27926. "$ref": "#/components/schemas/ConnectionInfo"
  27927. }
  27928. }
  27929. },
  27930. "required": ["id", "name", "methods", "connections"],
  27931. "additionalProperties": false
  27932. },
  27933. "IntegrationAttempt": {
  27934. "type": "object",
  27935. "properties": {
  27936. "attemptID": {
  27937. "type": "string"
  27938. },
  27939. "url": {
  27940. "type": "string"
  27941. },
  27942. "instructions": {
  27943. "type": "string"
  27944. },
  27945. "mode": {
  27946. "type": "string",
  27947. "enum": ["auto", "code"]
  27948. },
  27949. "time": {
  27950. "type": "object",
  27951. "properties": {
  27952. "created": {
  27953. "anyOf": [
  27954. {
  27955. "type": "number"
  27956. },
  27957. {
  27958. "type": "string",
  27959. "enum": ["NaN"]
  27960. },
  27961. {
  27962. "type": "string",
  27963. "enum": ["Infinity"]
  27964. },
  27965. {
  27966. "type": "string",
  27967. "enum": ["-Infinity"]
  27968. },
  27969. {
  27970. "type": "string",
  27971. "enum": ["Infinity", "-Infinity", "NaN"]
  27972. }
  27973. ]
  27974. },
  27975. "expires": {
  27976. "anyOf": [
  27977. {
  27978. "type": "number"
  27979. },
  27980. {
  27981. "type": "string",
  27982. "enum": ["NaN"]
  27983. },
  27984. {
  27985. "type": "string",
  27986. "enum": ["Infinity"]
  27987. },
  27988. {
  27989. "type": "string",
  27990. "enum": ["-Infinity"]
  27991. },
  27992. {
  27993. "type": "string",
  27994. "enum": ["Infinity", "-Infinity", "NaN"]
  27995. }
  27996. ]
  27997. }
  27998. },
  27999. "required": ["created", "expires"],
  28000. "additionalProperties": false
  28001. }
  28002. },
  28003. "required": ["attemptID", "url", "instructions", "mode", "time"],
  28004. "additionalProperties": false
  28005. },
  28006. "PermissionV2Request": {
  28007. "type": "object",
  28008. "properties": {
  28009. "id": {
  28010. "type": "string",
  28011. "pattern": "^per"
  28012. },
  28013. "sessionID": {
  28014. "type": "string",
  28015. "pattern": "^ses"
  28016. },
  28017. "action": {
  28018. "type": "string"
  28019. },
  28020. "resources": {
  28021. "type": "array",
  28022. "items": {
  28023. "type": "string"
  28024. }
  28025. },
  28026. "save": {
  28027. "type": "array",
  28028. "items": {
  28029. "type": "string"
  28030. }
  28031. },
  28032. "metadata": {
  28033. "type": "object"
  28034. },
  28035. "source": {
  28036. "$ref": "#/components/schemas/PermissionV2Source"
  28037. }
  28038. },
  28039. "required": ["id", "sessionID", "action", "resources"],
  28040. "additionalProperties": false
  28041. },
  28042. "PermissionSavedInfo": {
  28043. "type": "object",
  28044. "properties": {
  28045. "id": {
  28046. "type": "string"
  28047. },
  28048. "projectID": {
  28049. "type": "string"
  28050. },
  28051. "action": {
  28052. "type": "string"
  28053. },
  28054. "resource": {
  28055. "type": "string"
  28056. }
  28057. },
  28058. "required": ["id", "projectID", "action", "resource"],
  28059. "additionalProperties": false
  28060. },
  28061. "FileSystemEntry": {
  28062. "type": "object",
  28063. "properties": {
  28064. "path": {
  28065. "type": "string"
  28066. },
  28067. "type": {
  28068. "type": "string",
  28069. "enum": ["file", "directory"]
  28070. }
  28071. },
  28072. "required": ["path", "type"],
  28073. "additionalProperties": false
  28074. },
  28075. "CommandV2Info": {
  28076. "type": "object",
  28077. "properties": {
  28078. "name": {
  28079. "type": "string"
  28080. },
  28081. "template": {
  28082. "type": "string"
  28083. },
  28084. "description": {
  28085. "type": "string"
  28086. },
  28087. "agent": {
  28088. "type": "string"
  28089. },
  28090. "model": {
  28091. "type": "object",
  28092. "properties": {
  28093. "id": {
  28094. "type": "string"
  28095. },
  28096. "providerID": {
  28097. "type": "string"
  28098. },
  28099. "variant": {
  28100. "type": "string"
  28101. }
  28102. },
  28103. "required": ["id", "providerID"],
  28104. "additionalProperties": false
  28105. },
  28106. "subtask": {
  28107. "type": "boolean"
  28108. }
  28109. },
  28110. "required": ["name", "template"],
  28111. "additionalProperties": false
  28112. },
  28113. "SkillV2Info": {
  28114. "type": "object",
  28115. "properties": {
  28116. "name": {
  28117. "type": "string"
  28118. },
  28119. "description": {
  28120. "type": "string"
  28121. },
  28122. "slash": {
  28123. "type": "boolean"
  28124. },
  28125. "location": {
  28126. "type": "string"
  28127. },
  28128. "content": {
  28129. "type": "string"
  28130. }
  28131. },
  28132. "required": ["name", "location", "content"],
  28133. "additionalProperties": false
  28134. },
  28135. "V2EventModels-devRefreshed": {
  28136. "type": "object",
  28137. "properties": {
  28138. "id": {
  28139. "type": "string",
  28140. "pattern": "^evt_"
  28141. },
  28142. "metadata": {
  28143. "type": "object"
  28144. },
  28145. "durable": {
  28146. "type": "object",
  28147. "properties": {
  28148. "aggregateID": {
  28149. "type": "string"
  28150. },
  28151. "seq": {
  28152. "type": "integer"
  28153. },
  28154. "version": {
  28155. "type": "integer"
  28156. }
  28157. },
  28158. "required": ["aggregateID", "seq", "version"],
  28159. "additionalProperties": false
  28160. },
  28161. "location": {
  28162. "$ref": "#/components/schemas/LocationRef"
  28163. },
  28164. "type": {
  28165. "type": "string",
  28166. "enum": ["models-dev.refreshed"]
  28167. },
  28168. "data": {
  28169. "type": "object",
  28170. "properties": {}
  28171. }
  28172. },
  28173. "required": ["id", "type", "data"],
  28174. "additionalProperties": false
  28175. },
  28176. "V2EventIntegrationUpdated": {
  28177. "type": "object",
  28178. "properties": {
  28179. "id": {
  28180. "type": "string",
  28181. "pattern": "^evt_"
  28182. },
  28183. "metadata": {
  28184. "type": "object"
  28185. },
  28186. "durable": {
  28187. "type": "object",
  28188. "properties": {
  28189. "aggregateID": {
  28190. "type": "string"
  28191. },
  28192. "seq": {
  28193. "type": "integer"
  28194. },
  28195. "version": {
  28196. "type": "integer"
  28197. }
  28198. },
  28199. "required": ["aggregateID", "seq", "version"],
  28200. "additionalProperties": false
  28201. },
  28202. "location": {
  28203. "$ref": "#/components/schemas/LocationRef"
  28204. },
  28205. "type": {
  28206. "type": "string",
  28207. "enum": ["integration.updated"]
  28208. },
  28209. "data": {
  28210. "type": "object",
  28211. "properties": {}
  28212. }
  28213. },
  28214. "required": ["id", "type", "data"],
  28215. "additionalProperties": false
  28216. },
  28217. "V2EventIntegrationConnectionUpdated": {
  28218. "type": "object",
  28219. "properties": {
  28220. "id": {
  28221. "type": "string",
  28222. "pattern": "^evt_"
  28223. },
  28224. "metadata": {
  28225. "type": "object"
  28226. },
  28227. "durable": {
  28228. "type": "object",
  28229. "properties": {
  28230. "aggregateID": {
  28231. "type": "string"
  28232. },
  28233. "seq": {
  28234. "type": "integer"
  28235. },
  28236. "version": {
  28237. "type": "integer"
  28238. }
  28239. },
  28240. "required": ["aggregateID", "seq", "version"],
  28241. "additionalProperties": false
  28242. },
  28243. "location": {
  28244. "$ref": "#/components/schemas/LocationRef"
  28245. },
  28246. "type": {
  28247. "type": "string",
  28248. "enum": ["integration.connection.updated"]
  28249. },
  28250. "data": {
  28251. "type": "object",
  28252. "properties": {
  28253. "integrationID": {
  28254. "type": "string"
  28255. }
  28256. },
  28257. "required": ["integrationID"],
  28258. "additionalProperties": false
  28259. }
  28260. },
  28261. "required": ["id", "type", "data"],
  28262. "additionalProperties": false
  28263. },
  28264. "V2EventCatalogUpdated": {
  28265. "type": "object",
  28266. "properties": {
  28267. "id": {
  28268. "type": "string",
  28269. "pattern": "^evt_"
  28270. },
  28271. "metadata": {
  28272. "type": "object"
  28273. },
  28274. "durable": {
  28275. "type": "object",
  28276. "properties": {
  28277. "aggregateID": {
  28278. "type": "string"
  28279. },
  28280. "seq": {
  28281. "type": "integer"
  28282. },
  28283. "version": {
  28284. "type": "integer"
  28285. }
  28286. },
  28287. "required": ["aggregateID", "seq", "version"],
  28288. "additionalProperties": false
  28289. },
  28290. "location": {
  28291. "$ref": "#/components/schemas/LocationRef"
  28292. },
  28293. "type": {
  28294. "type": "string",
  28295. "enum": ["catalog.updated"]
  28296. },
  28297. "data": {
  28298. "type": "object",
  28299. "properties": {}
  28300. }
  28301. },
  28302. "required": ["id", "type", "data"],
  28303. "additionalProperties": false
  28304. },
  28305. "V2EventSessionCreated": {
  28306. "type": "object",
  28307. "properties": {
  28308. "id": {
  28309. "type": "string",
  28310. "pattern": "^evt_"
  28311. },
  28312. "metadata": {
  28313. "type": "object"
  28314. },
  28315. "durable": {
  28316. "type": "object",
  28317. "properties": {
  28318. "aggregateID": {
  28319. "type": "string"
  28320. },
  28321. "seq": {
  28322. "type": "integer"
  28323. },
  28324. "version": {
  28325. "type": "integer"
  28326. }
  28327. },
  28328. "required": ["aggregateID", "seq", "version"],
  28329. "additionalProperties": false
  28330. },
  28331. "location": {
  28332. "$ref": "#/components/schemas/LocationRef"
  28333. },
  28334. "type": {
  28335. "type": "string",
  28336. "enum": ["session.created"]
  28337. },
  28338. "data": {
  28339. "type": "object",
  28340. "properties": {
  28341. "sessionID": {
  28342. "type": "string",
  28343. "pattern": "^ses"
  28344. },
  28345. "info": {
  28346. "$ref": "#/components/schemas/Session"
  28347. }
  28348. },
  28349. "required": ["sessionID", "info"],
  28350. "additionalProperties": false
  28351. }
  28352. },
  28353. "required": ["id", "type", "data"],
  28354. "additionalProperties": false
  28355. },
  28356. "V2EventSessionUpdated": {
  28357. "type": "object",
  28358. "properties": {
  28359. "id": {
  28360. "type": "string",
  28361. "pattern": "^evt_"
  28362. },
  28363. "metadata": {
  28364. "type": "object"
  28365. },
  28366. "durable": {
  28367. "type": "object",
  28368. "properties": {
  28369. "aggregateID": {
  28370. "type": "string"
  28371. },
  28372. "seq": {
  28373. "type": "integer"
  28374. },
  28375. "version": {
  28376. "type": "integer"
  28377. }
  28378. },
  28379. "required": ["aggregateID", "seq", "version"],
  28380. "additionalProperties": false
  28381. },
  28382. "location": {
  28383. "$ref": "#/components/schemas/LocationRef"
  28384. },
  28385. "type": {
  28386. "type": "string",
  28387. "enum": ["session.updated"]
  28388. },
  28389. "data": {
  28390. "type": "object",
  28391. "properties": {
  28392. "sessionID": {
  28393. "type": "string",
  28394. "pattern": "^ses"
  28395. },
  28396. "info": {
  28397. "$ref": "#/components/schemas/Session"
  28398. }
  28399. },
  28400. "required": ["sessionID", "info"],
  28401. "additionalProperties": false
  28402. }
  28403. },
  28404. "required": ["id", "type", "data"],
  28405. "additionalProperties": false
  28406. },
  28407. "V2EventSessionDeleted": {
  28408. "type": "object",
  28409. "properties": {
  28410. "id": {
  28411. "type": "string",
  28412. "pattern": "^evt_"
  28413. },
  28414. "metadata": {
  28415. "type": "object"
  28416. },
  28417. "durable": {
  28418. "type": "object",
  28419. "properties": {
  28420. "aggregateID": {
  28421. "type": "string"
  28422. },
  28423. "seq": {
  28424. "type": "integer"
  28425. },
  28426. "version": {
  28427. "type": "integer"
  28428. }
  28429. },
  28430. "required": ["aggregateID", "seq", "version"],
  28431. "additionalProperties": false
  28432. },
  28433. "location": {
  28434. "$ref": "#/components/schemas/LocationRef"
  28435. },
  28436. "type": {
  28437. "type": "string",
  28438. "enum": ["session.deleted"]
  28439. },
  28440. "data": {
  28441. "type": "object",
  28442. "properties": {
  28443. "sessionID": {
  28444. "type": "string",
  28445. "pattern": "^ses"
  28446. },
  28447. "info": {
  28448. "$ref": "#/components/schemas/Session"
  28449. }
  28450. },
  28451. "required": ["sessionID", "info"],
  28452. "additionalProperties": false
  28453. }
  28454. },
  28455. "required": ["id", "type", "data"],
  28456. "additionalProperties": false
  28457. },
  28458. "V2EventMessageUpdated": {
  28459. "type": "object",
  28460. "properties": {
  28461. "id": {
  28462. "type": "string",
  28463. "pattern": "^evt_"
  28464. },
  28465. "metadata": {
  28466. "type": "object"
  28467. },
  28468. "durable": {
  28469. "type": "object",
  28470. "properties": {
  28471. "aggregateID": {
  28472. "type": "string"
  28473. },
  28474. "seq": {
  28475. "type": "integer"
  28476. },
  28477. "version": {
  28478. "type": "integer"
  28479. }
  28480. },
  28481. "required": ["aggregateID", "seq", "version"],
  28482. "additionalProperties": false
  28483. },
  28484. "location": {
  28485. "$ref": "#/components/schemas/LocationRef"
  28486. },
  28487. "type": {
  28488. "type": "string",
  28489. "enum": ["message.updated"]
  28490. },
  28491. "data": {
  28492. "type": "object",
  28493. "properties": {
  28494. "sessionID": {
  28495. "type": "string",
  28496. "pattern": "^ses"
  28497. },
  28498. "info": {
  28499. "$ref": "#/components/schemas/Message"
  28500. }
  28501. },
  28502. "required": ["sessionID", "info"],
  28503. "additionalProperties": false
  28504. }
  28505. },
  28506. "required": ["id", "type", "data"],
  28507. "additionalProperties": false
  28508. },
  28509. "V2EventMessageRemoved": {
  28510. "type": "object",
  28511. "properties": {
  28512. "id": {
  28513. "type": "string",
  28514. "pattern": "^evt_"
  28515. },
  28516. "metadata": {
  28517. "type": "object"
  28518. },
  28519. "durable": {
  28520. "type": "object",
  28521. "properties": {
  28522. "aggregateID": {
  28523. "type": "string"
  28524. },
  28525. "seq": {
  28526. "type": "integer"
  28527. },
  28528. "version": {
  28529. "type": "integer"
  28530. }
  28531. },
  28532. "required": ["aggregateID", "seq", "version"],
  28533. "additionalProperties": false
  28534. },
  28535. "location": {
  28536. "$ref": "#/components/schemas/LocationRef"
  28537. },
  28538. "type": {
  28539. "type": "string",
  28540. "enum": ["message.removed"]
  28541. },
  28542. "data": {
  28543. "type": "object",
  28544. "properties": {
  28545. "sessionID": {
  28546. "type": "string",
  28547. "pattern": "^ses"
  28548. },
  28549. "messageID": {
  28550. "type": "string",
  28551. "pattern": "^msg"
  28552. }
  28553. },
  28554. "required": ["sessionID", "messageID"],
  28555. "additionalProperties": false
  28556. }
  28557. },
  28558. "required": ["id", "type", "data"],
  28559. "additionalProperties": false
  28560. },
  28561. "V2EventMessagePartUpdated": {
  28562. "type": "object",
  28563. "properties": {
  28564. "id": {
  28565. "type": "string",
  28566. "pattern": "^evt_"
  28567. },
  28568. "metadata": {
  28569. "type": "object"
  28570. },
  28571. "durable": {
  28572. "type": "object",
  28573. "properties": {
  28574. "aggregateID": {
  28575. "type": "string"
  28576. },
  28577. "seq": {
  28578. "type": "integer"
  28579. },
  28580. "version": {
  28581. "type": "integer"
  28582. }
  28583. },
  28584. "required": ["aggregateID", "seq", "version"],
  28585. "additionalProperties": false
  28586. },
  28587. "location": {
  28588. "$ref": "#/components/schemas/LocationRef"
  28589. },
  28590. "type": {
  28591. "type": "string",
  28592. "enum": ["message.part.updated"]
  28593. },
  28594. "data": {
  28595. "type": "object",
  28596. "properties": {
  28597. "sessionID": {
  28598. "type": "string",
  28599. "pattern": "^ses"
  28600. },
  28601. "part": {
  28602. "$ref": "#/components/schemas/Part"
  28603. },
  28604. "time": {
  28605. "type": "number"
  28606. }
  28607. },
  28608. "required": ["sessionID", "part", "time"],
  28609. "additionalProperties": false
  28610. }
  28611. },
  28612. "required": ["id", "type", "data"],
  28613. "additionalProperties": false
  28614. },
  28615. "V2EventMessagePartRemoved": {
  28616. "type": "object",
  28617. "properties": {
  28618. "id": {
  28619. "type": "string",
  28620. "pattern": "^evt_"
  28621. },
  28622. "metadata": {
  28623. "type": "object"
  28624. },
  28625. "durable": {
  28626. "type": "object",
  28627. "properties": {
  28628. "aggregateID": {
  28629. "type": "string"
  28630. },
  28631. "seq": {
  28632. "type": "integer"
  28633. },
  28634. "version": {
  28635. "type": "integer"
  28636. }
  28637. },
  28638. "required": ["aggregateID", "seq", "version"],
  28639. "additionalProperties": false
  28640. },
  28641. "location": {
  28642. "$ref": "#/components/schemas/LocationRef"
  28643. },
  28644. "type": {
  28645. "type": "string",
  28646. "enum": ["message.part.removed"]
  28647. },
  28648. "data": {
  28649. "type": "object",
  28650. "properties": {
  28651. "sessionID": {
  28652. "type": "string",
  28653. "pattern": "^ses"
  28654. },
  28655. "messageID": {
  28656. "type": "string",
  28657. "pattern": "^msg"
  28658. },
  28659. "partID": {
  28660. "type": "string",
  28661. "pattern": "^prt"
  28662. }
  28663. },
  28664. "required": ["sessionID", "messageID", "partID"],
  28665. "additionalProperties": false
  28666. }
  28667. },
  28668. "required": ["id", "type", "data"],
  28669. "additionalProperties": false
  28670. },
  28671. "V2EventSessionNextAgentSwitched": {
  28672. "type": "object",
  28673. "properties": {
  28674. "id": {
  28675. "type": "string",
  28676. "pattern": "^evt_"
  28677. },
  28678. "metadata": {
  28679. "type": "object"
  28680. },
  28681. "durable": {
  28682. "type": "object",
  28683. "properties": {
  28684. "aggregateID": {
  28685. "type": "string"
  28686. },
  28687. "seq": {
  28688. "type": "integer"
  28689. },
  28690. "version": {
  28691. "type": "integer"
  28692. }
  28693. },
  28694. "required": ["aggregateID", "seq", "version"],
  28695. "additionalProperties": false
  28696. },
  28697. "location": {
  28698. "$ref": "#/components/schemas/LocationRef"
  28699. },
  28700. "type": {
  28701. "type": "string",
  28702. "enum": ["session.next.agent.switched"]
  28703. },
  28704. "data": {
  28705. "type": "object",
  28706. "properties": {
  28707. "timestamp": {
  28708. "type": "number"
  28709. },
  28710. "sessionID": {
  28711. "type": "string",
  28712. "pattern": "^ses"
  28713. },
  28714. "messageID": {
  28715. "type": "string",
  28716. "pattern": "^msg_"
  28717. },
  28718. "agent": {
  28719. "type": "string"
  28720. }
  28721. },
  28722. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28723. "additionalProperties": false
  28724. }
  28725. },
  28726. "required": ["id", "type", "data"],
  28727. "additionalProperties": false
  28728. },
  28729. "V2EventSessionNextModelSwitched": {
  28730. "type": "object",
  28731. "properties": {
  28732. "id": {
  28733. "type": "string",
  28734. "pattern": "^evt_"
  28735. },
  28736. "metadata": {
  28737. "type": "object"
  28738. },
  28739. "durable": {
  28740. "type": "object",
  28741. "properties": {
  28742. "aggregateID": {
  28743. "type": "string"
  28744. },
  28745. "seq": {
  28746. "type": "integer"
  28747. },
  28748. "version": {
  28749. "type": "integer"
  28750. }
  28751. },
  28752. "required": ["aggregateID", "seq", "version"],
  28753. "additionalProperties": false
  28754. },
  28755. "location": {
  28756. "$ref": "#/components/schemas/LocationRef"
  28757. },
  28758. "type": {
  28759. "type": "string",
  28760. "enum": ["session.next.model.switched"]
  28761. },
  28762. "data": {
  28763. "type": "object",
  28764. "properties": {
  28765. "timestamp": {
  28766. "type": "number"
  28767. },
  28768. "sessionID": {
  28769. "type": "string",
  28770. "pattern": "^ses"
  28771. },
  28772. "messageID": {
  28773. "type": "string",
  28774. "pattern": "^msg_"
  28775. },
  28776. "model": {
  28777. "type": "object",
  28778. "properties": {
  28779. "id": {
  28780. "type": "string"
  28781. },
  28782. "providerID": {
  28783. "type": "string"
  28784. },
  28785. "variant": {
  28786. "type": "string"
  28787. }
  28788. },
  28789. "required": ["id", "providerID"],
  28790. "additionalProperties": false
  28791. }
  28792. },
  28793. "required": ["timestamp", "sessionID", "messageID", "model"],
  28794. "additionalProperties": false
  28795. }
  28796. },
  28797. "required": ["id", "type", "data"],
  28798. "additionalProperties": false
  28799. },
  28800. "V2EventSessionNextMoved": {
  28801. "type": "object",
  28802. "properties": {
  28803. "id": {
  28804. "type": "string",
  28805. "pattern": "^evt_"
  28806. },
  28807. "metadata": {
  28808. "type": "object"
  28809. },
  28810. "durable": {
  28811. "type": "object",
  28812. "properties": {
  28813. "aggregateID": {
  28814. "type": "string"
  28815. },
  28816. "seq": {
  28817. "type": "integer"
  28818. },
  28819. "version": {
  28820. "type": "integer"
  28821. }
  28822. },
  28823. "required": ["aggregateID", "seq", "version"],
  28824. "additionalProperties": false
  28825. },
  28826. "location": {
  28827. "$ref": "#/components/schemas/LocationRef"
  28828. },
  28829. "type": {
  28830. "type": "string",
  28831. "enum": ["session.next.moved"]
  28832. },
  28833. "data": {
  28834. "type": "object",
  28835. "properties": {
  28836. "timestamp": {
  28837. "type": "number"
  28838. },
  28839. "sessionID": {
  28840. "type": "string",
  28841. "pattern": "^ses"
  28842. },
  28843. "location": {
  28844. "$ref": "#/components/schemas/LocationRef"
  28845. },
  28846. "subdirectory": {
  28847. "type": "string"
  28848. }
  28849. },
  28850. "required": ["timestamp", "sessionID", "location"],
  28851. "additionalProperties": false
  28852. }
  28853. },
  28854. "required": ["id", "type", "data"],
  28855. "additionalProperties": false
  28856. },
  28857. "V2EventSessionNextPrompted": {
  28858. "type": "object",
  28859. "properties": {
  28860. "id": {
  28861. "type": "string",
  28862. "pattern": "^evt_"
  28863. },
  28864. "metadata": {
  28865. "type": "object"
  28866. },
  28867. "durable": {
  28868. "type": "object",
  28869. "properties": {
  28870. "aggregateID": {
  28871. "type": "string"
  28872. },
  28873. "seq": {
  28874. "type": "integer"
  28875. },
  28876. "version": {
  28877. "type": "integer"
  28878. }
  28879. },
  28880. "required": ["aggregateID", "seq", "version"],
  28881. "additionalProperties": false
  28882. },
  28883. "location": {
  28884. "$ref": "#/components/schemas/LocationRef"
  28885. },
  28886. "type": {
  28887. "type": "string",
  28888. "enum": ["session.next.prompted"]
  28889. },
  28890. "data": {
  28891. "type": "object",
  28892. "properties": {
  28893. "timestamp": {
  28894. "type": "number"
  28895. },
  28896. "sessionID": {
  28897. "type": "string",
  28898. "pattern": "^ses"
  28899. },
  28900. "messageID": {
  28901. "type": "string",
  28902. "pattern": "^msg_"
  28903. },
  28904. "prompt": {
  28905. "$ref": "#/components/schemas/Prompt"
  28906. },
  28907. "delivery": {
  28908. "type": "string",
  28909. "enum": ["steer", "queue"]
  28910. }
  28911. },
  28912. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28913. "additionalProperties": false
  28914. }
  28915. },
  28916. "required": ["id", "type", "data"],
  28917. "additionalProperties": false
  28918. },
  28919. "V2EventSessionNextPromptAdmitted": {
  28920. "type": "object",
  28921. "properties": {
  28922. "id": {
  28923. "type": "string",
  28924. "pattern": "^evt_"
  28925. },
  28926. "metadata": {
  28927. "type": "object"
  28928. },
  28929. "durable": {
  28930. "type": "object",
  28931. "properties": {
  28932. "aggregateID": {
  28933. "type": "string"
  28934. },
  28935. "seq": {
  28936. "type": "integer"
  28937. },
  28938. "version": {
  28939. "type": "integer"
  28940. }
  28941. },
  28942. "required": ["aggregateID", "seq", "version"],
  28943. "additionalProperties": false
  28944. },
  28945. "location": {
  28946. "$ref": "#/components/schemas/LocationRef"
  28947. },
  28948. "type": {
  28949. "type": "string",
  28950. "enum": ["session.next.prompt.admitted"]
  28951. },
  28952. "data": {
  28953. "type": "object",
  28954. "properties": {
  28955. "timestamp": {
  28956. "type": "number"
  28957. },
  28958. "sessionID": {
  28959. "type": "string",
  28960. "pattern": "^ses"
  28961. },
  28962. "messageID": {
  28963. "type": "string",
  28964. "pattern": "^msg_"
  28965. },
  28966. "prompt": {
  28967. "$ref": "#/components/schemas/Prompt"
  28968. },
  28969. "delivery": {
  28970. "type": "string",
  28971. "enum": ["steer", "queue"]
  28972. }
  28973. },
  28974. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28975. "additionalProperties": false
  28976. }
  28977. },
  28978. "required": ["id", "type", "data"],
  28979. "additionalProperties": false
  28980. },
  28981. "V2EventSessionNextContextUpdated": {
  28982. "type": "object",
  28983. "properties": {
  28984. "id": {
  28985. "type": "string",
  28986. "pattern": "^evt_"
  28987. },
  28988. "metadata": {
  28989. "type": "object"
  28990. },
  28991. "durable": {
  28992. "type": "object",
  28993. "properties": {
  28994. "aggregateID": {
  28995. "type": "string"
  28996. },
  28997. "seq": {
  28998. "type": "integer"
  28999. },
  29000. "version": {
  29001. "type": "integer"
  29002. }
  29003. },
  29004. "required": ["aggregateID", "seq", "version"],
  29005. "additionalProperties": false
  29006. },
  29007. "location": {
  29008. "$ref": "#/components/schemas/LocationRef"
  29009. },
  29010. "type": {
  29011. "type": "string",
  29012. "enum": ["session.next.context.updated"]
  29013. },
  29014. "data": {
  29015. "type": "object",
  29016. "properties": {
  29017. "timestamp": {
  29018. "type": "number"
  29019. },
  29020. "sessionID": {
  29021. "type": "string",
  29022. "pattern": "^ses"
  29023. },
  29024. "messageID": {
  29025. "type": "string",
  29026. "pattern": "^msg_"
  29027. },
  29028. "text": {
  29029. "type": "string"
  29030. }
  29031. },
  29032. "required": ["timestamp", "sessionID", "messageID", "text"],
  29033. "additionalProperties": false
  29034. }
  29035. },
  29036. "required": ["id", "type", "data"],
  29037. "additionalProperties": false
  29038. },
  29039. "V2EventSessionNextSynthetic": {
  29040. "type": "object",
  29041. "properties": {
  29042. "id": {
  29043. "type": "string",
  29044. "pattern": "^evt_"
  29045. },
  29046. "metadata": {
  29047. "type": "object"
  29048. },
  29049. "durable": {
  29050. "type": "object",
  29051. "properties": {
  29052. "aggregateID": {
  29053. "type": "string"
  29054. },
  29055. "seq": {
  29056. "type": "integer"
  29057. },
  29058. "version": {
  29059. "type": "integer"
  29060. }
  29061. },
  29062. "required": ["aggregateID", "seq", "version"],
  29063. "additionalProperties": false
  29064. },
  29065. "location": {
  29066. "$ref": "#/components/schemas/LocationRef"
  29067. },
  29068. "type": {
  29069. "type": "string",
  29070. "enum": ["session.next.synthetic"]
  29071. },
  29072. "data": {
  29073. "type": "object",
  29074. "properties": {
  29075. "timestamp": {
  29076. "type": "number"
  29077. },
  29078. "sessionID": {
  29079. "type": "string",
  29080. "pattern": "^ses"
  29081. },
  29082. "messageID": {
  29083. "type": "string",
  29084. "pattern": "^msg_"
  29085. },
  29086. "text": {
  29087. "type": "string"
  29088. }
  29089. },
  29090. "required": ["timestamp", "sessionID", "messageID", "text"],
  29091. "additionalProperties": false
  29092. }
  29093. },
  29094. "required": ["id", "type", "data"],
  29095. "additionalProperties": false
  29096. },
  29097. "V2EventSessionNextShellStarted": {
  29098. "type": "object",
  29099. "properties": {
  29100. "id": {
  29101. "type": "string",
  29102. "pattern": "^evt_"
  29103. },
  29104. "metadata": {
  29105. "type": "object"
  29106. },
  29107. "durable": {
  29108. "type": "object",
  29109. "properties": {
  29110. "aggregateID": {
  29111. "type": "string"
  29112. },
  29113. "seq": {
  29114. "type": "integer"
  29115. },
  29116. "version": {
  29117. "type": "integer"
  29118. }
  29119. },
  29120. "required": ["aggregateID", "seq", "version"],
  29121. "additionalProperties": false
  29122. },
  29123. "location": {
  29124. "$ref": "#/components/schemas/LocationRef"
  29125. },
  29126. "type": {
  29127. "type": "string",
  29128. "enum": ["session.next.shell.started"]
  29129. },
  29130. "data": {
  29131. "type": "object",
  29132. "properties": {
  29133. "timestamp": {
  29134. "type": "number"
  29135. },
  29136. "sessionID": {
  29137. "type": "string",
  29138. "pattern": "^ses"
  29139. },
  29140. "messageID": {
  29141. "type": "string",
  29142. "pattern": "^msg_"
  29143. },
  29144. "callID": {
  29145. "type": "string"
  29146. },
  29147. "command": {
  29148. "type": "string"
  29149. }
  29150. },
  29151. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  29152. "additionalProperties": false
  29153. }
  29154. },
  29155. "required": ["id", "type", "data"],
  29156. "additionalProperties": false
  29157. },
  29158. "V2EventSessionNextShellEnded": {
  29159. "type": "object",
  29160. "properties": {
  29161. "id": {
  29162. "type": "string",
  29163. "pattern": "^evt_"
  29164. },
  29165. "metadata": {
  29166. "type": "object"
  29167. },
  29168. "durable": {
  29169. "type": "object",
  29170. "properties": {
  29171. "aggregateID": {
  29172. "type": "string"
  29173. },
  29174. "seq": {
  29175. "type": "integer"
  29176. },
  29177. "version": {
  29178. "type": "integer"
  29179. }
  29180. },
  29181. "required": ["aggregateID", "seq", "version"],
  29182. "additionalProperties": false
  29183. },
  29184. "location": {
  29185. "$ref": "#/components/schemas/LocationRef"
  29186. },
  29187. "type": {
  29188. "type": "string",
  29189. "enum": ["session.next.shell.ended"]
  29190. },
  29191. "data": {
  29192. "type": "object",
  29193. "properties": {
  29194. "timestamp": {
  29195. "type": "number"
  29196. },
  29197. "sessionID": {
  29198. "type": "string",
  29199. "pattern": "^ses"
  29200. },
  29201. "callID": {
  29202. "type": "string"
  29203. },
  29204. "output": {
  29205. "type": "string"
  29206. }
  29207. },
  29208. "required": ["timestamp", "sessionID", "callID", "output"],
  29209. "additionalProperties": false
  29210. }
  29211. },
  29212. "required": ["id", "type", "data"],
  29213. "additionalProperties": false
  29214. },
  29215. "V2EventSessionNextStepStarted": {
  29216. "type": "object",
  29217. "properties": {
  29218. "id": {
  29219. "type": "string",
  29220. "pattern": "^evt_"
  29221. },
  29222. "metadata": {
  29223. "type": "object"
  29224. },
  29225. "durable": {
  29226. "type": "object",
  29227. "properties": {
  29228. "aggregateID": {
  29229. "type": "string"
  29230. },
  29231. "seq": {
  29232. "type": "integer"
  29233. },
  29234. "version": {
  29235. "type": "integer"
  29236. }
  29237. },
  29238. "required": ["aggregateID", "seq", "version"],
  29239. "additionalProperties": false
  29240. },
  29241. "location": {
  29242. "$ref": "#/components/schemas/LocationRef"
  29243. },
  29244. "type": {
  29245. "type": "string",
  29246. "enum": ["session.next.step.started"]
  29247. },
  29248. "data": {
  29249. "type": "object",
  29250. "properties": {
  29251. "timestamp": {
  29252. "type": "number"
  29253. },
  29254. "sessionID": {
  29255. "type": "string",
  29256. "pattern": "^ses"
  29257. },
  29258. "assistantMessageID": {
  29259. "type": "string",
  29260. "pattern": "^msg_"
  29261. },
  29262. "agent": {
  29263. "type": "string"
  29264. },
  29265. "model": {
  29266. "type": "object",
  29267. "properties": {
  29268. "id": {
  29269. "type": "string"
  29270. },
  29271. "providerID": {
  29272. "type": "string"
  29273. },
  29274. "variant": {
  29275. "type": "string"
  29276. }
  29277. },
  29278. "required": ["id", "providerID"],
  29279. "additionalProperties": false
  29280. },
  29281. "snapshot": {
  29282. "type": "string"
  29283. }
  29284. },
  29285. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  29286. "additionalProperties": false
  29287. }
  29288. },
  29289. "required": ["id", "type", "data"],
  29290. "additionalProperties": false
  29291. },
  29292. "V2EventSessionNextStepEnded": {
  29293. "type": "object",
  29294. "properties": {
  29295. "id": {
  29296. "type": "string",
  29297. "pattern": "^evt_"
  29298. },
  29299. "metadata": {
  29300. "type": "object"
  29301. },
  29302. "durable": {
  29303. "type": "object",
  29304. "properties": {
  29305. "aggregateID": {
  29306. "type": "string"
  29307. },
  29308. "seq": {
  29309. "type": "integer"
  29310. },
  29311. "version": {
  29312. "type": "integer"
  29313. }
  29314. },
  29315. "required": ["aggregateID", "seq", "version"],
  29316. "additionalProperties": false
  29317. },
  29318. "location": {
  29319. "$ref": "#/components/schemas/LocationRef"
  29320. },
  29321. "type": {
  29322. "type": "string",
  29323. "enum": ["session.next.step.ended"]
  29324. },
  29325. "data": {
  29326. "type": "object",
  29327. "properties": {
  29328. "timestamp": {
  29329. "type": "number"
  29330. },
  29331. "sessionID": {
  29332. "type": "string",
  29333. "pattern": "^ses"
  29334. },
  29335. "assistantMessageID": {
  29336. "type": "string",
  29337. "pattern": "^msg_"
  29338. },
  29339. "finish": {
  29340. "type": "string"
  29341. },
  29342. "cost": {
  29343. "type": "number"
  29344. },
  29345. "tokens": {
  29346. "type": "object",
  29347. "properties": {
  29348. "input": {
  29349. "type": "number"
  29350. },
  29351. "output": {
  29352. "type": "number"
  29353. },
  29354. "reasoning": {
  29355. "type": "number"
  29356. },
  29357. "cache": {
  29358. "type": "object",
  29359. "properties": {
  29360. "read": {
  29361. "type": "number"
  29362. },
  29363. "write": {
  29364. "type": "number"
  29365. }
  29366. },
  29367. "required": ["read", "write"],
  29368. "additionalProperties": false
  29369. }
  29370. },
  29371. "required": ["input", "output", "reasoning", "cache"],
  29372. "additionalProperties": false
  29373. },
  29374. "snapshot": {
  29375. "type": "string"
  29376. },
  29377. "files": {
  29378. "type": "array",
  29379. "items": {
  29380. "type": "string"
  29381. }
  29382. }
  29383. },
  29384. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  29385. "additionalProperties": false
  29386. }
  29387. },
  29388. "required": ["id", "type", "data"],
  29389. "additionalProperties": false
  29390. },
  29391. "V2EventSessionNextStepFailed": {
  29392. "type": "object",
  29393. "properties": {
  29394. "id": {
  29395. "type": "string",
  29396. "pattern": "^evt_"
  29397. },
  29398. "metadata": {
  29399. "type": "object"
  29400. },
  29401. "durable": {
  29402. "type": "object",
  29403. "properties": {
  29404. "aggregateID": {
  29405. "type": "string"
  29406. },
  29407. "seq": {
  29408. "type": "integer"
  29409. },
  29410. "version": {
  29411. "type": "integer"
  29412. }
  29413. },
  29414. "required": ["aggregateID", "seq", "version"],
  29415. "additionalProperties": false
  29416. },
  29417. "location": {
  29418. "$ref": "#/components/schemas/LocationRef"
  29419. },
  29420. "type": {
  29421. "type": "string",
  29422. "enum": ["session.next.step.failed"]
  29423. },
  29424. "data": {
  29425. "type": "object",
  29426. "properties": {
  29427. "timestamp": {
  29428. "type": "number"
  29429. },
  29430. "sessionID": {
  29431. "type": "string",
  29432. "pattern": "^ses"
  29433. },
  29434. "assistantMessageID": {
  29435. "type": "string",
  29436. "pattern": "^msg_"
  29437. },
  29438. "error": {
  29439. "$ref": "#/components/schemas/SessionErrorUnknown"
  29440. }
  29441. },
  29442. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  29443. "additionalProperties": false
  29444. }
  29445. },
  29446. "required": ["id", "type", "data"],
  29447. "additionalProperties": false
  29448. },
  29449. "V2EventSessionNextTextStarted": {
  29450. "type": "object",
  29451. "properties": {
  29452. "id": {
  29453. "type": "string",
  29454. "pattern": "^evt_"
  29455. },
  29456. "metadata": {
  29457. "type": "object"
  29458. },
  29459. "durable": {
  29460. "type": "object",
  29461. "properties": {
  29462. "aggregateID": {
  29463. "type": "string"
  29464. },
  29465. "seq": {
  29466. "type": "integer"
  29467. },
  29468. "version": {
  29469. "type": "integer"
  29470. }
  29471. },
  29472. "required": ["aggregateID", "seq", "version"],
  29473. "additionalProperties": false
  29474. },
  29475. "location": {
  29476. "$ref": "#/components/schemas/LocationRef"
  29477. },
  29478. "type": {
  29479. "type": "string",
  29480. "enum": ["session.next.text.started"]
  29481. },
  29482. "data": {
  29483. "type": "object",
  29484. "properties": {
  29485. "timestamp": {
  29486. "type": "number"
  29487. },
  29488. "sessionID": {
  29489. "type": "string",
  29490. "pattern": "^ses"
  29491. },
  29492. "assistantMessageID": {
  29493. "type": "string",
  29494. "pattern": "^msg_"
  29495. },
  29496. "textID": {
  29497. "type": "string"
  29498. }
  29499. },
  29500. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  29501. "additionalProperties": false
  29502. }
  29503. },
  29504. "required": ["id", "type", "data"],
  29505. "additionalProperties": false
  29506. },
  29507. "V2EventSessionNextTextDelta": {
  29508. "type": "object",
  29509. "properties": {
  29510. "id": {
  29511. "type": "string",
  29512. "pattern": "^evt_"
  29513. },
  29514. "metadata": {
  29515. "type": "object"
  29516. },
  29517. "durable": {
  29518. "type": "object",
  29519. "properties": {
  29520. "aggregateID": {
  29521. "type": "string"
  29522. },
  29523. "seq": {
  29524. "type": "integer"
  29525. },
  29526. "version": {
  29527. "type": "integer"
  29528. }
  29529. },
  29530. "required": ["aggregateID", "seq", "version"],
  29531. "additionalProperties": false
  29532. },
  29533. "location": {
  29534. "$ref": "#/components/schemas/LocationRef"
  29535. },
  29536. "type": {
  29537. "type": "string",
  29538. "enum": ["session.next.text.delta"]
  29539. },
  29540. "data": {
  29541. "type": "object",
  29542. "properties": {
  29543. "timestamp": {
  29544. "type": "number"
  29545. },
  29546. "sessionID": {
  29547. "type": "string",
  29548. "pattern": "^ses"
  29549. },
  29550. "assistantMessageID": {
  29551. "type": "string",
  29552. "pattern": "^msg_"
  29553. },
  29554. "textID": {
  29555. "type": "string"
  29556. },
  29557. "delta": {
  29558. "type": "string"
  29559. }
  29560. },
  29561. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  29562. "additionalProperties": false
  29563. }
  29564. },
  29565. "required": ["id", "type", "data"],
  29566. "additionalProperties": false
  29567. },
  29568. "V2EventSessionNextTextEnded": {
  29569. "type": "object",
  29570. "properties": {
  29571. "id": {
  29572. "type": "string",
  29573. "pattern": "^evt_"
  29574. },
  29575. "metadata": {
  29576. "type": "object"
  29577. },
  29578. "durable": {
  29579. "type": "object",
  29580. "properties": {
  29581. "aggregateID": {
  29582. "type": "string"
  29583. },
  29584. "seq": {
  29585. "type": "integer"
  29586. },
  29587. "version": {
  29588. "type": "integer"
  29589. }
  29590. },
  29591. "required": ["aggregateID", "seq", "version"],
  29592. "additionalProperties": false
  29593. },
  29594. "location": {
  29595. "$ref": "#/components/schemas/LocationRef"
  29596. },
  29597. "type": {
  29598. "type": "string",
  29599. "enum": ["session.next.text.ended"]
  29600. },
  29601. "data": {
  29602. "type": "object",
  29603. "properties": {
  29604. "timestamp": {
  29605. "type": "number"
  29606. },
  29607. "sessionID": {
  29608. "type": "string",
  29609. "pattern": "^ses"
  29610. },
  29611. "assistantMessageID": {
  29612. "type": "string",
  29613. "pattern": "^msg_"
  29614. },
  29615. "textID": {
  29616. "type": "string"
  29617. },
  29618. "text": {
  29619. "type": "string"
  29620. }
  29621. },
  29622. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  29623. "additionalProperties": false
  29624. }
  29625. },
  29626. "required": ["id", "type", "data"],
  29627. "additionalProperties": false
  29628. },
  29629. "V2EventSessionNextReasoningStarted": {
  29630. "type": "object",
  29631. "properties": {
  29632. "id": {
  29633. "type": "string",
  29634. "pattern": "^evt_"
  29635. },
  29636. "metadata": {
  29637. "type": "object"
  29638. },
  29639. "durable": {
  29640. "type": "object",
  29641. "properties": {
  29642. "aggregateID": {
  29643. "type": "string"
  29644. },
  29645. "seq": {
  29646. "type": "integer"
  29647. },
  29648. "version": {
  29649. "type": "integer"
  29650. }
  29651. },
  29652. "required": ["aggregateID", "seq", "version"],
  29653. "additionalProperties": false
  29654. },
  29655. "location": {
  29656. "$ref": "#/components/schemas/LocationRef"
  29657. },
  29658. "type": {
  29659. "type": "string",
  29660. "enum": ["session.next.reasoning.started"]
  29661. },
  29662. "data": {
  29663. "type": "object",
  29664. "properties": {
  29665. "timestamp": {
  29666. "type": "number"
  29667. },
  29668. "sessionID": {
  29669. "type": "string",
  29670. "pattern": "^ses"
  29671. },
  29672. "assistantMessageID": {
  29673. "type": "string",
  29674. "pattern": "^msg_"
  29675. },
  29676. "reasoningID": {
  29677. "type": "string"
  29678. },
  29679. "providerMetadata": {
  29680. "type": "object",
  29681. "additionalProperties": {
  29682. "type": "object"
  29683. }
  29684. }
  29685. },
  29686. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29687. "additionalProperties": false
  29688. }
  29689. },
  29690. "required": ["id", "type", "data"],
  29691. "additionalProperties": false
  29692. },
  29693. "V2EventSessionNextReasoningDelta": {
  29694. "type": "object",
  29695. "properties": {
  29696. "id": {
  29697. "type": "string",
  29698. "pattern": "^evt_"
  29699. },
  29700. "metadata": {
  29701. "type": "object"
  29702. },
  29703. "durable": {
  29704. "type": "object",
  29705. "properties": {
  29706. "aggregateID": {
  29707. "type": "string"
  29708. },
  29709. "seq": {
  29710. "type": "integer"
  29711. },
  29712. "version": {
  29713. "type": "integer"
  29714. }
  29715. },
  29716. "required": ["aggregateID", "seq", "version"],
  29717. "additionalProperties": false
  29718. },
  29719. "location": {
  29720. "$ref": "#/components/schemas/LocationRef"
  29721. },
  29722. "type": {
  29723. "type": "string",
  29724. "enum": ["session.next.reasoning.delta"]
  29725. },
  29726. "data": {
  29727. "type": "object",
  29728. "properties": {
  29729. "timestamp": {
  29730. "type": "number"
  29731. },
  29732. "sessionID": {
  29733. "type": "string",
  29734. "pattern": "^ses"
  29735. },
  29736. "assistantMessageID": {
  29737. "type": "string",
  29738. "pattern": "^msg_"
  29739. },
  29740. "reasoningID": {
  29741. "type": "string"
  29742. },
  29743. "delta": {
  29744. "type": "string"
  29745. }
  29746. },
  29747. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  29748. "additionalProperties": false
  29749. }
  29750. },
  29751. "required": ["id", "type", "data"],
  29752. "additionalProperties": false
  29753. },
  29754. "V2EventSessionNextReasoningEnded": {
  29755. "type": "object",
  29756. "properties": {
  29757. "id": {
  29758. "type": "string",
  29759. "pattern": "^evt_"
  29760. },
  29761. "metadata": {
  29762. "type": "object"
  29763. },
  29764. "durable": {
  29765. "type": "object",
  29766. "properties": {
  29767. "aggregateID": {
  29768. "type": "string"
  29769. },
  29770. "seq": {
  29771. "type": "integer"
  29772. },
  29773. "version": {
  29774. "type": "integer"
  29775. }
  29776. },
  29777. "required": ["aggregateID", "seq", "version"],
  29778. "additionalProperties": false
  29779. },
  29780. "location": {
  29781. "$ref": "#/components/schemas/LocationRef"
  29782. },
  29783. "type": {
  29784. "type": "string",
  29785. "enum": ["session.next.reasoning.ended"]
  29786. },
  29787. "data": {
  29788. "type": "object",
  29789. "properties": {
  29790. "timestamp": {
  29791. "type": "number"
  29792. },
  29793. "sessionID": {
  29794. "type": "string",
  29795. "pattern": "^ses"
  29796. },
  29797. "assistantMessageID": {
  29798. "type": "string",
  29799. "pattern": "^msg_"
  29800. },
  29801. "reasoningID": {
  29802. "type": "string"
  29803. },
  29804. "text": {
  29805. "type": "string"
  29806. },
  29807. "providerMetadata": {
  29808. "type": "object",
  29809. "additionalProperties": {
  29810. "type": "object"
  29811. }
  29812. }
  29813. },
  29814. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29815. "additionalProperties": false
  29816. }
  29817. },
  29818. "required": ["id", "type", "data"],
  29819. "additionalProperties": false
  29820. },
  29821. "V2EventSessionNextToolInputStarted": {
  29822. "type": "object",
  29823. "properties": {
  29824. "id": {
  29825. "type": "string",
  29826. "pattern": "^evt_"
  29827. },
  29828. "metadata": {
  29829. "type": "object"
  29830. },
  29831. "durable": {
  29832. "type": "object",
  29833. "properties": {
  29834. "aggregateID": {
  29835. "type": "string"
  29836. },
  29837. "seq": {
  29838. "type": "integer"
  29839. },
  29840. "version": {
  29841. "type": "integer"
  29842. }
  29843. },
  29844. "required": ["aggregateID", "seq", "version"],
  29845. "additionalProperties": false
  29846. },
  29847. "location": {
  29848. "$ref": "#/components/schemas/LocationRef"
  29849. },
  29850. "type": {
  29851. "type": "string",
  29852. "enum": ["session.next.tool.input.started"]
  29853. },
  29854. "data": {
  29855. "type": "object",
  29856. "properties": {
  29857. "timestamp": {
  29858. "type": "number"
  29859. },
  29860. "sessionID": {
  29861. "type": "string",
  29862. "pattern": "^ses"
  29863. },
  29864. "assistantMessageID": {
  29865. "type": "string",
  29866. "pattern": "^msg_"
  29867. },
  29868. "callID": {
  29869. "type": "string"
  29870. },
  29871. "name": {
  29872. "type": "string"
  29873. }
  29874. },
  29875. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  29876. "additionalProperties": false
  29877. }
  29878. },
  29879. "required": ["id", "type", "data"],
  29880. "additionalProperties": false
  29881. },
  29882. "V2EventSessionNextToolInputDelta": {
  29883. "type": "object",
  29884. "properties": {
  29885. "id": {
  29886. "type": "string",
  29887. "pattern": "^evt_"
  29888. },
  29889. "metadata": {
  29890. "type": "object"
  29891. },
  29892. "durable": {
  29893. "type": "object",
  29894. "properties": {
  29895. "aggregateID": {
  29896. "type": "string"
  29897. },
  29898. "seq": {
  29899. "type": "integer"
  29900. },
  29901. "version": {
  29902. "type": "integer"
  29903. }
  29904. },
  29905. "required": ["aggregateID", "seq", "version"],
  29906. "additionalProperties": false
  29907. },
  29908. "location": {
  29909. "$ref": "#/components/schemas/LocationRef"
  29910. },
  29911. "type": {
  29912. "type": "string",
  29913. "enum": ["session.next.tool.input.delta"]
  29914. },
  29915. "data": {
  29916. "type": "object",
  29917. "properties": {
  29918. "timestamp": {
  29919. "type": "number"
  29920. },
  29921. "sessionID": {
  29922. "type": "string",
  29923. "pattern": "^ses"
  29924. },
  29925. "assistantMessageID": {
  29926. "type": "string",
  29927. "pattern": "^msg_"
  29928. },
  29929. "callID": {
  29930. "type": "string"
  29931. },
  29932. "delta": {
  29933. "type": "string"
  29934. }
  29935. },
  29936. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  29937. "additionalProperties": false
  29938. }
  29939. },
  29940. "required": ["id", "type", "data"],
  29941. "additionalProperties": false
  29942. },
  29943. "V2EventSessionNextToolInputEnded": {
  29944. "type": "object",
  29945. "properties": {
  29946. "id": {
  29947. "type": "string",
  29948. "pattern": "^evt_"
  29949. },
  29950. "metadata": {
  29951. "type": "object"
  29952. },
  29953. "durable": {
  29954. "type": "object",
  29955. "properties": {
  29956. "aggregateID": {
  29957. "type": "string"
  29958. },
  29959. "seq": {
  29960. "type": "integer"
  29961. },
  29962. "version": {
  29963. "type": "integer"
  29964. }
  29965. },
  29966. "required": ["aggregateID", "seq", "version"],
  29967. "additionalProperties": false
  29968. },
  29969. "location": {
  29970. "$ref": "#/components/schemas/LocationRef"
  29971. },
  29972. "type": {
  29973. "type": "string",
  29974. "enum": ["session.next.tool.input.ended"]
  29975. },
  29976. "data": {
  29977. "type": "object",
  29978. "properties": {
  29979. "timestamp": {
  29980. "type": "number"
  29981. },
  29982. "sessionID": {
  29983. "type": "string",
  29984. "pattern": "^ses"
  29985. },
  29986. "assistantMessageID": {
  29987. "type": "string",
  29988. "pattern": "^msg_"
  29989. },
  29990. "callID": {
  29991. "type": "string"
  29992. },
  29993. "text": {
  29994. "type": "string"
  29995. }
  29996. },
  29997. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29998. "additionalProperties": false
  29999. }
  30000. },
  30001. "required": ["id", "type", "data"],
  30002. "additionalProperties": false
  30003. },
  30004. "V2EventSessionNextToolCalled": {
  30005. "type": "object",
  30006. "properties": {
  30007. "id": {
  30008. "type": "string",
  30009. "pattern": "^evt_"
  30010. },
  30011. "metadata": {
  30012. "type": "object"
  30013. },
  30014. "durable": {
  30015. "type": "object",
  30016. "properties": {
  30017. "aggregateID": {
  30018. "type": "string"
  30019. },
  30020. "seq": {
  30021. "type": "integer"
  30022. },
  30023. "version": {
  30024. "type": "integer"
  30025. }
  30026. },
  30027. "required": ["aggregateID", "seq", "version"],
  30028. "additionalProperties": false
  30029. },
  30030. "location": {
  30031. "$ref": "#/components/schemas/LocationRef"
  30032. },
  30033. "type": {
  30034. "type": "string",
  30035. "enum": ["session.next.tool.called"]
  30036. },
  30037. "data": {
  30038. "type": "object",
  30039. "properties": {
  30040. "timestamp": {
  30041. "type": "number"
  30042. },
  30043. "sessionID": {
  30044. "type": "string",
  30045. "pattern": "^ses"
  30046. },
  30047. "assistantMessageID": {
  30048. "type": "string",
  30049. "pattern": "^msg_"
  30050. },
  30051. "callID": {
  30052. "type": "string"
  30053. },
  30054. "tool": {
  30055. "type": "string"
  30056. },
  30057. "input": {
  30058. "type": "object"
  30059. },
  30060. "provider": {
  30061. "type": "object",
  30062. "properties": {
  30063. "executed": {
  30064. "type": "boolean"
  30065. },
  30066. "metadata": {
  30067. "type": "object",
  30068. "additionalProperties": {
  30069. "type": "object"
  30070. }
  30071. }
  30072. },
  30073. "required": ["executed"],
  30074. "additionalProperties": false
  30075. }
  30076. },
  30077. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  30078. "additionalProperties": false
  30079. }
  30080. },
  30081. "required": ["id", "type", "data"],
  30082. "additionalProperties": false
  30083. },
  30084. "V2EventSessionNextToolProgress": {
  30085. "type": "object",
  30086. "properties": {
  30087. "id": {
  30088. "type": "string",
  30089. "pattern": "^evt_"
  30090. },
  30091. "metadata": {
  30092. "type": "object"
  30093. },
  30094. "durable": {
  30095. "type": "object",
  30096. "properties": {
  30097. "aggregateID": {
  30098. "type": "string"
  30099. },
  30100. "seq": {
  30101. "type": "integer"
  30102. },
  30103. "version": {
  30104. "type": "integer"
  30105. }
  30106. },
  30107. "required": ["aggregateID", "seq", "version"],
  30108. "additionalProperties": false
  30109. },
  30110. "location": {
  30111. "$ref": "#/components/schemas/LocationRef"
  30112. },
  30113. "type": {
  30114. "type": "string",
  30115. "enum": ["session.next.tool.progress"]
  30116. },
  30117. "data": {
  30118. "type": "object",
  30119. "properties": {
  30120. "timestamp": {
  30121. "type": "number"
  30122. },
  30123. "sessionID": {
  30124. "type": "string",
  30125. "pattern": "^ses"
  30126. },
  30127. "assistantMessageID": {
  30128. "type": "string",
  30129. "pattern": "^msg_"
  30130. },
  30131. "callID": {
  30132. "type": "string"
  30133. },
  30134. "structured": {
  30135. "type": "object"
  30136. },
  30137. "content": {
  30138. "type": "array",
  30139. "items": {
  30140. "anyOf": [
  30141. {
  30142. "$ref": "#/components/schemas/ToolTextContent"
  30143. },
  30144. {
  30145. "$ref": "#/components/schemas/ToolFileContent"
  30146. }
  30147. ]
  30148. }
  30149. }
  30150. },
  30151. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  30152. "additionalProperties": false
  30153. }
  30154. },
  30155. "required": ["id", "type", "data"],
  30156. "additionalProperties": false
  30157. },
  30158. "V2EventSessionNextToolSuccess": {
  30159. "type": "object",
  30160. "properties": {
  30161. "id": {
  30162. "type": "string",
  30163. "pattern": "^evt_"
  30164. },
  30165. "metadata": {
  30166. "type": "object"
  30167. },
  30168. "durable": {
  30169. "type": "object",
  30170. "properties": {
  30171. "aggregateID": {
  30172. "type": "string"
  30173. },
  30174. "seq": {
  30175. "type": "integer"
  30176. },
  30177. "version": {
  30178. "type": "integer"
  30179. }
  30180. },
  30181. "required": ["aggregateID", "seq", "version"],
  30182. "additionalProperties": false
  30183. },
  30184. "location": {
  30185. "$ref": "#/components/schemas/LocationRef"
  30186. },
  30187. "type": {
  30188. "type": "string",
  30189. "enum": ["session.next.tool.success"]
  30190. },
  30191. "data": {
  30192. "type": "object",
  30193. "properties": {
  30194. "timestamp": {
  30195. "type": "number"
  30196. },
  30197. "sessionID": {
  30198. "type": "string",
  30199. "pattern": "^ses"
  30200. },
  30201. "assistantMessageID": {
  30202. "type": "string",
  30203. "pattern": "^msg_"
  30204. },
  30205. "callID": {
  30206. "type": "string"
  30207. },
  30208. "structured": {
  30209. "type": "object"
  30210. },
  30211. "content": {
  30212. "type": "array",
  30213. "items": {
  30214. "anyOf": [
  30215. {
  30216. "$ref": "#/components/schemas/ToolTextContent"
  30217. },
  30218. {
  30219. "$ref": "#/components/schemas/ToolFileContent"
  30220. }
  30221. ]
  30222. }
  30223. },
  30224. "outputPaths": {
  30225. "type": "array",
  30226. "items": {
  30227. "type": "string"
  30228. }
  30229. },
  30230. "result": {},
  30231. "provider": {
  30232. "type": "object",
  30233. "properties": {
  30234. "executed": {
  30235. "type": "boolean"
  30236. },
  30237. "metadata": {
  30238. "type": "object",
  30239. "additionalProperties": {
  30240. "type": "object"
  30241. }
  30242. }
  30243. },
  30244. "required": ["executed"],
  30245. "additionalProperties": false
  30246. }
  30247. },
  30248. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  30249. "additionalProperties": false
  30250. }
  30251. },
  30252. "required": ["id", "type", "data"],
  30253. "additionalProperties": false
  30254. },
  30255. "V2EventSessionNextToolFailed": {
  30256. "type": "object",
  30257. "properties": {
  30258. "id": {
  30259. "type": "string",
  30260. "pattern": "^evt_"
  30261. },
  30262. "metadata": {
  30263. "type": "object"
  30264. },
  30265. "durable": {
  30266. "type": "object",
  30267. "properties": {
  30268. "aggregateID": {
  30269. "type": "string"
  30270. },
  30271. "seq": {
  30272. "type": "integer"
  30273. },
  30274. "version": {
  30275. "type": "integer"
  30276. }
  30277. },
  30278. "required": ["aggregateID", "seq", "version"],
  30279. "additionalProperties": false
  30280. },
  30281. "location": {
  30282. "$ref": "#/components/schemas/LocationRef"
  30283. },
  30284. "type": {
  30285. "type": "string",
  30286. "enum": ["session.next.tool.failed"]
  30287. },
  30288. "data": {
  30289. "type": "object",
  30290. "properties": {
  30291. "timestamp": {
  30292. "type": "number"
  30293. },
  30294. "sessionID": {
  30295. "type": "string",
  30296. "pattern": "^ses"
  30297. },
  30298. "assistantMessageID": {
  30299. "type": "string",
  30300. "pattern": "^msg_"
  30301. },
  30302. "callID": {
  30303. "type": "string"
  30304. },
  30305. "error": {
  30306. "$ref": "#/components/schemas/SessionErrorUnknown"
  30307. },
  30308. "result": {},
  30309. "provider": {
  30310. "type": "object",
  30311. "properties": {
  30312. "executed": {
  30313. "type": "boolean"
  30314. },
  30315. "metadata": {
  30316. "type": "object",
  30317. "additionalProperties": {
  30318. "type": "object"
  30319. }
  30320. }
  30321. },
  30322. "required": ["executed"],
  30323. "additionalProperties": false
  30324. }
  30325. },
  30326. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  30327. "additionalProperties": false
  30328. }
  30329. },
  30330. "required": ["id", "type", "data"],
  30331. "additionalProperties": false
  30332. },
  30333. "V2EventSessionNextRetried": {
  30334. "type": "object",
  30335. "properties": {
  30336. "id": {
  30337. "type": "string",
  30338. "pattern": "^evt_"
  30339. },
  30340. "metadata": {
  30341. "type": "object"
  30342. },
  30343. "durable": {
  30344. "type": "object",
  30345. "properties": {
  30346. "aggregateID": {
  30347. "type": "string"
  30348. },
  30349. "seq": {
  30350. "type": "integer"
  30351. },
  30352. "version": {
  30353. "type": "integer"
  30354. }
  30355. },
  30356. "required": ["aggregateID", "seq", "version"],
  30357. "additionalProperties": false
  30358. },
  30359. "location": {
  30360. "$ref": "#/components/schemas/LocationRef"
  30361. },
  30362. "type": {
  30363. "type": "string",
  30364. "enum": ["session.next.retried"]
  30365. },
  30366. "data": {
  30367. "type": "object",
  30368. "properties": {
  30369. "timestamp": {
  30370. "type": "number"
  30371. },
  30372. "sessionID": {
  30373. "type": "string",
  30374. "pattern": "^ses"
  30375. },
  30376. "attempt": {
  30377. "type": "number"
  30378. },
  30379. "error": {
  30380. "$ref": "#/components/schemas/SessionNextRetry_error"
  30381. }
  30382. },
  30383. "required": ["timestamp", "sessionID", "attempt", "error"],
  30384. "additionalProperties": false
  30385. }
  30386. },
  30387. "required": ["id", "type", "data"],
  30388. "additionalProperties": false
  30389. },
  30390. "V2EventSessionNextCompactionStarted": {
  30391. "type": "object",
  30392. "properties": {
  30393. "id": {
  30394. "type": "string",
  30395. "pattern": "^evt_"
  30396. },
  30397. "metadata": {
  30398. "type": "object"
  30399. },
  30400. "durable": {
  30401. "type": "object",
  30402. "properties": {
  30403. "aggregateID": {
  30404. "type": "string"
  30405. },
  30406. "seq": {
  30407. "type": "integer"
  30408. },
  30409. "version": {
  30410. "type": "integer"
  30411. }
  30412. },
  30413. "required": ["aggregateID", "seq", "version"],
  30414. "additionalProperties": false
  30415. },
  30416. "location": {
  30417. "$ref": "#/components/schemas/LocationRef"
  30418. },
  30419. "type": {
  30420. "type": "string",
  30421. "enum": ["session.next.compaction.started"]
  30422. },
  30423. "data": {
  30424. "type": "object",
  30425. "properties": {
  30426. "timestamp": {
  30427. "type": "number"
  30428. },
  30429. "sessionID": {
  30430. "type": "string",
  30431. "pattern": "^ses"
  30432. },
  30433. "messageID": {
  30434. "type": "string",
  30435. "pattern": "^msg_"
  30436. },
  30437. "reason": {
  30438. "type": "string",
  30439. "enum": ["auto", "manual"]
  30440. }
  30441. },
  30442. "required": ["timestamp", "sessionID", "messageID", "reason"],
  30443. "additionalProperties": false
  30444. }
  30445. },
  30446. "required": ["id", "type", "data"],
  30447. "additionalProperties": false
  30448. },
  30449. "V2EventSessionNextCompactionDelta": {
  30450. "type": "object",
  30451. "properties": {
  30452. "id": {
  30453. "type": "string",
  30454. "pattern": "^evt_"
  30455. },
  30456. "metadata": {
  30457. "type": "object"
  30458. },
  30459. "durable": {
  30460. "type": "object",
  30461. "properties": {
  30462. "aggregateID": {
  30463. "type": "string"
  30464. },
  30465. "seq": {
  30466. "type": "integer"
  30467. },
  30468. "version": {
  30469. "type": "integer"
  30470. }
  30471. },
  30472. "required": ["aggregateID", "seq", "version"],
  30473. "additionalProperties": false
  30474. },
  30475. "location": {
  30476. "$ref": "#/components/schemas/LocationRef"
  30477. },
  30478. "type": {
  30479. "type": "string",
  30480. "enum": ["session.next.compaction.delta"]
  30481. },
  30482. "data": {
  30483. "type": "object",
  30484. "properties": {
  30485. "timestamp": {
  30486. "type": "number"
  30487. },
  30488. "sessionID": {
  30489. "type": "string",
  30490. "pattern": "^ses"
  30491. },
  30492. "messageID": {
  30493. "type": "string",
  30494. "pattern": "^msg_"
  30495. },
  30496. "text": {
  30497. "type": "string"
  30498. }
  30499. },
  30500. "required": ["timestamp", "sessionID", "messageID", "text"],
  30501. "additionalProperties": false
  30502. }
  30503. },
  30504. "required": ["id", "type", "data"],
  30505. "additionalProperties": false
  30506. },
  30507. "V2EventSessionNextCompactionEnded": {
  30508. "type": "object",
  30509. "properties": {
  30510. "id": {
  30511. "type": "string",
  30512. "pattern": "^evt_"
  30513. },
  30514. "metadata": {
  30515. "type": "object"
  30516. },
  30517. "durable": {
  30518. "type": "object",
  30519. "properties": {
  30520. "aggregateID": {
  30521. "type": "string"
  30522. },
  30523. "seq": {
  30524. "type": "integer"
  30525. },
  30526. "version": {
  30527. "type": "integer"
  30528. }
  30529. },
  30530. "required": ["aggregateID", "seq", "version"],
  30531. "additionalProperties": false
  30532. },
  30533. "location": {
  30534. "$ref": "#/components/schemas/LocationRef"
  30535. },
  30536. "type": {
  30537. "type": "string",
  30538. "enum": ["session.next.compaction.ended"]
  30539. },
  30540. "data": {
  30541. "type": "object",
  30542. "properties": {
  30543. "timestamp": {
  30544. "type": "number"
  30545. },
  30546. "sessionID": {
  30547. "type": "string",
  30548. "pattern": "^ses"
  30549. },
  30550. "messageID": {
  30551. "type": "string",
  30552. "pattern": "^msg_"
  30553. },
  30554. "reason": {
  30555. "type": "string",
  30556. "enum": ["auto", "manual"]
  30557. },
  30558. "text": {
  30559. "type": "string"
  30560. },
  30561. "recent": {
  30562. "type": "string"
  30563. }
  30564. },
  30565. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  30566. "additionalProperties": false
  30567. }
  30568. },
  30569. "required": ["id", "type", "data"],
  30570. "additionalProperties": false
  30571. },
  30572. "V2EventSessionNextRevertStaged": {
  30573. "type": "object",
  30574. "properties": {
  30575. "id": {
  30576. "type": "string",
  30577. "pattern": "^evt_"
  30578. },
  30579. "metadata": {
  30580. "type": "object"
  30581. },
  30582. "durable": {
  30583. "type": "object",
  30584. "properties": {
  30585. "aggregateID": {
  30586. "type": "string"
  30587. },
  30588. "seq": {
  30589. "type": "integer"
  30590. },
  30591. "version": {
  30592. "type": "integer"
  30593. }
  30594. },
  30595. "required": ["aggregateID", "seq", "version"],
  30596. "additionalProperties": false
  30597. },
  30598. "location": {
  30599. "$ref": "#/components/schemas/LocationRef"
  30600. },
  30601. "type": {
  30602. "type": "string",
  30603. "enum": ["session.next.revert.staged"]
  30604. },
  30605. "data": {
  30606. "type": "object",
  30607. "properties": {
  30608. "timestamp": {
  30609. "type": "number"
  30610. },
  30611. "sessionID": {
  30612. "type": "string",
  30613. "pattern": "^ses"
  30614. },
  30615. "revert": {
  30616. "type": "object",
  30617. "properties": {
  30618. "messageID": {
  30619. "type": "string",
  30620. "pattern": "^msg_"
  30621. },
  30622. "partID": {
  30623. "type": "string"
  30624. },
  30625. "snapshot": {
  30626. "type": "string"
  30627. },
  30628. "diff": {
  30629. "type": "string"
  30630. },
  30631. "files": {
  30632. "type": "array",
  30633. "items": {
  30634. "$ref": "#/components/schemas/FileDiff"
  30635. }
  30636. }
  30637. },
  30638. "required": ["messageID"],
  30639. "additionalProperties": false
  30640. }
  30641. },
  30642. "required": ["timestamp", "sessionID", "revert"],
  30643. "additionalProperties": false
  30644. }
  30645. },
  30646. "required": ["id", "type", "data"],
  30647. "additionalProperties": false
  30648. },
  30649. "V2EventSessionNextRevertCleared": {
  30650. "type": "object",
  30651. "properties": {
  30652. "id": {
  30653. "type": "string",
  30654. "pattern": "^evt_"
  30655. },
  30656. "metadata": {
  30657. "type": "object"
  30658. },
  30659. "durable": {
  30660. "type": "object",
  30661. "properties": {
  30662. "aggregateID": {
  30663. "type": "string"
  30664. },
  30665. "seq": {
  30666. "type": "integer"
  30667. },
  30668. "version": {
  30669. "type": "integer"
  30670. }
  30671. },
  30672. "required": ["aggregateID", "seq", "version"],
  30673. "additionalProperties": false
  30674. },
  30675. "location": {
  30676. "$ref": "#/components/schemas/LocationRef"
  30677. },
  30678. "type": {
  30679. "type": "string",
  30680. "enum": ["session.next.revert.cleared"]
  30681. },
  30682. "data": {
  30683. "type": "object",
  30684. "properties": {
  30685. "timestamp": {
  30686. "type": "number"
  30687. },
  30688. "sessionID": {
  30689. "type": "string",
  30690. "pattern": "^ses"
  30691. }
  30692. },
  30693. "required": ["timestamp", "sessionID"],
  30694. "additionalProperties": false
  30695. }
  30696. },
  30697. "required": ["id", "type", "data"],
  30698. "additionalProperties": false
  30699. },
  30700. "V2EventSessionNextRevertCommitted": {
  30701. "type": "object",
  30702. "properties": {
  30703. "id": {
  30704. "type": "string",
  30705. "pattern": "^evt_"
  30706. },
  30707. "metadata": {
  30708. "type": "object"
  30709. },
  30710. "durable": {
  30711. "type": "object",
  30712. "properties": {
  30713. "aggregateID": {
  30714. "type": "string"
  30715. },
  30716. "seq": {
  30717. "type": "integer"
  30718. },
  30719. "version": {
  30720. "type": "integer"
  30721. }
  30722. },
  30723. "required": ["aggregateID", "seq", "version"],
  30724. "additionalProperties": false
  30725. },
  30726. "location": {
  30727. "$ref": "#/components/schemas/LocationRef"
  30728. },
  30729. "type": {
  30730. "type": "string",
  30731. "enum": ["session.next.revert.committed"]
  30732. },
  30733. "data": {
  30734. "type": "object",
  30735. "properties": {
  30736. "timestamp": {
  30737. "type": "number"
  30738. },
  30739. "sessionID": {
  30740. "type": "string",
  30741. "pattern": "^ses"
  30742. },
  30743. "messageID": {
  30744. "type": "string",
  30745. "pattern": "^msg_"
  30746. }
  30747. },
  30748. "required": ["timestamp", "sessionID", "messageID"],
  30749. "additionalProperties": false
  30750. }
  30751. },
  30752. "required": ["id", "type", "data"],
  30753. "additionalProperties": false
  30754. },
  30755. "V2EventMessagePartDelta": {
  30756. "type": "object",
  30757. "properties": {
  30758. "id": {
  30759. "type": "string",
  30760. "pattern": "^evt_"
  30761. },
  30762. "metadata": {
  30763. "type": "object"
  30764. },
  30765. "durable": {
  30766. "type": "object",
  30767. "properties": {
  30768. "aggregateID": {
  30769. "type": "string"
  30770. },
  30771. "seq": {
  30772. "type": "integer"
  30773. },
  30774. "version": {
  30775. "type": "integer"
  30776. }
  30777. },
  30778. "required": ["aggregateID", "seq", "version"],
  30779. "additionalProperties": false
  30780. },
  30781. "location": {
  30782. "$ref": "#/components/schemas/LocationRef"
  30783. },
  30784. "type": {
  30785. "type": "string",
  30786. "enum": ["message.part.delta"]
  30787. },
  30788. "data": {
  30789. "type": "object",
  30790. "properties": {
  30791. "sessionID": {
  30792. "type": "string",
  30793. "pattern": "^ses"
  30794. },
  30795. "messageID": {
  30796. "type": "string",
  30797. "pattern": "^msg"
  30798. },
  30799. "partID": {
  30800. "type": "string",
  30801. "pattern": "^prt"
  30802. },
  30803. "field": {
  30804. "type": "string"
  30805. },
  30806. "delta": {
  30807. "type": "string"
  30808. }
  30809. },
  30810. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  30811. "additionalProperties": false
  30812. }
  30813. },
  30814. "required": ["id", "type", "data"],
  30815. "additionalProperties": false
  30816. },
  30817. "V2EventSessionDiff": {
  30818. "type": "object",
  30819. "properties": {
  30820. "id": {
  30821. "type": "string",
  30822. "pattern": "^evt_"
  30823. },
  30824. "metadata": {
  30825. "type": "object"
  30826. },
  30827. "durable": {
  30828. "type": "object",
  30829. "properties": {
  30830. "aggregateID": {
  30831. "type": "string"
  30832. },
  30833. "seq": {
  30834. "type": "integer"
  30835. },
  30836. "version": {
  30837. "type": "integer"
  30838. }
  30839. },
  30840. "required": ["aggregateID", "seq", "version"],
  30841. "additionalProperties": false
  30842. },
  30843. "location": {
  30844. "$ref": "#/components/schemas/LocationRef"
  30845. },
  30846. "type": {
  30847. "type": "string",
  30848. "enum": ["session.diff"]
  30849. },
  30850. "data": {
  30851. "type": "object",
  30852. "properties": {
  30853. "sessionID": {
  30854. "type": "string",
  30855. "pattern": "^ses"
  30856. },
  30857. "diff": {
  30858. "type": "array",
  30859. "items": {
  30860. "$ref": "#/components/schemas/SnapshotFileDiff"
  30861. }
  30862. }
  30863. },
  30864. "required": ["sessionID", "diff"],
  30865. "additionalProperties": false
  30866. }
  30867. },
  30868. "required": ["id", "type", "data"],
  30869. "additionalProperties": false
  30870. },
  30871. "V2EventSessionError": {
  30872. "type": "object",
  30873. "properties": {
  30874. "id": {
  30875. "type": "string",
  30876. "pattern": "^evt_"
  30877. },
  30878. "metadata": {
  30879. "type": "object"
  30880. },
  30881. "durable": {
  30882. "type": "object",
  30883. "properties": {
  30884. "aggregateID": {
  30885. "type": "string"
  30886. },
  30887. "seq": {
  30888. "type": "integer"
  30889. },
  30890. "version": {
  30891. "type": "integer"
  30892. }
  30893. },
  30894. "required": ["aggregateID", "seq", "version"],
  30895. "additionalProperties": false
  30896. },
  30897. "location": {
  30898. "$ref": "#/components/schemas/LocationRef"
  30899. },
  30900. "type": {
  30901. "type": "string",
  30902. "enum": ["session.error"]
  30903. },
  30904. "data": {
  30905. "type": "object",
  30906. "properties": {
  30907. "sessionID": {
  30908. "type": "string",
  30909. "pattern": "^ses"
  30910. },
  30911. "error": {
  30912. "anyOf": [
  30913. {
  30914. "$ref": "#/components/schemas/ProviderAuthError"
  30915. },
  30916. {
  30917. "$ref": "#/components/schemas/UnknownError"
  30918. },
  30919. {
  30920. "$ref": "#/components/schemas/MessageOutputLengthError"
  30921. },
  30922. {
  30923. "$ref": "#/components/schemas/MessageAbortedError"
  30924. },
  30925. {
  30926. "$ref": "#/components/schemas/StructuredOutputError"
  30927. },
  30928. {
  30929. "$ref": "#/components/schemas/ContextOverflowError"
  30930. },
  30931. {
  30932. "$ref": "#/components/schemas/ContentFilterError"
  30933. },
  30934. {
  30935. "$ref": "#/components/schemas/APIError"
  30936. }
  30937. ]
  30938. }
  30939. },
  30940. "additionalProperties": false
  30941. }
  30942. },
  30943. "required": ["id", "type", "data"],
  30944. "additionalProperties": false
  30945. },
  30946. "V2EventInstallationUpdated": {
  30947. "type": "object",
  30948. "properties": {
  30949. "id": {
  30950. "type": "string",
  30951. "pattern": "^evt_"
  30952. },
  30953. "metadata": {
  30954. "type": "object"
  30955. },
  30956. "durable": {
  30957. "type": "object",
  30958. "properties": {
  30959. "aggregateID": {
  30960. "type": "string"
  30961. },
  30962. "seq": {
  30963. "type": "integer"
  30964. },
  30965. "version": {
  30966. "type": "integer"
  30967. }
  30968. },
  30969. "required": ["aggregateID", "seq", "version"],
  30970. "additionalProperties": false
  30971. },
  30972. "location": {
  30973. "$ref": "#/components/schemas/LocationRef"
  30974. },
  30975. "type": {
  30976. "type": "string",
  30977. "enum": ["installation.updated"]
  30978. },
  30979. "data": {
  30980. "type": "object",
  30981. "properties": {
  30982. "version": {
  30983. "type": "string"
  30984. }
  30985. },
  30986. "required": ["version"],
  30987. "additionalProperties": false
  30988. }
  30989. },
  30990. "required": ["id", "type", "data"],
  30991. "additionalProperties": false
  30992. },
  30993. "V2EventInstallationUpdate-available": {
  30994. "type": "object",
  30995. "properties": {
  30996. "id": {
  30997. "type": "string",
  30998. "pattern": "^evt_"
  30999. },
  31000. "metadata": {
  31001. "type": "object"
  31002. },
  31003. "durable": {
  31004. "type": "object",
  31005. "properties": {
  31006. "aggregateID": {
  31007. "type": "string"
  31008. },
  31009. "seq": {
  31010. "type": "integer"
  31011. },
  31012. "version": {
  31013. "type": "integer"
  31014. }
  31015. },
  31016. "required": ["aggregateID", "seq", "version"],
  31017. "additionalProperties": false
  31018. },
  31019. "location": {
  31020. "$ref": "#/components/schemas/LocationRef"
  31021. },
  31022. "type": {
  31023. "type": "string",
  31024. "enum": ["installation.update-available"]
  31025. },
  31026. "data": {
  31027. "type": "object",
  31028. "properties": {
  31029. "version": {
  31030. "type": "string"
  31031. }
  31032. },
  31033. "required": ["version"],
  31034. "additionalProperties": false
  31035. }
  31036. },
  31037. "required": ["id", "type", "data"],
  31038. "additionalProperties": false
  31039. },
  31040. "V2EventFileEdited": {
  31041. "type": "object",
  31042. "properties": {
  31043. "id": {
  31044. "type": "string",
  31045. "pattern": "^evt_"
  31046. },
  31047. "metadata": {
  31048. "type": "object"
  31049. },
  31050. "durable": {
  31051. "type": "object",
  31052. "properties": {
  31053. "aggregateID": {
  31054. "type": "string"
  31055. },
  31056. "seq": {
  31057. "type": "integer"
  31058. },
  31059. "version": {
  31060. "type": "integer"
  31061. }
  31062. },
  31063. "required": ["aggregateID", "seq", "version"],
  31064. "additionalProperties": false
  31065. },
  31066. "location": {
  31067. "$ref": "#/components/schemas/LocationRef"
  31068. },
  31069. "type": {
  31070. "type": "string",
  31071. "enum": ["file.edited"]
  31072. },
  31073. "data": {
  31074. "type": "object",
  31075. "properties": {
  31076. "file": {
  31077. "type": "string"
  31078. }
  31079. },
  31080. "required": ["file"],
  31081. "additionalProperties": false
  31082. }
  31083. },
  31084. "required": ["id", "type", "data"],
  31085. "additionalProperties": false
  31086. },
  31087. "V2EventReferenceUpdated": {
  31088. "type": "object",
  31089. "properties": {
  31090. "id": {
  31091. "type": "string",
  31092. "pattern": "^evt_"
  31093. },
  31094. "metadata": {
  31095. "type": "object"
  31096. },
  31097. "durable": {
  31098. "type": "object",
  31099. "properties": {
  31100. "aggregateID": {
  31101. "type": "string"
  31102. },
  31103. "seq": {
  31104. "type": "integer"
  31105. },
  31106. "version": {
  31107. "type": "integer"
  31108. }
  31109. },
  31110. "required": ["aggregateID", "seq", "version"],
  31111. "additionalProperties": false
  31112. },
  31113. "location": {
  31114. "$ref": "#/components/schemas/LocationRef"
  31115. },
  31116. "type": {
  31117. "type": "string",
  31118. "enum": ["reference.updated"]
  31119. },
  31120. "data": {
  31121. "type": "object",
  31122. "properties": {}
  31123. }
  31124. },
  31125. "required": ["id", "type", "data"],
  31126. "additionalProperties": false
  31127. },
  31128. "V2EventPermissionV2Asked": {
  31129. "type": "object",
  31130. "properties": {
  31131. "id": {
  31132. "type": "string",
  31133. "pattern": "^evt_"
  31134. },
  31135. "metadata": {
  31136. "type": "object"
  31137. },
  31138. "durable": {
  31139. "type": "object",
  31140. "properties": {
  31141. "aggregateID": {
  31142. "type": "string"
  31143. },
  31144. "seq": {
  31145. "type": "integer"
  31146. },
  31147. "version": {
  31148. "type": "integer"
  31149. }
  31150. },
  31151. "required": ["aggregateID", "seq", "version"],
  31152. "additionalProperties": false
  31153. },
  31154. "location": {
  31155. "$ref": "#/components/schemas/LocationRef"
  31156. },
  31157. "type": {
  31158. "type": "string",
  31159. "enum": ["permission.v2.asked"]
  31160. },
  31161. "data": {
  31162. "type": "object",
  31163. "properties": {
  31164. "id": {
  31165. "type": "string",
  31166. "pattern": "^per"
  31167. },
  31168. "sessionID": {
  31169. "type": "string",
  31170. "pattern": "^ses"
  31171. },
  31172. "action": {
  31173. "type": "string"
  31174. },
  31175. "resources": {
  31176. "type": "array",
  31177. "items": {
  31178. "type": "string"
  31179. }
  31180. },
  31181. "save": {
  31182. "type": "array",
  31183. "items": {
  31184. "type": "string"
  31185. }
  31186. },
  31187. "metadata": {
  31188. "type": "object"
  31189. },
  31190. "source": {
  31191. "$ref": "#/components/schemas/PermissionV2Source"
  31192. }
  31193. },
  31194. "required": ["id", "sessionID", "action", "resources"],
  31195. "additionalProperties": false
  31196. }
  31197. },
  31198. "required": ["id", "type", "data"],
  31199. "additionalProperties": false
  31200. },
  31201. "V2EventPermissionV2Replied": {
  31202. "type": "object",
  31203. "properties": {
  31204. "id": {
  31205. "type": "string",
  31206. "pattern": "^evt_"
  31207. },
  31208. "metadata": {
  31209. "type": "object"
  31210. },
  31211. "durable": {
  31212. "type": "object",
  31213. "properties": {
  31214. "aggregateID": {
  31215. "type": "string"
  31216. },
  31217. "seq": {
  31218. "type": "integer"
  31219. },
  31220. "version": {
  31221. "type": "integer"
  31222. }
  31223. },
  31224. "required": ["aggregateID", "seq", "version"],
  31225. "additionalProperties": false
  31226. },
  31227. "location": {
  31228. "$ref": "#/components/schemas/LocationRef"
  31229. },
  31230. "type": {
  31231. "type": "string",
  31232. "enum": ["permission.v2.replied"]
  31233. },
  31234. "data": {
  31235. "type": "object",
  31236. "properties": {
  31237. "sessionID": {
  31238. "type": "string",
  31239. "pattern": "^ses"
  31240. },
  31241. "requestID": {
  31242. "type": "string",
  31243. "pattern": "^per"
  31244. },
  31245. "reply": {
  31246. "$ref": "#/components/schemas/PermissionV2Reply"
  31247. }
  31248. },
  31249. "required": ["sessionID", "requestID", "reply"],
  31250. "additionalProperties": false
  31251. }
  31252. },
  31253. "required": ["id", "type", "data"],
  31254. "additionalProperties": false
  31255. },
  31256. "V2EventPluginAdded": {
  31257. "type": "object",
  31258. "properties": {
  31259. "id": {
  31260. "type": "string",
  31261. "pattern": "^evt_"
  31262. },
  31263. "metadata": {
  31264. "type": "object"
  31265. },
  31266. "durable": {
  31267. "type": "object",
  31268. "properties": {
  31269. "aggregateID": {
  31270. "type": "string"
  31271. },
  31272. "seq": {
  31273. "type": "integer"
  31274. },
  31275. "version": {
  31276. "type": "integer"
  31277. }
  31278. },
  31279. "required": ["aggregateID", "seq", "version"],
  31280. "additionalProperties": false
  31281. },
  31282. "location": {
  31283. "$ref": "#/components/schemas/LocationRef"
  31284. },
  31285. "type": {
  31286. "type": "string",
  31287. "enum": ["plugin.added"]
  31288. },
  31289. "data": {
  31290. "type": "object",
  31291. "properties": {
  31292. "id": {
  31293. "type": "string"
  31294. }
  31295. },
  31296. "required": ["id"],
  31297. "additionalProperties": false
  31298. }
  31299. },
  31300. "required": ["id", "type", "data"],
  31301. "additionalProperties": false
  31302. },
  31303. "V2EventProjectDirectoriesUpdated": {
  31304. "type": "object",
  31305. "properties": {
  31306. "id": {
  31307. "type": "string",
  31308. "pattern": "^evt_"
  31309. },
  31310. "metadata": {
  31311. "type": "object"
  31312. },
  31313. "durable": {
  31314. "type": "object",
  31315. "properties": {
  31316. "aggregateID": {
  31317. "type": "string"
  31318. },
  31319. "seq": {
  31320. "type": "integer"
  31321. },
  31322. "version": {
  31323. "type": "integer"
  31324. }
  31325. },
  31326. "required": ["aggregateID", "seq", "version"],
  31327. "additionalProperties": false
  31328. },
  31329. "location": {
  31330. "$ref": "#/components/schemas/LocationRef"
  31331. },
  31332. "type": {
  31333. "type": "string",
  31334. "enum": ["project.directories.updated"]
  31335. },
  31336. "data": {
  31337. "type": "object",
  31338. "properties": {
  31339. "projectID": {
  31340. "type": "string"
  31341. }
  31342. },
  31343. "required": ["projectID"],
  31344. "additionalProperties": false
  31345. }
  31346. },
  31347. "required": ["id", "type", "data"],
  31348. "additionalProperties": false
  31349. },
  31350. "V2EventFileWatcherUpdated": {
  31351. "type": "object",
  31352. "properties": {
  31353. "id": {
  31354. "type": "string",
  31355. "pattern": "^evt_"
  31356. },
  31357. "metadata": {
  31358. "type": "object"
  31359. },
  31360. "durable": {
  31361. "type": "object",
  31362. "properties": {
  31363. "aggregateID": {
  31364. "type": "string"
  31365. },
  31366. "seq": {
  31367. "type": "integer"
  31368. },
  31369. "version": {
  31370. "type": "integer"
  31371. }
  31372. },
  31373. "required": ["aggregateID", "seq", "version"],
  31374. "additionalProperties": false
  31375. },
  31376. "location": {
  31377. "$ref": "#/components/schemas/LocationRef"
  31378. },
  31379. "type": {
  31380. "type": "string",
  31381. "enum": ["file.watcher.updated"]
  31382. },
  31383. "data": {
  31384. "type": "object",
  31385. "properties": {
  31386. "file": {
  31387. "type": "string"
  31388. },
  31389. "event": {
  31390. "type": "string",
  31391. "enum": ["add", "change", "unlink"]
  31392. }
  31393. },
  31394. "required": ["file", "event"],
  31395. "additionalProperties": false
  31396. }
  31397. },
  31398. "required": ["id", "type", "data"],
  31399. "additionalProperties": false
  31400. },
  31401. "V2EventPtyCreated": {
  31402. "type": "object",
  31403. "properties": {
  31404. "id": {
  31405. "type": "string",
  31406. "pattern": "^evt_"
  31407. },
  31408. "metadata": {
  31409. "type": "object"
  31410. },
  31411. "durable": {
  31412. "type": "object",
  31413. "properties": {
  31414. "aggregateID": {
  31415. "type": "string"
  31416. },
  31417. "seq": {
  31418. "type": "integer"
  31419. },
  31420. "version": {
  31421. "type": "integer"
  31422. }
  31423. },
  31424. "required": ["aggregateID", "seq", "version"],
  31425. "additionalProperties": false
  31426. },
  31427. "location": {
  31428. "$ref": "#/components/schemas/LocationRef"
  31429. },
  31430. "type": {
  31431. "type": "string",
  31432. "enum": ["pty.created"]
  31433. },
  31434. "data": {
  31435. "type": "object",
  31436. "properties": {
  31437. "info": {
  31438. "$ref": "#/components/schemas/Pty"
  31439. }
  31440. },
  31441. "required": ["info"],
  31442. "additionalProperties": false
  31443. }
  31444. },
  31445. "required": ["id", "type", "data"],
  31446. "additionalProperties": false
  31447. },
  31448. "V2EventPtyUpdated": {
  31449. "type": "object",
  31450. "properties": {
  31451. "id": {
  31452. "type": "string",
  31453. "pattern": "^evt_"
  31454. },
  31455. "metadata": {
  31456. "type": "object"
  31457. },
  31458. "durable": {
  31459. "type": "object",
  31460. "properties": {
  31461. "aggregateID": {
  31462. "type": "string"
  31463. },
  31464. "seq": {
  31465. "type": "integer"
  31466. },
  31467. "version": {
  31468. "type": "integer"
  31469. }
  31470. },
  31471. "required": ["aggregateID", "seq", "version"],
  31472. "additionalProperties": false
  31473. },
  31474. "location": {
  31475. "$ref": "#/components/schemas/LocationRef"
  31476. },
  31477. "type": {
  31478. "type": "string",
  31479. "enum": ["pty.updated"]
  31480. },
  31481. "data": {
  31482. "type": "object",
  31483. "properties": {
  31484. "info": {
  31485. "$ref": "#/components/schemas/Pty"
  31486. }
  31487. },
  31488. "required": ["info"],
  31489. "additionalProperties": false
  31490. }
  31491. },
  31492. "required": ["id", "type", "data"],
  31493. "additionalProperties": false
  31494. },
  31495. "V2EventPtyExited": {
  31496. "type": "object",
  31497. "properties": {
  31498. "id": {
  31499. "type": "string",
  31500. "pattern": "^evt_"
  31501. },
  31502. "metadata": {
  31503. "type": "object"
  31504. },
  31505. "durable": {
  31506. "type": "object",
  31507. "properties": {
  31508. "aggregateID": {
  31509. "type": "string"
  31510. },
  31511. "seq": {
  31512. "type": "integer"
  31513. },
  31514. "version": {
  31515. "type": "integer"
  31516. }
  31517. },
  31518. "required": ["aggregateID", "seq", "version"],
  31519. "additionalProperties": false
  31520. },
  31521. "location": {
  31522. "$ref": "#/components/schemas/LocationRef"
  31523. },
  31524. "type": {
  31525. "type": "string",
  31526. "enum": ["pty.exited"]
  31527. },
  31528. "data": {
  31529. "type": "object",
  31530. "properties": {
  31531. "id": {
  31532. "type": "string",
  31533. "pattern": "^pty"
  31534. },
  31535. "exitCode": {
  31536. "type": "integer",
  31537. "minimum": 0
  31538. }
  31539. },
  31540. "required": ["id", "exitCode"],
  31541. "additionalProperties": false
  31542. }
  31543. },
  31544. "required": ["id", "type", "data"],
  31545. "additionalProperties": false
  31546. },
  31547. "V2EventPtyDeleted": {
  31548. "type": "object",
  31549. "properties": {
  31550. "id": {
  31551. "type": "string",
  31552. "pattern": "^evt_"
  31553. },
  31554. "metadata": {
  31555. "type": "object"
  31556. },
  31557. "durable": {
  31558. "type": "object",
  31559. "properties": {
  31560. "aggregateID": {
  31561. "type": "string"
  31562. },
  31563. "seq": {
  31564. "type": "integer"
  31565. },
  31566. "version": {
  31567. "type": "integer"
  31568. }
  31569. },
  31570. "required": ["aggregateID", "seq", "version"],
  31571. "additionalProperties": false
  31572. },
  31573. "location": {
  31574. "$ref": "#/components/schemas/LocationRef"
  31575. },
  31576. "type": {
  31577. "type": "string",
  31578. "enum": ["pty.deleted"]
  31579. },
  31580. "data": {
  31581. "type": "object",
  31582. "properties": {
  31583. "id": {
  31584. "type": "string",
  31585. "pattern": "^pty"
  31586. }
  31587. },
  31588. "required": ["id"],
  31589. "additionalProperties": false
  31590. }
  31591. },
  31592. "required": ["id", "type", "data"],
  31593. "additionalProperties": false
  31594. },
  31595. "V2EventQuestionV2Asked": {
  31596. "type": "object",
  31597. "properties": {
  31598. "id": {
  31599. "type": "string",
  31600. "pattern": "^evt_"
  31601. },
  31602. "metadata": {
  31603. "type": "object"
  31604. },
  31605. "durable": {
  31606. "type": "object",
  31607. "properties": {
  31608. "aggregateID": {
  31609. "type": "string"
  31610. },
  31611. "seq": {
  31612. "type": "integer"
  31613. },
  31614. "version": {
  31615. "type": "integer"
  31616. }
  31617. },
  31618. "required": ["aggregateID", "seq", "version"],
  31619. "additionalProperties": false
  31620. },
  31621. "location": {
  31622. "$ref": "#/components/schemas/LocationRef"
  31623. },
  31624. "type": {
  31625. "type": "string",
  31626. "enum": ["question.v2.asked"]
  31627. },
  31628. "data": {
  31629. "type": "object",
  31630. "properties": {
  31631. "id": {
  31632. "type": "string",
  31633. "pattern": "^que"
  31634. },
  31635. "sessionID": {
  31636. "type": "string",
  31637. "pattern": "^ses"
  31638. },
  31639. "questions": {
  31640. "type": "array",
  31641. "items": {
  31642. "$ref": "#/components/schemas/QuestionV2Info"
  31643. },
  31644. "description": "Questions to ask"
  31645. },
  31646. "tool": {
  31647. "$ref": "#/components/schemas/QuestionV2Tool"
  31648. }
  31649. },
  31650. "required": ["id", "sessionID", "questions"],
  31651. "additionalProperties": false
  31652. }
  31653. },
  31654. "required": ["id", "type", "data"],
  31655. "additionalProperties": false
  31656. },
  31657. "V2EventQuestionV2Replied": {
  31658. "type": "object",
  31659. "properties": {
  31660. "id": {
  31661. "type": "string",
  31662. "pattern": "^evt_"
  31663. },
  31664. "metadata": {
  31665. "type": "object"
  31666. },
  31667. "durable": {
  31668. "type": "object",
  31669. "properties": {
  31670. "aggregateID": {
  31671. "type": "string"
  31672. },
  31673. "seq": {
  31674. "type": "integer"
  31675. },
  31676. "version": {
  31677. "type": "integer"
  31678. }
  31679. },
  31680. "required": ["aggregateID", "seq", "version"],
  31681. "additionalProperties": false
  31682. },
  31683. "location": {
  31684. "$ref": "#/components/schemas/LocationRef"
  31685. },
  31686. "type": {
  31687. "type": "string",
  31688. "enum": ["question.v2.replied"]
  31689. },
  31690. "data": {
  31691. "type": "object",
  31692. "properties": {
  31693. "sessionID": {
  31694. "type": "string",
  31695. "pattern": "^ses"
  31696. },
  31697. "requestID": {
  31698. "type": "string",
  31699. "pattern": "^que"
  31700. },
  31701. "answers": {
  31702. "type": "array",
  31703. "items": {
  31704. "$ref": "#/components/schemas/QuestionV2Answer"
  31705. }
  31706. }
  31707. },
  31708. "required": ["sessionID", "requestID", "answers"],
  31709. "additionalProperties": false
  31710. }
  31711. },
  31712. "required": ["id", "type", "data"],
  31713. "additionalProperties": false
  31714. },
  31715. "V2EventQuestionV2Rejected": {
  31716. "type": "object",
  31717. "properties": {
  31718. "id": {
  31719. "type": "string",
  31720. "pattern": "^evt_"
  31721. },
  31722. "metadata": {
  31723. "type": "object"
  31724. },
  31725. "durable": {
  31726. "type": "object",
  31727. "properties": {
  31728. "aggregateID": {
  31729. "type": "string"
  31730. },
  31731. "seq": {
  31732. "type": "integer"
  31733. },
  31734. "version": {
  31735. "type": "integer"
  31736. }
  31737. },
  31738. "required": ["aggregateID", "seq", "version"],
  31739. "additionalProperties": false
  31740. },
  31741. "location": {
  31742. "$ref": "#/components/schemas/LocationRef"
  31743. },
  31744. "type": {
  31745. "type": "string",
  31746. "enum": ["question.v2.rejected"]
  31747. },
  31748. "data": {
  31749. "type": "object",
  31750. "properties": {
  31751. "sessionID": {
  31752. "type": "string",
  31753. "pattern": "^ses"
  31754. },
  31755. "requestID": {
  31756. "type": "string",
  31757. "pattern": "^que"
  31758. }
  31759. },
  31760. "required": ["sessionID", "requestID"],
  31761. "additionalProperties": false
  31762. }
  31763. },
  31764. "required": ["id", "type", "data"],
  31765. "additionalProperties": false
  31766. },
  31767. "V2EventTodoUpdated": {
  31768. "type": "object",
  31769. "properties": {
  31770. "id": {
  31771. "type": "string",
  31772. "pattern": "^evt_"
  31773. },
  31774. "metadata": {
  31775. "type": "object"
  31776. },
  31777. "durable": {
  31778. "type": "object",
  31779. "properties": {
  31780. "aggregateID": {
  31781. "type": "string"
  31782. },
  31783. "seq": {
  31784. "type": "integer"
  31785. },
  31786. "version": {
  31787. "type": "integer"
  31788. }
  31789. },
  31790. "required": ["aggregateID", "seq", "version"],
  31791. "additionalProperties": false
  31792. },
  31793. "location": {
  31794. "$ref": "#/components/schemas/LocationRef"
  31795. },
  31796. "type": {
  31797. "type": "string",
  31798. "enum": ["todo.updated"]
  31799. },
  31800. "data": {
  31801. "type": "object",
  31802. "properties": {
  31803. "sessionID": {
  31804. "type": "string",
  31805. "pattern": "^ses"
  31806. },
  31807. "todos": {
  31808. "type": "array",
  31809. "items": {
  31810. "$ref": "#/components/schemas/Todo"
  31811. }
  31812. }
  31813. },
  31814. "required": ["sessionID", "todos"],
  31815. "additionalProperties": false
  31816. }
  31817. },
  31818. "required": ["id", "type", "data"],
  31819. "additionalProperties": false
  31820. },
  31821. "V2EventLspUpdated": {
  31822. "type": "object",
  31823. "properties": {
  31824. "id": {
  31825. "type": "string",
  31826. "pattern": "^evt_"
  31827. },
  31828. "metadata": {
  31829. "type": "object"
  31830. },
  31831. "durable": {
  31832. "type": "object",
  31833. "properties": {
  31834. "aggregateID": {
  31835. "type": "string"
  31836. },
  31837. "seq": {
  31838. "type": "integer"
  31839. },
  31840. "version": {
  31841. "type": "integer"
  31842. }
  31843. },
  31844. "required": ["aggregateID", "seq", "version"],
  31845. "additionalProperties": false
  31846. },
  31847. "location": {
  31848. "$ref": "#/components/schemas/LocationRef"
  31849. },
  31850. "type": {
  31851. "type": "string",
  31852. "enum": ["lsp.updated"]
  31853. },
  31854. "data": {
  31855. "type": "object",
  31856. "properties": {}
  31857. }
  31858. },
  31859. "required": ["id", "type", "data"],
  31860. "additionalProperties": false
  31861. },
  31862. "V2EventPermissionAsked": {
  31863. "type": "object",
  31864. "properties": {
  31865. "id": {
  31866. "type": "string",
  31867. "pattern": "^evt_"
  31868. },
  31869. "metadata": {
  31870. "type": "object"
  31871. },
  31872. "durable": {
  31873. "type": "object",
  31874. "properties": {
  31875. "aggregateID": {
  31876. "type": "string"
  31877. },
  31878. "seq": {
  31879. "type": "integer"
  31880. },
  31881. "version": {
  31882. "type": "integer"
  31883. }
  31884. },
  31885. "required": ["aggregateID", "seq", "version"],
  31886. "additionalProperties": false
  31887. },
  31888. "location": {
  31889. "$ref": "#/components/schemas/LocationRef"
  31890. },
  31891. "type": {
  31892. "type": "string",
  31893. "enum": ["permission.asked"]
  31894. },
  31895. "data": {
  31896. "type": "object",
  31897. "properties": {
  31898. "id": {
  31899. "type": "string",
  31900. "pattern": "^per"
  31901. },
  31902. "sessionID": {
  31903. "type": "string",
  31904. "pattern": "^ses"
  31905. },
  31906. "permission": {
  31907. "type": "string"
  31908. },
  31909. "patterns": {
  31910. "type": "array",
  31911. "items": {
  31912. "type": "string"
  31913. }
  31914. },
  31915. "metadata": {
  31916. "type": "object"
  31917. },
  31918. "always": {
  31919. "type": "array",
  31920. "items": {
  31921. "type": "string"
  31922. }
  31923. },
  31924. "tool": {
  31925. "type": "object",
  31926. "properties": {
  31927. "messageID": {
  31928. "type": "string"
  31929. },
  31930. "callID": {
  31931. "type": "string"
  31932. }
  31933. },
  31934. "required": ["messageID", "callID"],
  31935. "additionalProperties": false
  31936. }
  31937. },
  31938. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  31939. "additionalProperties": false
  31940. }
  31941. },
  31942. "required": ["id", "type", "data"],
  31943. "additionalProperties": false
  31944. },
  31945. "V2EventPermissionReplied": {
  31946. "type": "object",
  31947. "properties": {
  31948. "id": {
  31949. "type": "string",
  31950. "pattern": "^evt_"
  31951. },
  31952. "metadata": {
  31953. "type": "object"
  31954. },
  31955. "durable": {
  31956. "type": "object",
  31957. "properties": {
  31958. "aggregateID": {
  31959. "type": "string"
  31960. },
  31961. "seq": {
  31962. "type": "integer"
  31963. },
  31964. "version": {
  31965. "type": "integer"
  31966. }
  31967. },
  31968. "required": ["aggregateID", "seq", "version"],
  31969. "additionalProperties": false
  31970. },
  31971. "location": {
  31972. "$ref": "#/components/schemas/LocationRef"
  31973. },
  31974. "type": {
  31975. "type": "string",
  31976. "enum": ["permission.replied"]
  31977. },
  31978. "data": {
  31979. "type": "object",
  31980. "properties": {
  31981. "sessionID": {
  31982. "type": "string",
  31983. "pattern": "^ses"
  31984. },
  31985. "requestID": {
  31986. "type": "string",
  31987. "pattern": "^per"
  31988. },
  31989. "reply": {
  31990. "type": "string",
  31991. "enum": ["once", "always", "reject"]
  31992. }
  31993. },
  31994. "required": ["sessionID", "requestID", "reply"],
  31995. "additionalProperties": false
  31996. }
  31997. },
  31998. "required": ["id", "type", "data"],
  31999. "additionalProperties": false
  32000. },
  32001. "V2EventTuiPromptAppend": {
  32002. "type": "object",
  32003. "properties": {
  32004. "id": {
  32005. "type": "string",
  32006. "pattern": "^evt_"
  32007. },
  32008. "metadata": {
  32009. "type": "object"
  32010. },
  32011. "durable": {
  32012. "type": "object",
  32013. "properties": {
  32014. "aggregateID": {
  32015. "type": "string"
  32016. },
  32017. "seq": {
  32018. "type": "integer"
  32019. },
  32020. "version": {
  32021. "type": "integer"
  32022. }
  32023. },
  32024. "required": ["aggregateID", "seq", "version"],
  32025. "additionalProperties": false
  32026. },
  32027. "location": {
  32028. "$ref": "#/components/schemas/LocationRef"
  32029. },
  32030. "type": {
  32031. "type": "string",
  32032. "enum": ["tui.prompt.append"]
  32033. },
  32034. "data": {
  32035. "type": "object",
  32036. "properties": {
  32037. "text": {
  32038. "type": "string"
  32039. }
  32040. },
  32041. "required": ["text"],
  32042. "additionalProperties": false
  32043. }
  32044. },
  32045. "required": ["id", "type", "data"],
  32046. "additionalProperties": false
  32047. },
  32048. "V2EventTuiCommandExecute": {
  32049. "type": "object",
  32050. "properties": {
  32051. "id": {
  32052. "type": "string",
  32053. "pattern": "^evt_"
  32054. },
  32055. "metadata": {
  32056. "type": "object"
  32057. },
  32058. "durable": {
  32059. "type": "object",
  32060. "properties": {
  32061. "aggregateID": {
  32062. "type": "string"
  32063. },
  32064. "seq": {
  32065. "type": "integer"
  32066. },
  32067. "version": {
  32068. "type": "integer"
  32069. }
  32070. },
  32071. "required": ["aggregateID", "seq", "version"],
  32072. "additionalProperties": false
  32073. },
  32074. "location": {
  32075. "$ref": "#/components/schemas/LocationRef"
  32076. },
  32077. "type": {
  32078. "type": "string",
  32079. "enum": ["tui.command.execute"]
  32080. },
  32081. "data": {
  32082. "type": "object",
  32083. "properties": {
  32084. "command": {
  32085. "anyOf": [
  32086. {
  32087. "type": "string",
  32088. "enum": [
  32089. "session.list",
  32090. "session.new",
  32091. "session.share",
  32092. "session.interrupt",
  32093. "session.compact",
  32094. "session.page.up",
  32095. "session.page.down",
  32096. "session.line.up",
  32097. "session.line.down",
  32098. "session.half.page.up",
  32099. "session.half.page.down",
  32100. "session.first",
  32101. "session.last",
  32102. "prompt.clear",
  32103. "prompt.submit",
  32104. "agent.cycle"
  32105. ]
  32106. },
  32107. {
  32108. "type": "string"
  32109. }
  32110. ]
  32111. }
  32112. },
  32113. "required": ["command"],
  32114. "additionalProperties": false
  32115. }
  32116. },
  32117. "required": ["id", "type", "data"],
  32118. "additionalProperties": false
  32119. },
  32120. "V2EventTuiToastShow": {
  32121. "type": "object",
  32122. "properties": {
  32123. "id": {
  32124. "type": "string",
  32125. "pattern": "^evt_"
  32126. },
  32127. "metadata": {
  32128. "type": "object"
  32129. },
  32130. "durable": {
  32131. "type": "object",
  32132. "properties": {
  32133. "aggregateID": {
  32134. "type": "string"
  32135. },
  32136. "seq": {
  32137. "type": "integer"
  32138. },
  32139. "version": {
  32140. "type": "integer"
  32141. }
  32142. },
  32143. "required": ["aggregateID", "seq", "version"],
  32144. "additionalProperties": false
  32145. },
  32146. "location": {
  32147. "$ref": "#/components/schemas/LocationRef"
  32148. },
  32149. "type": {
  32150. "type": "string",
  32151. "enum": ["tui.toast.show"]
  32152. },
  32153. "data": {
  32154. "type": "object",
  32155. "properties": {
  32156. "title": {
  32157. "type": "string"
  32158. },
  32159. "message": {
  32160. "type": "string"
  32161. },
  32162. "variant": {
  32163. "type": "string",
  32164. "enum": ["info", "success", "warning", "error"]
  32165. },
  32166. "duration": {
  32167. "type": "integer",
  32168. "exclusiveMinimum": 0
  32169. }
  32170. },
  32171. "required": ["message", "variant"],
  32172. "additionalProperties": false
  32173. }
  32174. },
  32175. "required": ["id", "type", "data"],
  32176. "additionalProperties": false
  32177. },
  32178. "V2EventTuiSessionSelect": {
  32179. "type": "object",
  32180. "properties": {
  32181. "id": {
  32182. "type": "string",
  32183. "pattern": "^evt_"
  32184. },
  32185. "metadata": {
  32186. "type": "object"
  32187. },
  32188. "durable": {
  32189. "type": "object",
  32190. "properties": {
  32191. "aggregateID": {
  32192. "type": "string"
  32193. },
  32194. "seq": {
  32195. "type": "integer"
  32196. },
  32197. "version": {
  32198. "type": "integer"
  32199. }
  32200. },
  32201. "required": ["aggregateID", "seq", "version"],
  32202. "additionalProperties": false
  32203. },
  32204. "location": {
  32205. "$ref": "#/components/schemas/LocationRef"
  32206. },
  32207. "type": {
  32208. "type": "string",
  32209. "enum": ["tui.session.select"]
  32210. },
  32211. "data": {
  32212. "type": "object",
  32213. "properties": {
  32214. "sessionID": {
  32215. "type": "string",
  32216. "pattern": "^ses",
  32217. "description": "Session ID to navigate to"
  32218. }
  32219. },
  32220. "required": ["sessionID"],
  32221. "additionalProperties": false
  32222. }
  32223. },
  32224. "required": ["id", "type", "data"],
  32225. "additionalProperties": false
  32226. },
  32227. "V2EventMcpToolsChanged": {
  32228. "type": "object",
  32229. "properties": {
  32230. "id": {
  32231. "type": "string",
  32232. "pattern": "^evt_"
  32233. },
  32234. "metadata": {
  32235. "type": "object"
  32236. },
  32237. "durable": {
  32238. "type": "object",
  32239. "properties": {
  32240. "aggregateID": {
  32241. "type": "string"
  32242. },
  32243. "seq": {
  32244. "type": "integer"
  32245. },
  32246. "version": {
  32247. "type": "integer"
  32248. }
  32249. },
  32250. "required": ["aggregateID", "seq", "version"],
  32251. "additionalProperties": false
  32252. },
  32253. "location": {
  32254. "$ref": "#/components/schemas/LocationRef"
  32255. },
  32256. "type": {
  32257. "type": "string",
  32258. "enum": ["mcp.tools.changed"]
  32259. },
  32260. "data": {
  32261. "type": "object",
  32262. "properties": {
  32263. "server": {
  32264. "type": "string"
  32265. }
  32266. },
  32267. "required": ["server"],
  32268. "additionalProperties": false
  32269. }
  32270. },
  32271. "required": ["id", "type", "data"],
  32272. "additionalProperties": false
  32273. },
  32274. "V2EventMcpBrowserOpenFailed": {
  32275. "type": "object",
  32276. "properties": {
  32277. "id": {
  32278. "type": "string",
  32279. "pattern": "^evt_"
  32280. },
  32281. "metadata": {
  32282. "type": "object"
  32283. },
  32284. "durable": {
  32285. "type": "object",
  32286. "properties": {
  32287. "aggregateID": {
  32288. "type": "string"
  32289. },
  32290. "seq": {
  32291. "type": "integer"
  32292. },
  32293. "version": {
  32294. "type": "integer"
  32295. }
  32296. },
  32297. "required": ["aggregateID", "seq", "version"],
  32298. "additionalProperties": false
  32299. },
  32300. "location": {
  32301. "$ref": "#/components/schemas/LocationRef"
  32302. },
  32303. "type": {
  32304. "type": "string",
  32305. "enum": ["mcp.browser.open.failed"]
  32306. },
  32307. "data": {
  32308. "type": "object",
  32309. "properties": {
  32310. "mcpName": {
  32311. "type": "string"
  32312. },
  32313. "url": {
  32314. "type": "string"
  32315. }
  32316. },
  32317. "required": ["mcpName", "url"],
  32318. "additionalProperties": false
  32319. }
  32320. },
  32321. "required": ["id", "type", "data"],
  32322. "additionalProperties": false
  32323. },
  32324. "V2EventCommandExecuted": {
  32325. "type": "object",
  32326. "properties": {
  32327. "id": {
  32328. "type": "string",
  32329. "pattern": "^evt_"
  32330. },
  32331. "metadata": {
  32332. "type": "object"
  32333. },
  32334. "durable": {
  32335. "type": "object",
  32336. "properties": {
  32337. "aggregateID": {
  32338. "type": "string"
  32339. },
  32340. "seq": {
  32341. "type": "integer"
  32342. },
  32343. "version": {
  32344. "type": "integer"
  32345. }
  32346. },
  32347. "required": ["aggregateID", "seq", "version"],
  32348. "additionalProperties": false
  32349. },
  32350. "location": {
  32351. "$ref": "#/components/schemas/LocationRef"
  32352. },
  32353. "type": {
  32354. "type": "string",
  32355. "enum": ["command.executed"]
  32356. },
  32357. "data": {
  32358. "type": "object",
  32359. "properties": {
  32360. "name": {
  32361. "type": "string"
  32362. },
  32363. "sessionID": {
  32364. "type": "string",
  32365. "pattern": "^ses"
  32366. },
  32367. "arguments": {
  32368. "type": "string"
  32369. },
  32370. "messageID": {
  32371. "type": "string",
  32372. "pattern": "^msg"
  32373. }
  32374. },
  32375. "required": ["name", "sessionID", "arguments", "messageID"],
  32376. "additionalProperties": false
  32377. }
  32378. },
  32379. "required": ["id", "type", "data"],
  32380. "additionalProperties": false
  32381. },
  32382. "V2EventProjectUpdated": {
  32383. "type": "object",
  32384. "properties": {
  32385. "id": {
  32386. "type": "string",
  32387. "pattern": "^evt_"
  32388. },
  32389. "metadata": {
  32390. "type": "object"
  32391. },
  32392. "durable": {
  32393. "type": "object",
  32394. "properties": {
  32395. "aggregateID": {
  32396. "type": "string"
  32397. },
  32398. "seq": {
  32399. "type": "integer"
  32400. },
  32401. "version": {
  32402. "type": "integer"
  32403. }
  32404. },
  32405. "required": ["aggregateID", "seq", "version"],
  32406. "additionalProperties": false
  32407. },
  32408. "location": {
  32409. "$ref": "#/components/schemas/LocationRef"
  32410. },
  32411. "type": {
  32412. "type": "string",
  32413. "enum": ["project.updated"]
  32414. },
  32415. "data": {
  32416. "type": "object",
  32417. "properties": {
  32418. "id": {
  32419. "type": "string"
  32420. },
  32421. "worktree": {
  32422. "type": "string"
  32423. },
  32424. "vcs": {
  32425. "type": "string",
  32426. "enum": ["git"]
  32427. },
  32428. "name": {
  32429. "type": "string"
  32430. },
  32431. "icon": {
  32432. "type": "object",
  32433. "properties": {
  32434. "url": {
  32435. "type": "string"
  32436. },
  32437. "override": {
  32438. "type": "string"
  32439. },
  32440. "color": {
  32441. "type": "string"
  32442. }
  32443. },
  32444. "additionalProperties": false
  32445. },
  32446. "commands": {
  32447. "type": "object",
  32448. "properties": {
  32449. "start": {
  32450. "type": "string",
  32451. "description": "Startup script to run when creating a new workspace (worktree)"
  32452. }
  32453. },
  32454. "additionalProperties": false
  32455. },
  32456. "time": {
  32457. "type": "object",
  32458. "properties": {
  32459. "created": {
  32460. "type": "integer",
  32461. "minimum": 0
  32462. },
  32463. "updated": {
  32464. "type": "integer",
  32465. "minimum": 0
  32466. },
  32467. "initialized": {
  32468. "type": "integer",
  32469. "minimum": 0
  32470. }
  32471. },
  32472. "required": ["created", "updated"],
  32473. "additionalProperties": false
  32474. },
  32475. "sandboxes": {
  32476. "type": "array",
  32477. "items": {
  32478. "type": "string"
  32479. }
  32480. }
  32481. },
  32482. "required": ["id", "worktree", "time", "sandboxes"],
  32483. "additionalProperties": false
  32484. }
  32485. },
  32486. "required": ["id", "type", "data"],
  32487. "additionalProperties": false
  32488. },
  32489. "V2EventSessionStatus": {
  32490. "type": "object",
  32491. "properties": {
  32492. "id": {
  32493. "type": "string",
  32494. "pattern": "^evt_"
  32495. },
  32496. "metadata": {
  32497. "type": "object"
  32498. },
  32499. "durable": {
  32500. "type": "object",
  32501. "properties": {
  32502. "aggregateID": {
  32503. "type": "string"
  32504. },
  32505. "seq": {
  32506. "type": "integer"
  32507. },
  32508. "version": {
  32509. "type": "integer"
  32510. }
  32511. },
  32512. "required": ["aggregateID", "seq", "version"],
  32513. "additionalProperties": false
  32514. },
  32515. "location": {
  32516. "$ref": "#/components/schemas/LocationRef"
  32517. },
  32518. "type": {
  32519. "type": "string",
  32520. "enum": ["session.status"]
  32521. },
  32522. "data": {
  32523. "type": "object",
  32524. "properties": {
  32525. "sessionID": {
  32526. "type": "string",
  32527. "pattern": "^ses"
  32528. },
  32529. "status": {
  32530. "$ref": "#/components/schemas/SessionStatus"
  32531. }
  32532. },
  32533. "required": ["sessionID", "status"],
  32534. "additionalProperties": false
  32535. }
  32536. },
  32537. "required": ["id", "type", "data"],
  32538. "additionalProperties": false
  32539. },
  32540. "V2EventSessionIdle": {
  32541. "type": "object",
  32542. "properties": {
  32543. "id": {
  32544. "type": "string",
  32545. "pattern": "^evt_"
  32546. },
  32547. "metadata": {
  32548. "type": "object"
  32549. },
  32550. "durable": {
  32551. "type": "object",
  32552. "properties": {
  32553. "aggregateID": {
  32554. "type": "string"
  32555. },
  32556. "seq": {
  32557. "type": "integer"
  32558. },
  32559. "version": {
  32560. "type": "integer"
  32561. }
  32562. },
  32563. "required": ["aggregateID", "seq", "version"],
  32564. "additionalProperties": false
  32565. },
  32566. "location": {
  32567. "$ref": "#/components/schemas/LocationRef"
  32568. },
  32569. "type": {
  32570. "type": "string",
  32571. "enum": ["session.idle"]
  32572. },
  32573. "data": {
  32574. "type": "object",
  32575. "properties": {
  32576. "sessionID": {
  32577. "type": "string",
  32578. "pattern": "^ses"
  32579. }
  32580. },
  32581. "required": ["sessionID"],
  32582. "additionalProperties": false
  32583. }
  32584. },
  32585. "required": ["id", "type", "data"],
  32586. "additionalProperties": false
  32587. },
  32588. "V2EventQuestionAsked": {
  32589. "type": "object",
  32590. "properties": {
  32591. "id": {
  32592. "type": "string",
  32593. "pattern": "^evt_"
  32594. },
  32595. "metadata": {
  32596. "type": "object"
  32597. },
  32598. "durable": {
  32599. "type": "object",
  32600. "properties": {
  32601. "aggregateID": {
  32602. "type": "string"
  32603. },
  32604. "seq": {
  32605. "type": "integer"
  32606. },
  32607. "version": {
  32608. "type": "integer"
  32609. }
  32610. },
  32611. "required": ["aggregateID", "seq", "version"],
  32612. "additionalProperties": false
  32613. },
  32614. "location": {
  32615. "$ref": "#/components/schemas/LocationRef"
  32616. },
  32617. "type": {
  32618. "type": "string",
  32619. "enum": ["question.asked"]
  32620. },
  32621. "data": {
  32622. "type": "object",
  32623. "properties": {
  32624. "id": {
  32625. "type": "string",
  32626. "pattern": "^que"
  32627. },
  32628. "sessionID": {
  32629. "type": "string",
  32630. "pattern": "^ses"
  32631. },
  32632. "questions": {
  32633. "type": "array",
  32634. "items": {
  32635. "$ref": "#/components/schemas/QuestionInfo"
  32636. },
  32637. "description": "Questions to ask"
  32638. },
  32639. "tool": {
  32640. "$ref": "#/components/schemas/QuestionTool"
  32641. }
  32642. },
  32643. "required": ["id", "sessionID", "questions"],
  32644. "additionalProperties": false
  32645. }
  32646. },
  32647. "required": ["id", "type", "data"],
  32648. "additionalProperties": false
  32649. },
  32650. "V2EventQuestionReplied": {
  32651. "type": "object",
  32652. "properties": {
  32653. "id": {
  32654. "type": "string",
  32655. "pattern": "^evt_"
  32656. },
  32657. "metadata": {
  32658. "type": "object"
  32659. },
  32660. "durable": {
  32661. "type": "object",
  32662. "properties": {
  32663. "aggregateID": {
  32664. "type": "string"
  32665. },
  32666. "seq": {
  32667. "type": "integer"
  32668. },
  32669. "version": {
  32670. "type": "integer"
  32671. }
  32672. },
  32673. "required": ["aggregateID", "seq", "version"],
  32674. "additionalProperties": false
  32675. },
  32676. "location": {
  32677. "$ref": "#/components/schemas/LocationRef"
  32678. },
  32679. "type": {
  32680. "type": "string",
  32681. "enum": ["question.replied"]
  32682. },
  32683. "data": {
  32684. "type": "object",
  32685. "properties": {
  32686. "sessionID": {
  32687. "type": "string",
  32688. "pattern": "^ses"
  32689. },
  32690. "requestID": {
  32691. "type": "string",
  32692. "pattern": "^que"
  32693. },
  32694. "answers": {
  32695. "type": "array",
  32696. "items": {
  32697. "$ref": "#/components/schemas/QuestionAnswer"
  32698. }
  32699. }
  32700. },
  32701. "required": ["sessionID", "requestID", "answers"],
  32702. "additionalProperties": false
  32703. }
  32704. },
  32705. "required": ["id", "type", "data"],
  32706. "additionalProperties": false
  32707. },
  32708. "V2EventQuestionRejected": {
  32709. "type": "object",
  32710. "properties": {
  32711. "id": {
  32712. "type": "string",
  32713. "pattern": "^evt_"
  32714. },
  32715. "metadata": {
  32716. "type": "object"
  32717. },
  32718. "durable": {
  32719. "type": "object",
  32720. "properties": {
  32721. "aggregateID": {
  32722. "type": "string"
  32723. },
  32724. "seq": {
  32725. "type": "integer"
  32726. },
  32727. "version": {
  32728. "type": "integer"
  32729. }
  32730. },
  32731. "required": ["aggregateID", "seq", "version"],
  32732. "additionalProperties": false
  32733. },
  32734. "location": {
  32735. "$ref": "#/components/schemas/LocationRef"
  32736. },
  32737. "type": {
  32738. "type": "string",
  32739. "enum": ["question.rejected"]
  32740. },
  32741. "data": {
  32742. "type": "object",
  32743. "properties": {
  32744. "sessionID": {
  32745. "type": "string",
  32746. "pattern": "^ses"
  32747. },
  32748. "requestID": {
  32749. "type": "string",
  32750. "pattern": "^que"
  32751. }
  32752. },
  32753. "required": ["sessionID", "requestID"],
  32754. "additionalProperties": false
  32755. }
  32756. },
  32757. "required": ["id", "type", "data"],
  32758. "additionalProperties": false
  32759. },
  32760. "V2EventSessionCompacted": {
  32761. "type": "object",
  32762. "properties": {
  32763. "id": {
  32764. "type": "string",
  32765. "pattern": "^evt_"
  32766. },
  32767. "metadata": {
  32768. "type": "object"
  32769. },
  32770. "durable": {
  32771. "type": "object",
  32772. "properties": {
  32773. "aggregateID": {
  32774. "type": "string"
  32775. },
  32776. "seq": {
  32777. "type": "integer"
  32778. },
  32779. "version": {
  32780. "type": "integer"
  32781. }
  32782. },
  32783. "required": ["aggregateID", "seq", "version"],
  32784. "additionalProperties": false
  32785. },
  32786. "location": {
  32787. "$ref": "#/components/schemas/LocationRef"
  32788. },
  32789. "type": {
  32790. "type": "string",
  32791. "enum": ["session.compacted"]
  32792. },
  32793. "data": {
  32794. "type": "object",
  32795. "properties": {
  32796. "sessionID": {
  32797. "type": "string",
  32798. "pattern": "^ses"
  32799. }
  32800. },
  32801. "required": ["sessionID"],
  32802. "additionalProperties": false
  32803. }
  32804. },
  32805. "required": ["id", "type", "data"],
  32806. "additionalProperties": false
  32807. },
  32808. "V2EventVcsBranchUpdated": {
  32809. "type": "object",
  32810. "properties": {
  32811. "id": {
  32812. "type": "string",
  32813. "pattern": "^evt_"
  32814. },
  32815. "metadata": {
  32816. "type": "object"
  32817. },
  32818. "durable": {
  32819. "type": "object",
  32820. "properties": {
  32821. "aggregateID": {
  32822. "type": "string"
  32823. },
  32824. "seq": {
  32825. "type": "integer"
  32826. },
  32827. "version": {
  32828. "type": "integer"
  32829. }
  32830. },
  32831. "required": ["aggregateID", "seq", "version"],
  32832. "additionalProperties": false
  32833. },
  32834. "location": {
  32835. "$ref": "#/components/schemas/LocationRef"
  32836. },
  32837. "type": {
  32838. "type": "string",
  32839. "enum": ["vcs.branch.updated"]
  32840. },
  32841. "data": {
  32842. "type": "object",
  32843. "properties": {
  32844. "branch": {
  32845. "type": "string"
  32846. }
  32847. },
  32848. "additionalProperties": false
  32849. }
  32850. },
  32851. "required": ["id", "type", "data"],
  32852. "additionalProperties": false
  32853. },
  32854. "V2EventWorkspaceReady": {
  32855. "type": "object",
  32856. "properties": {
  32857. "id": {
  32858. "type": "string",
  32859. "pattern": "^evt_"
  32860. },
  32861. "metadata": {
  32862. "type": "object"
  32863. },
  32864. "durable": {
  32865. "type": "object",
  32866. "properties": {
  32867. "aggregateID": {
  32868. "type": "string"
  32869. },
  32870. "seq": {
  32871. "type": "integer"
  32872. },
  32873. "version": {
  32874. "type": "integer"
  32875. }
  32876. },
  32877. "required": ["aggregateID", "seq", "version"],
  32878. "additionalProperties": false
  32879. },
  32880. "location": {
  32881. "$ref": "#/components/schemas/LocationRef"
  32882. },
  32883. "type": {
  32884. "type": "string",
  32885. "enum": ["workspace.ready"]
  32886. },
  32887. "data": {
  32888. "type": "object",
  32889. "properties": {
  32890. "name": {
  32891. "type": "string"
  32892. }
  32893. },
  32894. "required": ["name"],
  32895. "additionalProperties": false
  32896. }
  32897. },
  32898. "required": ["id", "type", "data"],
  32899. "additionalProperties": false
  32900. },
  32901. "V2EventWorkspaceFailed": {
  32902. "type": "object",
  32903. "properties": {
  32904. "id": {
  32905. "type": "string",
  32906. "pattern": "^evt_"
  32907. },
  32908. "metadata": {
  32909. "type": "object"
  32910. },
  32911. "durable": {
  32912. "type": "object",
  32913. "properties": {
  32914. "aggregateID": {
  32915. "type": "string"
  32916. },
  32917. "seq": {
  32918. "type": "integer"
  32919. },
  32920. "version": {
  32921. "type": "integer"
  32922. }
  32923. },
  32924. "required": ["aggregateID", "seq", "version"],
  32925. "additionalProperties": false
  32926. },
  32927. "location": {
  32928. "$ref": "#/components/schemas/LocationRef"
  32929. },
  32930. "type": {
  32931. "type": "string",
  32932. "enum": ["workspace.failed"]
  32933. },
  32934. "data": {
  32935. "type": "object",
  32936. "properties": {
  32937. "message": {
  32938. "type": "string"
  32939. }
  32940. },
  32941. "required": ["message"],
  32942. "additionalProperties": false
  32943. }
  32944. },
  32945. "required": ["id", "type", "data"],
  32946. "additionalProperties": false
  32947. },
  32948. "V2EventWorkspaceStatus": {
  32949. "type": "object",
  32950. "properties": {
  32951. "id": {
  32952. "type": "string",
  32953. "pattern": "^evt_"
  32954. },
  32955. "metadata": {
  32956. "type": "object"
  32957. },
  32958. "durable": {
  32959. "type": "object",
  32960. "properties": {
  32961. "aggregateID": {
  32962. "type": "string"
  32963. },
  32964. "seq": {
  32965. "type": "integer"
  32966. },
  32967. "version": {
  32968. "type": "integer"
  32969. }
  32970. },
  32971. "required": ["aggregateID", "seq", "version"],
  32972. "additionalProperties": false
  32973. },
  32974. "location": {
  32975. "$ref": "#/components/schemas/LocationRef"
  32976. },
  32977. "type": {
  32978. "type": "string",
  32979. "enum": ["workspace.status"]
  32980. },
  32981. "data": {
  32982. "type": "object",
  32983. "properties": {
  32984. "workspaceID": {
  32985. "type": "string",
  32986. "pattern": "^wrk"
  32987. },
  32988. "status": {
  32989. "type": "string",
  32990. "enum": ["connected", "connecting", "disconnected", "error"]
  32991. }
  32992. },
  32993. "required": ["workspaceID", "status"],
  32994. "additionalProperties": false
  32995. }
  32996. },
  32997. "required": ["id", "type", "data"],
  32998. "additionalProperties": false
  32999. },
  33000. "V2EventWorktreeReady": {
  33001. "type": "object",
  33002. "properties": {
  33003. "id": {
  33004. "type": "string",
  33005. "pattern": "^evt_"
  33006. },
  33007. "metadata": {
  33008. "type": "object"
  33009. },
  33010. "durable": {
  33011. "type": "object",
  33012. "properties": {
  33013. "aggregateID": {
  33014. "type": "string"
  33015. },
  33016. "seq": {
  33017. "type": "integer"
  33018. },
  33019. "version": {
  33020. "type": "integer"
  33021. }
  33022. },
  33023. "required": ["aggregateID", "seq", "version"],
  33024. "additionalProperties": false
  33025. },
  33026. "location": {
  33027. "$ref": "#/components/schemas/LocationRef"
  33028. },
  33029. "type": {
  33030. "type": "string",
  33031. "enum": ["worktree.ready"]
  33032. },
  33033. "data": {
  33034. "type": "object",
  33035. "properties": {
  33036. "name": {
  33037. "type": "string"
  33038. },
  33039. "branch": {
  33040. "type": "string"
  33041. }
  33042. },
  33043. "required": ["name"],
  33044. "additionalProperties": false
  33045. }
  33046. },
  33047. "required": ["id", "type", "data"],
  33048. "additionalProperties": false
  33049. },
  33050. "V2EventWorktreeFailed": {
  33051. "type": "object",
  33052. "properties": {
  33053. "id": {
  33054. "type": "string",
  33055. "pattern": "^evt_"
  33056. },
  33057. "metadata": {
  33058. "type": "object"
  33059. },
  33060. "durable": {
  33061. "type": "object",
  33062. "properties": {
  33063. "aggregateID": {
  33064. "type": "string"
  33065. },
  33066. "seq": {
  33067. "type": "integer"
  33068. },
  33069. "version": {
  33070. "type": "integer"
  33071. }
  33072. },
  33073. "required": ["aggregateID", "seq", "version"],
  33074. "additionalProperties": false
  33075. },
  33076. "location": {
  33077. "$ref": "#/components/schemas/LocationRef"
  33078. },
  33079. "type": {
  33080. "type": "string",
  33081. "enum": ["worktree.failed"]
  33082. },
  33083. "data": {
  33084. "type": "object",
  33085. "properties": {
  33086. "message": {
  33087. "type": "string"
  33088. }
  33089. },
  33090. "required": ["message"],
  33091. "additionalProperties": false
  33092. }
  33093. },
  33094. "required": ["id", "type", "data"],
  33095. "additionalProperties": false
  33096. },
  33097. "V2EventServerConnected": {
  33098. "type": "object",
  33099. "properties": {
  33100. "id": {
  33101. "type": "string",
  33102. "pattern": "^evt_"
  33103. },
  33104. "metadata": {
  33105. "type": "object"
  33106. },
  33107. "durable": {
  33108. "type": "object",
  33109. "properties": {
  33110. "aggregateID": {
  33111. "type": "string"
  33112. },
  33113. "seq": {
  33114. "type": "integer"
  33115. },
  33116. "version": {
  33117. "type": "integer"
  33118. }
  33119. },
  33120. "required": ["aggregateID", "seq", "version"],
  33121. "additionalProperties": false
  33122. },
  33123. "location": {
  33124. "$ref": "#/components/schemas/LocationRef"
  33125. },
  33126. "type": {
  33127. "type": "string",
  33128. "enum": ["server.connected"]
  33129. },
  33130. "data": {
  33131. "type": "object",
  33132. "properties": {}
  33133. }
  33134. },
  33135. "required": ["id", "type", "data"],
  33136. "additionalProperties": false
  33137. },
  33138. "V2EventGlobalDisposed": {
  33139. "type": "object",
  33140. "properties": {
  33141. "id": {
  33142. "type": "string",
  33143. "pattern": "^evt_"
  33144. },
  33145. "metadata": {
  33146. "type": "object"
  33147. },
  33148. "durable": {
  33149. "type": "object",
  33150. "properties": {
  33151. "aggregateID": {
  33152. "type": "string"
  33153. },
  33154. "seq": {
  33155. "type": "integer"
  33156. },
  33157. "version": {
  33158. "type": "integer"
  33159. }
  33160. },
  33161. "required": ["aggregateID", "seq", "version"],
  33162. "additionalProperties": false
  33163. },
  33164. "location": {
  33165. "$ref": "#/components/schemas/LocationRef"
  33166. },
  33167. "type": {
  33168. "type": "string",
  33169. "enum": ["global.disposed"]
  33170. },
  33171. "data": {
  33172. "type": "object",
  33173. "properties": {}
  33174. }
  33175. },
  33176. "required": ["id", "type", "data"],
  33177. "additionalProperties": false
  33178. },
  33179. "QuestionV2Request": {
  33180. "type": "object",
  33181. "properties": {
  33182. "id": {
  33183. "type": "string",
  33184. "pattern": "^que"
  33185. },
  33186. "sessionID": {
  33187. "type": "string",
  33188. "pattern": "^ses"
  33189. },
  33190. "questions": {
  33191. "type": "array",
  33192. "items": {
  33193. "$ref": "#/components/schemas/QuestionV2Info"
  33194. },
  33195. "description": "Questions to ask"
  33196. },
  33197. "tool": {
  33198. "$ref": "#/components/schemas/QuestionV2Tool"
  33199. }
  33200. },
  33201. "required": ["id", "sessionID", "questions"],
  33202. "additionalProperties": false
  33203. },
  33204. "QuestionV2Reply": {
  33205. "type": "object",
  33206. "properties": {
  33207. "answers": {
  33208. "type": "array",
  33209. "items": {
  33210. "$ref": "#/components/schemas/QuestionV2Answer"
  33211. },
  33212. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33213. }
  33214. },
  33215. "required": ["answers"],
  33216. "additionalProperties": false
  33217. },
  33218. "ReferenceLocalSource": {
  33219. "type": "object",
  33220. "properties": {
  33221. "type": {
  33222. "type": "string",
  33223. "enum": ["local"]
  33224. },
  33225. "path": {
  33226. "type": "string"
  33227. },
  33228. "description": {
  33229. "type": "string"
  33230. },
  33231. "hidden": {
  33232. "type": "boolean"
  33233. }
  33234. },
  33235. "required": ["type", "path"],
  33236. "additionalProperties": false
  33237. },
  33238. "ReferenceGitSource": {
  33239. "type": "object",
  33240. "properties": {
  33241. "type": {
  33242. "type": "string",
  33243. "enum": ["git"]
  33244. },
  33245. "repository": {
  33246. "type": "string"
  33247. },
  33248. "branch": {
  33249. "type": "string"
  33250. },
  33251. "description": {
  33252. "type": "string"
  33253. },
  33254. "hidden": {
  33255. "type": "boolean"
  33256. }
  33257. },
  33258. "required": ["type", "repository"],
  33259. "additionalProperties": false
  33260. },
  33261. "ReferenceInfo": {
  33262. "type": "object",
  33263. "properties": {
  33264. "name": {
  33265. "type": "string"
  33266. },
  33267. "path": {
  33268. "type": "string"
  33269. },
  33270. "description": {
  33271. "type": "string"
  33272. },
  33273. "hidden": {
  33274. "type": "boolean"
  33275. },
  33276. "source": {
  33277. "anyOf": [
  33278. {
  33279. "$ref": "#/components/schemas/ReferenceLocalSource"
  33280. },
  33281. {
  33282. "$ref": "#/components/schemas/ReferenceGitSource"
  33283. }
  33284. ]
  33285. }
  33286. },
  33287. "required": ["name", "path", "source"],
  33288. "additionalProperties": false
  33289. },
  33290. "ProjectCopyCopy": {
  33291. "type": "object",
  33292. "properties": {
  33293. "directory": {
  33294. "type": "string"
  33295. }
  33296. },
  33297. "required": ["directory"],
  33298. "additionalProperties": false
  33299. },
  33300. "EventModels-devRefreshed": {
  33301. "type": "object",
  33302. "properties": {
  33303. "id": {
  33304. "type": "string",
  33305. "pattern": "^evt_"
  33306. },
  33307. "type": {
  33308. "type": "string",
  33309. "enum": ["models-dev.refreshed"]
  33310. },
  33311. "properties": {
  33312. "type": "object",
  33313. "properties": {}
  33314. }
  33315. },
  33316. "required": ["id", "type", "properties"],
  33317. "additionalProperties": false
  33318. },
  33319. "EventIntegrationUpdated": {
  33320. "type": "object",
  33321. "properties": {
  33322. "id": {
  33323. "type": "string",
  33324. "pattern": "^evt_"
  33325. },
  33326. "type": {
  33327. "type": "string",
  33328. "enum": ["integration.updated"]
  33329. },
  33330. "properties": {
  33331. "type": "object",
  33332. "properties": {}
  33333. }
  33334. },
  33335. "required": ["id", "type", "properties"],
  33336. "additionalProperties": false
  33337. },
  33338. "EventIntegrationConnectionUpdated": {
  33339. "type": "object",
  33340. "properties": {
  33341. "id": {
  33342. "type": "string",
  33343. "pattern": "^evt_"
  33344. },
  33345. "type": {
  33346. "type": "string",
  33347. "enum": ["integration.connection.updated"]
  33348. },
  33349. "properties": {
  33350. "type": "object",
  33351. "properties": {
  33352. "integrationID": {
  33353. "type": "string"
  33354. }
  33355. },
  33356. "required": ["integrationID"],
  33357. "additionalProperties": false
  33358. }
  33359. },
  33360. "required": ["id", "type", "properties"],
  33361. "additionalProperties": false
  33362. },
  33363. "EventCatalogUpdated": {
  33364. "type": "object",
  33365. "properties": {
  33366. "id": {
  33367. "type": "string",
  33368. "pattern": "^evt_"
  33369. },
  33370. "type": {
  33371. "type": "string",
  33372. "enum": ["catalog.updated"]
  33373. },
  33374. "properties": {
  33375. "type": "object",
  33376. "properties": {}
  33377. }
  33378. },
  33379. "required": ["id", "type", "properties"],
  33380. "additionalProperties": false
  33381. },
  33382. "EventSessionCreated": {
  33383. "type": "object",
  33384. "properties": {
  33385. "id": {
  33386. "type": "string",
  33387. "pattern": "^evt_"
  33388. },
  33389. "type": {
  33390. "type": "string",
  33391. "enum": ["session.created"]
  33392. },
  33393. "properties": {
  33394. "type": "object",
  33395. "properties": {
  33396. "sessionID": {
  33397. "type": "string",
  33398. "pattern": "^ses"
  33399. },
  33400. "info": {
  33401. "$ref": "#/components/schemas/Session"
  33402. }
  33403. },
  33404. "required": ["sessionID", "info"],
  33405. "additionalProperties": false
  33406. }
  33407. },
  33408. "required": ["id", "type", "properties"],
  33409. "additionalProperties": false
  33410. },
  33411. "EventSessionUpdated": {
  33412. "type": "object",
  33413. "properties": {
  33414. "id": {
  33415. "type": "string",
  33416. "pattern": "^evt_"
  33417. },
  33418. "type": {
  33419. "type": "string",
  33420. "enum": ["session.updated"]
  33421. },
  33422. "properties": {
  33423. "type": "object",
  33424. "properties": {
  33425. "sessionID": {
  33426. "type": "string",
  33427. "pattern": "^ses"
  33428. },
  33429. "info": {
  33430. "$ref": "#/components/schemas/Session"
  33431. }
  33432. },
  33433. "required": ["sessionID", "info"],
  33434. "additionalProperties": false
  33435. }
  33436. },
  33437. "required": ["id", "type", "properties"],
  33438. "additionalProperties": false
  33439. },
  33440. "EventSessionDeleted": {
  33441. "type": "object",
  33442. "properties": {
  33443. "id": {
  33444. "type": "string",
  33445. "pattern": "^evt_"
  33446. },
  33447. "type": {
  33448. "type": "string",
  33449. "enum": ["session.deleted"]
  33450. },
  33451. "properties": {
  33452. "type": "object",
  33453. "properties": {
  33454. "sessionID": {
  33455. "type": "string",
  33456. "pattern": "^ses"
  33457. },
  33458. "info": {
  33459. "$ref": "#/components/schemas/Session"
  33460. }
  33461. },
  33462. "required": ["sessionID", "info"],
  33463. "additionalProperties": false
  33464. }
  33465. },
  33466. "required": ["id", "type", "properties"],
  33467. "additionalProperties": false
  33468. },
  33469. "EventMessageUpdated": {
  33470. "type": "object",
  33471. "properties": {
  33472. "id": {
  33473. "type": "string",
  33474. "pattern": "^evt_"
  33475. },
  33476. "type": {
  33477. "type": "string",
  33478. "enum": ["message.updated"]
  33479. },
  33480. "properties": {
  33481. "type": "object",
  33482. "properties": {
  33483. "sessionID": {
  33484. "type": "string",
  33485. "pattern": "^ses"
  33486. },
  33487. "info": {
  33488. "$ref": "#/components/schemas/Message"
  33489. }
  33490. },
  33491. "required": ["sessionID", "info"],
  33492. "additionalProperties": false
  33493. }
  33494. },
  33495. "required": ["id", "type", "properties"],
  33496. "additionalProperties": false
  33497. },
  33498. "EventMessageRemoved": {
  33499. "type": "object",
  33500. "properties": {
  33501. "id": {
  33502. "type": "string",
  33503. "pattern": "^evt_"
  33504. },
  33505. "type": {
  33506. "type": "string",
  33507. "enum": ["message.removed"]
  33508. },
  33509. "properties": {
  33510. "type": "object",
  33511. "properties": {
  33512. "sessionID": {
  33513. "type": "string",
  33514. "pattern": "^ses"
  33515. },
  33516. "messageID": {
  33517. "type": "string",
  33518. "pattern": "^msg"
  33519. }
  33520. },
  33521. "required": ["sessionID", "messageID"],
  33522. "additionalProperties": false
  33523. }
  33524. },
  33525. "required": ["id", "type", "properties"],
  33526. "additionalProperties": false
  33527. },
  33528. "EventMessagePartUpdated": {
  33529. "type": "object",
  33530. "properties": {
  33531. "id": {
  33532. "type": "string",
  33533. "pattern": "^evt_"
  33534. },
  33535. "type": {
  33536. "type": "string",
  33537. "enum": ["message.part.updated"]
  33538. },
  33539. "properties": {
  33540. "type": "object",
  33541. "properties": {
  33542. "sessionID": {
  33543. "type": "string",
  33544. "pattern": "^ses"
  33545. },
  33546. "part": {
  33547. "$ref": "#/components/schemas/Part"
  33548. },
  33549. "time": {
  33550. "type": "number"
  33551. }
  33552. },
  33553. "required": ["sessionID", "part", "time"],
  33554. "additionalProperties": false
  33555. }
  33556. },
  33557. "required": ["id", "type", "properties"],
  33558. "additionalProperties": false
  33559. },
  33560. "EventMessagePartRemoved": {
  33561. "type": "object",
  33562. "properties": {
  33563. "id": {
  33564. "type": "string",
  33565. "pattern": "^evt_"
  33566. },
  33567. "type": {
  33568. "type": "string",
  33569. "enum": ["message.part.removed"]
  33570. },
  33571. "properties": {
  33572. "type": "object",
  33573. "properties": {
  33574. "sessionID": {
  33575. "type": "string",
  33576. "pattern": "^ses"
  33577. },
  33578. "messageID": {
  33579. "type": "string",
  33580. "pattern": "^msg"
  33581. },
  33582. "partID": {
  33583. "type": "string",
  33584. "pattern": "^prt"
  33585. }
  33586. },
  33587. "required": ["sessionID", "messageID", "partID"],
  33588. "additionalProperties": false
  33589. }
  33590. },
  33591. "required": ["id", "type", "properties"],
  33592. "additionalProperties": false
  33593. },
  33594. "EventSessionNextAgentSwitched": {
  33595. "type": "object",
  33596. "properties": {
  33597. "id": {
  33598. "type": "string",
  33599. "pattern": "^evt_"
  33600. },
  33601. "type": {
  33602. "type": "string",
  33603. "enum": ["session.next.agent.switched"]
  33604. },
  33605. "properties": {
  33606. "type": "object",
  33607. "properties": {
  33608. "timestamp": {
  33609. "type": "number"
  33610. },
  33611. "sessionID": {
  33612. "type": "string",
  33613. "pattern": "^ses"
  33614. },
  33615. "messageID": {
  33616. "type": "string",
  33617. "pattern": "^msg_"
  33618. },
  33619. "agent": {
  33620. "type": "string"
  33621. }
  33622. },
  33623. "required": ["timestamp", "sessionID", "messageID", "agent"],
  33624. "additionalProperties": false
  33625. }
  33626. },
  33627. "required": ["id", "type", "properties"],
  33628. "additionalProperties": false
  33629. },
  33630. "EventSessionNextModelSwitched": {
  33631. "type": "object",
  33632. "properties": {
  33633. "id": {
  33634. "type": "string",
  33635. "pattern": "^evt_"
  33636. },
  33637. "type": {
  33638. "type": "string",
  33639. "enum": ["session.next.model.switched"]
  33640. },
  33641. "properties": {
  33642. "type": "object",
  33643. "properties": {
  33644. "timestamp": {
  33645. "type": "number"
  33646. },
  33647. "sessionID": {
  33648. "type": "string",
  33649. "pattern": "^ses"
  33650. },
  33651. "messageID": {
  33652. "type": "string",
  33653. "pattern": "^msg_"
  33654. },
  33655. "model": {
  33656. "type": "object",
  33657. "properties": {
  33658. "id": {
  33659. "type": "string"
  33660. },
  33661. "providerID": {
  33662. "type": "string"
  33663. },
  33664. "variant": {
  33665. "type": "string"
  33666. }
  33667. },
  33668. "required": ["id", "providerID"],
  33669. "additionalProperties": false
  33670. }
  33671. },
  33672. "required": ["timestamp", "sessionID", "messageID", "model"],
  33673. "additionalProperties": false
  33674. }
  33675. },
  33676. "required": ["id", "type", "properties"],
  33677. "additionalProperties": false
  33678. },
  33679. "EventSessionNextMoved": {
  33680. "type": "object",
  33681. "properties": {
  33682. "id": {
  33683. "type": "string",
  33684. "pattern": "^evt_"
  33685. },
  33686. "type": {
  33687. "type": "string",
  33688. "enum": ["session.next.moved"]
  33689. },
  33690. "properties": {
  33691. "type": "object",
  33692. "properties": {
  33693. "timestamp": {
  33694. "type": "number"
  33695. },
  33696. "sessionID": {
  33697. "type": "string",
  33698. "pattern": "^ses"
  33699. },
  33700. "location": {
  33701. "$ref": "#/components/schemas/LocationRef"
  33702. },
  33703. "subdirectory": {
  33704. "type": "string"
  33705. }
  33706. },
  33707. "required": ["timestamp", "sessionID", "location"],
  33708. "additionalProperties": false
  33709. }
  33710. },
  33711. "required": ["id", "type", "properties"],
  33712. "additionalProperties": false
  33713. },
  33714. "EventSessionNextPrompted": {
  33715. "type": "object",
  33716. "properties": {
  33717. "id": {
  33718. "type": "string",
  33719. "pattern": "^evt_"
  33720. },
  33721. "type": {
  33722. "type": "string",
  33723. "enum": ["session.next.prompted"]
  33724. },
  33725. "properties": {
  33726. "type": "object",
  33727. "properties": {
  33728. "timestamp": {
  33729. "type": "number"
  33730. },
  33731. "sessionID": {
  33732. "type": "string",
  33733. "pattern": "^ses"
  33734. },
  33735. "messageID": {
  33736. "type": "string",
  33737. "pattern": "^msg_"
  33738. },
  33739. "prompt": {
  33740. "$ref": "#/components/schemas/Prompt"
  33741. },
  33742. "delivery": {
  33743. "type": "string",
  33744. "enum": ["steer", "queue"]
  33745. }
  33746. },
  33747. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33748. "additionalProperties": false
  33749. }
  33750. },
  33751. "required": ["id", "type", "properties"],
  33752. "additionalProperties": false
  33753. },
  33754. "EventSessionNextPromptAdmitted": {
  33755. "type": "object",
  33756. "properties": {
  33757. "id": {
  33758. "type": "string",
  33759. "pattern": "^evt_"
  33760. },
  33761. "type": {
  33762. "type": "string",
  33763. "enum": ["session.next.prompt.admitted"]
  33764. },
  33765. "properties": {
  33766. "type": "object",
  33767. "properties": {
  33768. "timestamp": {
  33769. "type": "number"
  33770. },
  33771. "sessionID": {
  33772. "type": "string",
  33773. "pattern": "^ses"
  33774. },
  33775. "messageID": {
  33776. "type": "string",
  33777. "pattern": "^msg_"
  33778. },
  33779. "prompt": {
  33780. "$ref": "#/components/schemas/Prompt"
  33781. },
  33782. "delivery": {
  33783. "type": "string",
  33784. "enum": ["steer", "queue"]
  33785. }
  33786. },
  33787. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33788. "additionalProperties": false
  33789. }
  33790. },
  33791. "required": ["id", "type", "properties"],
  33792. "additionalProperties": false
  33793. },
  33794. "EventSessionNextContextUpdated": {
  33795. "type": "object",
  33796. "properties": {
  33797. "id": {
  33798. "type": "string",
  33799. "pattern": "^evt_"
  33800. },
  33801. "type": {
  33802. "type": "string",
  33803. "enum": ["session.next.context.updated"]
  33804. },
  33805. "properties": {
  33806. "type": "object",
  33807. "properties": {
  33808. "timestamp": {
  33809. "type": "number"
  33810. },
  33811. "sessionID": {
  33812. "type": "string",
  33813. "pattern": "^ses"
  33814. },
  33815. "messageID": {
  33816. "type": "string",
  33817. "pattern": "^msg_"
  33818. },
  33819. "text": {
  33820. "type": "string"
  33821. }
  33822. },
  33823. "required": ["timestamp", "sessionID", "messageID", "text"],
  33824. "additionalProperties": false
  33825. }
  33826. },
  33827. "required": ["id", "type", "properties"],
  33828. "additionalProperties": false
  33829. },
  33830. "EventSessionNextSynthetic": {
  33831. "type": "object",
  33832. "properties": {
  33833. "id": {
  33834. "type": "string",
  33835. "pattern": "^evt_"
  33836. },
  33837. "type": {
  33838. "type": "string",
  33839. "enum": ["session.next.synthetic"]
  33840. },
  33841. "properties": {
  33842. "type": "object",
  33843. "properties": {
  33844. "timestamp": {
  33845. "type": "number"
  33846. },
  33847. "sessionID": {
  33848. "type": "string",
  33849. "pattern": "^ses"
  33850. },
  33851. "messageID": {
  33852. "type": "string",
  33853. "pattern": "^msg_"
  33854. },
  33855. "text": {
  33856. "type": "string"
  33857. }
  33858. },
  33859. "required": ["timestamp", "sessionID", "messageID", "text"],
  33860. "additionalProperties": false
  33861. }
  33862. },
  33863. "required": ["id", "type", "properties"],
  33864. "additionalProperties": false
  33865. },
  33866. "EventSessionNextShellStarted": {
  33867. "type": "object",
  33868. "properties": {
  33869. "id": {
  33870. "type": "string",
  33871. "pattern": "^evt_"
  33872. },
  33873. "type": {
  33874. "type": "string",
  33875. "enum": ["session.next.shell.started"]
  33876. },
  33877. "properties": {
  33878. "type": "object",
  33879. "properties": {
  33880. "timestamp": {
  33881. "type": "number"
  33882. },
  33883. "sessionID": {
  33884. "type": "string",
  33885. "pattern": "^ses"
  33886. },
  33887. "messageID": {
  33888. "type": "string",
  33889. "pattern": "^msg_"
  33890. },
  33891. "callID": {
  33892. "type": "string"
  33893. },
  33894. "command": {
  33895. "type": "string"
  33896. }
  33897. },
  33898. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  33899. "additionalProperties": false
  33900. }
  33901. },
  33902. "required": ["id", "type", "properties"],
  33903. "additionalProperties": false
  33904. },
  33905. "EventSessionNextShellEnded": {
  33906. "type": "object",
  33907. "properties": {
  33908. "id": {
  33909. "type": "string",
  33910. "pattern": "^evt_"
  33911. },
  33912. "type": {
  33913. "type": "string",
  33914. "enum": ["session.next.shell.ended"]
  33915. },
  33916. "properties": {
  33917. "type": "object",
  33918. "properties": {
  33919. "timestamp": {
  33920. "type": "number"
  33921. },
  33922. "sessionID": {
  33923. "type": "string",
  33924. "pattern": "^ses"
  33925. },
  33926. "callID": {
  33927. "type": "string"
  33928. },
  33929. "output": {
  33930. "type": "string"
  33931. }
  33932. },
  33933. "required": ["timestamp", "sessionID", "callID", "output"],
  33934. "additionalProperties": false
  33935. }
  33936. },
  33937. "required": ["id", "type", "properties"],
  33938. "additionalProperties": false
  33939. },
  33940. "EventSessionNextStepStarted": {
  33941. "type": "object",
  33942. "properties": {
  33943. "id": {
  33944. "type": "string",
  33945. "pattern": "^evt_"
  33946. },
  33947. "type": {
  33948. "type": "string",
  33949. "enum": ["session.next.step.started"]
  33950. },
  33951. "properties": {
  33952. "type": "object",
  33953. "properties": {
  33954. "timestamp": {
  33955. "type": "number"
  33956. },
  33957. "sessionID": {
  33958. "type": "string",
  33959. "pattern": "^ses"
  33960. },
  33961. "assistantMessageID": {
  33962. "type": "string",
  33963. "pattern": "^msg_"
  33964. },
  33965. "agent": {
  33966. "type": "string"
  33967. },
  33968. "model": {
  33969. "type": "object",
  33970. "properties": {
  33971. "id": {
  33972. "type": "string"
  33973. },
  33974. "providerID": {
  33975. "type": "string"
  33976. },
  33977. "variant": {
  33978. "type": "string"
  33979. }
  33980. },
  33981. "required": ["id", "providerID"],
  33982. "additionalProperties": false
  33983. },
  33984. "snapshot": {
  33985. "type": "string"
  33986. }
  33987. },
  33988. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  33989. "additionalProperties": false
  33990. }
  33991. },
  33992. "required": ["id", "type", "properties"],
  33993. "additionalProperties": false
  33994. },
  33995. "EventSessionNextStepEnded": {
  33996. "type": "object",
  33997. "properties": {
  33998. "id": {
  33999. "type": "string",
  34000. "pattern": "^evt_"
  34001. },
  34002. "type": {
  34003. "type": "string",
  34004. "enum": ["session.next.step.ended"]
  34005. },
  34006. "properties": {
  34007. "type": "object",
  34008. "properties": {
  34009. "timestamp": {
  34010. "type": "number"
  34011. },
  34012. "sessionID": {
  34013. "type": "string",
  34014. "pattern": "^ses"
  34015. },
  34016. "assistantMessageID": {
  34017. "type": "string",
  34018. "pattern": "^msg_"
  34019. },
  34020. "finish": {
  34021. "type": "string"
  34022. },
  34023. "cost": {
  34024. "type": "number"
  34025. },
  34026. "tokens": {
  34027. "type": "object",
  34028. "properties": {
  34029. "input": {
  34030. "type": "number"
  34031. },
  34032. "output": {
  34033. "type": "number"
  34034. },
  34035. "reasoning": {
  34036. "type": "number"
  34037. },
  34038. "cache": {
  34039. "type": "object",
  34040. "properties": {
  34041. "read": {
  34042. "type": "number"
  34043. },
  34044. "write": {
  34045. "type": "number"
  34046. }
  34047. },
  34048. "required": ["read", "write"],
  34049. "additionalProperties": false
  34050. }
  34051. },
  34052. "required": ["input", "output", "reasoning", "cache"],
  34053. "additionalProperties": false
  34054. },
  34055. "snapshot": {
  34056. "type": "string"
  34057. },
  34058. "files": {
  34059. "type": "array",
  34060. "items": {
  34061. "type": "string"
  34062. }
  34063. }
  34064. },
  34065. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34066. "additionalProperties": false
  34067. }
  34068. },
  34069. "required": ["id", "type", "properties"],
  34070. "additionalProperties": false
  34071. },
  34072. "EventSessionNextStepFailed": {
  34073. "type": "object",
  34074. "properties": {
  34075. "id": {
  34076. "type": "string",
  34077. "pattern": "^evt_"
  34078. },
  34079. "type": {
  34080. "type": "string",
  34081. "enum": ["session.next.step.failed"]
  34082. },
  34083. "properties": {
  34084. "type": "object",
  34085. "properties": {
  34086. "timestamp": {
  34087. "type": "number"
  34088. },
  34089. "sessionID": {
  34090. "type": "string",
  34091. "pattern": "^ses"
  34092. },
  34093. "assistantMessageID": {
  34094. "type": "string",
  34095. "pattern": "^msg_"
  34096. },
  34097. "error": {
  34098. "$ref": "#/components/schemas/SessionErrorUnknown"
  34099. }
  34100. },
  34101. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34102. "additionalProperties": false
  34103. }
  34104. },
  34105. "required": ["id", "type", "properties"],
  34106. "additionalProperties": false
  34107. },
  34108. "EventSessionNextTextStarted": {
  34109. "type": "object",
  34110. "properties": {
  34111. "id": {
  34112. "type": "string",
  34113. "pattern": "^evt_"
  34114. },
  34115. "type": {
  34116. "type": "string",
  34117. "enum": ["session.next.text.started"]
  34118. },
  34119. "properties": {
  34120. "type": "object",
  34121. "properties": {
  34122. "timestamp": {
  34123. "type": "number"
  34124. },
  34125. "sessionID": {
  34126. "type": "string",
  34127. "pattern": "^ses"
  34128. },
  34129. "assistantMessageID": {
  34130. "type": "string",
  34131. "pattern": "^msg_"
  34132. },
  34133. "textID": {
  34134. "type": "string"
  34135. }
  34136. },
  34137. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34138. "additionalProperties": false
  34139. }
  34140. },
  34141. "required": ["id", "type", "properties"],
  34142. "additionalProperties": false
  34143. },
  34144. "EventSessionNextTextDelta": {
  34145. "type": "object",
  34146. "properties": {
  34147. "id": {
  34148. "type": "string",
  34149. "pattern": "^evt_"
  34150. },
  34151. "type": {
  34152. "type": "string",
  34153. "enum": ["session.next.text.delta"]
  34154. },
  34155. "properties": {
  34156. "type": "object",
  34157. "properties": {
  34158. "timestamp": {
  34159. "type": "number"
  34160. },
  34161. "sessionID": {
  34162. "type": "string",
  34163. "pattern": "^ses"
  34164. },
  34165. "assistantMessageID": {
  34166. "type": "string",
  34167. "pattern": "^msg_"
  34168. },
  34169. "textID": {
  34170. "type": "string"
  34171. },
  34172. "delta": {
  34173. "type": "string"
  34174. }
  34175. },
  34176. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34177. "additionalProperties": false
  34178. }
  34179. },
  34180. "required": ["id", "type", "properties"],
  34181. "additionalProperties": false
  34182. },
  34183. "EventSessionNextTextEnded": {
  34184. "type": "object",
  34185. "properties": {
  34186. "id": {
  34187. "type": "string",
  34188. "pattern": "^evt_"
  34189. },
  34190. "type": {
  34191. "type": "string",
  34192. "enum": ["session.next.text.ended"]
  34193. },
  34194. "properties": {
  34195. "type": "object",
  34196. "properties": {
  34197. "timestamp": {
  34198. "type": "number"
  34199. },
  34200. "sessionID": {
  34201. "type": "string",
  34202. "pattern": "^ses"
  34203. },
  34204. "assistantMessageID": {
  34205. "type": "string",
  34206. "pattern": "^msg_"
  34207. },
  34208. "textID": {
  34209. "type": "string"
  34210. },
  34211. "text": {
  34212. "type": "string"
  34213. }
  34214. },
  34215. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34216. "additionalProperties": false
  34217. }
  34218. },
  34219. "required": ["id", "type", "properties"],
  34220. "additionalProperties": false
  34221. },
  34222. "EventSessionNextReasoningStarted": {
  34223. "type": "object",
  34224. "properties": {
  34225. "id": {
  34226. "type": "string",
  34227. "pattern": "^evt_"
  34228. },
  34229. "type": {
  34230. "type": "string",
  34231. "enum": ["session.next.reasoning.started"]
  34232. },
  34233. "properties": {
  34234. "type": "object",
  34235. "properties": {
  34236. "timestamp": {
  34237. "type": "number"
  34238. },
  34239. "sessionID": {
  34240. "type": "string",
  34241. "pattern": "^ses"
  34242. },
  34243. "assistantMessageID": {
  34244. "type": "string",
  34245. "pattern": "^msg_"
  34246. },
  34247. "reasoningID": {
  34248. "type": "string"
  34249. },
  34250. "providerMetadata": {
  34251. "type": "object",
  34252. "additionalProperties": {
  34253. "type": "object"
  34254. }
  34255. }
  34256. },
  34257. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34258. "additionalProperties": false
  34259. }
  34260. },
  34261. "required": ["id", "type", "properties"],
  34262. "additionalProperties": false
  34263. },
  34264. "EventSessionNextReasoningDelta": {
  34265. "type": "object",
  34266. "properties": {
  34267. "id": {
  34268. "type": "string",
  34269. "pattern": "^evt_"
  34270. },
  34271. "type": {
  34272. "type": "string",
  34273. "enum": ["session.next.reasoning.delta"]
  34274. },
  34275. "properties": {
  34276. "type": "object",
  34277. "properties": {
  34278. "timestamp": {
  34279. "type": "number"
  34280. },
  34281. "sessionID": {
  34282. "type": "string",
  34283. "pattern": "^ses"
  34284. },
  34285. "assistantMessageID": {
  34286. "type": "string",
  34287. "pattern": "^msg_"
  34288. },
  34289. "reasoningID": {
  34290. "type": "string"
  34291. },
  34292. "delta": {
  34293. "type": "string"
  34294. }
  34295. },
  34296. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34297. "additionalProperties": false
  34298. }
  34299. },
  34300. "required": ["id", "type", "properties"],
  34301. "additionalProperties": false
  34302. },
  34303. "EventSessionNextReasoningEnded": {
  34304. "type": "object",
  34305. "properties": {
  34306. "id": {
  34307. "type": "string",
  34308. "pattern": "^evt_"
  34309. },
  34310. "type": {
  34311. "type": "string",
  34312. "enum": ["session.next.reasoning.ended"]
  34313. },
  34314. "properties": {
  34315. "type": "object",
  34316. "properties": {
  34317. "timestamp": {
  34318. "type": "number"
  34319. },
  34320. "sessionID": {
  34321. "type": "string",
  34322. "pattern": "^ses"
  34323. },
  34324. "assistantMessageID": {
  34325. "type": "string",
  34326. "pattern": "^msg_"
  34327. },
  34328. "reasoningID": {
  34329. "type": "string"
  34330. },
  34331. "text": {
  34332. "type": "string"
  34333. },
  34334. "providerMetadata": {
  34335. "type": "object",
  34336. "additionalProperties": {
  34337. "type": "object"
  34338. }
  34339. }
  34340. },
  34341. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34342. "additionalProperties": false
  34343. }
  34344. },
  34345. "required": ["id", "type", "properties"],
  34346. "additionalProperties": false
  34347. },
  34348. "EventSessionNextToolInputStarted": {
  34349. "type": "object",
  34350. "properties": {
  34351. "id": {
  34352. "type": "string",
  34353. "pattern": "^evt_"
  34354. },
  34355. "type": {
  34356. "type": "string",
  34357. "enum": ["session.next.tool.input.started"]
  34358. },
  34359. "properties": {
  34360. "type": "object",
  34361. "properties": {
  34362. "timestamp": {
  34363. "type": "number"
  34364. },
  34365. "sessionID": {
  34366. "type": "string",
  34367. "pattern": "^ses"
  34368. },
  34369. "assistantMessageID": {
  34370. "type": "string",
  34371. "pattern": "^msg_"
  34372. },
  34373. "callID": {
  34374. "type": "string"
  34375. },
  34376. "name": {
  34377. "type": "string"
  34378. }
  34379. },
  34380. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34381. "additionalProperties": false
  34382. }
  34383. },
  34384. "required": ["id", "type", "properties"],
  34385. "additionalProperties": false
  34386. },
  34387. "EventSessionNextToolInputDelta": {
  34388. "type": "object",
  34389. "properties": {
  34390. "id": {
  34391. "type": "string",
  34392. "pattern": "^evt_"
  34393. },
  34394. "type": {
  34395. "type": "string",
  34396. "enum": ["session.next.tool.input.delta"]
  34397. },
  34398. "properties": {
  34399. "type": "object",
  34400. "properties": {
  34401. "timestamp": {
  34402. "type": "number"
  34403. },
  34404. "sessionID": {
  34405. "type": "string",
  34406. "pattern": "^ses"
  34407. },
  34408. "assistantMessageID": {
  34409. "type": "string",
  34410. "pattern": "^msg_"
  34411. },
  34412. "callID": {
  34413. "type": "string"
  34414. },
  34415. "delta": {
  34416. "type": "string"
  34417. }
  34418. },
  34419. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34420. "additionalProperties": false
  34421. }
  34422. },
  34423. "required": ["id", "type", "properties"],
  34424. "additionalProperties": false
  34425. },
  34426. "EventSessionNextToolInputEnded": {
  34427. "type": "object",
  34428. "properties": {
  34429. "id": {
  34430. "type": "string",
  34431. "pattern": "^evt_"
  34432. },
  34433. "type": {
  34434. "type": "string",
  34435. "enum": ["session.next.tool.input.ended"]
  34436. },
  34437. "properties": {
  34438. "type": "object",
  34439. "properties": {
  34440. "timestamp": {
  34441. "type": "number"
  34442. },
  34443. "sessionID": {
  34444. "type": "string",
  34445. "pattern": "^ses"
  34446. },
  34447. "assistantMessageID": {
  34448. "type": "string",
  34449. "pattern": "^msg_"
  34450. },
  34451. "callID": {
  34452. "type": "string"
  34453. },
  34454. "text": {
  34455. "type": "string"
  34456. }
  34457. },
  34458. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34459. "additionalProperties": false
  34460. }
  34461. },
  34462. "required": ["id", "type", "properties"],
  34463. "additionalProperties": false
  34464. },
  34465. "EventSessionNextToolCalled": {
  34466. "type": "object",
  34467. "properties": {
  34468. "id": {
  34469. "type": "string",
  34470. "pattern": "^evt_"
  34471. },
  34472. "type": {
  34473. "type": "string",
  34474. "enum": ["session.next.tool.called"]
  34475. },
  34476. "properties": {
  34477. "type": "object",
  34478. "properties": {
  34479. "timestamp": {
  34480. "type": "number"
  34481. },
  34482. "sessionID": {
  34483. "type": "string",
  34484. "pattern": "^ses"
  34485. },
  34486. "assistantMessageID": {
  34487. "type": "string",
  34488. "pattern": "^msg_"
  34489. },
  34490. "callID": {
  34491. "type": "string"
  34492. },
  34493. "tool": {
  34494. "type": "string"
  34495. },
  34496. "input": {
  34497. "type": "object"
  34498. },
  34499. "provider": {
  34500. "type": "object",
  34501. "properties": {
  34502. "executed": {
  34503. "type": "boolean"
  34504. },
  34505. "metadata": {
  34506. "type": "object",
  34507. "additionalProperties": {
  34508. "type": "object"
  34509. }
  34510. }
  34511. },
  34512. "required": ["executed"],
  34513. "additionalProperties": false
  34514. }
  34515. },
  34516. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34517. "additionalProperties": false
  34518. }
  34519. },
  34520. "required": ["id", "type", "properties"],
  34521. "additionalProperties": false
  34522. },
  34523. "EventSessionNextToolProgress": {
  34524. "type": "object",
  34525. "properties": {
  34526. "id": {
  34527. "type": "string",
  34528. "pattern": "^evt_"
  34529. },
  34530. "type": {
  34531. "type": "string",
  34532. "enum": ["session.next.tool.progress"]
  34533. },
  34534. "properties": {
  34535. "type": "object",
  34536. "properties": {
  34537. "timestamp": {
  34538. "type": "number"
  34539. },
  34540. "sessionID": {
  34541. "type": "string",
  34542. "pattern": "^ses"
  34543. },
  34544. "assistantMessageID": {
  34545. "type": "string",
  34546. "pattern": "^msg_"
  34547. },
  34548. "callID": {
  34549. "type": "string"
  34550. },
  34551. "structured": {
  34552. "type": "object"
  34553. },
  34554. "content": {
  34555. "type": "array",
  34556. "items": {
  34557. "anyOf": [
  34558. {
  34559. "$ref": "#/components/schemas/ToolTextContent"
  34560. },
  34561. {
  34562. "$ref": "#/components/schemas/ToolFileContent"
  34563. }
  34564. ]
  34565. }
  34566. }
  34567. },
  34568. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  34569. "additionalProperties": false
  34570. }
  34571. },
  34572. "required": ["id", "type", "properties"],
  34573. "additionalProperties": false
  34574. },
  34575. "EventSessionNextToolSuccess": {
  34576. "type": "object",
  34577. "properties": {
  34578. "id": {
  34579. "type": "string",
  34580. "pattern": "^evt_"
  34581. },
  34582. "type": {
  34583. "type": "string",
  34584. "enum": ["session.next.tool.success"]
  34585. },
  34586. "properties": {
  34587. "type": "object",
  34588. "properties": {
  34589. "timestamp": {
  34590. "type": "number"
  34591. },
  34592. "sessionID": {
  34593. "type": "string",
  34594. "pattern": "^ses"
  34595. },
  34596. "assistantMessageID": {
  34597. "type": "string",
  34598. "pattern": "^msg_"
  34599. },
  34600. "callID": {
  34601. "type": "string"
  34602. },
  34603. "structured": {
  34604. "type": "object"
  34605. },
  34606. "content": {
  34607. "type": "array",
  34608. "items": {
  34609. "anyOf": [
  34610. {
  34611. "$ref": "#/components/schemas/ToolTextContent"
  34612. },
  34613. {
  34614. "$ref": "#/components/schemas/ToolFileContent"
  34615. }
  34616. ]
  34617. }
  34618. },
  34619. "outputPaths": {
  34620. "type": "array",
  34621. "items": {
  34622. "type": "string"
  34623. }
  34624. },
  34625. "result": {},
  34626. "provider": {
  34627. "type": "object",
  34628. "properties": {
  34629. "executed": {
  34630. "type": "boolean"
  34631. },
  34632. "metadata": {
  34633. "type": "object",
  34634. "additionalProperties": {
  34635. "type": "object"
  34636. }
  34637. }
  34638. },
  34639. "required": ["executed"],
  34640. "additionalProperties": false
  34641. }
  34642. },
  34643. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  34644. "additionalProperties": false
  34645. }
  34646. },
  34647. "required": ["id", "type", "properties"],
  34648. "additionalProperties": false
  34649. },
  34650. "EventSessionNextToolFailed": {
  34651. "type": "object",
  34652. "properties": {
  34653. "id": {
  34654. "type": "string",
  34655. "pattern": "^evt_"
  34656. },
  34657. "type": {
  34658. "type": "string",
  34659. "enum": ["session.next.tool.failed"]
  34660. },
  34661. "properties": {
  34662. "type": "object",
  34663. "properties": {
  34664. "timestamp": {
  34665. "type": "number"
  34666. },
  34667. "sessionID": {
  34668. "type": "string",
  34669. "pattern": "^ses"
  34670. },
  34671. "assistantMessageID": {
  34672. "type": "string",
  34673. "pattern": "^msg_"
  34674. },
  34675. "callID": {
  34676. "type": "string"
  34677. },
  34678. "error": {
  34679. "$ref": "#/components/schemas/SessionErrorUnknown"
  34680. },
  34681. "result": {},
  34682. "provider": {
  34683. "type": "object",
  34684. "properties": {
  34685. "executed": {
  34686. "type": "boolean"
  34687. },
  34688. "metadata": {
  34689. "type": "object",
  34690. "additionalProperties": {
  34691. "type": "object"
  34692. }
  34693. }
  34694. },
  34695. "required": ["executed"],
  34696. "additionalProperties": false
  34697. }
  34698. },
  34699. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  34700. "additionalProperties": false
  34701. }
  34702. },
  34703. "required": ["id", "type", "properties"],
  34704. "additionalProperties": false
  34705. },
  34706. "EventSessionNextRetried": {
  34707. "type": "object",
  34708. "properties": {
  34709. "id": {
  34710. "type": "string",
  34711. "pattern": "^evt_"
  34712. },
  34713. "type": {
  34714. "type": "string",
  34715. "enum": ["session.next.retried"]
  34716. },
  34717. "properties": {
  34718. "type": "object",
  34719. "properties": {
  34720. "timestamp": {
  34721. "type": "number"
  34722. },
  34723. "sessionID": {
  34724. "type": "string",
  34725. "pattern": "^ses"
  34726. },
  34727. "attempt": {
  34728. "type": "number"
  34729. },
  34730. "error": {
  34731. "$ref": "#/components/schemas/SessionNextRetry_error"
  34732. }
  34733. },
  34734. "required": ["timestamp", "sessionID", "attempt", "error"],
  34735. "additionalProperties": false
  34736. }
  34737. },
  34738. "required": ["id", "type", "properties"],
  34739. "additionalProperties": false
  34740. },
  34741. "EventSessionNextCompactionStarted": {
  34742. "type": "object",
  34743. "properties": {
  34744. "id": {
  34745. "type": "string",
  34746. "pattern": "^evt_"
  34747. },
  34748. "type": {
  34749. "type": "string",
  34750. "enum": ["session.next.compaction.started"]
  34751. },
  34752. "properties": {
  34753. "type": "object",
  34754. "properties": {
  34755. "timestamp": {
  34756. "type": "number"
  34757. },
  34758. "sessionID": {
  34759. "type": "string",
  34760. "pattern": "^ses"
  34761. },
  34762. "messageID": {
  34763. "type": "string",
  34764. "pattern": "^msg_"
  34765. },
  34766. "reason": {
  34767. "type": "string",
  34768. "enum": ["auto", "manual"]
  34769. }
  34770. },
  34771. "required": ["timestamp", "sessionID", "messageID", "reason"],
  34772. "additionalProperties": false
  34773. }
  34774. },
  34775. "required": ["id", "type", "properties"],
  34776. "additionalProperties": false
  34777. },
  34778. "EventSessionNextCompactionDelta": {
  34779. "type": "object",
  34780. "properties": {
  34781. "id": {
  34782. "type": "string",
  34783. "pattern": "^evt_"
  34784. },
  34785. "type": {
  34786. "type": "string",
  34787. "enum": ["session.next.compaction.delta"]
  34788. },
  34789. "properties": {
  34790. "type": "object",
  34791. "properties": {
  34792. "timestamp": {
  34793. "type": "number"
  34794. },
  34795. "sessionID": {
  34796. "type": "string",
  34797. "pattern": "^ses"
  34798. },
  34799. "messageID": {
  34800. "type": "string",
  34801. "pattern": "^msg_"
  34802. },
  34803. "text": {
  34804. "type": "string"
  34805. }
  34806. },
  34807. "required": ["timestamp", "sessionID", "messageID", "text"],
  34808. "additionalProperties": false
  34809. }
  34810. },
  34811. "required": ["id", "type", "properties"],
  34812. "additionalProperties": false
  34813. },
  34814. "EventSessionNextCompactionEnded": {
  34815. "type": "object",
  34816. "properties": {
  34817. "id": {
  34818. "type": "string",
  34819. "pattern": "^evt_"
  34820. },
  34821. "type": {
  34822. "type": "string",
  34823. "enum": ["session.next.compaction.ended"]
  34824. },
  34825. "properties": {
  34826. "type": "object",
  34827. "properties": {
  34828. "timestamp": {
  34829. "type": "number"
  34830. },
  34831. "sessionID": {
  34832. "type": "string",
  34833. "pattern": "^ses"
  34834. },
  34835. "messageID": {
  34836. "type": "string",
  34837. "pattern": "^msg_"
  34838. },
  34839. "reason": {
  34840. "type": "string",
  34841. "enum": ["auto", "manual"]
  34842. },
  34843. "text": {
  34844. "type": "string"
  34845. },
  34846. "recent": {
  34847. "type": "string"
  34848. }
  34849. },
  34850. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  34851. "additionalProperties": false
  34852. }
  34853. },
  34854. "required": ["id", "type", "properties"],
  34855. "additionalProperties": false
  34856. },
  34857. "EventSessionNextRevertStaged": {
  34858. "type": "object",
  34859. "properties": {
  34860. "id": {
  34861. "type": "string",
  34862. "pattern": "^evt_"
  34863. },
  34864. "type": {
  34865. "type": "string",
  34866. "enum": ["session.next.revert.staged"]
  34867. },
  34868. "properties": {
  34869. "type": "object",
  34870. "properties": {
  34871. "timestamp": {
  34872. "type": "number"
  34873. },
  34874. "sessionID": {
  34875. "type": "string",
  34876. "pattern": "^ses"
  34877. },
  34878. "revert": {
  34879. "type": "object",
  34880. "properties": {
  34881. "messageID": {
  34882. "type": "string",
  34883. "pattern": "^msg_"
  34884. },
  34885. "partID": {
  34886. "type": "string"
  34887. },
  34888. "snapshot": {
  34889. "type": "string"
  34890. },
  34891. "diff": {
  34892. "type": "string"
  34893. },
  34894. "files": {
  34895. "type": "array",
  34896. "items": {
  34897. "$ref": "#/components/schemas/FileDiff"
  34898. }
  34899. }
  34900. },
  34901. "required": ["messageID"],
  34902. "additionalProperties": false
  34903. }
  34904. },
  34905. "required": ["timestamp", "sessionID", "revert"],
  34906. "additionalProperties": false
  34907. }
  34908. },
  34909. "required": ["id", "type", "properties"],
  34910. "additionalProperties": false
  34911. },
  34912. "EventSessionNextRevertCleared": {
  34913. "type": "object",
  34914. "properties": {
  34915. "id": {
  34916. "type": "string",
  34917. "pattern": "^evt_"
  34918. },
  34919. "type": {
  34920. "type": "string",
  34921. "enum": ["session.next.revert.cleared"]
  34922. },
  34923. "properties": {
  34924. "type": "object",
  34925. "properties": {
  34926. "timestamp": {
  34927. "type": "number"
  34928. },
  34929. "sessionID": {
  34930. "type": "string",
  34931. "pattern": "^ses"
  34932. }
  34933. },
  34934. "required": ["timestamp", "sessionID"],
  34935. "additionalProperties": false
  34936. }
  34937. },
  34938. "required": ["id", "type", "properties"],
  34939. "additionalProperties": false
  34940. },
  34941. "EventSessionNextRevertCommitted": {
  34942. "type": "object",
  34943. "properties": {
  34944. "id": {
  34945. "type": "string",
  34946. "pattern": "^evt_"
  34947. },
  34948. "type": {
  34949. "type": "string",
  34950. "enum": ["session.next.revert.committed"]
  34951. },
  34952. "properties": {
  34953. "type": "object",
  34954. "properties": {
  34955. "timestamp": {
  34956. "type": "number"
  34957. },
  34958. "sessionID": {
  34959. "type": "string",
  34960. "pattern": "^ses"
  34961. },
  34962. "messageID": {
  34963. "type": "string",
  34964. "pattern": "^msg_"
  34965. }
  34966. },
  34967. "required": ["timestamp", "sessionID", "messageID"],
  34968. "additionalProperties": false
  34969. }
  34970. },
  34971. "required": ["id", "type", "properties"],
  34972. "additionalProperties": false
  34973. },
  34974. "EventMessagePartDelta": {
  34975. "type": "object",
  34976. "properties": {
  34977. "id": {
  34978. "type": "string",
  34979. "pattern": "^evt_"
  34980. },
  34981. "type": {
  34982. "type": "string",
  34983. "enum": ["message.part.delta"]
  34984. },
  34985. "properties": {
  34986. "type": "object",
  34987. "properties": {
  34988. "sessionID": {
  34989. "type": "string",
  34990. "pattern": "^ses"
  34991. },
  34992. "messageID": {
  34993. "type": "string",
  34994. "pattern": "^msg"
  34995. },
  34996. "partID": {
  34997. "type": "string",
  34998. "pattern": "^prt"
  34999. },
  35000. "field": {
  35001. "type": "string"
  35002. },
  35003. "delta": {
  35004. "type": "string"
  35005. }
  35006. },
  35007. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35008. "additionalProperties": false
  35009. }
  35010. },
  35011. "required": ["id", "type", "properties"],
  35012. "additionalProperties": false
  35013. },
  35014. "EventSessionDiff": {
  35015. "type": "object",
  35016. "properties": {
  35017. "id": {
  35018. "type": "string",
  35019. "pattern": "^evt_"
  35020. },
  35021. "type": {
  35022. "type": "string",
  35023. "enum": ["session.diff"]
  35024. },
  35025. "properties": {
  35026. "type": "object",
  35027. "properties": {
  35028. "sessionID": {
  35029. "type": "string",
  35030. "pattern": "^ses"
  35031. },
  35032. "diff": {
  35033. "type": "array",
  35034. "items": {
  35035. "$ref": "#/components/schemas/SnapshotFileDiff"
  35036. }
  35037. }
  35038. },
  35039. "required": ["sessionID", "diff"],
  35040. "additionalProperties": false
  35041. }
  35042. },
  35043. "required": ["id", "type", "properties"],
  35044. "additionalProperties": false
  35045. },
  35046. "EventSessionError": {
  35047. "type": "object",
  35048. "properties": {
  35049. "id": {
  35050. "type": "string",
  35051. "pattern": "^evt_"
  35052. },
  35053. "type": {
  35054. "type": "string",
  35055. "enum": ["session.error"]
  35056. },
  35057. "properties": {
  35058. "type": "object",
  35059. "properties": {
  35060. "sessionID": {
  35061. "type": "string",
  35062. "pattern": "^ses"
  35063. },
  35064. "error": {
  35065. "anyOf": [
  35066. {
  35067. "$ref": "#/components/schemas/ProviderAuthError"
  35068. },
  35069. {
  35070. "$ref": "#/components/schemas/UnknownError"
  35071. },
  35072. {
  35073. "$ref": "#/components/schemas/MessageOutputLengthError"
  35074. },
  35075. {
  35076. "$ref": "#/components/schemas/MessageAbortedError"
  35077. },
  35078. {
  35079. "$ref": "#/components/schemas/StructuredOutputError"
  35080. },
  35081. {
  35082. "$ref": "#/components/schemas/ContextOverflowError"
  35083. },
  35084. {
  35085. "$ref": "#/components/schemas/ContentFilterError"
  35086. },
  35087. {
  35088. "$ref": "#/components/schemas/APIError"
  35089. }
  35090. ]
  35091. }
  35092. },
  35093. "additionalProperties": false
  35094. }
  35095. },
  35096. "required": ["id", "type", "properties"],
  35097. "additionalProperties": false
  35098. },
  35099. "EventInstallationUpdated": {
  35100. "type": "object",
  35101. "properties": {
  35102. "id": {
  35103. "type": "string",
  35104. "pattern": "^evt_"
  35105. },
  35106. "type": {
  35107. "type": "string",
  35108. "enum": ["installation.updated"]
  35109. },
  35110. "properties": {
  35111. "type": "object",
  35112. "properties": {
  35113. "version": {
  35114. "type": "string"
  35115. }
  35116. },
  35117. "required": ["version"],
  35118. "additionalProperties": false
  35119. }
  35120. },
  35121. "required": ["id", "type", "properties"],
  35122. "additionalProperties": false
  35123. },
  35124. "EventInstallationUpdate-available": {
  35125. "type": "object",
  35126. "properties": {
  35127. "id": {
  35128. "type": "string",
  35129. "pattern": "^evt_"
  35130. },
  35131. "type": {
  35132. "type": "string",
  35133. "enum": ["installation.update-available"]
  35134. },
  35135. "properties": {
  35136. "type": "object",
  35137. "properties": {
  35138. "version": {
  35139. "type": "string"
  35140. }
  35141. },
  35142. "required": ["version"],
  35143. "additionalProperties": false
  35144. }
  35145. },
  35146. "required": ["id", "type", "properties"],
  35147. "additionalProperties": false
  35148. },
  35149. "EventFileEdited": {
  35150. "type": "object",
  35151. "properties": {
  35152. "id": {
  35153. "type": "string",
  35154. "pattern": "^evt_"
  35155. },
  35156. "type": {
  35157. "type": "string",
  35158. "enum": ["file.edited"]
  35159. },
  35160. "properties": {
  35161. "type": "object",
  35162. "properties": {
  35163. "file": {
  35164. "type": "string"
  35165. }
  35166. },
  35167. "required": ["file"],
  35168. "additionalProperties": false
  35169. }
  35170. },
  35171. "required": ["id", "type", "properties"],
  35172. "additionalProperties": false
  35173. },
  35174. "EventReferenceUpdated": {
  35175. "type": "object",
  35176. "properties": {
  35177. "id": {
  35178. "type": "string",
  35179. "pattern": "^evt_"
  35180. },
  35181. "type": {
  35182. "type": "string",
  35183. "enum": ["reference.updated"]
  35184. },
  35185. "properties": {
  35186. "type": "object",
  35187. "properties": {}
  35188. }
  35189. },
  35190. "required": ["id", "type", "properties"],
  35191. "additionalProperties": false
  35192. },
  35193. "EventPermissionV2Asked": {
  35194. "type": "object",
  35195. "properties": {
  35196. "id": {
  35197. "type": "string",
  35198. "pattern": "^evt_"
  35199. },
  35200. "type": {
  35201. "type": "string",
  35202. "enum": ["permission.v2.asked"]
  35203. },
  35204. "properties": {
  35205. "type": "object",
  35206. "properties": {
  35207. "id": {
  35208. "type": "string",
  35209. "pattern": "^per"
  35210. },
  35211. "sessionID": {
  35212. "type": "string",
  35213. "pattern": "^ses"
  35214. },
  35215. "action": {
  35216. "type": "string"
  35217. },
  35218. "resources": {
  35219. "type": "array",
  35220. "items": {
  35221. "type": "string"
  35222. }
  35223. },
  35224. "save": {
  35225. "type": "array",
  35226. "items": {
  35227. "type": "string"
  35228. }
  35229. },
  35230. "metadata": {
  35231. "type": "object"
  35232. },
  35233. "source": {
  35234. "$ref": "#/components/schemas/PermissionV2Source"
  35235. }
  35236. },
  35237. "required": ["id", "sessionID", "action", "resources"],
  35238. "additionalProperties": false
  35239. }
  35240. },
  35241. "required": ["id", "type", "properties"],
  35242. "additionalProperties": false
  35243. },
  35244. "EventPermissionV2Replied": {
  35245. "type": "object",
  35246. "properties": {
  35247. "id": {
  35248. "type": "string",
  35249. "pattern": "^evt_"
  35250. },
  35251. "type": {
  35252. "type": "string",
  35253. "enum": ["permission.v2.replied"]
  35254. },
  35255. "properties": {
  35256. "type": "object",
  35257. "properties": {
  35258. "sessionID": {
  35259. "type": "string",
  35260. "pattern": "^ses"
  35261. },
  35262. "requestID": {
  35263. "type": "string",
  35264. "pattern": "^per"
  35265. },
  35266. "reply": {
  35267. "$ref": "#/components/schemas/PermissionV2Reply"
  35268. }
  35269. },
  35270. "required": ["sessionID", "requestID", "reply"],
  35271. "additionalProperties": false
  35272. }
  35273. },
  35274. "required": ["id", "type", "properties"],
  35275. "additionalProperties": false
  35276. },
  35277. "EventPluginAdded": {
  35278. "type": "object",
  35279. "properties": {
  35280. "id": {
  35281. "type": "string",
  35282. "pattern": "^evt_"
  35283. },
  35284. "type": {
  35285. "type": "string",
  35286. "enum": ["plugin.added"]
  35287. },
  35288. "properties": {
  35289. "type": "object",
  35290. "properties": {
  35291. "id": {
  35292. "type": "string"
  35293. }
  35294. },
  35295. "required": ["id"],
  35296. "additionalProperties": false
  35297. }
  35298. },
  35299. "required": ["id", "type", "properties"],
  35300. "additionalProperties": false
  35301. },
  35302. "EventProjectDirectoriesUpdated": {
  35303. "type": "object",
  35304. "properties": {
  35305. "id": {
  35306. "type": "string",
  35307. "pattern": "^evt_"
  35308. },
  35309. "type": {
  35310. "type": "string",
  35311. "enum": ["project.directories.updated"]
  35312. },
  35313. "properties": {
  35314. "type": "object",
  35315. "properties": {
  35316. "projectID": {
  35317. "type": "string"
  35318. }
  35319. },
  35320. "required": ["projectID"],
  35321. "additionalProperties": false
  35322. }
  35323. },
  35324. "required": ["id", "type", "properties"],
  35325. "additionalProperties": false
  35326. },
  35327. "EventFileWatcherUpdated": {
  35328. "type": "object",
  35329. "properties": {
  35330. "id": {
  35331. "type": "string",
  35332. "pattern": "^evt_"
  35333. },
  35334. "type": {
  35335. "type": "string",
  35336. "enum": ["file.watcher.updated"]
  35337. },
  35338. "properties": {
  35339. "type": "object",
  35340. "properties": {
  35341. "file": {
  35342. "type": "string"
  35343. },
  35344. "event": {
  35345. "type": "string",
  35346. "enum": ["add", "change", "unlink"]
  35347. }
  35348. },
  35349. "required": ["file", "event"],
  35350. "additionalProperties": false
  35351. }
  35352. },
  35353. "required": ["id", "type", "properties"],
  35354. "additionalProperties": false
  35355. },
  35356. "EventPtyCreated": {
  35357. "type": "object",
  35358. "properties": {
  35359. "id": {
  35360. "type": "string",
  35361. "pattern": "^evt_"
  35362. },
  35363. "type": {
  35364. "type": "string",
  35365. "enum": ["pty.created"]
  35366. },
  35367. "properties": {
  35368. "type": "object",
  35369. "properties": {
  35370. "info": {
  35371. "$ref": "#/components/schemas/Pty"
  35372. }
  35373. },
  35374. "required": ["info"],
  35375. "additionalProperties": false
  35376. }
  35377. },
  35378. "required": ["id", "type", "properties"],
  35379. "additionalProperties": false
  35380. },
  35381. "EventPtyUpdated": {
  35382. "type": "object",
  35383. "properties": {
  35384. "id": {
  35385. "type": "string",
  35386. "pattern": "^evt_"
  35387. },
  35388. "type": {
  35389. "type": "string",
  35390. "enum": ["pty.updated"]
  35391. },
  35392. "properties": {
  35393. "type": "object",
  35394. "properties": {
  35395. "info": {
  35396. "$ref": "#/components/schemas/Pty"
  35397. }
  35398. },
  35399. "required": ["info"],
  35400. "additionalProperties": false
  35401. }
  35402. },
  35403. "required": ["id", "type", "properties"],
  35404. "additionalProperties": false
  35405. },
  35406. "EventPtyExited": {
  35407. "type": "object",
  35408. "properties": {
  35409. "id": {
  35410. "type": "string",
  35411. "pattern": "^evt_"
  35412. },
  35413. "type": {
  35414. "type": "string",
  35415. "enum": ["pty.exited"]
  35416. },
  35417. "properties": {
  35418. "type": "object",
  35419. "properties": {
  35420. "id": {
  35421. "type": "string",
  35422. "pattern": "^pty"
  35423. },
  35424. "exitCode": {
  35425. "type": "integer",
  35426. "minimum": 0
  35427. }
  35428. },
  35429. "required": ["id", "exitCode"],
  35430. "additionalProperties": false
  35431. }
  35432. },
  35433. "required": ["id", "type", "properties"],
  35434. "additionalProperties": false
  35435. },
  35436. "EventPtyDeleted": {
  35437. "type": "object",
  35438. "properties": {
  35439. "id": {
  35440. "type": "string",
  35441. "pattern": "^evt_"
  35442. },
  35443. "type": {
  35444. "type": "string",
  35445. "enum": ["pty.deleted"]
  35446. },
  35447. "properties": {
  35448. "type": "object",
  35449. "properties": {
  35450. "id": {
  35451. "type": "string",
  35452. "pattern": "^pty"
  35453. }
  35454. },
  35455. "required": ["id"],
  35456. "additionalProperties": false
  35457. }
  35458. },
  35459. "required": ["id", "type", "properties"],
  35460. "additionalProperties": false
  35461. },
  35462. "EventQuestionV2Asked": {
  35463. "type": "object",
  35464. "properties": {
  35465. "id": {
  35466. "type": "string",
  35467. "pattern": "^evt_"
  35468. },
  35469. "type": {
  35470. "type": "string",
  35471. "enum": ["question.v2.asked"]
  35472. },
  35473. "properties": {
  35474. "type": "object",
  35475. "properties": {
  35476. "id": {
  35477. "type": "string",
  35478. "pattern": "^que"
  35479. },
  35480. "sessionID": {
  35481. "type": "string",
  35482. "pattern": "^ses"
  35483. },
  35484. "questions": {
  35485. "type": "array",
  35486. "items": {
  35487. "$ref": "#/components/schemas/QuestionV2Info"
  35488. },
  35489. "description": "Questions to ask"
  35490. },
  35491. "tool": {
  35492. "$ref": "#/components/schemas/QuestionV2Tool"
  35493. }
  35494. },
  35495. "required": ["id", "sessionID", "questions"],
  35496. "additionalProperties": false
  35497. }
  35498. },
  35499. "required": ["id", "type", "properties"],
  35500. "additionalProperties": false
  35501. },
  35502. "EventQuestionV2Replied": {
  35503. "type": "object",
  35504. "properties": {
  35505. "id": {
  35506. "type": "string",
  35507. "pattern": "^evt_"
  35508. },
  35509. "type": {
  35510. "type": "string",
  35511. "enum": ["question.v2.replied"]
  35512. },
  35513. "properties": {
  35514. "type": "object",
  35515. "properties": {
  35516. "sessionID": {
  35517. "type": "string",
  35518. "pattern": "^ses"
  35519. },
  35520. "requestID": {
  35521. "type": "string",
  35522. "pattern": "^que"
  35523. },
  35524. "answers": {
  35525. "type": "array",
  35526. "items": {
  35527. "$ref": "#/components/schemas/QuestionV2Answer"
  35528. }
  35529. }
  35530. },
  35531. "required": ["sessionID", "requestID", "answers"],
  35532. "additionalProperties": false
  35533. }
  35534. },
  35535. "required": ["id", "type", "properties"],
  35536. "additionalProperties": false
  35537. },
  35538. "EventQuestionV2Rejected": {
  35539. "type": "object",
  35540. "properties": {
  35541. "id": {
  35542. "type": "string",
  35543. "pattern": "^evt_"
  35544. },
  35545. "type": {
  35546. "type": "string",
  35547. "enum": ["question.v2.rejected"]
  35548. },
  35549. "properties": {
  35550. "type": "object",
  35551. "properties": {
  35552. "sessionID": {
  35553. "type": "string",
  35554. "pattern": "^ses"
  35555. },
  35556. "requestID": {
  35557. "type": "string",
  35558. "pattern": "^que"
  35559. }
  35560. },
  35561. "required": ["sessionID", "requestID"],
  35562. "additionalProperties": false
  35563. }
  35564. },
  35565. "required": ["id", "type", "properties"],
  35566. "additionalProperties": false
  35567. },
  35568. "EventTodoUpdated": {
  35569. "type": "object",
  35570. "properties": {
  35571. "id": {
  35572. "type": "string",
  35573. "pattern": "^evt_"
  35574. },
  35575. "type": {
  35576. "type": "string",
  35577. "enum": ["todo.updated"]
  35578. },
  35579. "properties": {
  35580. "type": "object",
  35581. "properties": {
  35582. "sessionID": {
  35583. "type": "string",
  35584. "pattern": "^ses"
  35585. },
  35586. "todos": {
  35587. "type": "array",
  35588. "items": {
  35589. "$ref": "#/components/schemas/Todo"
  35590. }
  35591. }
  35592. },
  35593. "required": ["sessionID", "todos"],
  35594. "additionalProperties": false
  35595. }
  35596. },
  35597. "required": ["id", "type", "properties"],
  35598. "additionalProperties": false
  35599. },
  35600. "EventLspUpdated": {
  35601. "type": "object",
  35602. "properties": {
  35603. "id": {
  35604. "type": "string",
  35605. "pattern": "^evt_"
  35606. },
  35607. "type": {
  35608. "type": "string",
  35609. "enum": ["lsp.updated"]
  35610. },
  35611. "properties": {
  35612. "type": "object",
  35613. "properties": {}
  35614. }
  35615. },
  35616. "required": ["id", "type", "properties"],
  35617. "additionalProperties": false
  35618. },
  35619. "EventPermissionAsked": {
  35620. "type": "object",
  35621. "properties": {
  35622. "id": {
  35623. "type": "string",
  35624. "pattern": "^evt_"
  35625. },
  35626. "type": {
  35627. "type": "string",
  35628. "enum": ["permission.asked"]
  35629. },
  35630. "properties": {
  35631. "type": "object",
  35632. "properties": {
  35633. "id": {
  35634. "type": "string",
  35635. "pattern": "^per"
  35636. },
  35637. "sessionID": {
  35638. "type": "string",
  35639. "pattern": "^ses"
  35640. },
  35641. "permission": {
  35642. "type": "string"
  35643. },
  35644. "patterns": {
  35645. "type": "array",
  35646. "items": {
  35647. "type": "string"
  35648. }
  35649. },
  35650. "metadata": {
  35651. "type": "object"
  35652. },
  35653. "always": {
  35654. "type": "array",
  35655. "items": {
  35656. "type": "string"
  35657. }
  35658. },
  35659. "tool": {
  35660. "type": "object",
  35661. "properties": {
  35662. "messageID": {
  35663. "type": "string"
  35664. },
  35665. "callID": {
  35666. "type": "string"
  35667. }
  35668. },
  35669. "required": ["messageID", "callID"],
  35670. "additionalProperties": false
  35671. }
  35672. },
  35673. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  35674. "additionalProperties": false
  35675. }
  35676. },
  35677. "required": ["id", "type", "properties"],
  35678. "additionalProperties": false
  35679. },
  35680. "EventPermissionReplied": {
  35681. "type": "object",
  35682. "properties": {
  35683. "id": {
  35684. "type": "string",
  35685. "pattern": "^evt_"
  35686. },
  35687. "type": {
  35688. "type": "string",
  35689. "enum": ["permission.replied"]
  35690. },
  35691. "properties": {
  35692. "type": "object",
  35693. "properties": {
  35694. "sessionID": {
  35695. "type": "string",
  35696. "pattern": "^ses"
  35697. },
  35698. "requestID": {
  35699. "type": "string",
  35700. "pattern": "^per"
  35701. },
  35702. "reply": {
  35703. "type": "string",
  35704. "enum": ["once", "always", "reject"]
  35705. }
  35706. },
  35707. "required": ["sessionID", "requestID", "reply"],
  35708. "additionalProperties": false
  35709. }
  35710. },
  35711. "required": ["id", "type", "properties"],
  35712. "additionalProperties": false
  35713. },
  35714. "EventMcpToolsChanged": {
  35715. "type": "object",
  35716. "properties": {
  35717. "id": {
  35718. "type": "string",
  35719. "pattern": "^evt_"
  35720. },
  35721. "type": {
  35722. "type": "string",
  35723. "enum": ["mcp.tools.changed"]
  35724. },
  35725. "properties": {
  35726. "type": "object",
  35727. "properties": {
  35728. "server": {
  35729. "type": "string"
  35730. }
  35731. },
  35732. "required": ["server"],
  35733. "additionalProperties": false
  35734. }
  35735. },
  35736. "required": ["id", "type", "properties"],
  35737. "additionalProperties": false
  35738. },
  35739. "EventMcpBrowserOpenFailed": {
  35740. "type": "object",
  35741. "properties": {
  35742. "id": {
  35743. "type": "string",
  35744. "pattern": "^evt_"
  35745. },
  35746. "type": {
  35747. "type": "string",
  35748. "enum": ["mcp.browser.open.failed"]
  35749. },
  35750. "properties": {
  35751. "type": "object",
  35752. "properties": {
  35753. "mcpName": {
  35754. "type": "string"
  35755. },
  35756. "url": {
  35757. "type": "string"
  35758. }
  35759. },
  35760. "required": ["mcpName", "url"],
  35761. "additionalProperties": false
  35762. }
  35763. },
  35764. "required": ["id", "type", "properties"],
  35765. "additionalProperties": false
  35766. },
  35767. "EventCommandExecuted": {
  35768. "type": "object",
  35769. "properties": {
  35770. "id": {
  35771. "type": "string",
  35772. "pattern": "^evt_"
  35773. },
  35774. "type": {
  35775. "type": "string",
  35776. "enum": ["command.executed"]
  35777. },
  35778. "properties": {
  35779. "type": "object",
  35780. "properties": {
  35781. "name": {
  35782. "type": "string"
  35783. },
  35784. "sessionID": {
  35785. "type": "string",
  35786. "pattern": "^ses"
  35787. },
  35788. "arguments": {
  35789. "type": "string"
  35790. },
  35791. "messageID": {
  35792. "type": "string",
  35793. "pattern": "^msg"
  35794. }
  35795. },
  35796. "required": ["name", "sessionID", "arguments", "messageID"],
  35797. "additionalProperties": false
  35798. }
  35799. },
  35800. "required": ["id", "type", "properties"],
  35801. "additionalProperties": false
  35802. },
  35803. "EventProjectUpdated": {
  35804. "type": "object",
  35805. "properties": {
  35806. "id": {
  35807. "type": "string",
  35808. "pattern": "^evt_"
  35809. },
  35810. "type": {
  35811. "type": "string",
  35812. "enum": ["project.updated"]
  35813. },
  35814. "properties": {
  35815. "type": "object",
  35816. "properties": {
  35817. "id": {
  35818. "type": "string"
  35819. },
  35820. "worktree": {
  35821. "type": "string"
  35822. },
  35823. "vcs": {
  35824. "type": "string",
  35825. "enum": ["git"]
  35826. },
  35827. "name": {
  35828. "type": "string"
  35829. },
  35830. "icon": {
  35831. "type": "object",
  35832. "properties": {
  35833. "url": {
  35834. "type": "string"
  35835. },
  35836. "override": {
  35837. "type": "string"
  35838. },
  35839. "color": {
  35840. "type": "string"
  35841. }
  35842. },
  35843. "additionalProperties": false
  35844. },
  35845. "commands": {
  35846. "type": "object",
  35847. "properties": {
  35848. "start": {
  35849. "type": "string",
  35850. "description": "Startup script to run when creating a new workspace (worktree)"
  35851. }
  35852. },
  35853. "additionalProperties": false
  35854. },
  35855. "time": {
  35856. "type": "object",
  35857. "properties": {
  35858. "created": {
  35859. "type": "integer",
  35860. "minimum": 0
  35861. },
  35862. "updated": {
  35863. "type": "integer",
  35864. "minimum": 0
  35865. },
  35866. "initialized": {
  35867. "type": "integer",
  35868. "minimum": 0
  35869. }
  35870. },
  35871. "required": ["created", "updated"],
  35872. "additionalProperties": false
  35873. },
  35874. "sandboxes": {
  35875. "type": "array",
  35876. "items": {
  35877. "type": "string"
  35878. }
  35879. }
  35880. },
  35881. "required": ["id", "worktree", "time", "sandboxes"],
  35882. "additionalProperties": false
  35883. }
  35884. },
  35885. "required": ["id", "type", "properties"],
  35886. "additionalProperties": false
  35887. },
  35888. "EventSessionStatus": {
  35889. "type": "object",
  35890. "properties": {
  35891. "id": {
  35892. "type": "string",
  35893. "pattern": "^evt_"
  35894. },
  35895. "type": {
  35896. "type": "string",
  35897. "enum": ["session.status"]
  35898. },
  35899. "properties": {
  35900. "type": "object",
  35901. "properties": {
  35902. "sessionID": {
  35903. "type": "string",
  35904. "pattern": "^ses"
  35905. },
  35906. "status": {
  35907. "$ref": "#/components/schemas/SessionStatus"
  35908. }
  35909. },
  35910. "required": ["sessionID", "status"],
  35911. "additionalProperties": false
  35912. }
  35913. },
  35914. "required": ["id", "type", "properties"],
  35915. "additionalProperties": false
  35916. },
  35917. "EventSessionIdle": {
  35918. "type": "object",
  35919. "properties": {
  35920. "id": {
  35921. "type": "string",
  35922. "pattern": "^evt_"
  35923. },
  35924. "type": {
  35925. "type": "string",
  35926. "enum": ["session.idle"]
  35927. },
  35928. "properties": {
  35929. "type": "object",
  35930. "properties": {
  35931. "sessionID": {
  35932. "type": "string",
  35933. "pattern": "^ses"
  35934. }
  35935. },
  35936. "required": ["sessionID"],
  35937. "additionalProperties": false
  35938. }
  35939. },
  35940. "required": ["id", "type", "properties"],
  35941. "additionalProperties": false
  35942. },
  35943. "EventQuestionAsked": {
  35944. "type": "object",
  35945. "properties": {
  35946. "id": {
  35947. "type": "string",
  35948. "pattern": "^evt_"
  35949. },
  35950. "type": {
  35951. "type": "string",
  35952. "enum": ["question.asked"]
  35953. },
  35954. "properties": {
  35955. "type": "object",
  35956. "properties": {
  35957. "id": {
  35958. "type": "string",
  35959. "pattern": "^que"
  35960. },
  35961. "sessionID": {
  35962. "type": "string",
  35963. "pattern": "^ses"
  35964. },
  35965. "questions": {
  35966. "type": "array",
  35967. "items": {
  35968. "$ref": "#/components/schemas/QuestionInfo"
  35969. },
  35970. "description": "Questions to ask"
  35971. },
  35972. "tool": {
  35973. "$ref": "#/components/schemas/QuestionTool"
  35974. }
  35975. },
  35976. "required": ["id", "sessionID", "questions"],
  35977. "additionalProperties": false
  35978. }
  35979. },
  35980. "required": ["id", "type", "properties"],
  35981. "additionalProperties": false
  35982. },
  35983. "EventQuestionReplied": {
  35984. "type": "object",
  35985. "properties": {
  35986. "id": {
  35987. "type": "string",
  35988. "pattern": "^evt_"
  35989. },
  35990. "type": {
  35991. "type": "string",
  35992. "enum": ["question.replied"]
  35993. },
  35994. "properties": {
  35995. "type": "object",
  35996. "properties": {
  35997. "sessionID": {
  35998. "type": "string",
  35999. "pattern": "^ses"
  36000. },
  36001. "requestID": {
  36002. "type": "string",
  36003. "pattern": "^que"
  36004. },
  36005. "answers": {
  36006. "type": "array",
  36007. "items": {
  36008. "$ref": "#/components/schemas/QuestionAnswer"
  36009. }
  36010. }
  36011. },
  36012. "required": ["sessionID", "requestID", "answers"],
  36013. "additionalProperties": false
  36014. }
  36015. },
  36016. "required": ["id", "type", "properties"],
  36017. "additionalProperties": false
  36018. },
  36019. "EventQuestionRejected": {
  36020. "type": "object",
  36021. "properties": {
  36022. "id": {
  36023. "type": "string",
  36024. "pattern": "^evt_"
  36025. },
  36026. "type": {
  36027. "type": "string",
  36028. "enum": ["question.rejected"]
  36029. },
  36030. "properties": {
  36031. "type": "object",
  36032. "properties": {
  36033. "sessionID": {
  36034. "type": "string",
  36035. "pattern": "^ses"
  36036. },
  36037. "requestID": {
  36038. "type": "string",
  36039. "pattern": "^que"
  36040. }
  36041. },
  36042. "required": ["sessionID", "requestID"],
  36043. "additionalProperties": false
  36044. }
  36045. },
  36046. "required": ["id", "type", "properties"],
  36047. "additionalProperties": false
  36048. },
  36049. "EventSessionCompacted": {
  36050. "type": "object",
  36051. "properties": {
  36052. "id": {
  36053. "type": "string",
  36054. "pattern": "^evt_"
  36055. },
  36056. "type": {
  36057. "type": "string",
  36058. "enum": ["session.compacted"]
  36059. },
  36060. "properties": {
  36061. "type": "object",
  36062. "properties": {
  36063. "sessionID": {
  36064. "type": "string",
  36065. "pattern": "^ses"
  36066. }
  36067. },
  36068. "required": ["sessionID"],
  36069. "additionalProperties": false
  36070. }
  36071. },
  36072. "required": ["id", "type", "properties"],
  36073. "additionalProperties": false
  36074. },
  36075. "EventVcsBranchUpdated": {
  36076. "type": "object",
  36077. "properties": {
  36078. "id": {
  36079. "type": "string",
  36080. "pattern": "^evt_"
  36081. },
  36082. "type": {
  36083. "type": "string",
  36084. "enum": ["vcs.branch.updated"]
  36085. },
  36086. "properties": {
  36087. "type": "object",
  36088. "properties": {
  36089. "branch": {
  36090. "type": "string"
  36091. }
  36092. },
  36093. "additionalProperties": false
  36094. }
  36095. },
  36096. "required": ["id", "type", "properties"],
  36097. "additionalProperties": false
  36098. },
  36099. "EventWorkspaceReady": {
  36100. "type": "object",
  36101. "properties": {
  36102. "id": {
  36103. "type": "string",
  36104. "pattern": "^evt_"
  36105. },
  36106. "type": {
  36107. "type": "string",
  36108. "enum": ["workspace.ready"]
  36109. },
  36110. "properties": {
  36111. "type": "object",
  36112. "properties": {
  36113. "name": {
  36114. "type": "string"
  36115. }
  36116. },
  36117. "required": ["name"],
  36118. "additionalProperties": false
  36119. }
  36120. },
  36121. "required": ["id", "type", "properties"],
  36122. "additionalProperties": false
  36123. },
  36124. "EventWorkspaceFailed": {
  36125. "type": "object",
  36126. "properties": {
  36127. "id": {
  36128. "type": "string",
  36129. "pattern": "^evt_"
  36130. },
  36131. "type": {
  36132. "type": "string",
  36133. "enum": ["workspace.failed"]
  36134. },
  36135. "properties": {
  36136. "type": "object",
  36137. "properties": {
  36138. "message": {
  36139. "type": "string"
  36140. }
  36141. },
  36142. "required": ["message"],
  36143. "additionalProperties": false
  36144. }
  36145. },
  36146. "required": ["id", "type", "properties"],
  36147. "additionalProperties": false
  36148. },
  36149. "EventWorkspaceStatus": {
  36150. "type": "object",
  36151. "properties": {
  36152. "id": {
  36153. "type": "string",
  36154. "pattern": "^evt_"
  36155. },
  36156. "type": {
  36157. "type": "string",
  36158. "enum": ["workspace.status"]
  36159. },
  36160. "properties": {
  36161. "type": "object",
  36162. "properties": {
  36163. "workspaceID": {
  36164. "type": "string",
  36165. "pattern": "^wrk"
  36166. },
  36167. "status": {
  36168. "type": "string",
  36169. "enum": ["connected", "connecting", "disconnected", "error"]
  36170. }
  36171. },
  36172. "required": ["workspaceID", "status"],
  36173. "additionalProperties": false
  36174. }
  36175. },
  36176. "required": ["id", "type", "properties"],
  36177. "additionalProperties": false
  36178. },
  36179. "EventWorktreeReady": {
  36180. "type": "object",
  36181. "properties": {
  36182. "id": {
  36183. "type": "string",
  36184. "pattern": "^evt_"
  36185. },
  36186. "type": {
  36187. "type": "string",
  36188. "enum": ["worktree.ready"]
  36189. },
  36190. "properties": {
  36191. "type": "object",
  36192. "properties": {
  36193. "name": {
  36194. "type": "string"
  36195. },
  36196. "branch": {
  36197. "type": "string"
  36198. }
  36199. },
  36200. "required": ["name"],
  36201. "additionalProperties": false
  36202. }
  36203. },
  36204. "required": ["id", "type", "properties"],
  36205. "additionalProperties": false
  36206. },
  36207. "EventWorktreeFailed": {
  36208. "type": "object",
  36209. "properties": {
  36210. "id": {
  36211. "type": "string",
  36212. "pattern": "^evt_"
  36213. },
  36214. "type": {
  36215. "type": "string",
  36216. "enum": ["worktree.failed"]
  36217. },
  36218. "properties": {
  36219. "type": "object",
  36220. "properties": {
  36221. "message": {
  36222. "type": "string"
  36223. }
  36224. },
  36225. "required": ["message"],
  36226. "additionalProperties": false
  36227. }
  36228. },
  36229. "required": ["id", "type", "properties"],
  36230. "additionalProperties": false
  36231. },
  36232. "EventServerConnected": {
  36233. "type": "object",
  36234. "properties": {
  36235. "id": {
  36236. "type": "string",
  36237. "pattern": "^evt_"
  36238. },
  36239. "type": {
  36240. "type": "string",
  36241. "enum": ["server.connected"]
  36242. },
  36243. "properties": {
  36244. "type": "object",
  36245. "properties": {}
  36246. }
  36247. },
  36248. "required": ["id", "type", "properties"],
  36249. "additionalProperties": false
  36250. },
  36251. "EventGlobalDisposed": {
  36252. "type": "object",
  36253. "properties": {
  36254. "id": {
  36255. "type": "string",
  36256. "pattern": "^evt_"
  36257. },
  36258. "type": {
  36259. "type": "string",
  36260. "enum": ["global.disposed"]
  36261. },
  36262. "properties": {
  36263. "type": "object",
  36264. "properties": {}
  36265. }
  36266. },
  36267. "required": ["id", "type", "properties"],
  36268. "additionalProperties": false
  36269. },
  36270. "CredentialOAuth": {
  36271. "type": "object",
  36272. "properties": {
  36273. "type": {
  36274. "type": "string",
  36275. "enum": ["oauth"]
  36276. },
  36277. "methodID": {
  36278. "type": "string"
  36279. },
  36280. "refresh": {
  36281. "type": "string"
  36282. },
  36283. "access": {
  36284. "type": "string"
  36285. },
  36286. "expires": {
  36287. "type": "integer",
  36288. "minimum": 0
  36289. },
  36290. "metadata": {
  36291. "type": "object"
  36292. }
  36293. },
  36294. "required": ["type", "methodID", "refresh", "access", "expires"],
  36295. "additionalProperties": false
  36296. },
  36297. "CredentialKey": {
  36298. "type": "object",
  36299. "properties": {
  36300. "type": {
  36301. "type": "string",
  36302. "enum": ["key"]
  36303. },
  36304. "key": {
  36305. "type": "string"
  36306. },
  36307. "metadata": {
  36308. "type": "object"
  36309. }
  36310. },
  36311. "required": ["type", "key"],
  36312. "additionalProperties": false
  36313. },
  36314. "SkillV2DirectorySource": {
  36315. "type": "object",
  36316. "properties": {
  36317. "type": {
  36318. "type": "string",
  36319. "enum": ["directory"]
  36320. },
  36321. "path": {
  36322. "type": "string"
  36323. }
  36324. },
  36325. "required": ["type", "path"],
  36326. "additionalProperties": false
  36327. },
  36328. "SkillV2UrlSource": {
  36329. "type": "object",
  36330. "properties": {
  36331. "type": {
  36332. "type": "string",
  36333. "enum": ["url"]
  36334. },
  36335. "url": {
  36336. "type": "string"
  36337. }
  36338. },
  36339. "required": ["type", "url"],
  36340. "additionalProperties": false
  36341. },
  36342. "SkillV2EmbeddedSource": {
  36343. "type": "object",
  36344. "properties": {
  36345. "type": {
  36346. "type": "string",
  36347. "enum": ["embedded"]
  36348. },
  36349. "skill": {
  36350. "$ref": "#/components/schemas/SkillV2Info"
  36351. }
  36352. },
  36353. "required": ["type", "skill"],
  36354. "additionalProperties": false
  36355. },
  36356. "BadRequestError": {
  36357. "type": "object",
  36358. "required": ["name", "data"],
  36359. "properties": {
  36360. "name": {
  36361. "type": "string",
  36362. "enum": ["BadRequest"]
  36363. },
  36364. "data": {
  36365. "type": "object",
  36366. "required": ["message"],
  36367. "properties": {
  36368. "message": {
  36369. "type": "string"
  36370. },
  36371. "kind": {
  36372. "type": "string",
  36373. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36374. }
  36375. }
  36376. }
  36377. }
  36378. }
  36379. }
  36380. },
  36381. "security": [],
  36382. "tags": [
  36383. {
  36384. "name": "control",
  36385. "description": "Control plane routes."
  36386. },
  36387. {
  36388. "name": "controlPlane",
  36389. "description": "Control-plane orchestration routes."
  36390. },
  36391. {
  36392. "name": "global",
  36393. "description": "Global server routes."
  36394. },
  36395. {
  36396. "name": "event",
  36397. "description": "Instance event stream route."
  36398. },
  36399. {
  36400. "name": "config",
  36401. "description": "Experimental HttpApi config routes."
  36402. },
  36403. {
  36404. "name": "experimental",
  36405. "description": "Experimental HttpApi read-only routes."
  36406. },
  36407. {
  36408. "name": "file",
  36409. "description": "Experimental HttpApi file routes."
  36410. },
  36411. {
  36412. "name": "instance",
  36413. "description": "Experimental HttpApi instance read routes."
  36414. },
  36415. {
  36416. "name": "mcp",
  36417. "description": "Experimental HttpApi MCP routes."
  36418. },
  36419. {
  36420. "name": "project",
  36421. "description": "Experimental HttpApi project routes."
  36422. },
  36423. {
  36424. "name": "projectCopy",
  36425. "description": "Project copy naming routes."
  36426. },
  36427. {
  36428. "name": "pty",
  36429. "description": "Experimental HttpApi PTY routes."
  36430. },
  36431. {
  36432. "name": "question",
  36433. "description": "Question routes."
  36434. },
  36435. {
  36436. "name": "permission",
  36437. "description": "Experimental HttpApi permission routes."
  36438. },
  36439. {
  36440. "name": "provider",
  36441. "description": "Experimental HttpApi provider routes."
  36442. },
  36443. {
  36444. "name": "session",
  36445. "description": "Experimental HttpApi session routes."
  36446. },
  36447. {
  36448. "name": "sync",
  36449. "description": "Experimental HttpApi sync routes."
  36450. },
  36451. {
  36452. "name": "tui",
  36453. "description": "Experimental HttpApi TUI routes."
  36454. },
  36455. {
  36456. "name": "workspace",
  36457. "description": "Experimental HttpApi workspace routes."
  36458. },
  36459. {
  36460. "name": "opencode HttpApi",
  36461. "description": "Experimental HttpApi surface for selected instance routes."
  36462. },
  36463. {
  36464. "name": "opencode HttpApi",
  36465. "description": "Experimental HttpApi surface for selected instance routes."
  36466. },
  36467. {
  36468. "name": "opencode HttpApi",
  36469. "description": "Experimental HttpApi surface for selected instance routes."
  36470. },
  36471. {
  36472. "name": "sessions",
  36473. "description": "Experimental session routes."
  36474. },
  36475. {
  36476. "name": "messages",
  36477. "description": "Experimental message routes."
  36478. },
  36479. {
  36480. "name": "models",
  36481. "description": "Experimental model routes."
  36482. },
  36483. {
  36484. "name": "providers",
  36485. "description": "Experimental provider routes."
  36486. },
  36487. {
  36488. "name": "integrations",
  36489. "description": "Integration discovery and authentication routes."
  36490. },
  36491. {
  36492. "name": "opencode HttpApi",
  36493. "description": "Experimental HttpApi surface for selected instance routes."
  36494. },
  36495. {
  36496. "name": "permissions",
  36497. "description": "Experimental permission routes."
  36498. },
  36499. {
  36500. "name": "filesystem",
  36501. "description": "Experimental location-scoped filesystem routes."
  36502. },
  36503. {
  36504. "name": "commands",
  36505. "description": "Experimental command routes."
  36506. },
  36507. {
  36508. "name": "skills",
  36509. "description": "Experimental skill routes."
  36510. },
  36511. {
  36512. "name": "events",
  36513. "description": "Experimental event stream route."
  36514. },
  36515. {
  36516. "name": "pty",
  36517. "description": "Experimental location-scoped PTY routes."
  36518. },
  36519. {
  36520. "name": "session questions",
  36521. "description": "Experimental session question routes."
  36522. },
  36523. {
  36524. "name": "reference",
  36525. "description": "Location-scoped project references."
  36526. },
  36527. {
  36528. "name": "projectCopy",
  36529. "description": "Project copy management routes."
  36530. },
  36531. {
  36532. "name": "pty",
  36533. "description": "PTY websocket route."
  36534. }
  36535. ]
  36536. }