openapi.json 1.0 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763
  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. "post": {
  12811. "tags": ["permissions"],
  12812. "operationId": "v2.session.permission.create",
  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": "object",
  12835. "properties": {
  12836. "id": {
  12837. "type": "string",
  12838. "pattern": "^per"
  12839. },
  12840. "effect": {
  12841. "$ref": "#/components/schemas/PermissionV2Effect"
  12842. }
  12843. },
  12844. "required": ["id", "effect"],
  12845. "additionalProperties": false
  12846. }
  12847. },
  12848. "required": ["data"],
  12849. "additionalProperties": false
  12850. }
  12851. }
  12852. }
  12853. },
  12854. "400": {
  12855. "description": "InvalidRequestError",
  12856. "content": {
  12857. "application/json": {
  12858. "schema": {
  12859. "$ref": "#/components/schemas/InvalidRequestError"
  12860. }
  12861. }
  12862. }
  12863. },
  12864. "401": {
  12865. "description": "UnauthorizedError",
  12866. "content": {
  12867. "application/json": {
  12868. "schema": {
  12869. "$ref": "#/components/schemas/UnauthorizedError"
  12870. }
  12871. }
  12872. }
  12873. },
  12874. "404": {
  12875. "description": "SessionNotFoundError",
  12876. "content": {
  12877. "application/json": {
  12878. "schema": {
  12879. "anyOf": [
  12880. {
  12881. "$ref": "#/components/schemas/SessionNotFoundError"
  12882. },
  12883. {
  12884. "$ref": "#/components/schemas/SessionNotFoundError"
  12885. }
  12886. ]
  12887. }
  12888. }
  12889. }
  12890. }
  12891. },
  12892. "description": "Evaluate and, when approval is required, create a permission request for a session.",
  12893. "summary": "Create permission request",
  12894. "requestBody": {
  12895. "content": {
  12896. "application/json": {
  12897. "schema": {
  12898. "type": "object",
  12899. "properties": {
  12900. "id": {
  12901. "type": "string",
  12902. "pattern": "^per"
  12903. },
  12904. "action": {
  12905. "type": "string"
  12906. },
  12907. "resources": {
  12908. "type": "array",
  12909. "items": {
  12910. "type": "string"
  12911. }
  12912. },
  12913. "save": {
  12914. "type": "array",
  12915. "items": {
  12916. "type": "string"
  12917. }
  12918. },
  12919. "metadata": {
  12920. "type": "object"
  12921. },
  12922. "source": {
  12923. "$ref": "#/components/schemas/PermissionV2Source"
  12924. },
  12925. "agent": {
  12926. "type": "string"
  12927. }
  12928. },
  12929. "required": ["action", "resources"],
  12930. "additionalProperties": false
  12931. }
  12932. }
  12933. },
  12934. "required": true
  12935. },
  12936. "x-codeSamples": [
  12937. {
  12938. "lang": "js",
  12939. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.create({\n ...\n})"
  12940. }
  12941. ]
  12942. },
  12943. "get": {
  12944. "tags": ["permissions"],
  12945. "operationId": "v2.session.permission.list",
  12946. "parameters": [
  12947. {
  12948. "name": "sessionID",
  12949. "in": "path",
  12950. "schema": {
  12951. "type": "string",
  12952. "pattern": "^ses"
  12953. },
  12954. "required": true
  12955. }
  12956. ],
  12957. "security": [],
  12958. "responses": {
  12959. "200": {
  12960. "description": "Success",
  12961. "content": {
  12962. "application/json": {
  12963. "schema": {
  12964. "type": "object",
  12965. "properties": {
  12966. "data": {
  12967. "type": "array",
  12968. "items": {
  12969. "$ref": "#/components/schemas/PermissionV2Request"
  12970. }
  12971. }
  12972. },
  12973. "required": ["data"],
  12974. "additionalProperties": false
  12975. }
  12976. }
  12977. }
  12978. },
  12979. "400": {
  12980. "description": "InvalidRequestError",
  12981. "content": {
  12982. "application/json": {
  12983. "schema": {
  12984. "$ref": "#/components/schemas/InvalidRequestError"
  12985. }
  12986. }
  12987. }
  12988. },
  12989. "401": {
  12990. "description": "UnauthorizedError",
  12991. "content": {
  12992. "application/json": {
  12993. "schema": {
  12994. "$ref": "#/components/schemas/UnauthorizedError"
  12995. }
  12996. }
  12997. }
  12998. },
  12999. "404": {
  13000. "description": "SessionNotFoundError",
  13001. "content": {
  13002. "application/json": {
  13003. "schema": {
  13004. "anyOf": [
  13005. {
  13006. "$ref": "#/components/schemas/SessionNotFoundError"
  13007. },
  13008. {
  13009. "$ref": "#/components/schemas/SessionNotFoundError"
  13010. }
  13011. ]
  13012. }
  13013. }
  13014. }
  13015. }
  13016. },
  13017. "description": "Retrieve pending permission requests owned by a session.",
  13018. "summary": "List session permission requests",
  13019. "x-codeSamples": [
  13020. {
  13021. "lang": "js",
  13022. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  13023. }
  13024. ]
  13025. }
  13026. },
  13027. "/api/session/{sessionID}/permission/{requestID}": {
  13028. "get": {
  13029. "tags": ["permissions"],
  13030. "operationId": "v2.session.permission.get",
  13031. "parameters": [
  13032. {
  13033. "name": "sessionID",
  13034. "in": "path",
  13035. "schema": {
  13036. "type": "string",
  13037. "pattern": "^ses"
  13038. },
  13039. "required": true
  13040. },
  13041. {
  13042. "name": "requestID",
  13043. "in": "path",
  13044. "schema": {
  13045. "type": "string",
  13046. "pattern": "^per"
  13047. },
  13048. "required": true
  13049. }
  13050. ],
  13051. "security": [],
  13052. "responses": {
  13053. "200": {
  13054. "description": "Success",
  13055. "content": {
  13056. "application/json": {
  13057. "schema": {
  13058. "type": "object",
  13059. "properties": {
  13060. "data": {
  13061. "$ref": "#/components/schemas/PermissionV2Request"
  13062. }
  13063. },
  13064. "required": ["data"],
  13065. "additionalProperties": false
  13066. }
  13067. }
  13068. }
  13069. },
  13070. "400": {
  13071. "description": "InvalidRequestError",
  13072. "content": {
  13073. "application/json": {
  13074. "schema": {
  13075. "$ref": "#/components/schemas/InvalidRequestError"
  13076. }
  13077. }
  13078. }
  13079. },
  13080. "401": {
  13081. "description": "UnauthorizedError",
  13082. "content": {
  13083. "application/json": {
  13084. "schema": {
  13085. "$ref": "#/components/schemas/UnauthorizedError"
  13086. }
  13087. }
  13088. }
  13089. },
  13090. "404": {
  13091. "description": "SessionNotFoundError | PermissionNotFoundError",
  13092. "content": {
  13093. "application/json": {
  13094. "schema": {
  13095. "anyOf": [
  13096. {
  13097. "$ref": "#/components/schemas/PermissionNotFoundError"
  13098. },
  13099. {
  13100. "$ref": "#/components/schemas/SessionNotFoundError"
  13101. },
  13102. {
  13103. "$ref": "#/components/schemas/SessionNotFoundError"
  13104. }
  13105. ]
  13106. }
  13107. }
  13108. }
  13109. }
  13110. },
  13111. "description": "Retrieve a pending permission request owned by a session.",
  13112. "summary": "Get permission request",
  13113. "x-codeSamples": [
  13114. {
  13115. "lang": "js",
  13116. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.get({\n ...\n})"
  13117. }
  13118. ]
  13119. }
  13120. },
  13121. "/api/session/{sessionID}/permission/{requestID}/reply": {
  13122. "post": {
  13123. "tags": ["permissions"],
  13124. "operationId": "v2.session.permission.reply",
  13125. "parameters": [
  13126. {
  13127. "name": "sessionID",
  13128. "in": "path",
  13129. "schema": {
  13130. "type": "string",
  13131. "pattern": "^ses"
  13132. },
  13133. "required": true
  13134. },
  13135. {
  13136. "name": "requestID",
  13137. "in": "path",
  13138. "schema": {
  13139. "type": "string",
  13140. "pattern": "^per"
  13141. },
  13142. "required": true
  13143. }
  13144. ],
  13145. "security": [],
  13146. "responses": {
  13147. "204": {
  13148. "description": "<No Content>"
  13149. },
  13150. "400": {
  13151. "description": "InvalidRequestError",
  13152. "content": {
  13153. "application/json": {
  13154. "schema": {
  13155. "$ref": "#/components/schemas/InvalidRequestError"
  13156. }
  13157. }
  13158. }
  13159. },
  13160. "401": {
  13161. "description": "UnauthorizedError",
  13162. "content": {
  13163. "application/json": {
  13164. "schema": {
  13165. "$ref": "#/components/schemas/UnauthorizedError"
  13166. }
  13167. }
  13168. }
  13169. },
  13170. "404": {
  13171. "description": "SessionNotFoundError | PermissionNotFoundError",
  13172. "content": {
  13173. "application/json": {
  13174. "schema": {
  13175. "anyOf": [
  13176. {
  13177. "$ref": "#/components/schemas/PermissionNotFoundError"
  13178. },
  13179. {
  13180. "$ref": "#/components/schemas/SessionNotFoundError"
  13181. },
  13182. {
  13183. "$ref": "#/components/schemas/SessionNotFoundError"
  13184. }
  13185. ]
  13186. }
  13187. }
  13188. }
  13189. }
  13190. },
  13191. "description": "Respond to a pending permission request owned by a session.",
  13192. "summary": "Reply to pending permission request",
  13193. "requestBody": {
  13194. "content": {
  13195. "application/json": {
  13196. "schema": {
  13197. "type": "object",
  13198. "properties": {
  13199. "reply": {
  13200. "$ref": "#/components/schemas/PermissionV2Reply"
  13201. },
  13202. "message": {
  13203. "type": "string"
  13204. }
  13205. },
  13206. "required": ["reply"],
  13207. "additionalProperties": false
  13208. }
  13209. }
  13210. },
  13211. "required": true
  13212. },
  13213. "x-codeSamples": [
  13214. {
  13215. "lang": "js",
  13216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  13217. }
  13218. ]
  13219. }
  13220. },
  13221. "/api/fs/read/*": {
  13222. "get": {
  13223. "tags": ["filesystem"],
  13224. "operationId": "v2.fs.read",
  13225. "parameters": [
  13226. {
  13227. "name": "location",
  13228. "in": "query",
  13229. "schema": {
  13230. "type": "object",
  13231. "properties": {
  13232. "directory": {
  13233. "type": "string"
  13234. },
  13235. "workspace": {
  13236. "type": "string"
  13237. }
  13238. },
  13239. "additionalProperties": false
  13240. },
  13241. "required": false,
  13242. "style": "deepObject",
  13243. "explode": true
  13244. }
  13245. ],
  13246. "security": [],
  13247. "responses": {
  13248. "200": {
  13249. "description": "Success",
  13250. "content": {
  13251. "application/octet-stream": {
  13252. "schema": {
  13253. "type": "string",
  13254. "format": "binary"
  13255. }
  13256. }
  13257. }
  13258. },
  13259. "400": {
  13260. "description": "InvalidRequestError",
  13261. "content": {
  13262. "application/json": {
  13263. "schema": {
  13264. "$ref": "#/components/schemas/InvalidRequestError"
  13265. }
  13266. }
  13267. }
  13268. },
  13269. "401": {
  13270. "description": "UnauthorizedError",
  13271. "content": {
  13272. "application/json": {
  13273. "schema": {
  13274. "$ref": "#/components/schemas/UnauthorizedError"
  13275. }
  13276. }
  13277. }
  13278. }
  13279. },
  13280. "description": "Serve one file relative to the requested location.",
  13281. "summary": "Read file",
  13282. "x-codeSamples": [
  13283. {
  13284. "lang": "js",
  13285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  13286. }
  13287. ]
  13288. }
  13289. },
  13290. "/api/fs/list": {
  13291. "get": {
  13292. "tags": ["filesystem"],
  13293. "operationId": "v2.fs.list",
  13294. "parameters": [
  13295. {
  13296. "name": "location",
  13297. "in": "query",
  13298. "schema": {
  13299. "type": "object",
  13300. "properties": {
  13301. "directory": {
  13302. "type": "string"
  13303. },
  13304. "workspace": {
  13305. "type": "string"
  13306. }
  13307. },
  13308. "additionalProperties": false
  13309. },
  13310. "required": false,
  13311. "style": "deepObject",
  13312. "explode": true
  13313. },
  13314. {
  13315. "name": "path",
  13316. "in": "query",
  13317. "schema": {
  13318. "type": "string"
  13319. },
  13320. "required": false
  13321. }
  13322. ],
  13323. "security": [],
  13324. "responses": {
  13325. "200": {
  13326. "description": "Success",
  13327. "content": {
  13328. "application/json": {
  13329. "schema": {
  13330. "type": "object",
  13331. "properties": {
  13332. "location": {
  13333. "$ref": "#/components/schemas/LocationInfo"
  13334. },
  13335. "data": {
  13336. "type": "array",
  13337. "items": {
  13338. "$ref": "#/components/schemas/FileSystemEntry"
  13339. }
  13340. }
  13341. },
  13342. "required": ["location", "data"],
  13343. "additionalProperties": false
  13344. }
  13345. }
  13346. }
  13347. },
  13348. "400": {
  13349. "description": "InvalidRequestError",
  13350. "content": {
  13351. "application/json": {
  13352. "schema": {
  13353. "$ref": "#/components/schemas/InvalidRequestError"
  13354. }
  13355. }
  13356. }
  13357. },
  13358. "401": {
  13359. "description": "UnauthorizedError",
  13360. "content": {
  13361. "application/json": {
  13362. "schema": {
  13363. "$ref": "#/components/schemas/UnauthorizedError"
  13364. }
  13365. }
  13366. }
  13367. }
  13368. },
  13369. "description": "List direct children of one directory relative to the requested location.",
  13370. "summary": "List directory",
  13371. "x-codeSamples": [
  13372. {
  13373. "lang": "js",
  13374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13375. }
  13376. ]
  13377. }
  13378. },
  13379. "/api/fs/find": {
  13380. "get": {
  13381. "tags": ["filesystem"],
  13382. "operationId": "v2.fs.find",
  13383. "parameters": [
  13384. {
  13385. "name": "location",
  13386. "in": "query",
  13387. "schema": {
  13388. "type": "object",
  13389. "properties": {
  13390. "directory": {
  13391. "type": "string"
  13392. },
  13393. "workspace": {
  13394. "type": "string"
  13395. }
  13396. },
  13397. "additionalProperties": false
  13398. },
  13399. "required": false,
  13400. "style": "deepObject",
  13401. "explode": true
  13402. },
  13403. {
  13404. "name": "query",
  13405. "in": "query",
  13406. "schema": {
  13407. "type": "string"
  13408. },
  13409. "required": true
  13410. },
  13411. {
  13412. "name": "type",
  13413. "in": "query",
  13414. "schema": {
  13415. "type": "string",
  13416. "enum": ["file", "directory"]
  13417. },
  13418. "required": false
  13419. },
  13420. {
  13421. "name": "limit",
  13422. "in": "query",
  13423. "schema": {
  13424. "type": "string"
  13425. },
  13426. "required": false
  13427. }
  13428. ],
  13429. "security": [],
  13430. "responses": {
  13431. "200": {
  13432. "description": "Success",
  13433. "content": {
  13434. "application/json": {
  13435. "schema": {
  13436. "type": "object",
  13437. "properties": {
  13438. "location": {
  13439. "$ref": "#/components/schemas/LocationInfo"
  13440. },
  13441. "data": {
  13442. "type": "array",
  13443. "items": {
  13444. "$ref": "#/components/schemas/FileSystemEntry"
  13445. }
  13446. }
  13447. },
  13448. "required": ["location", "data"],
  13449. "additionalProperties": false
  13450. }
  13451. }
  13452. }
  13453. },
  13454. "400": {
  13455. "description": "InvalidRequestError",
  13456. "content": {
  13457. "application/json": {
  13458. "schema": {
  13459. "$ref": "#/components/schemas/InvalidRequestError"
  13460. }
  13461. }
  13462. }
  13463. },
  13464. "401": {
  13465. "description": "UnauthorizedError",
  13466. "content": {
  13467. "application/json": {
  13468. "schema": {
  13469. "$ref": "#/components/schemas/UnauthorizedError"
  13470. }
  13471. }
  13472. }
  13473. }
  13474. },
  13475. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13476. "summary": "Find files",
  13477. "x-codeSamples": [
  13478. {
  13479. "lang": "js",
  13480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13481. }
  13482. ]
  13483. }
  13484. },
  13485. "/api/command": {
  13486. "get": {
  13487. "tags": ["commands"],
  13488. "operationId": "v2.command.list",
  13489. "parameters": [
  13490. {
  13491. "name": "location",
  13492. "in": "query",
  13493. "schema": {
  13494. "type": "object",
  13495. "properties": {
  13496. "directory": {
  13497. "type": "string"
  13498. },
  13499. "workspace": {
  13500. "type": "string"
  13501. }
  13502. },
  13503. "additionalProperties": false
  13504. },
  13505. "required": false,
  13506. "style": "deepObject",
  13507. "explode": true
  13508. }
  13509. ],
  13510. "security": [],
  13511. "responses": {
  13512. "200": {
  13513. "description": "Success",
  13514. "content": {
  13515. "application/json": {
  13516. "schema": {
  13517. "type": "object",
  13518. "properties": {
  13519. "location": {
  13520. "$ref": "#/components/schemas/LocationInfo"
  13521. },
  13522. "data": {
  13523. "type": "array",
  13524. "items": {
  13525. "$ref": "#/components/schemas/CommandV2Info"
  13526. }
  13527. }
  13528. },
  13529. "required": ["location", "data"],
  13530. "additionalProperties": false
  13531. }
  13532. }
  13533. }
  13534. },
  13535. "400": {
  13536. "description": "InvalidRequestError",
  13537. "content": {
  13538. "application/json": {
  13539. "schema": {
  13540. "$ref": "#/components/schemas/InvalidRequestError"
  13541. }
  13542. }
  13543. }
  13544. },
  13545. "401": {
  13546. "description": "UnauthorizedError",
  13547. "content": {
  13548. "application/json": {
  13549. "schema": {
  13550. "$ref": "#/components/schemas/UnauthorizedError"
  13551. }
  13552. }
  13553. }
  13554. }
  13555. },
  13556. "description": "Retrieve currently registered commands.",
  13557. "summary": "List commands",
  13558. "x-codeSamples": [
  13559. {
  13560. "lang": "js",
  13561. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13562. }
  13563. ]
  13564. }
  13565. },
  13566. "/api/skill": {
  13567. "get": {
  13568. "tags": ["skills"],
  13569. "operationId": "v2.skill.list",
  13570. "parameters": [
  13571. {
  13572. "name": "location",
  13573. "in": "query",
  13574. "schema": {
  13575. "type": "object",
  13576. "properties": {
  13577. "directory": {
  13578. "type": "string"
  13579. },
  13580. "workspace": {
  13581. "type": "string"
  13582. }
  13583. },
  13584. "additionalProperties": false
  13585. },
  13586. "required": false,
  13587. "style": "deepObject",
  13588. "explode": true
  13589. }
  13590. ],
  13591. "security": [],
  13592. "responses": {
  13593. "200": {
  13594. "description": "Success",
  13595. "content": {
  13596. "application/json": {
  13597. "schema": {
  13598. "type": "object",
  13599. "properties": {
  13600. "location": {
  13601. "$ref": "#/components/schemas/LocationInfo"
  13602. },
  13603. "data": {
  13604. "type": "array",
  13605. "items": {
  13606. "$ref": "#/components/schemas/SkillV2Info"
  13607. }
  13608. }
  13609. },
  13610. "required": ["location", "data"],
  13611. "additionalProperties": false
  13612. }
  13613. }
  13614. }
  13615. },
  13616. "400": {
  13617. "description": "InvalidRequestError",
  13618. "content": {
  13619. "application/json": {
  13620. "schema": {
  13621. "$ref": "#/components/schemas/InvalidRequestError"
  13622. }
  13623. }
  13624. }
  13625. },
  13626. "401": {
  13627. "description": "UnauthorizedError",
  13628. "content": {
  13629. "application/json": {
  13630. "schema": {
  13631. "$ref": "#/components/schemas/UnauthorizedError"
  13632. }
  13633. }
  13634. }
  13635. }
  13636. },
  13637. "description": "Retrieve currently registered skills.",
  13638. "summary": "List skills",
  13639. "x-codeSamples": [
  13640. {
  13641. "lang": "js",
  13642. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13643. }
  13644. ]
  13645. }
  13646. },
  13647. "/api/event": {
  13648. "get": {
  13649. "tags": ["events"],
  13650. "operationId": "v2.event.subscribe",
  13651. "parameters": [],
  13652. "security": [],
  13653. "responses": {
  13654. "200": {
  13655. "description": "Event stream",
  13656. "content": {
  13657. "text/event-stream": {
  13658. "schema": {
  13659. "$ref": "#/components/schemas/V2Event"
  13660. }
  13661. }
  13662. }
  13663. },
  13664. "400": {
  13665. "description": "InvalidRequestError",
  13666. "content": {
  13667. "application/json": {
  13668. "schema": {
  13669. "$ref": "#/components/schemas/InvalidRequestError"
  13670. }
  13671. }
  13672. }
  13673. },
  13674. "401": {
  13675. "description": "UnauthorizedError",
  13676. "content": {
  13677. "application/json": {
  13678. "schema": {
  13679. "$ref": "#/components/schemas/UnauthorizedError"
  13680. }
  13681. }
  13682. }
  13683. }
  13684. },
  13685. "description": "Subscribe to native event payloads for the server.",
  13686. "summary": "Subscribe to events",
  13687. "x-codeSamples": [
  13688. {
  13689. "lang": "js",
  13690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13691. }
  13692. ]
  13693. }
  13694. },
  13695. "/api/pty": {
  13696. "get": {
  13697. "tags": ["pty"],
  13698. "operationId": "v2.pty.list",
  13699. "parameters": [
  13700. {
  13701. "name": "location",
  13702. "in": "query",
  13703. "schema": {
  13704. "type": "object",
  13705. "properties": {
  13706. "directory": {
  13707. "type": "string"
  13708. },
  13709. "workspace": {
  13710. "type": "string"
  13711. }
  13712. },
  13713. "additionalProperties": false
  13714. },
  13715. "required": false,
  13716. "style": "deepObject",
  13717. "explode": true
  13718. }
  13719. ],
  13720. "security": [],
  13721. "responses": {
  13722. "200": {
  13723. "description": "Success",
  13724. "content": {
  13725. "application/json": {
  13726. "schema": {
  13727. "type": "object",
  13728. "properties": {
  13729. "location": {
  13730. "$ref": "#/components/schemas/LocationInfo"
  13731. },
  13732. "data": {
  13733. "type": "array",
  13734. "items": {
  13735. "$ref": "#/components/schemas/Pty"
  13736. }
  13737. }
  13738. },
  13739. "required": ["location", "data"],
  13740. "additionalProperties": false
  13741. }
  13742. }
  13743. }
  13744. },
  13745. "400": {
  13746. "description": "InvalidRequestError",
  13747. "content": {
  13748. "application/json": {
  13749. "schema": {
  13750. "$ref": "#/components/schemas/InvalidRequestError"
  13751. }
  13752. }
  13753. }
  13754. },
  13755. "401": {
  13756. "description": "UnauthorizedError",
  13757. "content": {
  13758. "application/json": {
  13759. "schema": {
  13760. "$ref": "#/components/schemas/UnauthorizedError"
  13761. }
  13762. }
  13763. }
  13764. }
  13765. },
  13766. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13767. "summary": "List PTY sessions",
  13768. "x-codeSamples": [
  13769. {
  13770. "lang": "js",
  13771. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13772. }
  13773. ]
  13774. },
  13775. "post": {
  13776. "tags": ["pty"],
  13777. "operationId": "v2.pty.create",
  13778. "parameters": [
  13779. {
  13780. "name": "location",
  13781. "in": "query",
  13782. "schema": {
  13783. "type": "object",
  13784. "properties": {
  13785. "directory": {
  13786. "type": "string"
  13787. },
  13788. "workspace": {
  13789. "type": "string"
  13790. }
  13791. },
  13792. "additionalProperties": false
  13793. },
  13794. "required": false,
  13795. "style": "deepObject",
  13796. "explode": true
  13797. }
  13798. ],
  13799. "security": [],
  13800. "responses": {
  13801. "200": {
  13802. "description": "Success",
  13803. "content": {
  13804. "application/json": {
  13805. "schema": {
  13806. "type": "object",
  13807. "properties": {
  13808. "location": {
  13809. "$ref": "#/components/schemas/LocationInfo"
  13810. },
  13811. "data": {
  13812. "$ref": "#/components/schemas/Pty"
  13813. }
  13814. },
  13815. "required": ["location", "data"],
  13816. "additionalProperties": false
  13817. }
  13818. }
  13819. }
  13820. },
  13821. "400": {
  13822. "description": "InvalidRequestError",
  13823. "content": {
  13824. "application/json": {
  13825. "schema": {
  13826. "$ref": "#/components/schemas/InvalidRequestError"
  13827. }
  13828. }
  13829. }
  13830. },
  13831. "401": {
  13832. "description": "UnauthorizedError",
  13833. "content": {
  13834. "application/json": {
  13835. "schema": {
  13836. "$ref": "#/components/schemas/UnauthorizedError"
  13837. }
  13838. }
  13839. }
  13840. }
  13841. },
  13842. "description": "Create a pseudo-terminal session for a location.",
  13843. "summary": "Create PTY session",
  13844. "requestBody": {
  13845. "content": {
  13846. "application/json": {
  13847. "schema": {
  13848. "type": "object",
  13849. "properties": {
  13850. "command": {
  13851. "type": "string"
  13852. },
  13853. "args": {
  13854. "type": "array",
  13855. "items": {
  13856. "type": "string"
  13857. }
  13858. },
  13859. "cwd": {
  13860. "type": "string"
  13861. },
  13862. "title": {
  13863. "type": "string"
  13864. },
  13865. "env": {
  13866. "type": "object",
  13867. "additionalProperties": {
  13868. "type": "string"
  13869. }
  13870. }
  13871. },
  13872. "additionalProperties": false
  13873. }
  13874. }
  13875. },
  13876. "required": true
  13877. },
  13878. "x-codeSamples": [
  13879. {
  13880. "lang": "js",
  13881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13882. }
  13883. ]
  13884. }
  13885. },
  13886. "/api/pty/{ptyID}": {
  13887. "get": {
  13888. "tags": ["pty"],
  13889. "operationId": "v2.pty.get",
  13890. "parameters": [
  13891. {
  13892. "name": "ptyID",
  13893. "in": "path",
  13894. "schema": {
  13895. "type": "string",
  13896. "pattern": "^pty"
  13897. },
  13898. "required": true
  13899. },
  13900. {
  13901. "name": "location",
  13902. "in": "query",
  13903. "schema": {
  13904. "type": "object",
  13905. "properties": {
  13906. "directory": {
  13907. "type": "string"
  13908. },
  13909. "workspace": {
  13910. "type": "string"
  13911. }
  13912. },
  13913. "additionalProperties": false
  13914. },
  13915. "required": false,
  13916. "style": "deepObject",
  13917. "explode": true
  13918. }
  13919. ],
  13920. "security": [],
  13921. "responses": {
  13922. "200": {
  13923. "description": "Success",
  13924. "content": {
  13925. "application/json": {
  13926. "schema": {
  13927. "type": "object",
  13928. "properties": {
  13929. "location": {
  13930. "$ref": "#/components/schemas/LocationInfo"
  13931. },
  13932. "data": {
  13933. "$ref": "#/components/schemas/Pty"
  13934. }
  13935. },
  13936. "required": ["location", "data"],
  13937. "additionalProperties": false
  13938. }
  13939. }
  13940. }
  13941. },
  13942. "400": {
  13943. "description": "InvalidRequestError",
  13944. "content": {
  13945. "application/json": {
  13946. "schema": {
  13947. "$ref": "#/components/schemas/InvalidRequestError"
  13948. }
  13949. }
  13950. }
  13951. },
  13952. "401": {
  13953. "description": "UnauthorizedError",
  13954. "content": {
  13955. "application/json": {
  13956. "schema": {
  13957. "$ref": "#/components/schemas/UnauthorizedError"
  13958. }
  13959. }
  13960. }
  13961. },
  13962. "404": {
  13963. "description": "PtyNotFoundError",
  13964. "content": {
  13965. "application/json": {
  13966. "schema": {
  13967. "$ref": "#/components/schemas/PtyNotFoundError"
  13968. }
  13969. }
  13970. }
  13971. }
  13972. },
  13973. "description": "Get one PTY session, including its exit code once exited.",
  13974. "summary": "Get PTY session",
  13975. "x-codeSamples": [
  13976. {
  13977. "lang": "js",
  13978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13979. }
  13980. ]
  13981. },
  13982. "put": {
  13983. "tags": ["pty"],
  13984. "operationId": "v2.pty.update",
  13985. "parameters": [
  13986. {
  13987. "name": "ptyID",
  13988. "in": "path",
  13989. "schema": {
  13990. "type": "string",
  13991. "pattern": "^pty"
  13992. },
  13993. "required": true
  13994. },
  13995. {
  13996. "name": "location",
  13997. "in": "query",
  13998. "schema": {
  13999. "type": "object",
  14000. "properties": {
  14001. "directory": {
  14002. "type": "string"
  14003. },
  14004. "workspace": {
  14005. "type": "string"
  14006. }
  14007. },
  14008. "additionalProperties": false
  14009. },
  14010. "required": false,
  14011. "style": "deepObject",
  14012. "explode": true
  14013. }
  14014. ],
  14015. "security": [],
  14016. "responses": {
  14017. "200": {
  14018. "description": "Success",
  14019. "content": {
  14020. "application/json": {
  14021. "schema": {
  14022. "type": "object",
  14023. "properties": {
  14024. "location": {
  14025. "$ref": "#/components/schemas/LocationInfo"
  14026. },
  14027. "data": {
  14028. "$ref": "#/components/schemas/Pty"
  14029. }
  14030. },
  14031. "required": ["location", "data"],
  14032. "additionalProperties": false
  14033. }
  14034. }
  14035. }
  14036. },
  14037. "400": {
  14038. "description": "InvalidRequestError",
  14039. "content": {
  14040. "application/json": {
  14041. "schema": {
  14042. "$ref": "#/components/schemas/InvalidRequestError"
  14043. }
  14044. }
  14045. }
  14046. },
  14047. "401": {
  14048. "description": "UnauthorizedError",
  14049. "content": {
  14050. "application/json": {
  14051. "schema": {
  14052. "$ref": "#/components/schemas/UnauthorizedError"
  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": "Update the title or viewport size of one PTY session.",
  14069. "summary": "Update PTY session",
  14070. "requestBody": {
  14071. "content": {
  14072. "application/json": {
  14073. "schema": {
  14074. "type": "object",
  14075. "properties": {
  14076. "title": {
  14077. "type": "string"
  14078. },
  14079. "size": {
  14080. "type": "object",
  14081. "properties": {
  14082. "rows": {
  14083. "type": "integer",
  14084. "exclusiveMinimum": 0
  14085. },
  14086. "cols": {
  14087. "type": "integer",
  14088. "exclusiveMinimum": 0
  14089. }
  14090. },
  14091. "required": ["rows", "cols"],
  14092. "additionalProperties": false
  14093. }
  14094. },
  14095. "additionalProperties": false
  14096. }
  14097. }
  14098. },
  14099. "required": true
  14100. },
  14101. "x-codeSamples": [
  14102. {
  14103. "lang": "js",
  14104. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  14105. }
  14106. ]
  14107. },
  14108. "delete": {
  14109. "tags": ["pty"],
  14110. "operationId": "v2.pty.remove",
  14111. "parameters": [
  14112. {
  14113. "name": "ptyID",
  14114. "in": "path",
  14115. "schema": {
  14116. "type": "string",
  14117. "pattern": "^pty"
  14118. },
  14119. "required": true
  14120. },
  14121. {
  14122. "name": "location",
  14123. "in": "query",
  14124. "schema": {
  14125. "type": "object",
  14126. "properties": {
  14127. "directory": {
  14128. "type": "string"
  14129. },
  14130. "workspace": {
  14131. "type": "string"
  14132. }
  14133. },
  14134. "additionalProperties": false
  14135. },
  14136. "required": false,
  14137. "style": "deepObject",
  14138. "explode": true
  14139. }
  14140. ],
  14141. "security": [],
  14142. "responses": {
  14143. "204": {
  14144. "description": "<No Content>"
  14145. },
  14146. "400": {
  14147. "description": "InvalidRequestError",
  14148. "content": {
  14149. "application/json": {
  14150. "schema": {
  14151. "$ref": "#/components/schemas/InvalidRequestError"
  14152. }
  14153. }
  14154. }
  14155. },
  14156. "401": {
  14157. "description": "UnauthorizedError",
  14158. "content": {
  14159. "application/json": {
  14160. "schema": {
  14161. "$ref": "#/components/schemas/UnauthorizedError"
  14162. }
  14163. }
  14164. }
  14165. },
  14166. "404": {
  14167. "description": "PtyNotFoundError",
  14168. "content": {
  14169. "application/json": {
  14170. "schema": {
  14171. "$ref": "#/components/schemas/PtyNotFoundError"
  14172. }
  14173. }
  14174. }
  14175. }
  14176. },
  14177. "description": "Terminate and remove one PTY session.",
  14178. "summary": "Remove PTY session",
  14179. "x-codeSamples": [
  14180. {
  14181. "lang": "js",
  14182. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  14183. }
  14184. ]
  14185. }
  14186. },
  14187. "/api/pty/{ptyID}/connect-token": {
  14188. "post": {
  14189. "tags": ["pty"],
  14190. "operationId": "v2.pty.connectToken",
  14191. "parameters": [
  14192. {
  14193. "name": "ptyID",
  14194. "in": "path",
  14195. "schema": {
  14196. "type": "string",
  14197. "pattern": "^pty"
  14198. },
  14199. "required": true
  14200. },
  14201. {
  14202. "name": "location",
  14203. "in": "query",
  14204. "schema": {
  14205. "type": "object",
  14206. "properties": {
  14207. "directory": {
  14208. "type": "string"
  14209. },
  14210. "workspace": {
  14211. "type": "string"
  14212. }
  14213. },
  14214. "additionalProperties": false
  14215. },
  14216. "required": false,
  14217. "style": "deepObject",
  14218. "explode": true
  14219. }
  14220. ],
  14221. "security": [],
  14222. "responses": {
  14223. "200": {
  14224. "description": "Success",
  14225. "content": {
  14226. "application/json": {
  14227. "schema": {
  14228. "type": "object",
  14229. "properties": {
  14230. "location": {
  14231. "$ref": "#/components/schemas/LocationInfo"
  14232. },
  14233. "data": {
  14234. "type": "object",
  14235. "properties": {
  14236. "ticket": {
  14237. "type": "string"
  14238. },
  14239. "expires_in": {
  14240. "type": "integer",
  14241. "exclusiveMinimum": 0
  14242. }
  14243. },
  14244. "required": ["ticket", "expires_in"],
  14245. "additionalProperties": false
  14246. }
  14247. },
  14248. "required": ["location", "data"],
  14249. "additionalProperties": false
  14250. }
  14251. }
  14252. }
  14253. },
  14254. "400": {
  14255. "description": "InvalidRequestError",
  14256. "content": {
  14257. "application/json": {
  14258. "schema": {
  14259. "$ref": "#/components/schemas/InvalidRequestError"
  14260. }
  14261. }
  14262. }
  14263. },
  14264. "401": {
  14265. "description": "UnauthorizedError",
  14266. "content": {
  14267. "application/json": {
  14268. "schema": {
  14269. "$ref": "#/components/schemas/UnauthorizedError"
  14270. }
  14271. }
  14272. }
  14273. },
  14274. "403": {
  14275. "description": "ForbiddenError",
  14276. "content": {
  14277. "application/json": {
  14278. "schema": {
  14279. "$ref": "#/components/schemas/ForbiddenError"
  14280. }
  14281. }
  14282. }
  14283. },
  14284. "404": {
  14285. "description": "PtyNotFoundError",
  14286. "content": {
  14287. "application/json": {
  14288. "schema": {
  14289. "$ref": "#/components/schemas/PtyNotFoundError"
  14290. }
  14291. }
  14292. }
  14293. }
  14294. },
  14295. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  14296. "summary": "Create PTY WebSocket token",
  14297. "x-codeSamples": [
  14298. {
  14299. "lang": "js",
  14300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  14301. }
  14302. ]
  14303. }
  14304. },
  14305. "/api/pty/{ptyID}/connect": {
  14306. "get": {
  14307. "tags": ["pty"],
  14308. "operationId": "v2.pty.connect",
  14309. "parameters": [
  14310. {
  14311. "name": "ptyID",
  14312. "in": "path",
  14313. "schema": {
  14314. "type": "string",
  14315. "pattern": "^pty"
  14316. },
  14317. "required": true
  14318. },
  14319. {
  14320. "in": "query",
  14321. "name": "location[directory]",
  14322. "schema": {
  14323. "type": "string"
  14324. }
  14325. },
  14326. {
  14327. "in": "query",
  14328. "name": "location[workspace]",
  14329. "schema": {
  14330. "type": "string"
  14331. }
  14332. },
  14333. {
  14334. "in": "query",
  14335. "name": "cursor",
  14336. "schema": {
  14337. "type": "string"
  14338. }
  14339. },
  14340. {
  14341. "in": "query",
  14342. "name": "ticket",
  14343. "schema": {
  14344. "type": "string"
  14345. }
  14346. }
  14347. ],
  14348. "security": [],
  14349. "responses": {
  14350. "200": {
  14351. "description": "Success",
  14352. "content": {
  14353. "application/json": {
  14354. "schema": {
  14355. "type": "boolean"
  14356. }
  14357. }
  14358. }
  14359. },
  14360. "400": {
  14361. "description": "InvalidRequestError",
  14362. "content": {
  14363. "application/json": {
  14364. "schema": {
  14365. "$ref": "#/components/schemas/InvalidRequestError"
  14366. }
  14367. }
  14368. }
  14369. },
  14370. "401": {
  14371. "description": "UnauthorizedError",
  14372. "content": {
  14373. "application/json": {
  14374. "schema": {
  14375. "$ref": "#/components/schemas/UnauthorizedError"
  14376. }
  14377. }
  14378. }
  14379. },
  14380. "403": {
  14381. "description": "ForbiddenError",
  14382. "content": {
  14383. "application/json": {
  14384. "schema": {
  14385. "$ref": "#/components/schemas/ForbiddenError"
  14386. }
  14387. }
  14388. }
  14389. },
  14390. "404": {
  14391. "description": "PtyNotFoundError",
  14392. "content": {
  14393. "application/json": {
  14394. "schema": {
  14395. "$ref": "#/components/schemas/PtyNotFoundError"
  14396. }
  14397. }
  14398. }
  14399. }
  14400. },
  14401. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14402. "summary": "Connect to PTY session",
  14403. "x-codeSamples": [
  14404. {
  14405. "lang": "js",
  14406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14407. }
  14408. ]
  14409. }
  14410. },
  14411. "/api/question/request": {
  14412. "get": {
  14413. "tags": ["session questions"],
  14414. "operationId": "v2.question.request.list",
  14415. "parameters": [
  14416. {
  14417. "name": "location",
  14418. "in": "query",
  14419. "schema": {
  14420. "type": "object",
  14421. "properties": {
  14422. "directory": {
  14423. "type": "string"
  14424. },
  14425. "workspace": {
  14426. "type": "string"
  14427. }
  14428. },
  14429. "additionalProperties": false
  14430. },
  14431. "required": false,
  14432. "style": "deepObject",
  14433. "explode": true
  14434. }
  14435. ],
  14436. "security": [],
  14437. "responses": {
  14438. "200": {
  14439. "description": "Success",
  14440. "content": {
  14441. "application/json": {
  14442. "schema": {
  14443. "type": "object",
  14444. "properties": {
  14445. "location": {
  14446. "$ref": "#/components/schemas/LocationInfo"
  14447. },
  14448. "data": {
  14449. "type": "array",
  14450. "items": {
  14451. "$ref": "#/components/schemas/QuestionV2Request"
  14452. }
  14453. }
  14454. },
  14455. "required": ["location", "data"],
  14456. "additionalProperties": false
  14457. }
  14458. }
  14459. }
  14460. },
  14461. "400": {
  14462. "description": "InvalidRequestError",
  14463. "content": {
  14464. "application/json": {
  14465. "schema": {
  14466. "$ref": "#/components/schemas/InvalidRequestError"
  14467. }
  14468. }
  14469. }
  14470. },
  14471. "401": {
  14472. "description": "UnauthorizedError",
  14473. "content": {
  14474. "application/json": {
  14475. "schema": {
  14476. "$ref": "#/components/schemas/UnauthorizedError"
  14477. }
  14478. }
  14479. }
  14480. }
  14481. },
  14482. "description": "Retrieve pending question requests for a location.",
  14483. "summary": "List pending question requests",
  14484. "x-codeSamples": [
  14485. {
  14486. "lang": "js",
  14487. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14488. }
  14489. ]
  14490. }
  14491. },
  14492. "/api/session/{sessionID}/question": {
  14493. "get": {
  14494. "tags": ["session questions"],
  14495. "operationId": "v2.session.question.list",
  14496. "parameters": [
  14497. {
  14498. "name": "sessionID",
  14499. "in": "path",
  14500. "schema": {
  14501. "type": "string",
  14502. "pattern": "^ses"
  14503. },
  14504. "required": true
  14505. }
  14506. ],
  14507. "security": [],
  14508. "responses": {
  14509. "200": {
  14510. "description": "Success",
  14511. "content": {
  14512. "application/json": {
  14513. "schema": {
  14514. "type": "object",
  14515. "properties": {
  14516. "data": {
  14517. "type": "array",
  14518. "items": {
  14519. "$ref": "#/components/schemas/QuestionV2Request"
  14520. }
  14521. }
  14522. },
  14523. "required": ["data"],
  14524. "additionalProperties": false
  14525. }
  14526. }
  14527. }
  14528. },
  14529. "400": {
  14530. "description": "InvalidRequestError",
  14531. "content": {
  14532. "application/json": {
  14533. "schema": {
  14534. "$ref": "#/components/schemas/InvalidRequestError"
  14535. }
  14536. }
  14537. }
  14538. },
  14539. "401": {
  14540. "description": "UnauthorizedError",
  14541. "content": {
  14542. "application/json": {
  14543. "schema": {
  14544. "$ref": "#/components/schemas/UnauthorizedError"
  14545. }
  14546. }
  14547. }
  14548. },
  14549. "404": {
  14550. "description": "SessionNotFoundError",
  14551. "content": {
  14552. "application/json": {
  14553. "schema": {
  14554. "anyOf": [
  14555. {
  14556. "$ref": "#/components/schemas/SessionNotFoundError"
  14557. },
  14558. {
  14559. "$ref": "#/components/schemas/SessionNotFoundError"
  14560. }
  14561. ]
  14562. }
  14563. }
  14564. }
  14565. }
  14566. },
  14567. "description": "Retrieve pending question requests owned by a session.",
  14568. "summary": "List session question requests",
  14569. "x-codeSamples": [
  14570. {
  14571. "lang": "js",
  14572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14573. }
  14574. ]
  14575. }
  14576. },
  14577. "/api/session/{sessionID}/question/{requestID}/reply": {
  14578. "post": {
  14579. "tags": ["session questions"],
  14580. "operationId": "v2.session.question.reply",
  14581. "parameters": [
  14582. {
  14583. "name": "sessionID",
  14584. "in": "path",
  14585. "schema": {
  14586. "type": "string",
  14587. "pattern": "^ses"
  14588. },
  14589. "required": true
  14590. },
  14591. {
  14592. "name": "requestID",
  14593. "in": "path",
  14594. "schema": {
  14595. "type": "string",
  14596. "pattern": "^que"
  14597. },
  14598. "required": true
  14599. }
  14600. ],
  14601. "security": [],
  14602. "responses": {
  14603. "204": {
  14604. "description": "<No Content>"
  14605. },
  14606. "400": {
  14607. "description": "InvalidRequestError",
  14608. "content": {
  14609. "application/json": {
  14610. "schema": {
  14611. "$ref": "#/components/schemas/InvalidRequestError"
  14612. }
  14613. }
  14614. }
  14615. },
  14616. "401": {
  14617. "description": "UnauthorizedError",
  14618. "content": {
  14619. "application/json": {
  14620. "schema": {
  14621. "$ref": "#/components/schemas/UnauthorizedError"
  14622. }
  14623. }
  14624. }
  14625. },
  14626. "404": {
  14627. "description": "SessionNotFoundError | QuestionNotFoundError",
  14628. "content": {
  14629. "application/json": {
  14630. "schema": {
  14631. "anyOf": [
  14632. {
  14633. "$ref": "#/components/schemas/QuestionNotFoundError"
  14634. },
  14635. {
  14636. "$ref": "#/components/schemas/SessionNotFoundError"
  14637. },
  14638. {
  14639. "$ref": "#/components/schemas/SessionNotFoundError"
  14640. }
  14641. ]
  14642. }
  14643. }
  14644. }
  14645. }
  14646. },
  14647. "description": "Answer a pending question request owned by a session.",
  14648. "summary": "Reply to pending question request",
  14649. "requestBody": {
  14650. "content": {
  14651. "application/json": {
  14652. "schema": {
  14653. "$ref": "#/components/schemas/QuestionV2Reply"
  14654. }
  14655. }
  14656. },
  14657. "required": true
  14658. },
  14659. "x-codeSamples": [
  14660. {
  14661. "lang": "js",
  14662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14663. }
  14664. ]
  14665. }
  14666. },
  14667. "/api/session/{sessionID}/question/{requestID}/reject": {
  14668. "post": {
  14669. "tags": ["session questions"],
  14670. "operationId": "v2.session.question.reject",
  14671. "parameters": [
  14672. {
  14673. "name": "sessionID",
  14674. "in": "path",
  14675. "schema": {
  14676. "type": "string",
  14677. "pattern": "^ses"
  14678. },
  14679. "required": true
  14680. },
  14681. {
  14682. "name": "requestID",
  14683. "in": "path",
  14684. "schema": {
  14685. "type": "string",
  14686. "pattern": "^que"
  14687. },
  14688. "required": true
  14689. }
  14690. ],
  14691. "security": [],
  14692. "responses": {
  14693. "204": {
  14694. "description": "<No Content>"
  14695. },
  14696. "400": {
  14697. "description": "InvalidRequestError",
  14698. "content": {
  14699. "application/json": {
  14700. "schema": {
  14701. "$ref": "#/components/schemas/InvalidRequestError"
  14702. }
  14703. }
  14704. }
  14705. },
  14706. "401": {
  14707. "description": "UnauthorizedError",
  14708. "content": {
  14709. "application/json": {
  14710. "schema": {
  14711. "$ref": "#/components/schemas/UnauthorizedError"
  14712. }
  14713. }
  14714. }
  14715. },
  14716. "404": {
  14717. "description": "SessionNotFoundError | QuestionNotFoundError",
  14718. "content": {
  14719. "application/json": {
  14720. "schema": {
  14721. "anyOf": [
  14722. {
  14723. "$ref": "#/components/schemas/QuestionNotFoundError"
  14724. },
  14725. {
  14726. "$ref": "#/components/schemas/SessionNotFoundError"
  14727. },
  14728. {
  14729. "$ref": "#/components/schemas/SessionNotFoundError"
  14730. }
  14731. ]
  14732. }
  14733. }
  14734. }
  14735. }
  14736. },
  14737. "description": "Reject a pending question request owned by a session.",
  14738. "summary": "Reject pending question request",
  14739. "x-codeSamples": [
  14740. {
  14741. "lang": "js",
  14742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14743. }
  14744. ]
  14745. }
  14746. },
  14747. "/api/reference": {
  14748. "get": {
  14749. "tags": ["reference"],
  14750. "operationId": "v2.reference.list",
  14751. "parameters": [
  14752. {
  14753. "name": "location",
  14754. "in": "query",
  14755. "schema": {
  14756. "type": "object",
  14757. "properties": {
  14758. "directory": {
  14759. "type": "string"
  14760. },
  14761. "workspace": {
  14762. "type": "string"
  14763. }
  14764. },
  14765. "additionalProperties": false
  14766. },
  14767. "required": false,
  14768. "style": "deepObject",
  14769. "explode": true
  14770. }
  14771. ],
  14772. "security": [],
  14773. "responses": {
  14774. "200": {
  14775. "description": "Success",
  14776. "content": {
  14777. "application/json": {
  14778. "schema": {
  14779. "type": "object",
  14780. "properties": {
  14781. "location": {
  14782. "$ref": "#/components/schemas/LocationInfo"
  14783. },
  14784. "data": {
  14785. "type": "array",
  14786. "items": {
  14787. "$ref": "#/components/schemas/ReferenceInfo"
  14788. }
  14789. }
  14790. },
  14791. "required": ["location", "data"],
  14792. "additionalProperties": false
  14793. }
  14794. }
  14795. }
  14796. },
  14797. "400": {
  14798. "description": "InvalidRequestError",
  14799. "content": {
  14800. "application/json": {
  14801. "schema": {
  14802. "$ref": "#/components/schemas/InvalidRequestError"
  14803. }
  14804. }
  14805. }
  14806. },
  14807. "401": {
  14808. "description": "UnauthorizedError",
  14809. "content": {
  14810. "application/json": {
  14811. "schema": {
  14812. "$ref": "#/components/schemas/UnauthorizedError"
  14813. }
  14814. }
  14815. }
  14816. }
  14817. },
  14818. "description": "List references available in the requested location.",
  14819. "summary": "List references",
  14820. "x-codeSamples": [
  14821. {
  14822. "lang": "js",
  14823. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14824. }
  14825. ]
  14826. }
  14827. },
  14828. "/experimental/project/{projectID}/copy": {
  14829. "post": {
  14830. "tags": ["projectCopy"],
  14831. "operationId": "v2.projectCopy.create",
  14832. "parameters": [
  14833. {
  14834. "name": "projectID",
  14835. "in": "path",
  14836. "schema": {
  14837. "type": "string"
  14838. },
  14839. "required": true
  14840. },
  14841. {
  14842. "name": "location",
  14843. "in": "query",
  14844. "schema": {
  14845. "type": "object",
  14846. "properties": {
  14847. "directory": {
  14848. "type": "string"
  14849. },
  14850. "workspace": {
  14851. "type": "string"
  14852. }
  14853. },
  14854. "additionalProperties": false
  14855. },
  14856. "required": false,
  14857. "style": "deepObject",
  14858. "explode": true
  14859. }
  14860. ],
  14861. "responses": {
  14862. "200": {
  14863. "description": "ProjectCopy.Copy",
  14864. "content": {
  14865. "application/json": {
  14866. "schema": {
  14867. "$ref": "#/components/schemas/ProjectCopyCopy"
  14868. }
  14869. }
  14870. }
  14871. },
  14872. "400": {
  14873. "description": "ProjectCopyError | InvalidRequestError",
  14874. "content": {
  14875. "application/json": {
  14876. "schema": {
  14877. "anyOf": [
  14878. {
  14879. "$ref": "#/components/schemas/ProjectCopyError"
  14880. },
  14881. {
  14882. "$ref": "#/components/schemas/InvalidRequestError"
  14883. }
  14884. ]
  14885. }
  14886. }
  14887. }
  14888. }
  14889. },
  14890. "requestBody": {
  14891. "content": {
  14892. "application/json": {
  14893. "schema": {
  14894. "type": "object",
  14895. "properties": {
  14896. "strategy": {
  14897. "type": "string"
  14898. },
  14899. "directory": {
  14900. "type": "string"
  14901. },
  14902. "name": {
  14903. "type": "string"
  14904. }
  14905. },
  14906. "required": ["strategy", "directory"],
  14907. "additionalProperties": false
  14908. }
  14909. }
  14910. }
  14911. },
  14912. "x-codeSamples": [
  14913. {
  14914. "lang": "js",
  14915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14916. }
  14917. ]
  14918. },
  14919. "delete": {
  14920. "tags": ["projectCopy"],
  14921. "operationId": "v2.projectCopy.remove",
  14922. "parameters": [
  14923. {
  14924. "name": "projectID",
  14925. "in": "path",
  14926. "schema": {
  14927. "type": "string"
  14928. },
  14929. "required": true
  14930. },
  14931. {
  14932. "name": "location",
  14933. "in": "query",
  14934. "schema": {
  14935. "type": "object",
  14936. "properties": {
  14937. "directory": {
  14938. "type": "string"
  14939. },
  14940. "workspace": {
  14941. "type": "string"
  14942. }
  14943. },
  14944. "additionalProperties": false
  14945. },
  14946. "required": false,
  14947. "style": "deepObject",
  14948. "explode": true
  14949. }
  14950. ],
  14951. "responses": {
  14952. "204": {
  14953. "description": "<No Content>"
  14954. },
  14955. "400": {
  14956. "description": "ProjectCopyError | InvalidRequestError",
  14957. "content": {
  14958. "application/json": {
  14959. "schema": {
  14960. "anyOf": [
  14961. {
  14962. "$ref": "#/components/schemas/ProjectCopyError"
  14963. },
  14964. {
  14965. "$ref": "#/components/schemas/InvalidRequestError"
  14966. }
  14967. ]
  14968. }
  14969. }
  14970. }
  14971. }
  14972. },
  14973. "requestBody": {
  14974. "content": {
  14975. "application/json": {
  14976. "schema": {
  14977. "type": "object",
  14978. "properties": {
  14979. "directory": {
  14980. "type": "string"
  14981. },
  14982. "force": {
  14983. "type": "boolean"
  14984. }
  14985. },
  14986. "required": ["directory", "force"],
  14987. "additionalProperties": false
  14988. }
  14989. }
  14990. }
  14991. },
  14992. "x-codeSamples": [
  14993. {
  14994. "lang": "js",
  14995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14996. }
  14997. ]
  14998. }
  14999. },
  15000. "/experimental/project/{projectID}/copy/refresh": {
  15001. "post": {
  15002. "tags": ["projectCopy"],
  15003. "operationId": "v2.projectCopy.refresh",
  15004. "parameters": [
  15005. {
  15006. "name": "projectID",
  15007. "in": "path",
  15008. "schema": {
  15009. "type": "string"
  15010. },
  15011. "required": true
  15012. },
  15013. {
  15014. "name": "location",
  15015. "in": "query",
  15016. "schema": {
  15017. "type": "object",
  15018. "properties": {
  15019. "directory": {
  15020. "type": "string"
  15021. },
  15022. "workspace": {
  15023. "type": "string"
  15024. }
  15025. },
  15026. "additionalProperties": false
  15027. },
  15028. "required": false,
  15029. "style": "deepObject",
  15030. "explode": true
  15031. }
  15032. ],
  15033. "responses": {
  15034. "204": {
  15035. "description": "<No Content>"
  15036. },
  15037. "400": {
  15038. "description": "ProjectCopyError | InvalidRequestError",
  15039. "content": {
  15040. "application/json": {
  15041. "schema": {
  15042. "anyOf": [
  15043. {
  15044. "$ref": "#/components/schemas/ProjectCopyError"
  15045. },
  15046. {
  15047. "$ref": "#/components/schemas/InvalidRequestError"
  15048. }
  15049. ]
  15050. }
  15051. }
  15052. }
  15053. }
  15054. },
  15055. "x-codeSamples": [
  15056. {
  15057. "lang": "js",
  15058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  15059. }
  15060. ]
  15061. }
  15062. },
  15063. "/pty/{ptyID}/connect": {
  15064. "get": {
  15065. "tags": ["pty"],
  15066. "operationId": "pty.connect",
  15067. "parameters": [
  15068. {
  15069. "name": "ptyID",
  15070. "in": "path",
  15071. "schema": {
  15072. "type": "string",
  15073. "pattern": "^pty"
  15074. },
  15075. "required": true
  15076. },
  15077. {
  15078. "in": "query",
  15079. "name": "directory",
  15080. "schema": {
  15081. "type": "string"
  15082. }
  15083. },
  15084. {
  15085. "in": "query",
  15086. "name": "workspace",
  15087. "schema": {
  15088. "type": "string"
  15089. }
  15090. },
  15091. {
  15092. "in": "query",
  15093. "name": "cursor",
  15094. "schema": {
  15095. "type": "string"
  15096. }
  15097. },
  15098. {
  15099. "in": "query",
  15100. "name": "ticket",
  15101. "schema": {
  15102. "type": "string"
  15103. }
  15104. }
  15105. ],
  15106. "responses": {
  15107. "200": {
  15108. "description": "Connected session",
  15109. "content": {
  15110. "application/json": {
  15111. "schema": {
  15112. "type": "boolean",
  15113. "description": "Connected session"
  15114. }
  15115. }
  15116. }
  15117. },
  15118. "403": {
  15119. "description": "Forbidden",
  15120. "content": {
  15121. "application/json": {
  15122. "schema": {
  15123. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  15124. }
  15125. }
  15126. }
  15127. },
  15128. "404": {
  15129. "description": "Not found",
  15130. "content": {
  15131. "application/json": {
  15132. "schema": {
  15133. "$ref": "#/components/schemas/NotFoundError"
  15134. }
  15135. }
  15136. }
  15137. }
  15138. },
  15139. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  15140. "summary": "Connect to PTY session",
  15141. "x-codeSamples": [
  15142. {
  15143. "lang": "js",
  15144. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  15145. }
  15146. ]
  15147. }
  15148. }
  15149. },
  15150. "components": {
  15151. "schemas": {
  15152. "Event": {
  15153. "anyOf": [
  15154. {
  15155. "$ref": "#/components/schemas/EventModels-devRefreshed"
  15156. },
  15157. {
  15158. "$ref": "#/components/schemas/EventIntegrationUpdated"
  15159. },
  15160. {
  15161. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  15162. },
  15163. {
  15164. "$ref": "#/components/schemas/EventCatalogUpdated"
  15165. },
  15166. {
  15167. "$ref": "#/components/schemas/EventSessionCreated"
  15168. },
  15169. {
  15170. "$ref": "#/components/schemas/EventSessionUpdated"
  15171. },
  15172. {
  15173. "$ref": "#/components/schemas/EventSessionDeleted"
  15174. },
  15175. {
  15176. "$ref": "#/components/schemas/EventMessageUpdated"
  15177. },
  15178. {
  15179. "$ref": "#/components/schemas/EventMessageRemoved"
  15180. },
  15181. {
  15182. "$ref": "#/components/schemas/EventMessagePartUpdated"
  15183. },
  15184. {
  15185. "$ref": "#/components/schemas/EventMessagePartRemoved"
  15186. },
  15187. {
  15188. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  15189. },
  15190. {
  15191. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  15192. },
  15193. {
  15194. "$ref": "#/components/schemas/EventSessionNextMoved"
  15195. },
  15196. {
  15197. "$ref": "#/components/schemas/EventSessionNextPrompted"
  15198. },
  15199. {
  15200. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  15201. },
  15202. {
  15203. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  15204. },
  15205. {
  15206. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  15207. },
  15208. {
  15209. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  15210. },
  15211. {
  15212. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  15213. },
  15214. {
  15215. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  15216. },
  15217. {
  15218. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  15219. },
  15220. {
  15221. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  15222. },
  15223. {
  15224. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  15225. },
  15226. {
  15227. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15228. },
  15229. {
  15230. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15231. },
  15232. {
  15233. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15234. },
  15235. {
  15236. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15237. },
  15238. {
  15239. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15240. },
  15241. {
  15242. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15243. },
  15244. {
  15245. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15246. },
  15247. {
  15248. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15249. },
  15250. {
  15251. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15252. },
  15253. {
  15254. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15255. },
  15256. {
  15257. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15258. },
  15259. {
  15260. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15261. },
  15262. {
  15263. "$ref": "#/components/schemas/EventSessionNextRetried"
  15264. },
  15265. {
  15266. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15267. },
  15268. {
  15269. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15270. },
  15271. {
  15272. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15273. },
  15274. {
  15275. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15276. },
  15277. {
  15278. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15279. },
  15280. {
  15281. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15282. },
  15283. {
  15284. "$ref": "#/components/schemas/EventMessagePartDelta"
  15285. },
  15286. {
  15287. "$ref": "#/components/schemas/EventSessionDiff"
  15288. },
  15289. {
  15290. "$ref": "#/components/schemas/EventSessionError"
  15291. },
  15292. {
  15293. "$ref": "#/components/schemas/EventInstallationUpdated"
  15294. },
  15295. {
  15296. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15297. },
  15298. {
  15299. "$ref": "#/components/schemas/EventFileEdited"
  15300. },
  15301. {
  15302. "$ref": "#/components/schemas/EventReferenceUpdated"
  15303. },
  15304. {
  15305. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15306. },
  15307. {
  15308. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15309. },
  15310. {
  15311. "$ref": "#/components/schemas/EventPluginAdded"
  15312. },
  15313. {
  15314. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15315. },
  15316. {
  15317. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15318. },
  15319. {
  15320. "$ref": "#/components/schemas/EventPtyCreated"
  15321. },
  15322. {
  15323. "$ref": "#/components/schemas/EventPtyUpdated"
  15324. },
  15325. {
  15326. "$ref": "#/components/schemas/EventPtyExited"
  15327. },
  15328. {
  15329. "$ref": "#/components/schemas/EventPtyDeleted"
  15330. },
  15331. {
  15332. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15333. },
  15334. {
  15335. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15336. },
  15337. {
  15338. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15339. },
  15340. {
  15341. "$ref": "#/components/schemas/EventTodoUpdated"
  15342. },
  15343. {
  15344. "$ref": "#/components/schemas/EventLspUpdated"
  15345. },
  15346. {
  15347. "$ref": "#/components/schemas/EventPermissionAsked"
  15348. },
  15349. {
  15350. "$ref": "#/components/schemas/EventPermissionReplied"
  15351. },
  15352. {
  15353. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15354. },
  15355. {
  15356. "$ref": "#/components/schemas/Event.tui.command.execute"
  15357. },
  15358. {
  15359. "$ref": "#/components/schemas/Event.tui.toast.show"
  15360. },
  15361. {
  15362. "$ref": "#/components/schemas/Event.tui.session.select"
  15363. },
  15364. {
  15365. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15366. },
  15367. {
  15368. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15369. },
  15370. {
  15371. "$ref": "#/components/schemas/EventCommandExecuted"
  15372. },
  15373. {
  15374. "$ref": "#/components/schemas/EventProjectUpdated"
  15375. },
  15376. {
  15377. "$ref": "#/components/schemas/EventSessionStatus"
  15378. },
  15379. {
  15380. "$ref": "#/components/schemas/EventSessionIdle"
  15381. },
  15382. {
  15383. "$ref": "#/components/schemas/EventQuestionAsked"
  15384. },
  15385. {
  15386. "$ref": "#/components/schemas/EventQuestionReplied"
  15387. },
  15388. {
  15389. "$ref": "#/components/schemas/EventQuestionRejected"
  15390. },
  15391. {
  15392. "$ref": "#/components/schemas/EventSessionCompacted"
  15393. },
  15394. {
  15395. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15396. },
  15397. {
  15398. "$ref": "#/components/schemas/EventWorkspaceReady"
  15399. },
  15400. {
  15401. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15402. },
  15403. {
  15404. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15405. },
  15406. {
  15407. "$ref": "#/components/schemas/EventWorktreeReady"
  15408. },
  15409. {
  15410. "$ref": "#/components/schemas/EventWorktreeFailed"
  15411. },
  15412. {
  15413. "$ref": "#/components/schemas/EventServerConnected"
  15414. },
  15415. {
  15416. "$ref": "#/components/schemas/EventGlobalDisposed"
  15417. },
  15418. {
  15419. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15420. }
  15421. ]
  15422. },
  15423. "QuestionReplied": {
  15424. "type": "object",
  15425. "properties": {
  15426. "sessionID": {
  15427. "type": "string",
  15428. "pattern": "^ses"
  15429. },
  15430. "requestID": {
  15431. "type": "string",
  15432. "pattern": "^que"
  15433. },
  15434. "answers": {
  15435. "type": "array",
  15436. "items": {
  15437. "$ref": "#/components/schemas/QuestionAnswer"
  15438. }
  15439. }
  15440. },
  15441. "required": ["sessionID", "requestID", "answers"],
  15442. "additionalProperties": false
  15443. },
  15444. "QuestionRejected": {
  15445. "type": "object",
  15446. "properties": {
  15447. "sessionID": {
  15448. "type": "string",
  15449. "pattern": "^ses"
  15450. },
  15451. "requestID": {
  15452. "type": "string",
  15453. "pattern": "^que"
  15454. }
  15455. },
  15456. "required": ["sessionID", "requestID"],
  15457. "additionalProperties": false
  15458. },
  15459. "OAuth": {
  15460. "type": "object",
  15461. "properties": {
  15462. "type": {
  15463. "type": "string",
  15464. "enum": ["oauth"]
  15465. },
  15466. "refresh": {
  15467. "type": "string"
  15468. },
  15469. "access": {
  15470. "type": "string"
  15471. },
  15472. "expires": {
  15473. "type": "integer",
  15474. "minimum": 0
  15475. },
  15476. "accountId": {
  15477. "type": "string"
  15478. },
  15479. "enterpriseUrl": {
  15480. "type": "string"
  15481. }
  15482. },
  15483. "required": ["type", "refresh", "access", "expires"],
  15484. "additionalProperties": false
  15485. },
  15486. "ApiAuth": {
  15487. "type": "object",
  15488. "properties": {
  15489. "type": {
  15490. "type": "string",
  15491. "enum": ["api"]
  15492. },
  15493. "key": {
  15494. "type": "string"
  15495. },
  15496. "metadata": {
  15497. "type": "object",
  15498. "additionalProperties": {
  15499. "type": "string"
  15500. }
  15501. }
  15502. },
  15503. "required": ["type", "key"],
  15504. "additionalProperties": false
  15505. },
  15506. "WellKnownAuth": {
  15507. "type": "object",
  15508. "properties": {
  15509. "type": {
  15510. "type": "string",
  15511. "enum": ["wellknown"]
  15512. },
  15513. "key": {
  15514. "type": "string"
  15515. },
  15516. "token": {
  15517. "type": "string"
  15518. }
  15519. },
  15520. "required": ["type", "key", "token"],
  15521. "additionalProperties": false
  15522. },
  15523. "Auth": {
  15524. "anyOf": [
  15525. {
  15526. "$ref": "#/components/schemas/OAuth"
  15527. },
  15528. {
  15529. "$ref": "#/components/schemas/ApiAuth"
  15530. },
  15531. {
  15532. "$ref": "#/components/schemas/WellKnownAuth"
  15533. }
  15534. ]
  15535. },
  15536. "effect_HttpApiError_BadRequest": {
  15537. "type": "object",
  15538. "properties": {
  15539. "_tag": {
  15540. "type": "string",
  15541. "enum": ["BadRequest"]
  15542. }
  15543. },
  15544. "required": ["_tag"],
  15545. "additionalProperties": false
  15546. },
  15547. "InvalidRequestError": {
  15548. "type": "object",
  15549. "properties": {
  15550. "_tag": {
  15551. "type": "string",
  15552. "enum": ["InvalidRequestError"]
  15553. },
  15554. "message": {
  15555. "type": "string"
  15556. },
  15557. "kind": {
  15558. "type": "string"
  15559. },
  15560. "field": {
  15561. "type": "string"
  15562. }
  15563. },
  15564. "required": ["_tag", "message"],
  15565. "additionalProperties": false
  15566. },
  15567. "MoveSessionError": {
  15568. "type": "object",
  15569. "properties": {
  15570. "name": {
  15571. "type": "string",
  15572. "enum": ["MoveSessionError"]
  15573. },
  15574. "data": {
  15575. "type": "object",
  15576. "properties": {
  15577. "message": {
  15578. "type": "string"
  15579. }
  15580. },
  15581. "required": ["message"],
  15582. "additionalProperties": false
  15583. }
  15584. },
  15585. "required": ["name", "data"],
  15586. "additionalProperties": false
  15587. },
  15588. "SnapshotFileDiff": {
  15589. "type": "object",
  15590. "properties": {
  15591. "file": {
  15592. "type": "string"
  15593. },
  15594. "patch": {
  15595. "type": "string"
  15596. },
  15597. "additions": {
  15598. "type": "number"
  15599. },
  15600. "deletions": {
  15601. "type": "number"
  15602. },
  15603. "status": {
  15604. "type": "string",
  15605. "enum": ["added", "deleted", "modified"]
  15606. }
  15607. },
  15608. "required": ["additions", "deletions"],
  15609. "additionalProperties": false
  15610. },
  15611. "PermissionAction": {
  15612. "type": "string",
  15613. "enum": ["allow", "deny", "ask"]
  15614. },
  15615. "PermissionRule": {
  15616. "type": "object",
  15617. "properties": {
  15618. "permission": {
  15619. "type": "string"
  15620. },
  15621. "pattern": {
  15622. "type": "string"
  15623. },
  15624. "action": {
  15625. "$ref": "#/components/schemas/PermissionAction"
  15626. }
  15627. },
  15628. "required": ["permission", "pattern", "action"],
  15629. "additionalProperties": false
  15630. },
  15631. "PermissionRuleset": {
  15632. "type": "array",
  15633. "items": {
  15634. "$ref": "#/components/schemas/PermissionRule"
  15635. }
  15636. },
  15637. "Session": {
  15638. "type": "object",
  15639. "properties": {
  15640. "id": {
  15641. "type": "string",
  15642. "pattern": "^ses"
  15643. },
  15644. "slug": {
  15645. "type": "string"
  15646. },
  15647. "projectID": {
  15648. "type": "string"
  15649. },
  15650. "workspaceID": {
  15651. "type": "string",
  15652. "pattern": "^wrk"
  15653. },
  15654. "directory": {
  15655. "type": "string"
  15656. },
  15657. "path": {
  15658. "type": "string"
  15659. },
  15660. "parentID": {
  15661. "type": "string",
  15662. "pattern": "^ses"
  15663. },
  15664. "summary": {
  15665. "type": "object",
  15666. "properties": {
  15667. "additions": {
  15668. "type": "number"
  15669. },
  15670. "deletions": {
  15671. "type": "number"
  15672. },
  15673. "files": {
  15674. "type": "number"
  15675. },
  15676. "diffs": {
  15677. "type": "array",
  15678. "items": {
  15679. "$ref": "#/components/schemas/SnapshotFileDiff"
  15680. }
  15681. }
  15682. },
  15683. "required": ["additions", "deletions", "files"],
  15684. "additionalProperties": false
  15685. },
  15686. "cost": {
  15687. "type": "number"
  15688. },
  15689. "tokens": {
  15690. "type": "object",
  15691. "properties": {
  15692. "input": {
  15693. "type": "number"
  15694. },
  15695. "output": {
  15696. "type": "number"
  15697. },
  15698. "reasoning": {
  15699. "type": "number"
  15700. },
  15701. "cache": {
  15702. "type": "object",
  15703. "properties": {
  15704. "read": {
  15705. "type": "number"
  15706. },
  15707. "write": {
  15708. "type": "number"
  15709. }
  15710. },
  15711. "required": ["read", "write"],
  15712. "additionalProperties": false
  15713. }
  15714. },
  15715. "required": ["input", "output", "reasoning", "cache"],
  15716. "additionalProperties": false
  15717. },
  15718. "share": {
  15719. "type": "object",
  15720. "properties": {
  15721. "url": {
  15722. "type": "string"
  15723. }
  15724. },
  15725. "required": ["url"],
  15726. "additionalProperties": false
  15727. },
  15728. "title": {
  15729. "type": "string"
  15730. },
  15731. "agent": {
  15732. "type": "string"
  15733. },
  15734. "model": {
  15735. "type": "object",
  15736. "properties": {
  15737. "id": {
  15738. "type": "string"
  15739. },
  15740. "providerID": {
  15741. "type": "string"
  15742. },
  15743. "variant": {
  15744. "type": "string"
  15745. }
  15746. },
  15747. "required": ["id", "providerID"],
  15748. "additionalProperties": false
  15749. },
  15750. "version": {
  15751. "type": "string"
  15752. },
  15753. "metadata": {
  15754. "type": "object"
  15755. },
  15756. "time": {
  15757. "type": "object",
  15758. "properties": {
  15759. "created": {
  15760. "type": "integer",
  15761. "minimum": 0
  15762. },
  15763. "updated": {
  15764. "type": "integer",
  15765. "minimum": 0
  15766. },
  15767. "compacting": {
  15768. "type": "integer",
  15769. "minimum": 0
  15770. },
  15771. "archived": {
  15772. "type": "number"
  15773. }
  15774. },
  15775. "required": ["created", "updated"],
  15776. "additionalProperties": false
  15777. },
  15778. "permission": {
  15779. "$ref": "#/components/schemas/PermissionRuleset"
  15780. },
  15781. "revert": {
  15782. "type": "object",
  15783. "properties": {
  15784. "messageID": {
  15785. "type": "string",
  15786. "pattern": "^msg"
  15787. },
  15788. "partID": {
  15789. "type": "string",
  15790. "pattern": "^prt"
  15791. },
  15792. "snapshot": {
  15793. "type": "string"
  15794. },
  15795. "diff": {
  15796. "type": "string"
  15797. }
  15798. },
  15799. "required": ["messageID"],
  15800. "additionalProperties": false
  15801. }
  15802. },
  15803. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15804. "additionalProperties": false
  15805. },
  15806. "OutputFormatText": {
  15807. "type": "object",
  15808. "properties": {
  15809. "type": {
  15810. "type": "string",
  15811. "enum": ["text"]
  15812. }
  15813. },
  15814. "required": ["type"],
  15815. "additionalProperties": false
  15816. },
  15817. "JSONSchema": {
  15818. "type": "object"
  15819. },
  15820. "OutputFormatJsonSchema": {
  15821. "type": "object",
  15822. "properties": {
  15823. "type": {
  15824. "type": "string",
  15825. "enum": ["json_schema"]
  15826. },
  15827. "schema": {
  15828. "$ref": "#/components/schemas/JSONSchema"
  15829. },
  15830. "retryCount": {
  15831. "type": "integer",
  15832. "minimum": 0
  15833. }
  15834. },
  15835. "required": ["type", "schema"],
  15836. "additionalProperties": false
  15837. },
  15838. "OutputFormat": {
  15839. "anyOf": [
  15840. {
  15841. "$ref": "#/components/schemas/OutputFormatText"
  15842. },
  15843. {
  15844. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15845. }
  15846. ]
  15847. },
  15848. "UserMessage": {
  15849. "type": "object",
  15850. "properties": {
  15851. "id": {
  15852. "type": "string",
  15853. "pattern": "^msg"
  15854. },
  15855. "sessionID": {
  15856. "type": "string",
  15857. "pattern": "^ses"
  15858. },
  15859. "role": {
  15860. "type": "string",
  15861. "enum": ["user"]
  15862. },
  15863. "time": {
  15864. "type": "object",
  15865. "properties": {
  15866. "created": {
  15867. "type": "number",
  15868. "minimum": 0
  15869. }
  15870. },
  15871. "required": ["created"],
  15872. "additionalProperties": false
  15873. },
  15874. "format": {
  15875. "$ref": "#/components/schemas/OutputFormat"
  15876. },
  15877. "summary": {
  15878. "type": "object",
  15879. "properties": {
  15880. "title": {
  15881. "type": "string"
  15882. },
  15883. "body": {
  15884. "type": "string"
  15885. },
  15886. "diffs": {
  15887. "type": "array",
  15888. "items": {
  15889. "$ref": "#/components/schemas/SnapshotFileDiff"
  15890. }
  15891. }
  15892. },
  15893. "required": ["diffs"],
  15894. "additionalProperties": false
  15895. },
  15896. "agent": {
  15897. "type": "string"
  15898. },
  15899. "model": {
  15900. "type": "object",
  15901. "properties": {
  15902. "providerID": {
  15903. "type": "string"
  15904. },
  15905. "modelID": {
  15906. "type": "string"
  15907. },
  15908. "variant": {
  15909. "type": "string"
  15910. }
  15911. },
  15912. "required": ["providerID", "modelID"],
  15913. "additionalProperties": false
  15914. },
  15915. "system": {
  15916. "type": "string"
  15917. },
  15918. "tools": {
  15919. "type": "object",
  15920. "additionalProperties": {
  15921. "type": "boolean"
  15922. }
  15923. }
  15924. },
  15925. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15926. "additionalProperties": false
  15927. },
  15928. "ProviderAuthError": {
  15929. "type": "object",
  15930. "properties": {
  15931. "name": {
  15932. "type": "string",
  15933. "enum": ["ProviderAuthError"]
  15934. },
  15935. "data": {
  15936. "type": "object",
  15937. "properties": {
  15938. "providerID": {
  15939. "type": "string"
  15940. },
  15941. "message": {
  15942. "type": "string"
  15943. }
  15944. },
  15945. "required": ["providerID", "message"],
  15946. "additionalProperties": false
  15947. }
  15948. },
  15949. "required": ["name", "data"],
  15950. "additionalProperties": false
  15951. },
  15952. "UnknownError": {
  15953. "type": "object",
  15954. "properties": {
  15955. "name": {
  15956. "type": "string",
  15957. "enum": ["UnknownError"]
  15958. },
  15959. "data": {
  15960. "type": "object",
  15961. "properties": {
  15962. "message": {
  15963. "type": "string"
  15964. },
  15965. "ref": {
  15966. "type": "string"
  15967. }
  15968. },
  15969. "required": ["message"],
  15970. "additionalProperties": false
  15971. }
  15972. },
  15973. "required": ["name", "data"],
  15974. "additionalProperties": false
  15975. },
  15976. "MessageOutputLengthError": {
  15977. "type": "object",
  15978. "properties": {
  15979. "name": {
  15980. "type": "string",
  15981. "enum": ["MessageOutputLengthError"]
  15982. },
  15983. "data": {
  15984. "type": "object",
  15985. "properties": {}
  15986. }
  15987. },
  15988. "required": ["name", "data"],
  15989. "additionalProperties": false
  15990. },
  15991. "MessageAbortedError": {
  15992. "type": "object",
  15993. "properties": {
  15994. "name": {
  15995. "type": "string",
  15996. "enum": ["MessageAbortedError"]
  15997. },
  15998. "data": {
  15999. "type": "object",
  16000. "properties": {
  16001. "message": {
  16002. "type": "string"
  16003. }
  16004. },
  16005. "required": ["message"],
  16006. "additionalProperties": false
  16007. }
  16008. },
  16009. "required": ["name", "data"],
  16010. "additionalProperties": false
  16011. },
  16012. "StructuredOutputError": {
  16013. "type": "object",
  16014. "properties": {
  16015. "name": {
  16016. "type": "string",
  16017. "enum": ["StructuredOutputError"]
  16018. },
  16019. "data": {
  16020. "type": "object",
  16021. "properties": {
  16022. "message": {
  16023. "type": "string"
  16024. },
  16025. "retries": {
  16026. "type": "integer",
  16027. "minimum": 0
  16028. }
  16029. },
  16030. "required": ["message", "retries"],
  16031. "additionalProperties": false
  16032. }
  16033. },
  16034. "required": ["name", "data"],
  16035. "additionalProperties": false
  16036. },
  16037. "ContextOverflowError": {
  16038. "type": "object",
  16039. "properties": {
  16040. "name": {
  16041. "type": "string",
  16042. "enum": ["ContextOverflowError"]
  16043. },
  16044. "data": {
  16045. "type": "object",
  16046. "properties": {
  16047. "message": {
  16048. "type": "string"
  16049. },
  16050. "responseBody": {
  16051. "type": "string"
  16052. }
  16053. },
  16054. "required": ["message"],
  16055. "additionalProperties": false
  16056. }
  16057. },
  16058. "required": ["name", "data"],
  16059. "additionalProperties": false
  16060. },
  16061. "ContentFilterError": {
  16062. "type": "object",
  16063. "properties": {
  16064. "name": {
  16065. "type": "string",
  16066. "enum": ["ContentFilterError"]
  16067. },
  16068. "data": {
  16069. "type": "object",
  16070. "properties": {
  16071. "message": {
  16072. "type": "string"
  16073. }
  16074. },
  16075. "required": ["message"],
  16076. "additionalProperties": false
  16077. }
  16078. },
  16079. "required": ["name", "data"],
  16080. "additionalProperties": false
  16081. },
  16082. "APIError": {
  16083. "type": "object",
  16084. "properties": {
  16085. "name": {
  16086. "type": "string",
  16087. "enum": ["APIError"]
  16088. },
  16089. "data": {
  16090. "type": "object",
  16091. "properties": {
  16092. "message": {
  16093. "type": "string"
  16094. },
  16095. "statusCode": {
  16096. "type": "integer",
  16097. "minimum": 0
  16098. },
  16099. "isRetryable": {
  16100. "type": "boolean"
  16101. },
  16102. "responseHeaders": {
  16103. "type": "object",
  16104. "additionalProperties": {
  16105. "type": "string"
  16106. }
  16107. },
  16108. "responseBody": {
  16109. "type": "string"
  16110. },
  16111. "metadata": {
  16112. "type": "object",
  16113. "additionalProperties": {
  16114. "type": "string"
  16115. }
  16116. }
  16117. },
  16118. "required": ["message", "isRetryable"],
  16119. "additionalProperties": false
  16120. }
  16121. },
  16122. "required": ["name", "data"],
  16123. "additionalProperties": false
  16124. },
  16125. "AssistantMessage": {
  16126. "type": "object",
  16127. "properties": {
  16128. "id": {
  16129. "type": "string",
  16130. "pattern": "^msg"
  16131. },
  16132. "sessionID": {
  16133. "type": "string",
  16134. "pattern": "^ses"
  16135. },
  16136. "role": {
  16137. "type": "string",
  16138. "enum": ["assistant"]
  16139. },
  16140. "time": {
  16141. "type": "object",
  16142. "properties": {
  16143. "created": {
  16144. "type": "integer",
  16145. "minimum": 0
  16146. },
  16147. "completed": {
  16148. "type": "integer",
  16149. "minimum": 0
  16150. }
  16151. },
  16152. "required": ["created"],
  16153. "additionalProperties": false
  16154. },
  16155. "error": {
  16156. "anyOf": [
  16157. {
  16158. "$ref": "#/components/schemas/ProviderAuthError"
  16159. },
  16160. {
  16161. "$ref": "#/components/schemas/UnknownError"
  16162. },
  16163. {
  16164. "$ref": "#/components/schemas/MessageOutputLengthError"
  16165. },
  16166. {
  16167. "$ref": "#/components/schemas/MessageAbortedError"
  16168. },
  16169. {
  16170. "$ref": "#/components/schemas/StructuredOutputError"
  16171. },
  16172. {
  16173. "$ref": "#/components/schemas/ContextOverflowError"
  16174. },
  16175. {
  16176. "$ref": "#/components/schemas/ContentFilterError"
  16177. },
  16178. {
  16179. "$ref": "#/components/schemas/APIError"
  16180. }
  16181. ]
  16182. },
  16183. "parentID": {
  16184. "type": "string",
  16185. "pattern": "^msg"
  16186. },
  16187. "modelID": {
  16188. "type": "string"
  16189. },
  16190. "providerID": {
  16191. "type": "string"
  16192. },
  16193. "mode": {
  16194. "type": "string"
  16195. },
  16196. "agent": {
  16197. "type": "string"
  16198. },
  16199. "path": {
  16200. "type": "object",
  16201. "properties": {
  16202. "cwd": {
  16203. "type": "string"
  16204. },
  16205. "root": {
  16206. "type": "string"
  16207. }
  16208. },
  16209. "required": ["cwd", "root"],
  16210. "additionalProperties": false
  16211. },
  16212. "summary": {
  16213. "type": "boolean"
  16214. },
  16215. "cost": {
  16216. "type": "number"
  16217. },
  16218. "tokens": {
  16219. "type": "object",
  16220. "properties": {
  16221. "total": {
  16222. "type": "number"
  16223. },
  16224. "input": {
  16225. "type": "number"
  16226. },
  16227. "output": {
  16228. "type": "number"
  16229. },
  16230. "reasoning": {
  16231. "type": "number"
  16232. },
  16233. "cache": {
  16234. "type": "object",
  16235. "properties": {
  16236. "read": {
  16237. "type": "number"
  16238. },
  16239. "write": {
  16240. "type": "number"
  16241. }
  16242. },
  16243. "required": ["read", "write"],
  16244. "additionalProperties": false
  16245. }
  16246. },
  16247. "required": ["input", "output", "reasoning", "cache"],
  16248. "additionalProperties": false
  16249. },
  16250. "structured": {},
  16251. "variant": {
  16252. "type": "string"
  16253. },
  16254. "finish": {
  16255. "type": "string"
  16256. }
  16257. },
  16258. "required": [
  16259. "id",
  16260. "sessionID",
  16261. "role",
  16262. "time",
  16263. "parentID",
  16264. "modelID",
  16265. "providerID",
  16266. "mode",
  16267. "agent",
  16268. "path",
  16269. "cost",
  16270. "tokens"
  16271. ],
  16272. "additionalProperties": false
  16273. },
  16274. "Message": {
  16275. "anyOf": [
  16276. {
  16277. "$ref": "#/components/schemas/UserMessage"
  16278. },
  16279. {
  16280. "$ref": "#/components/schemas/AssistantMessage"
  16281. }
  16282. ]
  16283. },
  16284. "TextPart": {
  16285. "type": "object",
  16286. "properties": {
  16287. "id": {
  16288. "type": "string",
  16289. "pattern": "^prt"
  16290. },
  16291. "sessionID": {
  16292. "type": "string",
  16293. "pattern": "^ses"
  16294. },
  16295. "messageID": {
  16296. "type": "string",
  16297. "pattern": "^msg"
  16298. },
  16299. "type": {
  16300. "type": "string",
  16301. "enum": ["text"]
  16302. },
  16303. "text": {
  16304. "type": "string"
  16305. },
  16306. "synthetic": {
  16307. "type": "boolean"
  16308. },
  16309. "ignored": {
  16310. "type": "boolean"
  16311. },
  16312. "time": {
  16313. "type": "object",
  16314. "properties": {
  16315. "start": {
  16316. "type": "integer",
  16317. "minimum": 0
  16318. },
  16319. "end": {
  16320. "type": "integer",
  16321. "minimum": 0
  16322. }
  16323. },
  16324. "required": ["start"],
  16325. "additionalProperties": false
  16326. },
  16327. "metadata": {
  16328. "type": "object"
  16329. }
  16330. },
  16331. "required": ["id", "sessionID", "messageID", "type", "text"],
  16332. "additionalProperties": false
  16333. },
  16334. "SubtaskPart": {
  16335. "type": "object",
  16336. "properties": {
  16337. "id": {
  16338. "type": "string",
  16339. "pattern": "^prt"
  16340. },
  16341. "sessionID": {
  16342. "type": "string",
  16343. "pattern": "^ses"
  16344. },
  16345. "messageID": {
  16346. "type": "string",
  16347. "pattern": "^msg"
  16348. },
  16349. "type": {
  16350. "type": "string",
  16351. "enum": ["subtask"]
  16352. },
  16353. "prompt": {
  16354. "type": "string"
  16355. },
  16356. "description": {
  16357. "type": "string"
  16358. },
  16359. "agent": {
  16360. "type": "string"
  16361. },
  16362. "model": {
  16363. "type": "object",
  16364. "properties": {
  16365. "providerID": {
  16366. "type": "string"
  16367. },
  16368. "modelID": {
  16369. "type": "string"
  16370. }
  16371. },
  16372. "required": ["providerID", "modelID"],
  16373. "additionalProperties": false
  16374. },
  16375. "command": {
  16376. "type": "string"
  16377. }
  16378. },
  16379. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16380. "additionalProperties": false
  16381. },
  16382. "ReasoningPart": {
  16383. "type": "object",
  16384. "properties": {
  16385. "id": {
  16386. "type": "string",
  16387. "pattern": "^prt"
  16388. },
  16389. "sessionID": {
  16390. "type": "string",
  16391. "pattern": "^ses"
  16392. },
  16393. "messageID": {
  16394. "type": "string",
  16395. "pattern": "^msg"
  16396. },
  16397. "type": {
  16398. "type": "string",
  16399. "enum": ["reasoning"]
  16400. },
  16401. "text": {
  16402. "type": "string"
  16403. },
  16404. "metadata": {
  16405. "type": "object"
  16406. },
  16407. "time": {
  16408. "type": "object",
  16409. "properties": {
  16410. "start": {
  16411. "type": "integer",
  16412. "minimum": 0
  16413. },
  16414. "end": {
  16415. "type": "integer",
  16416. "minimum": 0
  16417. }
  16418. },
  16419. "required": ["start"],
  16420. "additionalProperties": false
  16421. }
  16422. },
  16423. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16424. "additionalProperties": false
  16425. },
  16426. "FilePartSourceText": {
  16427. "type": "object",
  16428. "properties": {
  16429. "value": {
  16430. "type": "string"
  16431. },
  16432. "start": {
  16433. "type": "number"
  16434. },
  16435. "end": {
  16436. "type": "number"
  16437. }
  16438. },
  16439. "required": ["value", "start", "end"],
  16440. "additionalProperties": false
  16441. },
  16442. "FileSource": {
  16443. "type": "object",
  16444. "properties": {
  16445. "text": {
  16446. "$ref": "#/components/schemas/FilePartSourceText"
  16447. },
  16448. "type": {
  16449. "type": "string",
  16450. "enum": ["file"]
  16451. },
  16452. "path": {
  16453. "type": "string"
  16454. }
  16455. },
  16456. "required": ["text", "type", "path"],
  16457. "additionalProperties": false
  16458. },
  16459. "Range": {
  16460. "type": "object",
  16461. "properties": {
  16462. "start": {
  16463. "type": "object",
  16464. "properties": {
  16465. "line": {
  16466. "type": "integer",
  16467. "minimum": 0
  16468. },
  16469. "character": {
  16470. "type": "integer",
  16471. "minimum": 0
  16472. }
  16473. },
  16474. "required": ["line", "character"],
  16475. "additionalProperties": false
  16476. },
  16477. "end": {
  16478. "type": "object",
  16479. "properties": {
  16480. "line": {
  16481. "type": "integer",
  16482. "minimum": 0
  16483. },
  16484. "character": {
  16485. "type": "integer",
  16486. "minimum": 0
  16487. }
  16488. },
  16489. "required": ["line", "character"],
  16490. "additionalProperties": false
  16491. }
  16492. },
  16493. "required": ["start", "end"],
  16494. "additionalProperties": false
  16495. },
  16496. "SymbolSource": {
  16497. "type": "object",
  16498. "properties": {
  16499. "text": {
  16500. "$ref": "#/components/schemas/FilePartSourceText"
  16501. },
  16502. "type": {
  16503. "type": "string",
  16504. "enum": ["symbol"]
  16505. },
  16506. "path": {
  16507. "type": "string"
  16508. },
  16509. "range": {
  16510. "$ref": "#/components/schemas/Range"
  16511. },
  16512. "name": {
  16513. "type": "string"
  16514. },
  16515. "kind": {
  16516. "type": "integer",
  16517. "minimum": 0
  16518. }
  16519. },
  16520. "required": ["text", "type", "path", "range", "name", "kind"],
  16521. "additionalProperties": false
  16522. },
  16523. "ResourceSource": {
  16524. "type": "object",
  16525. "properties": {
  16526. "text": {
  16527. "$ref": "#/components/schemas/FilePartSourceText"
  16528. },
  16529. "type": {
  16530. "type": "string",
  16531. "enum": ["resource"]
  16532. },
  16533. "clientName": {
  16534. "type": "string"
  16535. },
  16536. "uri": {
  16537. "type": "string"
  16538. }
  16539. },
  16540. "required": ["text", "type", "clientName", "uri"],
  16541. "additionalProperties": false
  16542. },
  16543. "FilePartSource": {
  16544. "anyOf": [
  16545. {
  16546. "$ref": "#/components/schemas/FileSource"
  16547. },
  16548. {
  16549. "$ref": "#/components/schemas/SymbolSource"
  16550. },
  16551. {
  16552. "$ref": "#/components/schemas/ResourceSource"
  16553. }
  16554. ]
  16555. },
  16556. "FilePart": {
  16557. "type": "object",
  16558. "properties": {
  16559. "id": {
  16560. "type": "string",
  16561. "pattern": "^prt"
  16562. },
  16563. "sessionID": {
  16564. "type": "string",
  16565. "pattern": "^ses"
  16566. },
  16567. "messageID": {
  16568. "type": "string",
  16569. "pattern": "^msg"
  16570. },
  16571. "type": {
  16572. "type": "string",
  16573. "enum": ["file"]
  16574. },
  16575. "mime": {
  16576. "type": "string"
  16577. },
  16578. "filename": {
  16579. "type": "string"
  16580. },
  16581. "url": {
  16582. "type": "string"
  16583. },
  16584. "source": {
  16585. "$ref": "#/components/schemas/FilePartSource"
  16586. }
  16587. },
  16588. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16589. "additionalProperties": false
  16590. },
  16591. "ToolStatePending": {
  16592. "type": "object",
  16593. "properties": {
  16594. "status": {
  16595. "type": "string",
  16596. "enum": ["pending"]
  16597. },
  16598. "input": {
  16599. "type": "object"
  16600. },
  16601. "raw": {
  16602. "type": "string"
  16603. }
  16604. },
  16605. "required": ["status", "input", "raw"],
  16606. "additionalProperties": false
  16607. },
  16608. "ToolStateRunning": {
  16609. "type": "object",
  16610. "properties": {
  16611. "status": {
  16612. "type": "string",
  16613. "enum": ["running"]
  16614. },
  16615. "input": {
  16616. "type": "object"
  16617. },
  16618. "title": {
  16619. "type": "string"
  16620. },
  16621. "metadata": {
  16622. "type": "object"
  16623. },
  16624. "time": {
  16625. "type": "object",
  16626. "properties": {
  16627. "start": {
  16628. "type": "integer",
  16629. "minimum": 0
  16630. }
  16631. },
  16632. "required": ["start"],
  16633. "additionalProperties": false
  16634. }
  16635. },
  16636. "required": ["status", "input", "time"],
  16637. "additionalProperties": false
  16638. },
  16639. "ToolStateCompleted": {
  16640. "type": "object",
  16641. "properties": {
  16642. "status": {
  16643. "type": "string",
  16644. "enum": ["completed"]
  16645. },
  16646. "input": {
  16647. "type": "object"
  16648. },
  16649. "output": {
  16650. "type": "string"
  16651. },
  16652. "title": {
  16653. "type": "string"
  16654. },
  16655. "metadata": {
  16656. "type": "object"
  16657. },
  16658. "time": {
  16659. "type": "object",
  16660. "properties": {
  16661. "start": {
  16662. "type": "integer",
  16663. "minimum": 0
  16664. },
  16665. "end": {
  16666. "type": "integer",
  16667. "minimum": 0
  16668. },
  16669. "compacted": {
  16670. "type": "integer",
  16671. "minimum": 0
  16672. }
  16673. },
  16674. "required": ["start", "end"],
  16675. "additionalProperties": false
  16676. },
  16677. "attachments": {
  16678. "type": "array",
  16679. "items": {
  16680. "$ref": "#/components/schemas/FilePart"
  16681. }
  16682. }
  16683. },
  16684. "required": ["status", "input", "output", "title", "metadata", "time"],
  16685. "additionalProperties": false
  16686. },
  16687. "ToolStateError": {
  16688. "type": "object",
  16689. "properties": {
  16690. "status": {
  16691. "type": "string",
  16692. "enum": ["error"]
  16693. },
  16694. "input": {
  16695. "type": "object"
  16696. },
  16697. "error": {
  16698. "type": "string"
  16699. },
  16700. "metadata": {
  16701. "type": "object"
  16702. },
  16703. "time": {
  16704. "type": "object",
  16705. "properties": {
  16706. "start": {
  16707. "type": "integer",
  16708. "minimum": 0
  16709. },
  16710. "end": {
  16711. "type": "integer",
  16712. "minimum": 0
  16713. }
  16714. },
  16715. "required": ["start", "end"],
  16716. "additionalProperties": false
  16717. }
  16718. },
  16719. "required": ["status", "input", "error", "time"],
  16720. "additionalProperties": false
  16721. },
  16722. "ToolState": {
  16723. "anyOf": [
  16724. {
  16725. "$ref": "#/components/schemas/ToolStatePending"
  16726. },
  16727. {
  16728. "$ref": "#/components/schemas/ToolStateRunning"
  16729. },
  16730. {
  16731. "$ref": "#/components/schemas/ToolStateCompleted"
  16732. },
  16733. {
  16734. "$ref": "#/components/schemas/ToolStateError"
  16735. }
  16736. ]
  16737. },
  16738. "ToolPart": {
  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": ["tool"]
  16756. },
  16757. "callID": {
  16758. "type": "string"
  16759. },
  16760. "tool": {
  16761. "type": "string"
  16762. },
  16763. "state": {
  16764. "$ref": "#/components/schemas/ToolState"
  16765. },
  16766. "metadata": {
  16767. "type": "object"
  16768. }
  16769. },
  16770. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16771. "additionalProperties": false
  16772. },
  16773. "StepStartPart": {
  16774. "type": "object",
  16775. "properties": {
  16776. "id": {
  16777. "type": "string",
  16778. "pattern": "^prt"
  16779. },
  16780. "sessionID": {
  16781. "type": "string",
  16782. "pattern": "^ses"
  16783. },
  16784. "messageID": {
  16785. "type": "string",
  16786. "pattern": "^msg"
  16787. },
  16788. "type": {
  16789. "type": "string",
  16790. "enum": ["step-start"]
  16791. },
  16792. "snapshot": {
  16793. "type": "string"
  16794. }
  16795. },
  16796. "required": ["id", "sessionID", "messageID", "type"],
  16797. "additionalProperties": false
  16798. },
  16799. "StepFinishPart": {
  16800. "type": "object",
  16801. "properties": {
  16802. "id": {
  16803. "type": "string",
  16804. "pattern": "^prt"
  16805. },
  16806. "sessionID": {
  16807. "type": "string",
  16808. "pattern": "^ses"
  16809. },
  16810. "messageID": {
  16811. "type": "string",
  16812. "pattern": "^msg"
  16813. },
  16814. "type": {
  16815. "type": "string",
  16816. "enum": ["step-finish"]
  16817. },
  16818. "reason": {
  16819. "type": "string"
  16820. },
  16821. "snapshot": {
  16822. "type": "string"
  16823. },
  16824. "cost": {
  16825. "type": "number"
  16826. },
  16827. "tokens": {
  16828. "type": "object",
  16829. "properties": {
  16830. "total": {
  16831. "type": "number"
  16832. },
  16833. "input": {
  16834. "type": "number"
  16835. },
  16836. "output": {
  16837. "type": "number"
  16838. },
  16839. "reasoning": {
  16840. "type": "number"
  16841. },
  16842. "cache": {
  16843. "type": "object",
  16844. "properties": {
  16845. "read": {
  16846. "type": "number"
  16847. },
  16848. "write": {
  16849. "type": "number"
  16850. }
  16851. },
  16852. "required": ["read", "write"],
  16853. "additionalProperties": false
  16854. }
  16855. },
  16856. "required": ["input", "output", "reasoning", "cache"],
  16857. "additionalProperties": false
  16858. }
  16859. },
  16860. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16861. "additionalProperties": false
  16862. },
  16863. "SnapshotPart": {
  16864. "type": "object",
  16865. "properties": {
  16866. "id": {
  16867. "type": "string",
  16868. "pattern": "^prt"
  16869. },
  16870. "sessionID": {
  16871. "type": "string",
  16872. "pattern": "^ses"
  16873. },
  16874. "messageID": {
  16875. "type": "string",
  16876. "pattern": "^msg"
  16877. },
  16878. "type": {
  16879. "type": "string",
  16880. "enum": ["snapshot"]
  16881. },
  16882. "snapshot": {
  16883. "type": "string"
  16884. }
  16885. },
  16886. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16887. "additionalProperties": false
  16888. },
  16889. "PatchPart": {
  16890. "type": "object",
  16891. "properties": {
  16892. "id": {
  16893. "type": "string",
  16894. "pattern": "^prt"
  16895. },
  16896. "sessionID": {
  16897. "type": "string",
  16898. "pattern": "^ses"
  16899. },
  16900. "messageID": {
  16901. "type": "string",
  16902. "pattern": "^msg"
  16903. },
  16904. "type": {
  16905. "type": "string",
  16906. "enum": ["patch"]
  16907. },
  16908. "hash": {
  16909. "type": "string"
  16910. },
  16911. "files": {
  16912. "type": "array",
  16913. "items": {
  16914. "type": "string"
  16915. }
  16916. }
  16917. },
  16918. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16919. "additionalProperties": false
  16920. },
  16921. "AgentPart": {
  16922. "type": "object",
  16923. "properties": {
  16924. "id": {
  16925. "type": "string",
  16926. "pattern": "^prt"
  16927. },
  16928. "sessionID": {
  16929. "type": "string",
  16930. "pattern": "^ses"
  16931. },
  16932. "messageID": {
  16933. "type": "string",
  16934. "pattern": "^msg"
  16935. },
  16936. "type": {
  16937. "type": "string",
  16938. "enum": ["agent"]
  16939. },
  16940. "name": {
  16941. "type": "string"
  16942. },
  16943. "source": {
  16944. "type": "object",
  16945. "properties": {
  16946. "value": {
  16947. "type": "string"
  16948. },
  16949. "start": {
  16950. "type": "integer",
  16951. "minimum": 0
  16952. },
  16953. "end": {
  16954. "type": "integer",
  16955. "minimum": 0
  16956. }
  16957. },
  16958. "required": ["value", "start", "end"],
  16959. "additionalProperties": false
  16960. }
  16961. },
  16962. "required": ["id", "sessionID", "messageID", "type", "name"],
  16963. "additionalProperties": false
  16964. },
  16965. "RetryPart": {
  16966. "type": "object",
  16967. "properties": {
  16968. "id": {
  16969. "type": "string",
  16970. "pattern": "^prt"
  16971. },
  16972. "sessionID": {
  16973. "type": "string",
  16974. "pattern": "^ses"
  16975. },
  16976. "messageID": {
  16977. "type": "string",
  16978. "pattern": "^msg"
  16979. },
  16980. "type": {
  16981. "type": "string",
  16982. "enum": ["retry"]
  16983. },
  16984. "attempt": {
  16985. "type": "integer",
  16986. "minimum": 0
  16987. },
  16988. "error": {
  16989. "$ref": "#/components/schemas/APIError"
  16990. },
  16991. "time": {
  16992. "type": "object",
  16993. "properties": {
  16994. "created": {
  16995. "type": "integer",
  16996. "minimum": 0
  16997. }
  16998. },
  16999. "required": ["created"],
  17000. "additionalProperties": false
  17001. }
  17002. },
  17003. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  17004. "additionalProperties": false
  17005. },
  17006. "CompactionPart": {
  17007. "type": "object",
  17008. "properties": {
  17009. "id": {
  17010. "type": "string",
  17011. "pattern": "^prt"
  17012. },
  17013. "sessionID": {
  17014. "type": "string",
  17015. "pattern": "^ses"
  17016. },
  17017. "messageID": {
  17018. "type": "string",
  17019. "pattern": "^msg"
  17020. },
  17021. "type": {
  17022. "type": "string",
  17023. "enum": ["compaction"]
  17024. },
  17025. "auto": {
  17026. "type": "boolean"
  17027. },
  17028. "overflow": {
  17029. "type": "boolean"
  17030. },
  17031. "tail_start_id": {
  17032. "type": "string",
  17033. "pattern": "^msg"
  17034. }
  17035. },
  17036. "required": ["id", "sessionID", "messageID", "type", "auto"],
  17037. "additionalProperties": false
  17038. },
  17039. "Part": {
  17040. "anyOf": [
  17041. {
  17042. "$ref": "#/components/schemas/TextPart"
  17043. },
  17044. {
  17045. "$ref": "#/components/schemas/SubtaskPart"
  17046. },
  17047. {
  17048. "$ref": "#/components/schemas/ReasoningPart"
  17049. },
  17050. {
  17051. "$ref": "#/components/schemas/FilePart"
  17052. },
  17053. {
  17054. "$ref": "#/components/schemas/ToolPart"
  17055. },
  17056. {
  17057. "$ref": "#/components/schemas/StepStartPart"
  17058. },
  17059. {
  17060. "$ref": "#/components/schemas/StepFinishPart"
  17061. },
  17062. {
  17063. "$ref": "#/components/schemas/SnapshotPart"
  17064. },
  17065. {
  17066. "$ref": "#/components/schemas/PatchPart"
  17067. },
  17068. {
  17069. "$ref": "#/components/schemas/AgentPart"
  17070. },
  17071. {
  17072. "$ref": "#/components/schemas/RetryPart"
  17073. },
  17074. {
  17075. "$ref": "#/components/schemas/CompactionPart"
  17076. }
  17077. ]
  17078. },
  17079. "Prompt": {
  17080. "type": "object",
  17081. "properties": {
  17082. "text": {
  17083. "type": "string"
  17084. },
  17085. "files": {
  17086. "type": "array",
  17087. "items": {
  17088. "$ref": "#/components/schemas/PromptFileAttachment"
  17089. }
  17090. },
  17091. "agents": {
  17092. "type": "array",
  17093. "items": {
  17094. "$ref": "#/components/schemas/PromptAgentAttachment"
  17095. }
  17096. }
  17097. },
  17098. "required": ["text"],
  17099. "additionalProperties": false
  17100. },
  17101. "Pty": {
  17102. "type": "object",
  17103. "properties": {
  17104. "id": {
  17105. "type": "string",
  17106. "pattern": "^pty"
  17107. },
  17108. "title": {
  17109. "type": "string"
  17110. },
  17111. "command": {
  17112. "type": "string"
  17113. },
  17114. "args": {
  17115. "type": "array",
  17116. "items": {
  17117. "type": "string"
  17118. }
  17119. },
  17120. "cwd": {
  17121. "type": "string"
  17122. },
  17123. "status": {
  17124. "type": "string",
  17125. "enum": ["running", "exited"]
  17126. },
  17127. "pid": {
  17128. "type": "integer",
  17129. "minimum": 0
  17130. },
  17131. "exitCode": {
  17132. "type": "integer",
  17133. "minimum": 0
  17134. }
  17135. },
  17136. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  17137. "additionalProperties": false
  17138. },
  17139. "Todo": {
  17140. "type": "object",
  17141. "properties": {
  17142. "content": {
  17143. "type": "string",
  17144. "description": "Brief description of the task"
  17145. },
  17146. "status": {
  17147. "type": "string",
  17148. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  17149. },
  17150. "priority": {
  17151. "type": "string",
  17152. "description": "Priority level of the task: high, medium, low"
  17153. }
  17154. },
  17155. "required": ["content", "status", "priority"],
  17156. "additionalProperties": false
  17157. },
  17158. "SessionStatus": {
  17159. "anyOf": [
  17160. {
  17161. "type": "object",
  17162. "properties": {
  17163. "type": {
  17164. "type": "string",
  17165. "enum": ["idle"]
  17166. }
  17167. },
  17168. "required": ["type"],
  17169. "additionalProperties": false
  17170. },
  17171. {
  17172. "type": "object",
  17173. "properties": {
  17174. "type": {
  17175. "type": "string",
  17176. "enum": ["retry"]
  17177. },
  17178. "attempt": {
  17179. "type": "integer",
  17180. "minimum": 0
  17181. },
  17182. "message": {
  17183. "type": "string"
  17184. },
  17185. "action": {
  17186. "type": "object",
  17187. "properties": {
  17188. "reason": {
  17189. "type": "string"
  17190. },
  17191. "provider": {
  17192. "type": "string"
  17193. },
  17194. "title": {
  17195. "type": "string"
  17196. },
  17197. "message": {
  17198. "type": "string"
  17199. },
  17200. "label": {
  17201. "type": "string"
  17202. },
  17203. "link": {
  17204. "type": "string"
  17205. }
  17206. },
  17207. "required": ["reason", "provider", "title", "message", "label"],
  17208. "additionalProperties": false
  17209. },
  17210. "next": {
  17211. "type": "integer",
  17212. "minimum": 0
  17213. }
  17214. },
  17215. "required": ["type", "attempt", "message", "next"],
  17216. "additionalProperties": false
  17217. },
  17218. {
  17219. "type": "object",
  17220. "properties": {
  17221. "type": {
  17222. "type": "string",
  17223. "enum": ["busy"]
  17224. }
  17225. },
  17226. "required": ["type"],
  17227. "additionalProperties": false
  17228. }
  17229. ]
  17230. },
  17231. "QuestionOption": {
  17232. "type": "object",
  17233. "properties": {
  17234. "label": {
  17235. "type": "string",
  17236. "description": "Display text (1-5 words, concise)"
  17237. },
  17238. "description": {
  17239. "type": "string",
  17240. "description": "Explanation of choice"
  17241. }
  17242. },
  17243. "required": ["label", "description"],
  17244. "additionalProperties": false
  17245. },
  17246. "QuestionInfo": {
  17247. "type": "object",
  17248. "properties": {
  17249. "question": {
  17250. "type": "string",
  17251. "description": "Complete question"
  17252. },
  17253. "header": {
  17254. "type": "string",
  17255. "description": "Very short label (max 30 chars)"
  17256. },
  17257. "options": {
  17258. "type": "array",
  17259. "items": {
  17260. "$ref": "#/components/schemas/QuestionOption"
  17261. },
  17262. "description": "Available choices"
  17263. },
  17264. "multiple": {
  17265. "type": "boolean"
  17266. },
  17267. "custom": {
  17268. "type": "boolean"
  17269. }
  17270. },
  17271. "required": ["question", "header", "options"],
  17272. "additionalProperties": false
  17273. },
  17274. "QuestionTool": {
  17275. "type": "object",
  17276. "properties": {
  17277. "messageID": {
  17278. "type": "string",
  17279. "pattern": "^msg"
  17280. },
  17281. "callID": {
  17282. "type": "string"
  17283. }
  17284. },
  17285. "required": ["messageID", "callID"],
  17286. "additionalProperties": false
  17287. },
  17288. "QuestionAnswer": {
  17289. "type": "array",
  17290. "items": {
  17291. "type": "string"
  17292. }
  17293. },
  17294. "GlobalEvent": {
  17295. "type": "object",
  17296. "properties": {
  17297. "directory": {
  17298. "type": "string"
  17299. },
  17300. "project": {
  17301. "type": "string"
  17302. },
  17303. "workspace": {
  17304. "type": "string"
  17305. },
  17306. "payload": {
  17307. "anyOf": [
  17308. {
  17309. "type": "object",
  17310. "properties": {
  17311. "id": {
  17312. "type": "string",
  17313. "pattern": "^evt_"
  17314. },
  17315. "type": {
  17316. "type": "string",
  17317. "enum": ["models-dev.refreshed"]
  17318. },
  17319. "properties": {
  17320. "type": "object",
  17321. "properties": {}
  17322. }
  17323. },
  17324. "required": ["id", "type", "properties"],
  17325. "additionalProperties": false
  17326. },
  17327. {
  17328. "type": "object",
  17329. "properties": {
  17330. "id": {
  17331. "type": "string",
  17332. "pattern": "^evt_"
  17333. },
  17334. "type": {
  17335. "type": "string",
  17336. "enum": ["integration.updated"]
  17337. },
  17338. "properties": {
  17339. "type": "object",
  17340. "properties": {}
  17341. }
  17342. },
  17343. "required": ["id", "type", "properties"],
  17344. "additionalProperties": false
  17345. },
  17346. {
  17347. "type": "object",
  17348. "properties": {
  17349. "id": {
  17350. "type": "string",
  17351. "pattern": "^evt_"
  17352. },
  17353. "type": {
  17354. "type": "string",
  17355. "enum": ["integration.connection.updated"]
  17356. },
  17357. "properties": {
  17358. "type": "object",
  17359. "properties": {
  17360. "integrationID": {
  17361. "type": "string"
  17362. }
  17363. },
  17364. "required": ["integrationID"],
  17365. "additionalProperties": false
  17366. }
  17367. },
  17368. "required": ["id", "type", "properties"],
  17369. "additionalProperties": false
  17370. },
  17371. {
  17372. "type": "object",
  17373. "properties": {
  17374. "id": {
  17375. "type": "string",
  17376. "pattern": "^evt_"
  17377. },
  17378. "type": {
  17379. "type": "string",
  17380. "enum": ["catalog.updated"]
  17381. },
  17382. "properties": {
  17383. "type": "object",
  17384. "properties": {}
  17385. }
  17386. },
  17387. "required": ["id", "type", "properties"],
  17388. "additionalProperties": false
  17389. },
  17390. {
  17391. "type": "object",
  17392. "properties": {
  17393. "id": {
  17394. "type": "string",
  17395. "pattern": "^evt_"
  17396. },
  17397. "type": {
  17398. "type": "string",
  17399. "enum": ["session.created"]
  17400. },
  17401. "properties": {
  17402. "type": "object",
  17403. "properties": {
  17404. "sessionID": {
  17405. "type": "string",
  17406. "pattern": "^ses"
  17407. },
  17408. "info": {
  17409. "$ref": "#/components/schemas/Session"
  17410. }
  17411. },
  17412. "required": ["sessionID", "info"],
  17413. "additionalProperties": false
  17414. }
  17415. },
  17416. "required": ["id", "type", "properties"],
  17417. "additionalProperties": false
  17418. },
  17419. {
  17420. "type": "object",
  17421. "properties": {
  17422. "id": {
  17423. "type": "string",
  17424. "pattern": "^evt_"
  17425. },
  17426. "type": {
  17427. "type": "string",
  17428. "enum": ["session.updated"]
  17429. },
  17430. "properties": {
  17431. "type": "object",
  17432. "properties": {
  17433. "sessionID": {
  17434. "type": "string",
  17435. "pattern": "^ses"
  17436. },
  17437. "info": {
  17438. "$ref": "#/components/schemas/Session"
  17439. }
  17440. },
  17441. "required": ["sessionID", "info"],
  17442. "additionalProperties": false
  17443. }
  17444. },
  17445. "required": ["id", "type", "properties"],
  17446. "additionalProperties": false
  17447. },
  17448. {
  17449. "type": "object",
  17450. "properties": {
  17451. "id": {
  17452. "type": "string",
  17453. "pattern": "^evt_"
  17454. },
  17455. "type": {
  17456. "type": "string",
  17457. "enum": ["session.deleted"]
  17458. },
  17459. "properties": {
  17460. "type": "object",
  17461. "properties": {
  17462. "sessionID": {
  17463. "type": "string",
  17464. "pattern": "^ses"
  17465. },
  17466. "info": {
  17467. "$ref": "#/components/schemas/Session"
  17468. }
  17469. },
  17470. "required": ["sessionID", "info"],
  17471. "additionalProperties": false
  17472. }
  17473. },
  17474. "required": ["id", "type", "properties"],
  17475. "additionalProperties": false
  17476. },
  17477. {
  17478. "type": "object",
  17479. "properties": {
  17480. "id": {
  17481. "type": "string",
  17482. "pattern": "^evt_"
  17483. },
  17484. "type": {
  17485. "type": "string",
  17486. "enum": ["message.updated"]
  17487. },
  17488. "properties": {
  17489. "type": "object",
  17490. "properties": {
  17491. "sessionID": {
  17492. "type": "string",
  17493. "pattern": "^ses"
  17494. },
  17495. "info": {
  17496. "$ref": "#/components/schemas/Message"
  17497. }
  17498. },
  17499. "required": ["sessionID", "info"],
  17500. "additionalProperties": false
  17501. }
  17502. },
  17503. "required": ["id", "type", "properties"],
  17504. "additionalProperties": false
  17505. },
  17506. {
  17507. "type": "object",
  17508. "properties": {
  17509. "id": {
  17510. "type": "string",
  17511. "pattern": "^evt_"
  17512. },
  17513. "type": {
  17514. "type": "string",
  17515. "enum": ["message.removed"]
  17516. },
  17517. "properties": {
  17518. "type": "object",
  17519. "properties": {
  17520. "sessionID": {
  17521. "type": "string",
  17522. "pattern": "^ses"
  17523. },
  17524. "messageID": {
  17525. "type": "string",
  17526. "pattern": "^msg"
  17527. }
  17528. },
  17529. "required": ["sessionID", "messageID"],
  17530. "additionalProperties": false
  17531. }
  17532. },
  17533. "required": ["id", "type", "properties"],
  17534. "additionalProperties": false
  17535. },
  17536. {
  17537. "type": "object",
  17538. "properties": {
  17539. "id": {
  17540. "type": "string",
  17541. "pattern": "^evt_"
  17542. },
  17543. "type": {
  17544. "type": "string",
  17545. "enum": ["message.part.updated"]
  17546. },
  17547. "properties": {
  17548. "type": "object",
  17549. "properties": {
  17550. "sessionID": {
  17551. "type": "string",
  17552. "pattern": "^ses"
  17553. },
  17554. "part": {
  17555. "$ref": "#/components/schemas/Part"
  17556. },
  17557. "time": {
  17558. "type": "number"
  17559. }
  17560. },
  17561. "required": ["sessionID", "part", "time"],
  17562. "additionalProperties": false
  17563. }
  17564. },
  17565. "required": ["id", "type", "properties"],
  17566. "additionalProperties": false
  17567. },
  17568. {
  17569. "type": "object",
  17570. "properties": {
  17571. "id": {
  17572. "type": "string",
  17573. "pattern": "^evt_"
  17574. },
  17575. "type": {
  17576. "type": "string",
  17577. "enum": ["message.part.removed"]
  17578. },
  17579. "properties": {
  17580. "type": "object",
  17581. "properties": {
  17582. "sessionID": {
  17583. "type": "string",
  17584. "pattern": "^ses"
  17585. },
  17586. "messageID": {
  17587. "type": "string",
  17588. "pattern": "^msg"
  17589. },
  17590. "partID": {
  17591. "type": "string",
  17592. "pattern": "^prt"
  17593. }
  17594. },
  17595. "required": ["sessionID", "messageID", "partID"],
  17596. "additionalProperties": false
  17597. }
  17598. },
  17599. "required": ["id", "type", "properties"],
  17600. "additionalProperties": false
  17601. },
  17602. {
  17603. "type": "object",
  17604. "properties": {
  17605. "id": {
  17606. "type": "string",
  17607. "pattern": "^evt_"
  17608. },
  17609. "type": {
  17610. "type": "string",
  17611. "enum": ["session.next.agent.switched"]
  17612. },
  17613. "properties": {
  17614. "type": "object",
  17615. "properties": {
  17616. "timestamp": {
  17617. "type": "number"
  17618. },
  17619. "sessionID": {
  17620. "type": "string",
  17621. "pattern": "^ses"
  17622. },
  17623. "messageID": {
  17624. "type": "string",
  17625. "pattern": "^msg_"
  17626. },
  17627. "agent": {
  17628. "type": "string"
  17629. }
  17630. },
  17631. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17632. "additionalProperties": false
  17633. }
  17634. },
  17635. "required": ["id", "type", "properties"],
  17636. "additionalProperties": false
  17637. },
  17638. {
  17639. "type": "object",
  17640. "properties": {
  17641. "id": {
  17642. "type": "string",
  17643. "pattern": "^evt_"
  17644. },
  17645. "type": {
  17646. "type": "string",
  17647. "enum": ["session.next.model.switched"]
  17648. },
  17649. "properties": {
  17650. "type": "object",
  17651. "properties": {
  17652. "timestamp": {
  17653. "type": "number"
  17654. },
  17655. "sessionID": {
  17656. "type": "string",
  17657. "pattern": "^ses"
  17658. },
  17659. "messageID": {
  17660. "type": "string",
  17661. "pattern": "^msg_"
  17662. },
  17663. "model": {
  17664. "type": "object",
  17665. "properties": {
  17666. "id": {
  17667. "type": "string"
  17668. },
  17669. "providerID": {
  17670. "type": "string"
  17671. },
  17672. "variant": {
  17673. "type": "string"
  17674. }
  17675. },
  17676. "required": ["id", "providerID"],
  17677. "additionalProperties": false
  17678. }
  17679. },
  17680. "required": ["timestamp", "sessionID", "messageID", "model"],
  17681. "additionalProperties": false
  17682. }
  17683. },
  17684. "required": ["id", "type", "properties"],
  17685. "additionalProperties": false
  17686. },
  17687. {
  17688. "type": "object",
  17689. "properties": {
  17690. "id": {
  17691. "type": "string",
  17692. "pattern": "^evt_"
  17693. },
  17694. "type": {
  17695. "type": "string",
  17696. "enum": ["session.next.moved"]
  17697. },
  17698. "properties": {
  17699. "type": "object",
  17700. "properties": {
  17701. "timestamp": {
  17702. "type": "number"
  17703. },
  17704. "sessionID": {
  17705. "type": "string",
  17706. "pattern": "^ses"
  17707. },
  17708. "location": {
  17709. "$ref": "#/components/schemas/LocationRef"
  17710. },
  17711. "subdirectory": {
  17712. "type": "string"
  17713. }
  17714. },
  17715. "required": ["timestamp", "sessionID", "location"],
  17716. "additionalProperties": false
  17717. }
  17718. },
  17719. "required": ["id", "type", "properties"],
  17720. "additionalProperties": false
  17721. },
  17722. {
  17723. "type": "object",
  17724. "properties": {
  17725. "id": {
  17726. "type": "string",
  17727. "pattern": "^evt_"
  17728. },
  17729. "type": {
  17730. "type": "string",
  17731. "enum": ["session.next.prompted"]
  17732. },
  17733. "properties": {
  17734. "type": "object",
  17735. "properties": {
  17736. "timestamp": {
  17737. "type": "number"
  17738. },
  17739. "sessionID": {
  17740. "type": "string",
  17741. "pattern": "^ses"
  17742. },
  17743. "messageID": {
  17744. "type": "string",
  17745. "pattern": "^msg_"
  17746. },
  17747. "prompt": {
  17748. "$ref": "#/components/schemas/Prompt"
  17749. },
  17750. "delivery": {
  17751. "type": "string",
  17752. "enum": ["steer", "queue"]
  17753. }
  17754. },
  17755. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17756. "additionalProperties": false
  17757. }
  17758. },
  17759. "required": ["id", "type", "properties"],
  17760. "additionalProperties": false
  17761. },
  17762. {
  17763. "type": "object",
  17764. "properties": {
  17765. "id": {
  17766. "type": "string",
  17767. "pattern": "^evt_"
  17768. },
  17769. "type": {
  17770. "type": "string",
  17771. "enum": ["session.next.prompt.admitted"]
  17772. },
  17773. "properties": {
  17774. "type": "object",
  17775. "properties": {
  17776. "timestamp": {
  17777. "type": "number"
  17778. },
  17779. "sessionID": {
  17780. "type": "string",
  17781. "pattern": "^ses"
  17782. },
  17783. "messageID": {
  17784. "type": "string",
  17785. "pattern": "^msg_"
  17786. },
  17787. "prompt": {
  17788. "$ref": "#/components/schemas/Prompt"
  17789. },
  17790. "delivery": {
  17791. "type": "string",
  17792. "enum": ["steer", "queue"]
  17793. }
  17794. },
  17795. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17796. "additionalProperties": false
  17797. }
  17798. },
  17799. "required": ["id", "type", "properties"],
  17800. "additionalProperties": false
  17801. },
  17802. {
  17803. "type": "object",
  17804. "properties": {
  17805. "id": {
  17806. "type": "string",
  17807. "pattern": "^evt_"
  17808. },
  17809. "type": {
  17810. "type": "string",
  17811. "enum": ["session.next.context.updated"]
  17812. },
  17813. "properties": {
  17814. "type": "object",
  17815. "properties": {
  17816. "timestamp": {
  17817. "type": "number"
  17818. },
  17819. "sessionID": {
  17820. "type": "string",
  17821. "pattern": "^ses"
  17822. },
  17823. "messageID": {
  17824. "type": "string",
  17825. "pattern": "^msg_"
  17826. },
  17827. "text": {
  17828. "type": "string"
  17829. }
  17830. },
  17831. "required": ["timestamp", "sessionID", "messageID", "text"],
  17832. "additionalProperties": false
  17833. }
  17834. },
  17835. "required": ["id", "type", "properties"],
  17836. "additionalProperties": false
  17837. },
  17838. {
  17839. "type": "object",
  17840. "properties": {
  17841. "id": {
  17842. "type": "string",
  17843. "pattern": "^evt_"
  17844. },
  17845. "type": {
  17846. "type": "string",
  17847. "enum": ["session.next.synthetic"]
  17848. },
  17849. "properties": {
  17850. "type": "object",
  17851. "properties": {
  17852. "timestamp": {
  17853. "type": "number"
  17854. },
  17855. "sessionID": {
  17856. "type": "string",
  17857. "pattern": "^ses"
  17858. },
  17859. "messageID": {
  17860. "type": "string",
  17861. "pattern": "^msg_"
  17862. },
  17863. "text": {
  17864. "type": "string"
  17865. }
  17866. },
  17867. "required": ["timestamp", "sessionID", "messageID", "text"],
  17868. "additionalProperties": false
  17869. }
  17870. },
  17871. "required": ["id", "type", "properties"],
  17872. "additionalProperties": false
  17873. },
  17874. {
  17875. "type": "object",
  17876. "properties": {
  17877. "id": {
  17878. "type": "string",
  17879. "pattern": "^evt_"
  17880. },
  17881. "type": {
  17882. "type": "string",
  17883. "enum": ["session.next.shell.started"]
  17884. },
  17885. "properties": {
  17886. "type": "object",
  17887. "properties": {
  17888. "timestamp": {
  17889. "type": "number"
  17890. },
  17891. "sessionID": {
  17892. "type": "string",
  17893. "pattern": "^ses"
  17894. },
  17895. "messageID": {
  17896. "type": "string",
  17897. "pattern": "^msg_"
  17898. },
  17899. "callID": {
  17900. "type": "string"
  17901. },
  17902. "command": {
  17903. "type": "string"
  17904. }
  17905. },
  17906. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17907. "additionalProperties": false
  17908. }
  17909. },
  17910. "required": ["id", "type", "properties"],
  17911. "additionalProperties": false
  17912. },
  17913. {
  17914. "type": "object",
  17915. "properties": {
  17916. "id": {
  17917. "type": "string",
  17918. "pattern": "^evt_"
  17919. },
  17920. "type": {
  17921. "type": "string",
  17922. "enum": ["session.next.shell.ended"]
  17923. },
  17924. "properties": {
  17925. "type": "object",
  17926. "properties": {
  17927. "timestamp": {
  17928. "type": "number"
  17929. },
  17930. "sessionID": {
  17931. "type": "string",
  17932. "pattern": "^ses"
  17933. },
  17934. "callID": {
  17935. "type": "string"
  17936. },
  17937. "output": {
  17938. "type": "string"
  17939. }
  17940. },
  17941. "required": ["timestamp", "sessionID", "callID", "output"],
  17942. "additionalProperties": false
  17943. }
  17944. },
  17945. "required": ["id", "type", "properties"],
  17946. "additionalProperties": false
  17947. },
  17948. {
  17949. "type": "object",
  17950. "properties": {
  17951. "id": {
  17952. "type": "string",
  17953. "pattern": "^evt_"
  17954. },
  17955. "type": {
  17956. "type": "string",
  17957. "enum": ["session.next.step.started"]
  17958. },
  17959. "properties": {
  17960. "type": "object",
  17961. "properties": {
  17962. "timestamp": {
  17963. "type": "number"
  17964. },
  17965. "sessionID": {
  17966. "type": "string",
  17967. "pattern": "^ses"
  17968. },
  17969. "assistantMessageID": {
  17970. "type": "string",
  17971. "pattern": "^msg_"
  17972. },
  17973. "agent": {
  17974. "type": "string"
  17975. },
  17976. "model": {
  17977. "type": "object",
  17978. "properties": {
  17979. "id": {
  17980. "type": "string"
  17981. },
  17982. "providerID": {
  17983. "type": "string"
  17984. },
  17985. "variant": {
  17986. "type": "string"
  17987. }
  17988. },
  17989. "required": ["id", "providerID"],
  17990. "additionalProperties": false
  17991. },
  17992. "snapshot": {
  17993. "type": "string"
  17994. }
  17995. },
  17996. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  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.step.ended"]
  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. "finish": {
  18029. "type": "string"
  18030. },
  18031. "cost": {
  18032. "type": "number"
  18033. },
  18034. "tokens": {
  18035. "type": "object",
  18036. "properties": {
  18037. "input": {
  18038. "type": "number"
  18039. },
  18040. "output": {
  18041. "type": "number"
  18042. },
  18043. "reasoning": {
  18044. "type": "number"
  18045. },
  18046. "cache": {
  18047. "type": "object",
  18048. "properties": {
  18049. "read": {
  18050. "type": "number"
  18051. },
  18052. "write": {
  18053. "type": "number"
  18054. }
  18055. },
  18056. "required": ["read", "write"],
  18057. "additionalProperties": false
  18058. }
  18059. },
  18060. "required": ["input", "output", "reasoning", "cache"],
  18061. "additionalProperties": false
  18062. },
  18063. "snapshot": {
  18064. "type": "string"
  18065. },
  18066. "files": {
  18067. "type": "array",
  18068. "items": {
  18069. "type": "string"
  18070. }
  18071. }
  18072. },
  18073. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  18074. "additionalProperties": false
  18075. }
  18076. },
  18077. "required": ["id", "type", "properties"],
  18078. "additionalProperties": false
  18079. },
  18080. {
  18081. "type": "object",
  18082. "properties": {
  18083. "id": {
  18084. "type": "string",
  18085. "pattern": "^evt_"
  18086. },
  18087. "type": {
  18088. "type": "string",
  18089. "enum": ["session.next.step.failed"]
  18090. },
  18091. "properties": {
  18092. "type": "object",
  18093. "properties": {
  18094. "timestamp": {
  18095. "type": "number"
  18096. },
  18097. "sessionID": {
  18098. "type": "string",
  18099. "pattern": "^ses"
  18100. },
  18101. "assistantMessageID": {
  18102. "type": "string",
  18103. "pattern": "^msg_"
  18104. },
  18105. "error": {
  18106. "$ref": "#/components/schemas/SessionErrorUnknown"
  18107. }
  18108. },
  18109. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  18110. "additionalProperties": false
  18111. }
  18112. },
  18113. "required": ["id", "type", "properties"],
  18114. "additionalProperties": false
  18115. },
  18116. {
  18117. "type": "object",
  18118. "properties": {
  18119. "id": {
  18120. "type": "string",
  18121. "pattern": "^evt_"
  18122. },
  18123. "type": {
  18124. "type": "string",
  18125. "enum": ["session.next.text.started"]
  18126. },
  18127. "properties": {
  18128. "type": "object",
  18129. "properties": {
  18130. "timestamp": {
  18131. "type": "number"
  18132. },
  18133. "sessionID": {
  18134. "type": "string",
  18135. "pattern": "^ses"
  18136. },
  18137. "assistantMessageID": {
  18138. "type": "string",
  18139. "pattern": "^msg_"
  18140. },
  18141. "textID": {
  18142. "type": "string"
  18143. }
  18144. },
  18145. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  18146. "additionalProperties": false
  18147. }
  18148. },
  18149. "required": ["id", "type", "properties"],
  18150. "additionalProperties": false
  18151. },
  18152. {
  18153. "type": "object",
  18154. "properties": {
  18155. "id": {
  18156. "type": "string",
  18157. "pattern": "^evt_"
  18158. },
  18159. "type": {
  18160. "type": "string",
  18161. "enum": ["session.next.text.delta"]
  18162. },
  18163. "properties": {
  18164. "type": "object",
  18165. "properties": {
  18166. "timestamp": {
  18167. "type": "number"
  18168. },
  18169. "sessionID": {
  18170. "type": "string",
  18171. "pattern": "^ses"
  18172. },
  18173. "assistantMessageID": {
  18174. "type": "string",
  18175. "pattern": "^msg_"
  18176. },
  18177. "textID": {
  18178. "type": "string"
  18179. },
  18180. "delta": {
  18181. "type": "string"
  18182. }
  18183. },
  18184. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  18185. "additionalProperties": false
  18186. }
  18187. },
  18188. "required": ["id", "type", "properties"],
  18189. "additionalProperties": false
  18190. },
  18191. {
  18192. "type": "object",
  18193. "properties": {
  18194. "id": {
  18195. "type": "string",
  18196. "pattern": "^evt_"
  18197. },
  18198. "type": {
  18199. "type": "string",
  18200. "enum": ["session.next.text.ended"]
  18201. },
  18202. "properties": {
  18203. "type": "object",
  18204. "properties": {
  18205. "timestamp": {
  18206. "type": "number"
  18207. },
  18208. "sessionID": {
  18209. "type": "string",
  18210. "pattern": "^ses"
  18211. },
  18212. "assistantMessageID": {
  18213. "type": "string",
  18214. "pattern": "^msg_"
  18215. },
  18216. "textID": {
  18217. "type": "string"
  18218. },
  18219. "text": {
  18220. "type": "string"
  18221. }
  18222. },
  18223. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  18224. "additionalProperties": false
  18225. }
  18226. },
  18227. "required": ["id", "type", "properties"],
  18228. "additionalProperties": false
  18229. },
  18230. {
  18231. "type": "object",
  18232. "properties": {
  18233. "id": {
  18234. "type": "string",
  18235. "pattern": "^evt_"
  18236. },
  18237. "type": {
  18238. "type": "string",
  18239. "enum": ["session.next.reasoning.started"]
  18240. },
  18241. "properties": {
  18242. "type": "object",
  18243. "properties": {
  18244. "timestamp": {
  18245. "type": "number"
  18246. },
  18247. "sessionID": {
  18248. "type": "string",
  18249. "pattern": "^ses"
  18250. },
  18251. "assistantMessageID": {
  18252. "type": "string",
  18253. "pattern": "^msg_"
  18254. },
  18255. "reasoningID": {
  18256. "type": "string"
  18257. },
  18258. "providerMetadata": {
  18259. "type": "object",
  18260. "additionalProperties": {
  18261. "type": "object"
  18262. }
  18263. }
  18264. },
  18265. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  18266. "additionalProperties": false
  18267. }
  18268. },
  18269. "required": ["id", "type", "properties"],
  18270. "additionalProperties": false
  18271. },
  18272. {
  18273. "type": "object",
  18274. "properties": {
  18275. "id": {
  18276. "type": "string",
  18277. "pattern": "^evt_"
  18278. },
  18279. "type": {
  18280. "type": "string",
  18281. "enum": ["session.next.reasoning.delta"]
  18282. },
  18283. "properties": {
  18284. "type": "object",
  18285. "properties": {
  18286. "timestamp": {
  18287. "type": "number"
  18288. },
  18289. "sessionID": {
  18290. "type": "string",
  18291. "pattern": "^ses"
  18292. },
  18293. "assistantMessageID": {
  18294. "type": "string",
  18295. "pattern": "^msg_"
  18296. },
  18297. "reasoningID": {
  18298. "type": "string"
  18299. },
  18300. "delta": {
  18301. "type": "string"
  18302. }
  18303. },
  18304. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18305. "additionalProperties": false
  18306. }
  18307. },
  18308. "required": ["id", "type", "properties"],
  18309. "additionalProperties": false
  18310. },
  18311. {
  18312. "type": "object",
  18313. "properties": {
  18314. "id": {
  18315. "type": "string",
  18316. "pattern": "^evt_"
  18317. },
  18318. "type": {
  18319. "type": "string",
  18320. "enum": ["session.next.reasoning.ended"]
  18321. },
  18322. "properties": {
  18323. "type": "object",
  18324. "properties": {
  18325. "timestamp": {
  18326. "type": "number"
  18327. },
  18328. "sessionID": {
  18329. "type": "string",
  18330. "pattern": "^ses"
  18331. },
  18332. "assistantMessageID": {
  18333. "type": "string",
  18334. "pattern": "^msg_"
  18335. },
  18336. "reasoningID": {
  18337. "type": "string"
  18338. },
  18339. "text": {
  18340. "type": "string"
  18341. },
  18342. "providerMetadata": {
  18343. "type": "object",
  18344. "additionalProperties": {
  18345. "type": "object"
  18346. }
  18347. }
  18348. },
  18349. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  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.input.started"]
  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. "name": {
  18385. "type": "string"
  18386. }
  18387. },
  18388. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18389. "additionalProperties": false
  18390. }
  18391. },
  18392. "required": ["id", "type", "properties"],
  18393. "additionalProperties": false
  18394. },
  18395. {
  18396. "type": "object",
  18397. "properties": {
  18398. "id": {
  18399. "type": "string",
  18400. "pattern": "^evt_"
  18401. },
  18402. "type": {
  18403. "type": "string",
  18404. "enum": ["session.next.tool.input.delta"]
  18405. },
  18406. "properties": {
  18407. "type": "object",
  18408. "properties": {
  18409. "timestamp": {
  18410. "type": "number"
  18411. },
  18412. "sessionID": {
  18413. "type": "string",
  18414. "pattern": "^ses"
  18415. },
  18416. "assistantMessageID": {
  18417. "type": "string",
  18418. "pattern": "^msg_"
  18419. },
  18420. "callID": {
  18421. "type": "string"
  18422. },
  18423. "delta": {
  18424. "type": "string"
  18425. }
  18426. },
  18427. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18428. "additionalProperties": false
  18429. }
  18430. },
  18431. "required": ["id", "type", "properties"],
  18432. "additionalProperties": false
  18433. },
  18434. {
  18435. "type": "object",
  18436. "properties": {
  18437. "id": {
  18438. "type": "string",
  18439. "pattern": "^evt_"
  18440. },
  18441. "type": {
  18442. "type": "string",
  18443. "enum": ["session.next.tool.input.ended"]
  18444. },
  18445. "properties": {
  18446. "type": "object",
  18447. "properties": {
  18448. "timestamp": {
  18449. "type": "number"
  18450. },
  18451. "sessionID": {
  18452. "type": "string",
  18453. "pattern": "^ses"
  18454. },
  18455. "assistantMessageID": {
  18456. "type": "string",
  18457. "pattern": "^msg_"
  18458. },
  18459. "callID": {
  18460. "type": "string"
  18461. },
  18462. "text": {
  18463. "type": "string"
  18464. }
  18465. },
  18466. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18467. "additionalProperties": false
  18468. }
  18469. },
  18470. "required": ["id", "type", "properties"],
  18471. "additionalProperties": false
  18472. },
  18473. {
  18474. "type": "object",
  18475. "properties": {
  18476. "id": {
  18477. "type": "string",
  18478. "pattern": "^evt_"
  18479. },
  18480. "type": {
  18481. "type": "string",
  18482. "enum": ["session.next.tool.called"]
  18483. },
  18484. "properties": {
  18485. "type": "object",
  18486. "properties": {
  18487. "timestamp": {
  18488. "type": "number"
  18489. },
  18490. "sessionID": {
  18491. "type": "string",
  18492. "pattern": "^ses"
  18493. },
  18494. "assistantMessageID": {
  18495. "type": "string",
  18496. "pattern": "^msg_"
  18497. },
  18498. "callID": {
  18499. "type": "string"
  18500. },
  18501. "tool": {
  18502. "type": "string"
  18503. },
  18504. "input": {
  18505. "type": "object"
  18506. },
  18507. "provider": {
  18508. "type": "object",
  18509. "properties": {
  18510. "executed": {
  18511. "type": "boolean"
  18512. },
  18513. "metadata": {
  18514. "type": "object",
  18515. "additionalProperties": {
  18516. "type": "object"
  18517. }
  18518. }
  18519. },
  18520. "required": ["executed"],
  18521. "additionalProperties": false
  18522. }
  18523. },
  18524. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18525. "additionalProperties": false
  18526. }
  18527. },
  18528. "required": ["id", "type", "properties"],
  18529. "additionalProperties": false
  18530. },
  18531. {
  18532. "type": "object",
  18533. "properties": {
  18534. "id": {
  18535. "type": "string",
  18536. "pattern": "^evt_"
  18537. },
  18538. "type": {
  18539. "type": "string",
  18540. "enum": ["session.next.tool.progress"]
  18541. },
  18542. "properties": {
  18543. "type": "object",
  18544. "properties": {
  18545. "timestamp": {
  18546. "type": "number"
  18547. },
  18548. "sessionID": {
  18549. "type": "string",
  18550. "pattern": "^ses"
  18551. },
  18552. "assistantMessageID": {
  18553. "type": "string",
  18554. "pattern": "^msg_"
  18555. },
  18556. "callID": {
  18557. "type": "string"
  18558. },
  18559. "structured": {
  18560. "type": "object"
  18561. },
  18562. "content": {
  18563. "type": "array",
  18564. "items": {
  18565. "anyOf": [
  18566. {
  18567. "$ref": "#/components/schemas/ToolTextContent"
  18568. },
  18569. {
  18570. "$ref": "#/components/schemas/ToolFileContent"
  18571. }
  18572. ]
  18573. }
  18574. }
  18575. },
  18576. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18577. "additionalProperties": false
  18578. }
  18579. },
  18580. "required": ["id", "type", "properties"],
  18581. "additionalProperties": false
  18582. },
  18583. {
  18584. "type": "object",
  18585. "properties": {
  18586. "id": {
  18587. "type": "string",
  18588. "pattern": "^evt_"
  18589. },
  18590. "type": {
  18591. "type": "string",
  18592. "enum": ["session.next.tool.success"]
  18593. },
  18594. "properties": {
  18595. "type": "object",
  18596. "properties": {
  18597. "timestamp": {
  18598. "type": "number"
  18599. },
  18600. "sessionID": {
  18601. "type": "string",
  18602. "pattern": "^ses"
  18603. },
  18604. "assistantMessageID": {
  18605. "type": "string",
  18606. "pattern": "^msg_"
  18607. },
  18608. "callID": {
  18609. "type": "string"
  18610. },
  18611. "structured": {
  18612. "type": "object"
  18613. },
  18614. "content": {
  18615. "type": "array",
  18616. "items": {
  18617. "anyOf": [
  18618. {
  18619. "$ref": "#/components/schemas/ToolTextContent"
  18620. },
  18621. {
  18622. "$ref": "#/components/schemas/ToolFileContent"
  18623. }
  18624. ]
  18625. }
  18626. },
  18627. "outputPaths": {
  18628. "type": "array",
  18629. "items": {
  18630. "type": "string"
  18631. }
  18632. },
  18633. "result": {},
  18634. "provider": {
  18635. "type": "object",
  18636. "properties": {
  18637. "executed": {
  18638. "type": "boolean"
  18639. },
  18640. "metadata": {
  18641. "type": "object",
  18642. "additionalProperties": {
  18643. "type": "object"
  18644. }
  18645. }
  18646. },
  18647. "required": ["executed"],
  18648. "additionalProperties": false
  18649. }
  18650. },
  18651. "required": [
  18652. "timestamp",
  18653. "sessionID",
  18654. "assistantMessageID",
  18655. "callID",
  18656. "structured",
  18657. "content",
  18658. "provider"
  18659. ],
  18660. "additionalProperties": false
  18661. }
  18662. },
  18663. "required": ["id", "type", "properties"],
  18664. "additionalProperties": false
  18665. },
  18666. {
  18667. "type": "object",
  18668. "properties": {
  18669. "id": {
  18670. "type": "string",
  18671. "pattern": "^evt_"
  18672. },
  18673. "type": {
  18674. "type": "string",
  18675. "enum": ["session.next.tool.failed"]
  18676. },
  18677. "properties": {
  18678. "type": "object",
  18679. "properties": {
  18680. "timestamp": {
  18681. "type": "number"
  18682. },
  18683. "sessionID": {
  18684. "type": "string",
  18685. "pattern": "^ses"
  18686. },
  18687. "assistantMessageID": {
  18688. "type": "string",
  18689. "pattern": "^msg_"
  18690. },
  18691. "callID": {
  18692. "type": "string"
  18693. },
  18694. "error": {
  18695. "$ref": "#/components/schemas/SessionErrorUnknown"
  18696. },
  18697. "result": {},
  18698. "provider": {
  18699. "type": "object",
  18700. "properties": {
  18701. "executed": {
  18702. "type": "boolean"
  18703. },
  18704. "metadata": {
  18705. "type": "object",
  18706. "additionalProperties": {
  18707. "type": "object"
  18708. }
  18709. }
  18710. },
  18711. "required": ["executed"],
  18712. "additionalProperties": false
  18713. }
  18714. },
  18715. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18716. "additionalProperties": false
  18717. }
  18718. },
  18719. "required": ["id", "type", "properties"],
  18720. "additionalProperties": false
  18721. },
  18722. {
  18723. "type": "object",
  18724. "properties": {
  18725. "id": {
  18726. "type": "string",
  18727. "pattern": "^evt_"
  18728. },
  18729. "type": {
  18730. "type": "string",
  18731. "enum": ["session.next.retried"]
  18732. },
  18733. "properties": {
  18734. "type": "object",
  18735. "properties": {
  18736. "timestamp": {
  18737. "type": "number"
  18738. },
  18739. "sessionID": {
  18740. "type": "string",
  18741. "pattern": "^ses"
  18742. },
  18743. "attempt": {
  18744. "type": "number"
  18745. },
  18746. "error": {
  18747. "$ref": "#/components/schemas/SessionNextRetry_error"
  18748. }
  18749. },
  18750. "required": ["timestamp", "sessionID", "attempt", "error"],
  18751. "additionalProperties": false
  18752. }
  18753. },
  18754. "required": ["id", "type", "properties"],
  18755. "additionalProperties": false
  18756. },
  18757. {
  18758. "type": "object",
  18759. "properties": {
  18760. "id": {
  18761. "type": "string",
  18762. "pattern": "^evt_"
  18763. },
  18764. "type": {
  18765. "type": "string",
  18766. "enum": ["session.next.compaction.started"]
  18767. },
  18768. "properties": {
  18769. "type": "object",
  18770. "properties": {
  18771. "timestamp": {
  18772. "type": "number"
  18773. },
  18774. "sessionID": {
  18775. "type": "string",
  18776. "pattern": "^ses"
  18777. },
  18778. "messageID": {
  18779. "type": "string",
  18780. "pattern": "^msg_"
  18781. },
  18782. "reason": {
  18783. "type": "string",
  18784. "enum": ["auto", "manual"]
  18785. }
  18786. },
  18787. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18788. "additionalProperties": false
  18789. }
  18790. },
  18791. "required": ["id", "type", "properties"],
  18792. "additionalProperties": false
  18793. },
  18794. {
  18795. "type": "object",
  18796. "properties": {
  18797. "id": {
  18798. "type": "string",
  18799. "pattern": "^evt_"
  18800. },
  18801. "type": {
  18802. "type": "string",
  18803. "enum": ["session.next.compaction.delta"]
  18804. },
  18805. "properties": {
  18806. "type": "object",
  18807. "properties": {
  18808. "timestamp": {
  18809. "type": "number"
  18810. },
  18811. "sessionID": {
  18812. "type": "string",
  18813. "pattern": "^ses"
  18814. },
  18815. "messageID": {
  18816. "type": "string",
  18817. "pattern": "^msg_"
  18818. },
  18819. "text": {
  18820. "type": "string"
  18821. }
  18822. },
  18823. "required": ["timestamp", "sessionID", "messageID", "text"],
  18824. "additionalProperties": false
  18825. }
  18826. },
  18827. "required": ["id", "type", "properties"],
  18828. "additionalProperties": false
  18829. },
  18830. {
  18831. "type": "object",
  18832. "properties": {
  18833. "id": {
  18834. "type": "string",
  18835. "pattern": "^evt_"
  18836. },
  18837. "type": {
  18838. "type": "string",
  18839. "enum": ["session.next.compaction.ended"]
  18840. },
  18841. "properties": {
  18842. "type": "object",
  18843. "properties": {
  18844. "timestamp": {
  18845. "type": "number"
  18846. },
  18847. "sessionID": {
  18848. "type": "string",
  18849. "pattern": "^ses"
  18850. },
  18851. "messageID": {
  18852. "type": "string",
  18853. "pattern": "^msg_"
  18854. },
  18855. "reason": {
  18856. "type": "string",
  18857. "enum": ["auto", "manual"]
  18858. },
  18859. "text": {
  18860. "type": "string"
  18861. },
  18862. "recent": {
  18863. "type": "string"
  18864. }
  18865. },
  18866. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18867. "additionalProperties": false
  18868. }
  18869. },
  18870. "required": ["id", "type", "properties"],
  18871. "additionalProperties": false
  18872. },
  18873. {
  18874. "type": "object",
  18875. "properties": {
  18876. "id": {
  18877. "type": "string",
  18878. "pattern": "^evt_"
  18879. },
  18880. "type": {
  18881. "type": "string",
  18882. "enum": ["session.next.revert.staged"]
  18883. },
  18884. "properties": {
  18885. "type": "object",
  18886. "properties": {
  18887. "timestamp": {
  18888. "type": "number"
  18889. },
  18890. "sessionID": {
  18891. "type": "string",
  18892. "pattern": "^ses"
  18893. },
  18894. "revert": {
  18895. "type": "object",
  18896. "properties": {
  18897. "messageID": {
  18898. "type": "string",
  18899. "pattern": "^msg_"
  18900. },
  18901. "partID": {
  18902. "type": "string"
  18903. },
  18904. "snapshot": {
  18905. "type": "string"
  18906. },
  18907. "diff": {
  18908. "type": "string"
  18909. },
  18910. "files": {
  18911. "type": "array",
  18912. "items": {
  18913. "$ref": "#/components/schemas/FileDiff"
  18914. }
  18915. }
  18916. },
  18917. "required": ["messageID"],
  18918. "additionalProperties": false
  18919. }
  18920. },
  18921. "required": ["timestamp", "sessionID", "revert"],
  18922. "additionalProperties": false
  18923. }
  18924. },
  18925. "required": ["id", "type", "properties"],
  18926. "additionalProperties": false
  18927. },
  18928. {
  18929. "type": "object",
  18930. "properties": {
  18931. "id": {
  18932. "type": "string",
  18933. "pattern": "^evt_"
  18934. },
  18935. "type": {
  18936. "type": "string",
  18937. "enum": ["session.next.revert.cleared"]
  18938. },
  18939. "properties": {
  18940. "type": "object",
  18941. "properties": {
  18942. "timestamp": {
  18943. "type": "number"
  18944. },
  18945. "sessionID": {
  18946. "type": "string",
  18947. "pattern": "^ses"
  18948. }
  18949. },
  18950. "required": ["timestamp", "sessionID"],
  18951. "additionalProperties": false
  18952. }
  18953. },
  18954. "required": ["id", "type", "properties"],
  18955. "additionalProperties": false
  18956. },
  18957. {
  18958. "type": "object",
  18959. "properties": {
  18960. "id": {
  18961. "type": "string",
  18962. "pattern": "^evt_"
  18963. },
  18964. "type": {
  18965. "type": "string",
  18966. "enum": ["session.next.revert.committed"]
  18967. },
  18968. "properties": {
  18969. "type": "object",
  18970. "properties": {
  18971. "timestamp": {
  18972. "type": "number"
  18973. },
  18974. "sessionID": {
  18975. "type": "string",
  18976. "pattern": "^ses"
  18977. },
  18978. "messageID": {
  18979. "type": "string",
  18980. "pattern": "^msg_"
  18981. }
  18982. },
  18983. "required": ["timestamp", "sessionID", "messageID"],
  18984. "additionalProperties": false
  18985. }
  18986. },
  18987. "required": ["id", "type", "properties"],
  18988. "additionalProperties": false
  18989. },
  18990. {
  18991. "type": "object",
  18992. "properties": {
  18993. "id": {
  18994. "type": "string",
  18995. "pattern": "^evt_"
  18996. },
  18997. "type": {
  18998. "type": "string",
  18999. "enum": ["message.part.delta"]
  19000. },
  19001. "properties": {
  19002. "type": "object",
  19003. "properties": {
  19004. "sessionID": {
  19005. "type": "string",
  19006. "pattern": "^ses"
  19007. },
  19008. "messageID": {
  19009. "type": "string",
  19010. "pattern": "^msg"
  19011. },
  19012. "partID": {
  19013. "type": "string",
  19014. "pattern": "^prt"
  19015. },
  19016. "field": {
  19017. "type": "string"
  19018. },
  19019. "delta": {
  19020. "type": "string"
  19021. }
  19022. },
  19023. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  19024. "additionalProperties": false
  19025. }
  19026. },
  19027. "required": ["id", "type", "properties"],
  19028. "additionalProperties": false
  19029. },
  19030. {
  19031. "type": "object",
  19032. "properties": {
  19033. "id": {
  19034. "type": "string",
  19035. "pattern": "^evt_"
  19036. },
  19037. "type": {
  19038. "type": "string",
  19039. "enum": ["session.diff"]
  19040. },
  19041. "properties": {
  19042. "type": "object",
  19043. "properties": {
  19044. "sessionID": {
  19045. "type": "string",
  19046. "pattern": "^ses"
  19047. },
  19048. "diff": {
  19049. "type": "array",
  19050. "items": {
  19051. "$ref": "#/components/schemas/SnapshotFileDiff"
  19052. }
  19053. }
  19054. },
  19055. "required": ["sessionID", "diff"],
  19056. "additionalProperties": false
  19057. }
  19058. },
  19059. "required": ["id", "type", "properties"],
  19060. "additionalProperties": false
  19061. },
  19062. {
  19063. "type": "object",
  19064. "properties": {
  19065. "id": {
  19066. "type": "string",
  19067. "pattern": "^evt_"
  19068. },
  19069. "type": {
  19070. "type": "string",
  19071. "enum": ["session.error"]
  19072. },
  19073. "properties": {
  19074. "type": "object",
  19075. "properties": {
  19076. "sessionID": {
  19077. "type": "string",
  19078. "pattern": "^ses"
  19079. },
  19080. "error": {
  19081. "anyOf": [
  19082. {
  19083. "$ref": "#/components/schemas/ProviderAuthError"
  19084. },
  19085. {
  19086. "$ref": "#/components/schemas/UnknownError"
  19087. },
  19088. {
  19089. "$ref": "#/components/schemas/MessageOutputLengthError"
  19090. },
  19091. {
  19092. "$ref": "#/components/schemas/MessageAbortedError"
  19093. },
  19094. {
  19095. "$ref": "#/components/schemas/StructuredOutputError"
  19096. },
  19097. {
  19098. "$ref": "#/components/schemas/ContextOverflowError"
  19099. },
  19100. {
  19101. "$ref": "#/components/schemas/ContentFilterError"
  19102. },
  19103. {
  19104. "$ref": "#/components/schemas/APIError"
  19105. }
  19106. ]
  19107. }
  19108. },
  19109. "additionalProperties": false
  19110. }
  19111. },
  19112. "required": ["id", "type", "properties"],
  19113. "additionalProperties": false
  19114. },
  19115. {
  19116. "type": "object",
  19117. "properties": {
  19118. "id": {
  19119. "type": "string",
  19120. "pattern": "^evt_"
  19121. },
  19122. "type": {
  19123. "type": "string",
  19124. "enum": ["installation.updated"]
  19125. },
  19126. "properties": {
  19127. "type": "object",
  19128. "properties": {
  19129. "version": {
  19130. "type": "string"
  19131. }
  19132. },
  19133. "required": ["version"],
  19134. "additionalProperties": false
  19135. }
  19136. },
  19137. "required": ["id", "type", "properties"],
  19138. "additionalProperties": false
  19139. },
  19140. {
  19141. "type": "object",
  19142. "properties": {
  19143. "id": {
  19144. "type": "string",
  19145. "pattern": "^evt_"
  19146. },
  19147. "type": {
  19148. "type": "string",
  19149. "enum": ["installation.update-available"]
  19150. },
  19151. "properties": {
  19152. "type": "object",
  19153. "properties": {
  19154. "version": {
  19155. "type": "string"
  19156. }
  19157. },
  19158. "required": ["version"],
  19159. "additionalProperties": false
  19160. }
  19161. },
  19162. "required": ["id", "type", "properties"],
  19163. "additionalProperties": false
  19164. },
  19165. {
  19166. "type": "object",
  19167. "properties": {
  19168. "id": {
  19169. "type": "string",
  19170. "pattern": "^evt_"
  19171. },
  19172. "type": {
  19173. "type": "string",
  19174. "enum": ["file.edited"]
  19175. },
  19176. "properties": {
  19177. "type": "object",
  19178. "properties": {
  19179. "file": {
  19180. "type": "string"
  19181. }
  19182. },
  19183. "required": ["file"],
  19184. "additionalProperties": false
  19185. }
  19186. },
  19187. "required": ["id", "type", "properties"],
  19188. "additionalProperties": false
  19189. },
  19190. {
  19191. "type": "object",
  19192. "properties": {
  19193. "id": {
  19194. "type": "string",
  19195. "pattern": "^evt_"
  19196. },
  19197. "type": {
  19198. "type": "string",
  19199. "enum": ["reference.updated"]
  19200. },
  19201. "properties": {
  19202. "type": "object",
  19203. "properties": {}
  19204. }
  19205. },
  19206. "required": ["id", "type", "properties"],
  19207. "additionalProperties": false
  19208. },
  19209. {
  19210. "type": "object",
  19211. "properties": {
  19212. "id": {
  19213. "type": "string",
  19214. "pattern": "^evt_"
  19215. },
  19216. "type": {
  19217. "type": "string",
  19218. "enum": ["permission.v2.asked"]
  19219. },
  19220. "properties": {
  19221. "type": "object",
  19222. "properties": {
  19223. "id": {
  19224. "type": "string",
  19225. "pattern": "^per"
  19226. },
  19227. "sessionID": {
  19228. "type": "string",
  19229. "pattern": "^ses"
  19230. },
  19231. "action": {
  19232. "type": "string"
  19233. },
  19234. "resources": {
  19235. "type": "array",
  19236. "items": {
  19237. "type": "string"
  19238. }
  19239. },
  19240. "save": {
  19241. "type": "array",
  19242. "items": {
  19243. "type": "string"
  19244. }
  19245. },
  19246. "metadata": {
  19247. "type": "object"
  19248. },
  19249. "source": {
  19250. "$ref": "#/components/schemas/PermissionV2Source"
  19251. }
  19252. },
  19253. "required": ["id", "sessionID", "action", "resources"],
  19254. "additionalProperties": false
  19255. }
  19256. },
  19257. "required": ["id", "type", "properties"],
  19258. "additionalProperties": false
  19259. },
  19260. {
  19261. "type": "object",
  19262. "properties": {
  19263. "id": {
  19264. "type": "string",
  19265. "pattern": "^evt_"
  19266. },
  19267. "type": {
  19268. "type": "string",
  19269. "enum": ["permission.v2.replied"]
  19270. },
  19271. "properties": {
  19272. "type": "object",
  19273. "properties": {
  19274. "sessionID": {
  19275. "type": "string",
  19276. "pattern": "^ses"
  19277. },
  19278. "requestID": {
  19279. "type": "string",
  19280. "pattern": "^per"
  19281. },
  19282. "reply": {
  19283. "$ref": "#/components/schemas/PermissionV2Reply"
  19284. }
  19285. },
  19286. "required": ["sessionID", "requestID", "reply"],
  19287. "additionalProperties": false
  19288. }
  19289. },
  19290. "required": ["id", "type", "properties"],
  19291. "additionalProperties": false
  19292. },
  19293. {
  19294. "type": "object",
  19295. "properties": {
  19296. "id": {
  19297. "type": "string",
  19298. "pattern": "^evt_"
  19299. },
  19300. "type": {
  19301. "type": "string",
  19302. "enum": ["plugin.added"]
  19303. },
  19304. "properties": {
  19305. "type": "object",
  19306. "properties": {
  19307. "id": {
  19308. "type": "string"
  19309. }
  19310. },
  19311. "required": ["id"],
  19312. "additionalProperties": false
  19313. }
  19314. },
  19315. "required": ["id", "type", "properties"],
  19316. "additionalProperties": false
  19317. },
  19318. {
  19319. "type": "object",
  19320. "properties": {
  19321. "id": {
  19322. "type": "string",
  19323. "pattern": "^evt_"
  19324. },
  19325. "type": {
  19326. "type": "string",
  19327. "enum": ["project.directories.updated"]
  19328. },
  19329. "properties": {
  19330. "type": "object",
  19331. "properties": {
  19332. "projectID": {
  19333. "type": "string"
  19334. }
  19335. },
  19336. "required": ["projectID"],
  19337. "additionalProperties": false
  19338. }
  19339. },
  19340. "required": ["id", "type", "properties"],
  19341. "additionalProperties": false
  19342. },
  19343. {
  19344. "type": "object",
  19345. "properties": {
  19346. "id": {
  19347. "type": "string",
  19348. "pattern": "^evt_"
  19349. },
  19350. "type": {
  19351. "type": "string",
  19352. "enum": ["file.watcher.updated"]
  19353. },
  19354. "properties": {
  19355. "type": "object",
  19356. "properties": {
  19357. "file": {
  19358. "type": "string"
  19359. },
  19360. "event": {
  19361. "type": "string",
  19362. "enum": ["add", "change", "unlink"]
  19363. }
  19364. },
  19365. "required": ["file", "event"],
  19366. "additionalProperties": false
  19367. }
  19368. },
  19369. "required": ["id", "type", "properties"],
  19370. "additionalProperties": false
  19371. },
  19372. {
  19373. "type": "object",
  19374. "properties": {
  19375. "id": {
  19376. "type": "string",
  19377. "pattern": "^evt_"
  19378. },
  19379. "type": {
  19380. "type": "string",
  19381. "enum": ["pty.created"]
  19382. },
  19383. "properties": {
  19384. "type": "object",
  19385. "properties": {
  19386. "info": {
  19387. "$ref": "#/components/schemas/Pty"
  19388. }
  19389. },
  19390. "required": ["info"],
  19391. "additionalProperties": false
  19392. }
  19393. },
  19394. "required": ["id", "type", "properties"],
  19395. "additionalProperties": false
  19396. },
  19397. {
  19398. "type": "object",
  19399. "properties": {
  19400. "id": {
  19401. "type": "string",
  19402. "pattern": "^evt_"
  19403. },
  19404. "type": {
  19405. "type": "string",
  19406. "enum": ["pty.updated"]
  19407. },
  19408. "properties": {
  19409. "type": "object",
  19410. "properties": {
  19411. "info": {
  19412. "$ref": "#/components/schemas/Pty"
  19413. }
  19414. },
  19415. "required": ["info"],
  19416. "additionalProperties": false
  19417. }
  19418. },
  19419. "required": ["id", "type", "properties"],
  19420. "additionalProperties": false
  19421. },
  19422. {
  19423. "type": "object",
  19424. "properties": {
  19425. "id": {
  19426. "type": "string",
  19427. "pattern": "^evt_"
  19428. },
  19429. "type": {
  19430. "type": "string",
  19431. "enum": ["pty.exited"]
  19432. },
  19433. "properties": {
  19434. "type": "object",
  19435. "properties": {
  19436. "id": {
  19437. "type": "string",
  19438. "pattern": "^pty"
  19439. },
  19440. "exitCode": {
  19441. "type": "integer",
  19442. "minimum": 0
  19443. }
  19444. },
  19445. "required": ["id", "exitCode"],
  19446. "additionalProperties": false
  19447. }
  19448. },
  19449. "required": ["id", "type", "properties"],
  19450. "additionalProperties": false
  19451. },
  19452. {
  19453. "type": "object",
  19454. "properties": {
  19455. "id": {
  19456. "type": "string",
  19457. "pattern": "^evt_"
  19458. },
  19459. "type": {
  19460. "type": "string",
  19461. "enum": ["pty.deleted"]
  19462. },
  19463. "properties": {
  19464. "type": "object",
  19465. "properties": {
  19466. "id": {
  19467. "type": "string",
  19468. "pattern": "^pty"
  19469. }
  19470. },
  19471. "required": ["id"],
  19472. "additionalProperties": false
  19473. }
  19474. },
  19475. "required": ["id", "type", "properties"],
  19476. "additionalProperties": false
  19477. },
  19478. {
  19479. "type": "object",
  19480. "properties": {
  19481. "id": {
  19482. "type": "string",
  19483. "pattern": "^evt_"
  19484. },
  19485. "type": {
  19486. "type": "string",
  19487. "enum": ["question.v2.asked"]
  19488. },
  19489. "properties": {
  19490. "type": "object",
  19491. "properties": {
  19492. "id": {
  19493. "type": "string",
  19494. "pattern": "^que"
  19495. },
  19496. "sessionID": {
  19497. "type": "string",
  19498. "pattern": "^ses"
  19499. },
  19500. "questions": {
  19501. "type": "array",
  19502. "items": {
  19503. "$ref": "#/components/schemas/QuestionV2Info"
  19504. },
  19505. "description": "Questions to ask"
  19506. },
  19507. "tool": {
  19508. "$ref": "#/components/schemas/QuestionV2Tool"
  19509. }
  19510. },
  19511. "required": ["id", "sessionID", "questions"],
  19512. "additionalProperties": false
  19513. }
  19514. },
  19515. "required": ["id", "type", "properties"],
  19516. "additionalProperties": false
  19517. },
  19518. {
  19519. "type": "object",
  19520. "properties": {
  19521. "id": {
  19522. "type": "string",
  19523. "pattern": "^evt_"
  19524. },
  19525. "type": {
  19526. "type": "string",
  19527. "enum": ["question.v2.replied"]
  19528. },
  19529. "properties": {
  19530. "type": "object",
  19531. "properties": {
  19532. "sessionID": {
  19533. "type": "string",
  19534. "pattern": "^ses"
  19535. },
  19536. "requestID": {
  19537. "type": "string",
  19538. "pattern": "^que"
  19539. },
  19540. "answers": {
  19541. "type": "array",
  19542. "items": {
  19543. "$ref": "#/components/schemas/QuestionV2Answer"
  19544. }
  19545. }
  19546. },
  19547. "required": ["sessionID", "requestID", "answers"],
  19548. "additionalProperties": false
  19549. }
  19550. },
  19551. "required": ["id", "type", "properties"],
  19552. "additionalProperties": false
  19553. },
  19554. {
  19555. "type": "object",
  19556. "properties": {
  19557. "id": {
  19558. "type": "string",
  19559. "pattern": "^evt_"
  19560. },
  19561. "type": {
  19562. "type": "string",
  19563. "enum": ["question.v2.rejected"]
  19564. },
  19565. "properties": {
  19566. "type": "object",
  19567. "properties": {
  19568. "sessionID": {
  19569. "type": "string",
  19570. "pattern": "^ses"
  19571. },
  19572. "requestID": {
  19573. "type": "string",
  19574. "pattern": "^que"
  19575. }
  19576. },
  19577. "required": ["sessionID", "requestID"],
  19578. "additionalProperties": false
  19579. }
  19580. },
  19581. "required": ["id", "type", "properties"],
  19582. "additionalProperties": false
  19583. },
  19584. {
  19585. "type": "object",
  19586. "properties": {
  19587. "id": {
  19588. "type": "string",
  19589. "pattern": "^evt_"
  19590. },
  19591. "type": {
  19592. "type": "string",
  19593. "enum": ["todo.updated"]
  19594. },
  19595. "properties": {
  19596. "type": "object",
  19597. "properties": {
  19598. "sessionID": {
  19599. "type": "string",
  19600. "pattern": "^ses"
  19601. },
  19602. "todos": {
  19603. "type": "array",
  19604. "items": {
  19605. "$ref": "#/components/schemas/Todo"
  19606. }
  19607. }
  19608. },
  19609. "required": ["sessionID", "todos"],
  19610. "additionalProperties": false
  19611. }
  19612. },
  19613. "required": ["id", "type", "properties"],
  19614. "additionalProperties": false
  19615. },
  19616. {
  19617. "type": "object",
  19618. "properties": {
  19619. "id": {
  19620. "type": "string",
  19621. "pattern": "^evt_"
  19622. },
  19623. "type": {
  19624. "type": "string",
  19625. "enum": ["lsp.updated"]
  19626. },
  19627. "properties": {
  19628. "type": "object",
  19629. "properties": {}
  19630. }
  19631. },
  19632. "required": ["id", "type", "properties"],
  19633. "additionalProperties": false
  19634. },
  19635. {
  19636. "type": "object",
  19637. "properties": {
  19638. "id": {
  19639. "type": "string",
  19640. "pattern": "^evt_"
  19641. },
  19642. "type": {
  19643. "type": "string",
  19644. "enum": ["permission.asked"]
  19645. },
  19646. "properties": {
  19647. "type": "object",
  19648. "properties": {
  19649. "id": {
  19650. "type": "string",
  19651. "pattern": "^per"
  19652. },
  19653. "sessionID": {
  19654. "type": "string",
  19655. "pattern": "^ses"
  19656. },
  19657. "permission": {
  19658. "type": "string"
  19659. },
  19660. "patterns": {
  19661. "type": "array",
  19662. "items": {
  19663. "type": "string"
  19664. }
  19665. },
  19666. "metadata": {
  19667. "type": "object"
  19668. },
  19669. "always": {
  19670. "type": "array",
  19671. "items": {
  19672. "type": "string"
  19673. }
  19674. },
  19675. "tool": {
  19676. "type": "object",
  19677. "properties": {
  19678. "messageID": {
  19679. "type": "string"
  19680. },
  19681. "callID": {
  19682. "type": "string"
  19683. }
  19684. },
  19685. "required": ["messageID", "callID"],
  19686. "additionalProperties": false
  19687. }
  19688. },
  19689. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19690. "additionalProperties": false
  19691. }
  19692. },
  19693. "required": ["id", "type", "properties"],
  19694. "additionalProperties": false
  19695. },
  19696. {
  19697. "type": "object",
  19698. "properties": {
  19699. "id": {
  19700. "type": "string",
  19701. "pattern": "^evt_"
  19702. },
  19703. "type": {
  19704. "type": "string",
  19705. "enum": ["permission.replied"]
  19706. },
  19707. "properties": {
  19708. "type": "object",
  19709. "properties": {
  19710. "sessionID": {
  19711. "type": "string",
  19712. "pattern": "^ses"
  19713. },
  19714. "requestID": {
  19715. "type": "string",
  19716. "pattern": "^per"
  19717. },
  19718. "reply": {
  19719. "type": "string",
  19720. "enum": ["once", "always", "reject"]
  19721. }
  19722. },
  19723. "required": ["sessionID", "requestID", "reply"],
  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": ["tui.prompt.append"]
  19740. },
  19741. "properties": {
  19742. "type": "object",
  19743. "properties": {
  19744. "text": {
  19745. "type": "string"
  19746. }
  19747. },
  19748. "required": ["text"],
  19749. "additionalProperties": false
  19750. }
  19751. },
  19752. "required": ["id", "type", "properties"],
  19753. "additionalProperties": false
  19754. },
  19755. {
  19756. "type": "object",
  19757. "properties": {
  19758. "id": {
  19759. "type": "string",
  19760. "pattern": "^evt_"
  19761. },
  19762. "type": {
  19763. "type": "string",
  19764. "enum": ["tui.command.execute"]
  19765. },
  19766. "properties": {
  19767. "type": "object",
  19768. "properties": {
  19769. "command": {
  19770. "anyOf": [
  19771. {
  19772. "type": "string",
  19773. "enum": [
  19774. "session.list",
  19775. "session.new",
  19776. "session.share",
  19777. "session.interrupt",
  19778. "session.compact",
  19779. "session.page.up",
  19780. "session.page.down",
  19781. "session.line.up",
  19782. "session.line.down",
  19783. "session.half.page.up",
  19784. "session.half.page.down",
  19785. "session.first",
  19786. "session.last",
  19787. "prompt.clear",
  19788. "prompt.submit",
  19789. "agent.cycle"
  19790. ]
  19791. },
  19792. {
  19793. "type": "string"
  19794. }
  19795. ]
  19796. }
  19797. },
  19798. "required": ["command"],
  19799. "additionalProperties": false
  19800. }
  19801. },
  19802. "required": ["id", "type", "properties"],
  19803. "additionalProperties": false
  19804. },
  19805. {
  19806. "type": "object",
  19807. "properties": {
  19808. "id": {
  19809. "type": "string",
  19810. "pattern": "^evt_"
  19811. },
  19812. "type": {
  19813. "type": "string",
  19814. "enum": ["tui.toast.show"]
  19815. },
  19816. "properties": {
  19817. "type": "object",
  19818. "properties": {
  19819. "title": {
  19820. "type": "string"
  19821. },
  19822. "message": {
  19823. "type": "string"
  19824. },
  19825. "variant": {
  19826. "type": "string",
  19827. "enum": ["info", "success", "warning", "error"]
  19828. },
  19829. "duration": {
  19830. "type": "integer",
  19831. "exclusiveMinimum": 0
  19832. }
  19833. },
  19834. "required": ["message", "variant"],
  19835. "additionalProperties": false
  19836. }
  19837. },
  19838. "required": ["id", "type", "properties"],
  19839. "additionalProperties": false
  19840. },
  19841. {
  19842. "type": "object",
  19843. "properties": {
  19844. "id": {
  19845. "type": "string",
  19846. "pattern": "^evt_"
  19847. },
  19848. "type": {
  19849. "type": "string",
  19850. "enum": ["tui.session.select"]
  19851. },
  19852. "properties": {
  19853. "type": "object",
  19854. "properties": {
  19855. "sessionID": {
  19856. "type": "string",
  19857. "pattern": "^ses",
  19858. "description": "Session ID to navigate to"
  19859. }
  19860. },
  19861. "required": ["sessionID"],
  19862. "additionalProperties": false
  19863. }
  19864. },
  19865. "required": ["id", "type", "properties"],
  19866. "additionalProperties": false
  19867. },
  19868. {
  19869. "type": "object",
  19870. "properties": {
  19871. "id": {
  19872. "type": "string",
  19873. "pattern": "^evt_"
  19874. },
  19875. "type": {
  19876. "type": "string",
  19877. "enum": ["mcp.tools.changed"]
  19878. },
  19879. "properties": {
  19880. "type": "object",
  19881. "properties": {
  19882. "server": {
  19883. "type": "string"
  19884. }
  19885. },
  19886. "required": ["server"],
  19887. "additionalProperties": false
  19888. }
  19889. },
  19890. "required": ["id", "type", "properties"],
  19891. "additionalProperties": false
  19892. },
  19893. {
  19894. "type": "object",
  19895. "properties": {
  19896. "id": {
  19897. "type": "string",
  19898. "pattern": "^evt_"
  19899. },
  19900. "type": {
  19901. "type": "string",
  19902. "enum": ["mcp.browser.open.failed"]
  19903. },
  19904. "properties": {
  19905. "type": "object",
  19906. "properties": {
  19907. "mcpName": {
  19908. "type": "string"
  19909. },
  19910. "url": {
  19911. "type": "string"
  19912. }
  19913. },
  19914. "required": ["mcpName", "url"],
  19915. "additionalProperties": false
  19916. }
  19917. },
  19918. "required": ["id", "type", "properties"],
  19919. "additionalProperties": false
  19920. },
  19921. {
  19922. "type": "object",
  19923. "properties": {
  19924. "id": {
  19925. "type": "string",
  19926. "pattern": "^evt_"
  19927. },
  19928. "type": {
  19929. "type": "string",
  19930. "enum": ["command.executed"]
  19931. },
  19932. "properties": {
  19933. "type": "object",
  19934. "properties": {
  19935. "name": {
  19936. "type": "string"
  19937. },
  19938. "sessionID": {
  19939. "type": "string",
  19940. "pattern": "^ses"
  19941. },
  19942. "arguments": {
  19943. "type": "string"
  19944. },
  19945. "messageID": {
  19946. "type": "string",
  19947. "pattern": "^msg"
  19948. }
  19949. },
  19950. "required": ["name", "sessionID", "arguments", "messageID"],
  19951. "additionalProperties": false
  19952. }
  19953. },
  19954. "required": ["id", "type", "properties"],
  19955. "additionalProperties": false
  19956. },
  19957. {
  19958. "type": "object",
  19959. "properties": {
  19960. "id": {
  19961. "type": "string",
  19962. "pattern": "^evt_"
  19963. },
  19964. "type": {
  19965. "type": "string",
  19966. "enum": ["project.updated"]
  19967. },
  19968. "properties": {
  19969. "type": "object",
  19970. "properties": {
  19971. "id": {
  19972. "type": "string"
  19973. },
  19974. "worktree": {
  19975. "type": "string"
  19976. },
  19977. "vcs": {
  19978. "type": "string",
  19979. "enum": ["git"]
  19980. },
  19981. "name": {
  19982. "type": "string"
  19983. },
  19984. "icon": {
  19985. "type": "object",
  19986. "properties": {
  19987. "url": {
  19988. "type": "string"
  19989. },
  19990. "override": {
  19991. "type": "string"
  19992. },
  19993. "color": {
  19994. "type": "string"
  19995. }
  19996. },
  19997. "additionalProperties": false
  19998. },
  19999. "commands": {
  20000. "type": "object",
  20001. "properties": {
  20002. "start": {
  20003. "type": "string",
  20004. "description": "Startup script to run when creating a new workspace (worktree)"
  20005. }
  20006. },
  20007. "additionalProperties": false
  20008. },
  20009. "time": {
  20010. "type": "object",
  20011. "properties": {
  20012. "created": {
  20013. "type": "integer",
  20014. "minimum": 0
  20015. },
  20016. "updated": {
  20017. "type": "integer",
  20018. "minimum": 0
  20019. },
  20020. "initialized": {
  20021. "type": "integer",
  20022. "minimum": 0
  20023. }
  20024. },
  20025. "required": ["created", "updated"],
  20026. "additionalProperties": false
  20027. },
  20028. "sandboxes": {
  20029. "type": "array",
  20030. "items": {
  20031. "type": "string"
  20032. }
  20033. }
  20034. },
  20035. "required": ["id", "worktree", "time", "sandboxes"],
  20036. "additionalProperties": false
  20037. }
  20038. },
  20039. "required": ["id", "type", "properties"],
  20040. "additionalProperties": false
  20041. },
  20042. {
  20043. "type": "object",
  20044. "properties": {
  20045. "id": {
  20046. "type": "string",
  20047. "pattern": "^evt_"
  20048. },
  20049. "type": {
  20050. "type": "string",
  20051. "enum": ["session.status"]
  20052. },
  20053. "properties": {
  20054. "type": "object",
  20055. "properties": {
  20056. "sessionID": {
  20057. "type": "string",
  20058. "pattern": "^ses"
  20059. },
  20060. "status": {
  20061. "$ref": "#/components/schemas/SessionStatus"
  20062. }
  20063. },
  20064. "required": ["sessionID", "status"],
  20065. "additionalProperties": false
  20066. }
  20067. },
  20068. "required": ["id", "type", "properties"],
  20069. "additionalProperties": false
  20070. },
  20071. {
  20072. "type": "object",
  20073. "properties": {
  20074. "id": {
  20075. "type": "string",
  20076. "pattern": "^evt_"
  20077. },
  20078. "type": {
  20079. "type": "string",
  20080. "enum": ["session.idle"]
  20081. },
  20082. "properties": {
  20083. "type": "object",
  20084. "properties": {
  20085. "sessionID": {
  20086. "type": "string",
  20087. "pattern": "^ses"
  20088. }
  20089. },
  20090. "required": ["sessionID"],
  20091. "additionalProperties": false
  20092. }
  20093. },
  20094. "required": ["id", "type", "properties"],
  20095. "additionalProperties": false
  20096. },
  20097. {
  20098. "type": "object",
  20099. "properties": {
  20100. "id": {
  20101. "type": "string",
  20102. "pattern": "^evt_"
  20103. },
  20104. "type": {
  20105. "type": "string",
  20106. "enum": ["question.asked"]
  20107. },
  20108. "properties": {
  20109. "type": "object",
  20110. "properties": {
  20111. "id": {
  20112. "type": "string",
  20113. "pattern": "^que"
  20114. },
  20115. "sessionID": {
  20116. "type": "string",
  20117. "pattern": "^ses"
  20118. },
  20119. "questions": {
  20120. "type": "array",
  20121. "items": {
  20122. "$ref": "#/components/schemas/QuestionInfo"
  20123. },
  20124. "description": "Questions to ask"
  20125. },
  20126. "tool": {
  20127. "$ref": "#/components/schemas/QuestionTool"
  20128. }
  20129. },
  20130. "required": ["id", "sessionID", "questions"],
  20131. "additionalProperties": false
  20132. }
  20133. },
  20134. "required": ["id", "type", "properties"],
  20135. "additionalProperties": false
  20136. },
  20137. {
  20138. "type": "object",
  20139. "properties": {
  20140. "id": {
  20141. "type": "string",
  20142. "pattern": "^evt_"
  20143. },
  20144. "type": {
  20145. "type": "string",
  20146. "enum": ["question.replied"]
  20147. },
  20148. "properties": {
  20149. "type": "object",
  20150. "properties": {
  20151. "sessionID": {
  20152. "type": "string",
  20153. "pattern": "^ses"
  20154. },
  20155. "requestID": {
  20156. "type": "string",
  20157. "pattern": "^que"
  20158. },
  20159. "answers": {
  20160. "type": "array",
  20161. "items": {
  20162. "$ref": "#/components/schemas/QuestionAnswer"
  20163. }
  20164. }
  20165. },
  20166. "required": ["sessionID", "requestID", "answers"],
  20167. "additionalProperties": false
  20168. }
  20169. },
  20170. "required": ["id", "type", "properties"],
  20171. "additionalProperties": false
  20172. },
  20173. {
  20174. "type": "object",
  20175. "properties": {
  20176. "id": {
  20177. "type": "string",
  20178. "pattern": "^evt_"
  20179. },
  20180. "type": {
  20181. "type": "string",
  20182. "enum": ["question.rejected"]
  20183. },
  20184. "properties": {
  20185. "type": "object",
  20186. "properties": {
  20187. "sessionID": {
  20188. "type": "string",
  20189. "pattern": "^ses"
  20190. },
  20191. "requestID": {
  20192. "type": "string",
  20193. "pattern": "^que"
  20194. }
  20195. },
  20196. "required": ["sessionID", "requestID"],
  20197. "additionalProperties": false
  20198. }
  20199. },
  20200. "required": ["id", "type", "properties"],
  20201. "additionalProperties": false
  20202. },
  20203. {
  20204. "type": "object",
  20205. "properties": {
  20206. "id": {
  20207. "type": "string",
  20208. "pattern": "^evt_"
  20209. },
  20210. "type": {
  20211. "type": "string",
  20212. "enum": ["session.compacted"]
  20213. },
  20214. "properties": {
  20215. "type": "object",
  20216. "properties": {
  20217. "sessionID": {
  20218. "type": "string",
  20219. "pattern": "^ses"
  20220. }
  20221. },
  20222. "required": ["sessionID"],
  20223. "additionalProperties": false
  20224. }
  20225. },
  20226. "required": ["id", "type", "properties"],
  20227. "additionalProperties": false
  20228. },
  20229. {
  20230. "type": "object",
  20231. "properties": {
  20232. "id": {
  20233. "type": "string",
  20234. "pattern": "^evt_"
  20235. },
  20236. "type": {
  20237. "type": "string",
  20238. "enum": ["vcs.branch.updated"]
  20239. },
  20240. "properties": {
  20241. "type": "object",
  20242. "properties": {
  20243. "branch": {
  20244. "type": "string"
  20245. }
  20246. },
  20247. "additionalProperties": false
  20248. }
  20249. },
  20250. "required": ["id", "type", "properties"],
  20251. "additionalProperties": false
  20252. },
  20253. {
  20254. "type": "object",
  20255. "properties": {
  20256. "id": {
  20257. "type": "string",
  20258. "pattern": "^evt_"
  20259. },
  20260. "type": {
  20261. "type": "string",
  20262. "enum": ["workspace.ready"]
  20263. },
  20264. "properties": {
  20265. "type": "object",
  20266. "properties": {
  20267. "name": {
  20268. "type": "string"
  20269. }
  20270. },
  20271. "required": ["name"],
  20272. "additionalProperties": false
  20273. }
  20274. },
  20275. "required": ["id", "type", "properties"],
  20276. "additionalProperties": false
  20277. },
  20278. {
  20279. "type": "object",
  20280. "properties": {
  20281. "id": {
  20282. "type": "string",
  20283. "pattern": "^evt_"
  20284. },
  20285. "type": {
  20286. "type": "string",
  20287. "enum": ["workspace.failed"]
  20288. },
  20289. "properties": {
  20290. "type": "object",
  20291. "properties": {
  20292. "message": {
  20293. "type": "string"
  20294. }
  20295. },
  20296. "required": ["message"],
  20297. "additionalProperties": false
  20298. }
  20299. },
  20300. "required": ["id", "type", "properties"],
  20301. "additionalProperties": false
  20302. },
  20303. {
  20304. "type": "object",
  20305. "properties": {
  20306. "id": {
  20307. "type": "string",
  20308. "pattern": "^evt_"
  20309. },
  20310. "type": {
  20311. "type": "string",
  20312. "enum": ["workspace.status"]
  20313. },
  20314. "properties": {
  20315. "type": "object",
  20316. "properties": {
  20317. "workspaceID": {
  20318. "type": "string",
  20319. "pattern": "^wrk"
  20320. },
  20321. "status": {
  20322. "type": "string",
  20323. "enum": ["connected", "connecting", "disconnected", "error"]
  20324. }
  20325. },
  20326. "required": ["workspaceID", "status"],
  20327. "additionalProperties": false
  20328. }
  20329. },
  20330. "required": ["id", "type", "properties"],
  20331. "additionalProperties": false
  20332. },
  20333. {
  20334. "type": "object",
  20335. "properties": {
  20336. "id": {
  20337. "type": "string",
  20338. "pattern": "^evt_"
  20339. },
  20340. "type": {
  20341. "type": "string",
  20342. "enum": ["worktree.ready"]
  20343. },
  20344. "properties": {
  20345. "type": "object",
  20346. "properties": {
  20347. "name": {
  20348. "type": "string"
  20349. },
  20350. "branch": {
  20351. "type": "string"
  20352. }
  20353. },
  20354. "required": ["name"],
  20355. "additionalProperties": false
  20356. }
  20357. },
  20358. "required": ["id", "type", "properties"],
  20359. "additionalProperties": false
  20360. },
  20361. {
  20362. "type": "object",
  20363. "properties": {
  20364. "id": {
  20365. "type": "string",
  20366. "pattern": "^evt_"
  20367. },
  20368. "type": {
  20369. "type": "string",
  20370. "enum": ["worktree.failed"]
  20371. },
  20372. "properties": {
  20373. "type": "object",
  20374. "properties": {
  20375. "message": {
  20376. "type": "string"
  20377. }
  20378. },
  20379. "required": ["message"],
  20380. "additionalProperties": false
  20381. }
  20382. },
  20383. "required": ["id", "type", "properties"],
  20384. "additionalProperties": false
  20385. },
  20386. {
  20387. "type": "object",
  20388. "properties": {
  20389. "id": {
  20390. "type": "string",
  20391. "pattern": "^evt_"
  20392. },
  20393. "type": {
  20394. "type": "string",
  20395. "enum": ["server.connected"]
  20396. },
  20397. "properties": {
  20398. "type": "object",
  20399. "properties": {}
  20400. }
  20401. },
  20402. "required": ["id", "type", "properties"],
  20403. "additionalProperties": false
  20404. },
  20405. {
  20406. "type": "object",
  20407. "properties": {
  20408. "id": {
  20409. "type": "string",
  20410. "pattern": "^evt_"
  20411. },
  20412. "type": {
  20413. "type": "string",
  20414. "enum": ["global.disposed"]
  20415. },
  20416. "properties": {
  20417. "type": "object",
  20418. "properties": {}
  20419. }
  20420. },
  20421. "required": ["id", "type", "properties"],
  20422. "additionalProperties": false
  20423. },
  20424. {
  20425. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20426. },
  20427. {
  20428. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20429. },
  20430. {
  20431. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20432. },
  20433. {
  20434. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20435. },
  20436. {
  20437. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20438. },
  20439. {
  20440. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20441. },
  20442. {
  20443. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20444. },
  20445. {
  20446. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20447. },
  20448. {
  20449. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20450. },
  20451. {
  20452. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20453. },
  20454. {
  20455. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20456. },
  20457. {
  20458. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20459. },
  20460. {
  20461. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20462. },
  20463. {
  20464. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20465. },
  20466. {
  20467. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20468. },
  20469. {
  20470. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20471. },
  20472. {
  20473. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20474. },
  20475. {
  20476. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20477. },
  20478. {
  20479. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20480. },
  20481. {
  20482. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20483. },
  20484. {
  20485. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20486. },
  20487. {
  20488. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20489. },
  20490. {
  20491. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20492. },
  20493. {
  20494. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20495. },
  20496. {
  20497. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20498. },
  20499. {
  20500. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20501. },
  20502. {
  20503. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20504. },
  20505. {
  20506. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20507. },
  20508. {
  20509. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20510. },
  20511. {
  20512. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20513. },
  20514. {
  20515. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20516. },
  20517. {
  20518. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20519. },
  20520. {
  20521. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20522. },
  20523. {
  20524. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20525. },
  20526. {
  20527. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20528. },
  20529. {
  20530. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20531. }
  20532. ]
  20533. }
  20534. },
  20535. "required": ["directory", "payload"],
  20536. "additionalProperties": false
  20537. },
  20538. "LogLevel": {
  20539. "type": "string",
  20540. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20541. "description": "Log level"
  20542. },
  20543. "ServerConfig": {
  20544. "type": "object",
  20545. "properties": {
  20546. "port": {
  20547. "type": "integer",
  20548. "exclusiveMinimum": 0
  20549. },
  20550. "hostname": {
  20551. "type": "string"
  20552. },
  20553. "mdns": {
  20554. "type": "boolean"
  20555. },
  20556. "mdnsDomain": {
  20557. "type": "string"
  20558. },
  20559. "cors": {
  20560. "type": "array",
  20561. "items": {
  20562. "type": "string"
  20563. }
  20564. }
  20565. },
  20566. "additionalProperties": false,
  20567. "description": "Server configuration for opencode serve and web commands"
  20568. },
  20569. "PermissionActionConfig": {
  20570. "type": "string",
  20571. "enum": ["ask", "allow", "deny"]
  20572. },
  20573. "PermissionObjectConfig": {
  20574. "type": "object",
  20575. "additionalProperties": {
  20576. "$ref": "#/components/schemas/PermissionActionConfig"
  20577. }
  20578. },
  20579. "PermissionRuleConfig": {
  20580. "anyOf": [
  20581. {
  20582. "$ref": "#/components/schemas/PermissionActionConfig"
  20583. },
  20584. {
  20585. "$ref": "#/components/schemas/PermissionObjectConfig"
  20586. }
  20587. ]
  20588. },
  20589. "PermissionConfig": {
  20590. "anyOf": [
  20591. {
  20592. "$ref": "#/components/schemas/PermissionActionConfig"
  20593. },
  20594. {
  20595. "type": "object",
  20596. "properties": {
  20597. "read": {
  20598. "$ref": "#/components/schemas/PermissionRuleConfig"
  20599. },
  20600. "edit": {
  20601. "$ref": "#/components/schemas/PermissionRuleConfig"
  20602. },
  20603. "glob": {
  20604. "$ref": "#/components/schemas/PermissionRuleConfig"
  20605. },
  20606. "grep": {
  20607. "$ref": "#/components/schemas/PermissionRuleConfig"
  20608. },
  20609. "list": {
  20610. "$ref": "#/components/schemas/PermissionRuleConfig"
  20611. },
  20612. "bash": {
  20613. "$ref": "#/components/schemas/PermissionRuleConfig"
  20614. },
  20615. "task": {
  20616. "$ref": "#/components/schemas/PermissionRuleConfig"
  20617. },
  20618. "external_directory": {
  20619. "$ref": "#/components/schemas/PermissionRuleConfig"
  20620. },
  20621. "todowrite": {
  20622. "$ref": "#/components/schemas/PermissionActionConfig"
  20623. },
  20624. "question": {
  20625. "$ref": "#/components/schemas/PermissionActionConfig"
  20626. },
  20627. "webfetch": {
  20628. "$ref": "#/components/schemas/PermissionActionConfig"
  20629. },
  20630. "websearch": {
  20631. "$ref": "#/components/schemas/PermissionActionConfig"
  20632. },
  20633. "lsp": {
  20634. "$ref": "#/components/schemas/PermissionRuleConfig"
  20635. },
  20636. "doom_loop": {
  20637. "$ref": "#/components/schemas/PermissionActionConfig"
  20638. },
  20639. "skill": {
  20640. "$ref": "#/components/schemas/PermissionRuleConfig"
  20641. }
  20642. },
  20643. "additionalProperties": {
  20644. "$ref": "#/components/schemas/PermissionRuleConfig"
  20645. }
  20646. }
  20647. ]
  20648. },
  20649. "AgentConfig": {
  20650. "type": "object",
  20651. "properties": {
  20652. "model": {
  20653. "type": "string"
  20654. },
  20655. "variant": {
  20656. "type": "string"
  20657. },
  20658. "temperature": {
  20659. "type": "number"
  20660. },
  20661. "top_p": {
  20662. "type": "number"
  20663. },
  20664. "prompt": {
  20665. "type": "string"
  20666. },
  20667. "tools": {
  20668. "type": "object",
  20669. "additionalProperties": {
  20670. "type": "boolean"
  20671. }
  20672. },
  20673. "disable": {
  20674. "type": "boolean"
  20675. },
  20676. "description": {
  20677. "type": "string"
  20678. },
  20679. "mode": {
  20680. "type": "string",
  20681. "enum": ["subagent", "primary", "all"]
  20682. },
  20683. "hidden": {
  20684. "type": "boolean"
  20685. },
  20686. "options": {
  20687. "type": "object"
  20688. },
  20689. "color": {
  20690. "anyOf": [
  20691. {
  20692. "type": "string",
  20693. "pattern": "^#[0-9a-fA-F]{6}$"
  20694. },
  20695. {
  20696. "type": "string",
  20697. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20698. }
  20699. ],
  20700. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20701. },
  20702. "steps": {
  20703. "type": "integer",
  20704. "exclusiveMinimum": 0
  20705. },
  20706. "maxSteps": {
  20707. "type": "integer",
  20708. "exclusiveMinimum": 0
  20709. },
  20710. "permission": {
  20711. "$ref": "#/components/schemas/PermissionConfig"
  20712. }
  20713. },
  20714. "additionalProperties": {}
  20715. },
  20716. "ProviderConfig": {
  20717. "type": "object",
  20718. "properties": {
  20719. "api": {
  20720. "type": "string"
  20721. },
  20722. "name": {
  20723. "type": "string"
  20724. },
  20725. "env": {
  20726. "type": "array",
  20727. "items": {
  20728. "type": "string"
  20729. }
  20730. },
  20731. "id": {
  20732. "type": "string"
  20733. },
  20734. "npm": {
  20735. "type": "string"
  20736. },
  20737. "whitelist": {
  20738. "type": "array",
  20739. "items": {
  20740. "type": "string"
  20741. }
  20742. },
  20743. "blacklist": {
  20744. "type": "array",
  20745. "items": {
  20746. "type": "string"
  20747. }
  20748. },
  20749. "options": {
  20750. "type": "object",
  20751. "properties": {
  20752. "apiKey": {
  20753. "type": "string"
  20754. },
  20755. "baseURL": {
  20756. "type": "string"
  20757. },
  20758. "enterpriseUrl": {
  20759. "type": "string"
  20760. },
  20761. "setCacheKey": {
  20762. "type": "boolean"
  20763. },
  20764. "timeout": {
  20765. "anyOf": [
  20766. {
  20767. "type": "integer",
  20768. "exclusiveMinimum": 0
  20769. },
  20770. {
  20771. "type": "boolean",
  20772. "enum": [false]
  20773. }
  20774. ],
  20775. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20776. },
  20777. "headerTimeout": {
  20778. "anyOf": [
  20779. {
  20780. "type": "integer",
  20781. "exclusiveMinimum": 0
  20782. },
  20783. {
  20784. "type": "boolean",
  20785. "enum": [false]
  20786. }
  20787. ],
  20788. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20789. },
  20790. "chunkTimeout": {
  20791. "type": "integer",
  20792. "exclusiveMinimum": 0
  20793. }
  20794. },
  20795. "additionalProperties": {}
  20796. },
  20797. "models": {
  20798. "type": "object",
  20799. "additionalProperties": {
  20800. "type": "object",
  20801. "properties": {
  20802. "id": {
  20803. "type": "string"
  20804. },
  20805. "name": {
  20806. "type": "string"
  20807. },
  20808. "family": {
  20809. "type": "string"
  20810. },
  20811. "release_date": {
  20812. "type": "string"
  20813. },
  20814. "attachment": {
  20815. "type": "boolean"
  20816. },
  20817. "reasoning": {
  20818. "type": "boolean"
  20819. },
  20820. "temperature": {
  20821. "type": "boolean"
  20822. },
  20823. "tool_call": {
  20824. "type": "boolean"
  20825. },
  20826. "interleaved": {
  20827. "anyOf": [
  20828. {
  20829. "type": "boolean",
  20830. "enum": [true]
  20831. },
  20832. {
  20833. "type": "object",
  20834. "properties": {
  20835. "field": {
  20836. "type": "string",
  20837. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20838. }
  20839. },
  20840. "required": ["field"],
  20841. "additionalProperties": false
  20842. }
  20843. ]
  20844. },
  20845. "cost": {
  20846. "type": "object",
  20847. "properties": {
  20848. "input": {
  20849. "type": "number"
  20850. },
  20851. "output": {
  20852. "type": "number"
  20853. },
  20854. "cache_read": {
  20855. "type": "number"
  20856. },
  20857. "cache_write": {
  20858. "type": "number"
  20859. },
  20860. "context_over_200k": {
  20861. "type": "object",
  20862. "properties": {
  20863. "input": {
  20864. "type": "number"
  20865. },
  20866. "output": {
  20867. "type": "number"
  20868. },
  20869. "cache_read": {
  20870. "type": "number"
  20871. },
  20872. "cache_write": {
  20873. "type": "number"
  20874. }
  20875. },
  20876. "required": ["input", "output"],
  20877. "additionalProperties": false
  20878. }
  20879. },
  20880. "required": ["input", "output"],
  20881. "additionalProperties": false
  20882. },
  20883. "limit": {
  20884. "type": "object",
  20885. "properties": {
  20886. "context": {
  20887. "type": "number"
  20888. },
  20889. "input": {
  20890. "type": "number"
  20891. },
  20892. "output": {
  20893. "type": "number"
  20894. }
  20895. },
  20896. "required": ["context", "output"],
  20897. "additionalProperties": false
  20898. },
  20899. "modalities": {
  20900. "type": "object",
  20901. "properties": {
  20902. "input": {
  20903. "type": "array",
  20904. "items": {
  20905. "type": "string",
  20906. "enum": ["text", "audio", "image", "video", "pdf"]
  20907. }
  20908. },
  20909. "output": {
  20910. "type": "array",
  20911. "items": {
  20912. "type": "string",
  20913. "enum": ["text", "audio", "image", "video", "pdf"]
  20914. }
  20915. }
  20916. },
  20917. "additionalProperties": false
  20918. },
  20919. "experimental": {
  20920. "type": "boolean"
  20921. },
  20922. "status": {
  20923. "type": "string",
  20924. "enum": ["alpha", "beta", "deprecated", "active"]
  20925. },
  20926. "provider": {
  20927. "type": "object",
  20928. "properties": {
  20929. "npm": {
  20930. "type": "string"
  20931. },
  20932. "api": {
  20933. "type": "string"
  20934. }
  20935. },
  20936. "additionalProperties": false
  20937. },
  20938. "options": {
  20939. "type": "object"
  20940. },
  20941. "headers": {
  20942. "type": "object",
  20943. "additionalProperties": {
  20944. "type": "string"
  20945. }
  20946. },
  20947. "variants": {
  20948. "type": "object",
  20949. "additionalProperties": {
  20950. "type": "object",
  20951. "properties": {
  20952. "disabled": {
  20953. "type": "boolean"
  20954. }
  20955. },
  20956. "additionalProperties": {}
  20957. },
  20958. "description": "Variant-specific configuration"
  20959. }
  20960. },
  20961. "additionalProperties": false
  20962. }
  20963. }
  20964. },
  20965. "additionalProperties": false
  20966. },
  20967. "McpLocalConfig": {
  20968. "type": "object",
  20969. "properties": {
  20970. "type": {
  20971. "type": "string",
  20972. "enum": ["local"],
  20973. "description": "Type of MCP server connection"
  20974. },
  20975. "command": {
  20976. "type": "array",
  20977. "items": {
  20978. "type": "string"
  20979. },
  20980. "description": "Command and arguments to run the MCP server"
  20981. },
  20982. "cwd": {
  20983. "type": "string"
  20984. },
  20985. "environment": {
  20986. "type": "object",
  20987. "additionalProperties": {
  20988. "type": "string"
  20989. }
  20990. },
  20991. "enabled": {
  20992. "type": "boolean"
  20993. },
  20994. "timeout": {
  20995. "type": "integer",
  20996. "exclusiveMinimum": 0
  20997. }
  20998. },
  20999. "required": ["type", "command"],
  21000. "additionalProperties": false
  21001. },
  21002. "McpOAuthConfig": {
  21003. "type": "object",
  21004. "properties": {
  21005. "clientId": {
  21006. "type": "string"
  21007. },
  21008. "clientSecret": {
  21009. "type": "string"
  21010. },
  21011. "scope": {
  21012. "type": "string"
  21013. },
  21014. "callbackPort": {
  21015. "type": "integer",
  21016. "minimum": 1,
  21017. "maximum": 65535
  21018. },
  21019. "redirectUri": {
  21020. "type": "string"
  21021. }
  21022. },
  21023. "additionalProperties": false
  21024. },
  21025. "McpRemoteConfig": {
  21026. "type": "object",
  21027. "properties": {
  21028. "type": {
  21029. "type": "string",
  21030. "enum": ["remote"],
  21031. "description": "Type of MCP server connection"
  21032. },
  21033. "url": {
  21034. "type": "string",
  21035. "description": "URL of the remote MCP server"
  21036. },
  21037. "enabled": {
  21038. "type": "boolean"
  21039. },
  21040. "headers": {
  21041. "type": "object",
  21042. "additionalProperties": {
  21043. "type": "string"
  21044. }
  21045. },
  21046. "oauth": {
  21047. "anyOf": [
  21048. {
  21049. "$ref": "#/components/schemas/McpOAuthConfig"
  21050. },
  21051. {
  21052. "type": "boolean",
  21053. "enum": [false]
  21054. }
  21055. ],
  21056. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  21057. },
  21058. "timeout": {
  21059. "type": "integer",
  21060. "exclusiveMinimum": 0
  21061. }
  21062. },
  21063. "required": ["type", "url"],
  21064. "additionalProperties": false
  21065. },
  21066. "LayoutConfig": {
  21067. "type": "string",
  21068. "enum": ["auto", "stretch"],
  21069. "description": "@deprecated Always uses stretch layout."
  21070. },
  21071. "ImageAttachmentConfig": {
  21072. "type": "object",
  21073. "properties": {
  21074. "auto_resize": {
  21075. "type": "boolean"
  21076. },
  21077. "max_width": {
  21078. "type": "integer",
  21079. "exclusiveMinimum": 0
  21080. },
  21081. "max_height": {
  21082. "type": "integer",
  21083. "exclusiveMinimum": 0
  21084. },
  21085. "max_base64_bytes": {
  21086. "type": "integer",
  21087. "exclusiveMinimum": 0
  21088. }
  21089. },
  21090. "additionalProperties": false
  21091. },
  21092. "AttachmentConfig": {
  21093. "type": "object",
  21094. "properties": {
  21095. "image": {
  21096. "$ref": "#/components/schemas/ImageAttachmentConfig"
  21097. }
  21098. },
  21099. "additionalProperties": false
  21100. },
  21101. "Config": {
  21102. "type": "object",
  21103. "properties": {
  21104. "$schema": {
  21105. "type": "string"
  21106. },
  21107. "shell": {
  21108. "type": "string"
  21109. },
  21110. "logLevel": {
  21111. "$ref": "#/components/schemas/LogLevel"
  21112. },
  21113. "server": {
  21114. "$ref": "#/components/schemas/ServerConfig"
  21115. },
  21116. "command": {
  21117. "type": "object",
  21118. "additionalProperties": {
  21119. "type": "object",
  21120. "properties": {
  21121. "template": {
  21122. "type": "string"
  21123. },
  21124. "description": {
  21125. "type": "string"
  21126. },
  21127. "agent": {
  21128. "type": "string"
  21129. },
  21130. "model": {
  21131. "type": "string"
  21132. },
  21133. "variant": {
  21134. "type": "string"
  21135. },
  21136. "subtask": {
  21137. "type": "boolean"
  21138. }
  21139. },
  21140. "required": ["template"],
  21141. "additionalProperties": false
  21142. }
  21143. },
  21144. "skills": {
  21145. "type": "object",
  21146. "properties": {
  21147. "paths": {
  21148. "type": "array",
  21149. "items": {
  21150. "type": "string"
  21151. }
  21152. },
  21153. "urls": {
  21154. "type": "array",
  21155. "items": {
  21156. "type": "string"
  21157. }
  21158. }
  21159. },
  21160. "additionalProperties": false
  21161. },
  21162. "references": {
  21163. "type": "object",
  21164. "additionalProperties": {
  21165. "anyOf": [
  21166. {
  21167. "type": "string"
  21168. },
  21169. {
  21170. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21171. },
  21172. {
  21173. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21174. }
  21175. ]
  21176. }
  21177. },
  21178. "reference": {
  21179. "type": "object",
  21180. "additionalProperties": {
  21181. "anyOf": [
  21182. {
  21183. "type": "string"
  21184. },
  21185. {
  21186. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21187. },
  21188. {
  21189. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21190. }
  21191. ]
  21192. }
  21193. },
  21194. "watcher": {
  21195. "type": "object",
  21196. "properties": {
  21197. "ignore": {
  21198. "type": "array",
  21199. "items": {
  21200. "type": "string"
  21201. }
  21202. }
  21203. },
  21204. "additionalProperties": false
  21205. },
  21206. "snapshot": {
  21207. "type": "boolean"
  21208. },
  21209. "plugin": {
  21210. "type": "array",
  21211. "items": {
  21212. "anyOf": [
  21213. {
  21214. "type": "string"
  21215. },
  21216. {
  21217. "type": "array",
  21218. "prefixItems": [
  21219. {
  21220. "type": "string"
  21221. },
  21222. {
  21223. "type": "object"
  21224. }
  21225. ],
  21226. "maxItems": 2,
  21227. "minItems": 2
  21228. }
  21229. ]
  21230. }
  21231. },
  21232. "share": {
  21233. "type": "string",
  21234. "enum": ["manual", "auto", "disabled"]
  21235. },
  21236. "autoshare": {
  21237. "type": "boolean"
  21238. },
  21239. "autoupdate": {
  21240. "anyOf": [
  21241. {
  21242. "type": "boolean"
  21243. },
  21244. {
  21245. "type": "string",
  21246. "enum": ["notify"]
  21247. }
  21248. ],
  21249. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21250. },
  21251. "disabled_providers": {
  21252. "type": "array",
  21253. "items": {
  21254. "type": "string"
  21255. }
  21256. },
  21257. "enabled_providers": {
  21258. "type": "array",
  21259. "items": {
  21260. "type": "string"
  21261. }
  21262. },
  21263. "model": {
  21264. "type": "string"
  21265. },
  21266. "small_model": {
  21267. "type": "string"
  21268. },
  21269. "default_agent": {
  21270. "type": "string"
  21271. },
  21272. "username": {
  21273. "type": "string"
  21274. },
  21275. "mode": {
  21276. "type": "object",
  21277. "properties": {
  21278. "build": {
  21279. "$ref": "#/components/schemas/AgentConfig"
  21280. },
  21281. "plan": {
  21282. "$ref": "#/components/schemas/AgentConfig"
  21283. }
  21284. },
  21285. "additionalProperties": {
  21286. "$ref": "#/components/schemas/AgentConfig"
  21287. }
  21288. },
  21289. "agent": {
  21290. "type": "object",
  21291. "properties": {
  21292. "plan": {
  21293. "$ref": "#/components/schemas/AgentConfig"
  21294. },
  21295. "build": {
  21296. "$ref": "#/components/schemas/AgentConfig"
  21297. },
  21298. "general": {
  21299. "$ref": "#/components/schemas/AgentConfig"
  21300. },
  21301. "explore": {
  21302. "$ref": "#/components/schemas/AgentConfig"
  21303. },
  21304. "title": {
  21305. "$ref": "#/components/schemas/AgentConfig"
  21306. },
  21307. "summary": {
  21308. "$ref": "#/components/schemas/AgentConfig"
  21309. },
  21310. "compaction": {
  21311. "$ref": "#/components/schemas/AgentConfig"
  21312. }
  21313. },
  21314. "additionalProperties": {
  21315. "$ref": "#/components/schemas/AgentConfig"
  21316. }
  21317. },
  21318. "provider": {
  21319. "type": "object",
  21320. "additionalProperties": {
  21321. "$ref": "#/components/schemas/ProviderConfig"
  21322. }
  21323. },
  21324. "mcp": {
  21325. "type": "object",
  21326. "additionalProperties": {
  21327. "anyOf": [
  21328. {
  21329. "$ref": "#/components/schemas/McpLocalConfig"
  21330. },
  21331. {
  21332. "$ref": "#/components/schemas/McpRemoteConfig"
  21333. },
  21334. {
  21335. "type": "object",
  21336. "properties": {
  21337. "enabled": {
  21338. "type": "boolean"
  21339. }
  21340. },
  21341. "required": ["enabled"],
  21342. "additionalProperties": false
  21343. }
  21344. ]
  21345. }
  21346. },
  21347. "formatter": {
  21348. "anyOf": [
  21349. {
  21350. "type": "boolean"
  21351. },
  21352. {
  21353. "type": "object",
  21354. "additionalProperties": {
  21355. "type": "object",
  21356. "properties": {
  21357. "disabled": {
  21358. "type": "boolean"
  21359. },
  21360. "command": {
  21361. "type": "array",
  21362. "items": {
  21363. "type": "string"
  21364. }
  21365. },
  21366. "environment": {
  21367. "type": "object",
  21368. "additionalProperties": {
  21369. "type": "string"
  21370. }
  21371. },
  21372. "extensions": {
  21373. "type": "array",
  21374. "items": {
  21375. "type": "string"
  21376. }
  21377. }
  21378. },
  21379. "additionalProperties": false
  21380. }
  21381. }
  21382. ],
  21383. "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."
  21384. },
  21385. "lsp": {
  21386. "anyOf": [
  21387. {
  21388. "type": "boolean"
  21389. },
  21390. {
  21391. "type": "object",
  21392. "additionalProperties": {
  21393. "anyOf": [
  21394. {
  21395. "type": "object",
  21396. "properties": {
  21397. "disabled": {
  21398. "type": "boolean",
  21399. "enum": [true]
  21400. }
  21401. },
  21402. "required": ["disabled"],
  21403. "additionalProperties": false
  21404. },
  21405. {
  21406. "type": "object",
  21407. "properties": {
  21408. "command": {
  21409. "type": "array",
  21410. "items": {
  21411. "type": "string"
  21412. }
  21413. },
  21414. "extensions": {
  21415. "type": "array",
  21416. "items": {
  21417. "type": "string"
  21418. }
  21419. },
  21420. "disabled": {
  21421. "type": "boolean"
  21422. },
  21423. "env": {
  21424. "type": "object",
  21425. "additionalProperties": {
  21426. "type": "string"
  21427. }
  21428. },
  21429. "initialization": {
  21430. "type": "object"
  21431. }
  21432. },
  21433. "required": ["command"],
  21434. "additionalProperties": false
  21435. }
  21436. ]
  21437. }
  21438. }
  21439. ],
  21440. "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."
  21441. },
  21442. "instructions": {
  21443. "type": "array",
  21444. "items": {
  21445. "type": "string"
  21446. }
  21447. },
  21448. "layout": {
  21449. "$ref": "#/components/schemas/LayoutConfig"
  21450. },
  21451. "permission": {
  21452. "$ref": "#/components/schemas/PermissionConfig"
  21453. },
  21454. "tools": {
  21455. "type": "object",
  21456. "additionalProperties": {
  21457. "type": "boolean"
  21458. }
  21459. },
  21460. "attachment": {
  21461. "$ref": "#/components/schemas/AttachmentConfig"
  21462. },
  21463. "enterprise": {
  21464. "type": "object",
  21465. "properties": {
  21466. "url": {
  21467. "type": "string"
  21468. }
  21469. },
  21470. "additionalProperties": false
  21471. },
  21472. "tool_output": {
  21473. "type": "object",
  21474. "properties": {
  21475. "max_lines": {
  21476. "type": "integer",
  21477. "exclusiveMinimum": 0
  21478. },
  21479. "max_bytes": {
  21480. "type": "integer",
  21481. "exclusiveMinimum": 0
  21482. }
  21483. },
  21484. "additionalProperties": false
  21485. },
  21486. "compaction": {
  21487. "type": "object",
  21488. "properties": {
  21489. "auto": {
  21490. "type": "boolean"
  21491. },
  21492. "prune": {
  21493. "type": "boolean"
  21494. },
  21495. "tail_turns": {
  21496. "type": "integer",
  21497. "minimum": 0
  21498. },
  21499. "preserve_recent_tokens": {
  21500. "type": "integer",
  21501. "minimum": 0
  21502. },
  21503. "reserved": {
  21504. "type": "integer",
  21505. "minimum": 0
  21506. }
  21507. },
  21508. "additionalProperties": false
  21509. },
  21510. "experimental": {
  21511. "type": "object",
  21512. "properties": {
  21513. "disable_paste_summary": {
  21514. "type": "boolean"
  21515. },
  21516. "batch_tool": {
  21517. "type": "boolean"
  21518. },
  21519. "openTelemetry": {
  21520. "type": "boolean"
  21521. },
  21522. "primary_tools": {
  21523. "type": "array",
  21524. "items": {
  21525. "type": "string"
  21526. }
  21527. },
  21528. "continue_loop_on_deny": {
  21529. "type": "boolean"
  21530. },
  21531. "mcp_timeout": {
  21532. "type": "integer",
  21533. "exclusiveMinimum": 0
  21534. },
  21535. "policies": {
  21536. "type": "array",
  21537. "items": {
  21538. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21539. }
  21540. }
  21541. },
  21542. "additionalProperties": false
  21543. }
  21544. },
  21545. "additionalProperties": false
  21546. },
  21547. "Model": {
  21548. "type": "object",
  21549. "properties": {
  21550. "id": {
  21551. "type": "string"
  21552. },
  21553. "providerID": {
  21554. "type": "string"
  21555. },
  21556. "api": {
  21557. "type": "object",
  21558. "properties": {
  21559. "id": {
  21560. "type": "string"
  21561. },
  21562. "url": {
  21563. "type": "string"
  21564. },
  21565. "npm": {
  21566. "type": "string"
  21567. }
  21568. },
  21569. "required": ["id", "url", "npm"],
  21570. "additionalProperties": false
  21571. },
  21572. "name": {
  21573. "type": "string"
  21574. },
  21575. "family": {
  21576. "type": "string"
  21577. },
  21578. "capabilities": {
  21579. "type": "object",
  21580. "properties": {
  21581. "temperature": {
  21582. "type": "boolean"
  21583. },
  21584. "reasoning": {
  21585. "type": "boolean"
  21586. },
  21587. "attachment": {
  21588. "type": "boolean"
  21589. },
  21590. "toolcall": {
  21591. "type": "boolean"
  21592. },
  21593. "input": {
  21594. "type": "object",
  21595. "properties": {
  21596. "text": {
  21597. "type": "boolean"
  21598. },
  21599. "audio": {
  21600. "type": "boolean"
  21601. },
  21602. "image": {
  21603. "type": "boolean"
  21604. },
  21605. "video": {
  21606. "type": "boolean"
  21607. },
  21608. "pdf": {
  21609. "type": "boolean"
  21610. }
  21611. },
  21612. "required": ["text", "audio", "image", "video", "pdf"],
  21613. "additionalProperties": false
  21614. },
  21615. "output": {
  21616. "type": "object",
  21617. "properties": {
  21618. "text": {
  21619. "type": "boolean"
  21620. },
  21621. "audio": {
  21622. "type": "boolean"
  21623. },
  21624. "image": {
  21625. "type": "boolean"
  21626. },
  21627. "video": {
  21628. "type": "boolean"
  21629. },
  21630. "pdf": {
  21631. "type": "boolean"
  21632. }
  21633. },
  21634. "required": ["text", "audio", "image", "video", "pdf"],
  21635. "additionalProperties": false
  21636. },
  21637. "interleaved": {
  21638. "anyOf": [
  21639. {
  21640. "type": "boolean"
  21641. },
  21642. {
  21643. "type": "object",
  21644. "properties": {
  21645. "field": {
  21646. "type": "string",
  21647. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21648. }
  21649. },
  21650. "required": ["field"],
  21651. "additionalProperties": false
  21652. }
  21653. ]
  21654. }
  21655. },
  21656. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21657. "additionalProperties": false
  21658. },
  21659. "cost": {
  21660. "type": "object",
  21661. "properties": {
  21662. "input": {
  21663. "type": "number"
  21664. },
  21665. "output": {
  21666. "type": "number"
  21667. },
  21668. "cache": {
  21669. "type": "object",
  21670. "properties": {
  21671. "read": {
  21672. "type": "number"
  21673. },
  21674. "write": {
  21675. "type": "number"
  21676. }
  21677. },
  21678. "required": ["read", "write"],
  21679. "additionalProperties": false
  21680. },
  21681. "tiers": {
  21682. "type": "array",
  21683. "items": {
  21684. "type": "object",
  21685. "properties": {
  21686. "input": {
  21687. "type": "number"
  21688. },
  21689. "output": {
  21690. "type": "number"
  21691. },
  21692. "cache": {
  21693. "type": "object",
  21694. "properties": {
  21695. "read": {
  21696. "type": "number"
  21697. },
  21698. "write": {
  21699. "type": "number"
  21700. }
  21701. },
  21702. "required": ["read", "write"],
  21703. "additionalProperties": false
  21704. },
  21705. "tier": {
  21706. "type": "object",
  21707. "properties": {
  21708. "type": {
  21709. "type": "string",
  21710. "enum": ["context"]
  21711. },
  21712. "size": {
  21713. "type": "number"
  21714. }
  21715. },
  21716. "required": ["type", "size"],
  21717. "additionalProperties": false
  21718. }
  21719. },
  21720. "required": ["input", "output", "cache", "tier"],
  21721. "additionalProperties": false
  21722. }
  21723. },
  21724. "experimentalOver200K": {
  21725. "type": "object",
  21726. "properties": {
  21727. "input": {
  21728. "type": "number"
  21729. },
  21730. "output": {
  21731. "type": "number"
  21732. },
  21733. "cache": {
  21734. "type": "object",
  21735. "properties": {
  21736. "read": {
  21737. "type": "number"
  21738. },
  21739. "write": {
  21740. "type": "number"
  21741. }
  21742. },
  21743. "required": ["read", "write"],
  21744. "additionalProperties": false
  21745. }
  21746. },
  21747. "required": ["input", "output", "cache"],
  21748. "additionalProperties": false
  21749. }
  21750. },
  21751. "required": ["input", "output", "cache"],
  21752. "additionalProperties": false
  21753. },
  21754. "limit": {
  21755. "type": "object",
  21756. "properties": {
  21757. "context": {
  21758. "type": "number"
  21759. },
  21760. "input": {
  21761. "type": "number"
  21762. },
  21763. "output": {
  21764. "type": "number"
  21765. }
  21766. },
  21767. "required": ["context", "output"],
  21768. "additionalProperties": false
  21769. },
  21770. "status": {
  21771. "type": "string",
  21772. "enum": ["alpha", "beta", "deprecated", "active"]
  21773. },
  21774. "options": {
  21775. "type": "object"
  21776. },
  21777. "headers": {
  21778. "type": "object",
  21779. "additionalProperties": {
  21780. "type": "string"
  21781. }
  21782. },
  21783. "release_date": {
  21784. "type": "string"
  21785. },
  21786. "variants": {
  21787. "type": "object",
  21788. "additionalProperties": {
  21789. "type": "object"
  21790. }
  21791. }
  21792. },
  21793. "required": [
  21794. "id",
  21795. "providerID",
  21796. "api",
  21797. "name",
  21798. "capabilities",
  21799. "cost",
  21800. "limit",
  21801. "status",
  21802. "options",
  21803. "headers",
  21804. "release_date"
  21805. ],
  21806. "additionalProperties": false
  21807. },
  21808. "Provider": {
  21809. "type": "object",
  21810. "properties": {
  21811. "id": {
  21812. "type": "string"
  21813. },
  21814. "name": {
  21815. "type": "string"
  21816. },
  21817. "source": {
  21818. "type": "string",
  21819. "enum": ["env", "config", "custom", "api"]
  21820. },
  21821. "env": {
  21822. "type": "array",
  21823. "items": {
  21824. "type": "string"
  21825. }
  21826. },
  21827. "key": {
  21828. "type": "string"
  21829. },
  21830. "options": {
  21831. "type": "object"
  21832. },
  21833. "models": {
  21834. "type": "object",
  21835. "additionalProperties": {
  21836. "$ref": "#/components/schemas/Model"
  21837. }
  21838. }
  21839. },
  21840. "required": ["id", "name", "source", "env", "options", "models"],
  21841. "additionalProperties": false
  21842. },
  21843. "ExperimentalCapabilities": {
  21844. "type": "object",
  21845. "properties": {
  21846. "backgroundSubagents": {
  21847. "type": "boolean"
  21848. }
  21849. },
  21850. "required": ["backgroundSubagents"],
  21851. "additionalProperties": false
  21852. },
  21853. "ConsoleState": {
  21854. "type": "object",
  21855. "properties": {
  21856. "consoleManagedProviders": {
  21857. "type": "array",
  21858. "items": {
  21859. "type": "string"
  21860. }
  21861. },
  21862. "activeOrgName": {
  21863. "type": "string"
  21864. },
  21865. "switchableOrgCount": {
  21866. "type": "integer",
  21867. "minimum": 0
  21868. }
  21869. },
  21870. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21871. "additionalProperties": false
  21872. },
  21873. "effect_HttpApiError_InternalServerError": {
  21874. "type": "object",
  21875. "properties": {
  21876. "_tag": {
  21877. "type": "string",
  21878. "enum": ["InternalServerError"]
  21879. }
  21880. },
  21881. "required": ["_tag"],
  21882. "additionalProperties": false
  21883. },
  21884. "ToolListItem": {
  21885. "type": "object",
  21886. "properties": {
  21887. "id": {
  21888. "type": "string"
  21889. },
  21890. "description": {
  21891. "type": "string"
  21892. },
  21893. "parameters": {}
  21894. },
  21895. "required": ["id", "description", "parameters"],
  21896. "additionalProperties": false
  21897. },
  21898. "ToolList": {
  21899. "type": "array",
  21900. "items": {
  21901. "$ref": "#/components/schemas/ToolListItem"
  21902. }
  21903. },
  21904. "ToolIDs": {
  21905. "type": "array",
  21906. "items": {
  21907. "type": "string"
  21908. }
  21909. },
  21910. "WorktreeError": {
  21911. "type": "object",
  21912. "properties": {
  21913. "name": {
  21914. "type": "string",
  21915. "enum": [
  21916. "WorktreeNotGitError",
  21917. "WorktreeNameGenerationFailedError",
  21918. "WorktreeCreateFailedError",
  21919. "WorktreeStartCommandFailedError",
  21920. "WorktreeRemoveFailedError",
  21921. "WorktreeResetFailedError",
  21922. "WorktreeListFailedError"
  21923. ]
  21924. },
  21925. "data": {
  21926. "type": "object",
  21927. "properties": {
  21928. "message": {
  21929. "type": "string"
  21930. }
  21931. },
  21932. "required": ["message"],
  21933. "additionalProperties": false
  21934. }
  21935. },
  21936. "required": ["name", "data"],
  21937. "additionalProperties": false
  21938. },
  21939. "WorktreeCreateInput": {
  21940. "type": "object",
  21941. "properties": {
  21942. "name": {
  21943. "type": "string"
  21944. },
  21945. "startCommand": {
  21946. "type": "string",
  21947. "description": "Additional startup script to run after the project's start command"
  21948. }
  21949. },
  21950. "additionalProperties": false
  21951. },
  21952. "Worktree": {
  21953. "type": "object",
  21954. "properties": {
  21955. "name": {
  21956. "type": "string"
  21957. },
  21958. "branch": {
  21959. "type": "string"
  21960. },
  21961. "directory": {
  21962. "type": "string"
  21963. }
  21964. },
  21965. "required": ["name", "directory"],
  21966. "additionalProperties": false
  21967. },
  21968. "WorktreeRemoveInput": {
  21969. "type": "object",
  21970. "properties": {
  21971. "directory": {
  21972. "type": "string"
  21973. }
  21974. },
  21975. "required": ["directory"],
  21976. "additionalProperties": false
  21977. },
  21978. "WorktreeResetInput": {
  21979. "type": "object",
  21980. "properties": {
  21981. "directory": {
  21982. "type": "string"
  21983. }
  21984. },
  21985. "required": ["directory"],
  21986. "additionalProperties": false
  21987. },
  21988. "ProjectSummary": {
  21989. "type": "object",
  21990. "properties": {
  21991. "id": {
  21992. "type": "string"
  21993. },
  21994. "name": {
  21995. "type": "string"
  21996. },
  21997. "worktree": {
  21998. "type": "string"
  21999. }
  22000. },
  22001. "required": ["id", "worktree"],
  22002. "additionalProperties": false
  22003. },
  22004. "GlobalSession": {
  22005. "type": "object",
  22006. "properties": {
  22007. "id": {
  22008. "type": "string",
  22009. "pattern": "^ses"
  22010. },
  22011. "slug": {
  22012. "type": "string"
  22013. },
  22014. "projectID": {
  22015. "type": "string"
  22016. },
  22017. "workspaceID": {
  22018. "type": "string",
  22019. "pattern": "^wrk"
  22020. },
  22021. "directory": {
  22022. "type": "string"
  22023. },
  22024. "path": {
  22025. "type": "string"
  22026. },
  22027. "parentID": {
  22028. "type": "string",
  22029. "pattern": "^ses"
  22030. },
  22031. "summary": {
  22032. "type": "object",
  22033. "properties": {
  22034. "additions": {
  22035. "type": "number"
  22036. },
  22037. "deletions": {
  22038. "type": "number"
  22039. },
  22040. "files": {
  22041. "type": "number"
  22042. },
  22043. "diffs": {
  22044. "type": "array",
  22045. "items": {
  22046. "$ref": "#/components/schemas/SnapshotFileDiff"
  22047. }
  22048. }
  22049. },
  22050. "required": ["additions", "deletions", "files"],
  22051. "additionalProperties": false
  22052. },
  22053. "cost": {
  22054. "type": "number"
  22055. },
  22056. "tokens": {
  22057. "type": "object",
  22058. "properties": {
  22059. "input": {
  22060. "type": "number"
  22061. },
  22062. "output": {
  22063. "type": "number"
  22064. },
  22065. "reasoning": {
  22066. "type": "number"
  22067. },
  22068. "cache": {
  22069. "type": "object",
  22070. "properties": {
  22071. "read": {
  22072. "type": "number"
  22073. },
  22074. "write": {
  22075. "type": "number"
  22076. }
  22077. },
  22078. "required": ["read", "write"],
  22079. "additionalProperties": false
  22080. }
  22081. },
  22082. "required": ["input", "output", "reasoning", "cache"],
  22083. "additionalProperties": false
  22084. },
  22085. "share": {
  22086. "type": "object",
  22087. "properties": {
  22088. "url": {
  22089. "type": "string"
  22090. }
  22091. },
  22092. "required": ["url"],
  22093. "additionalProperties": false
  22094. },
  22095. "title": {
  22096. "type": "string"
  22097. },
  22098. "agent": {
  22099. "type": "string"
  22100. },
  22101. "model": {
  22102. "type": "object",
  22103. "properties": {
  22104. "id": {
  22105. "type": "string"
  22106. },
  22107. "providerID": {
  22108. "type": "string"
  22109. },
  22110. "variant": {
  22111. "type": "string"
  22112. }
  22113. },
  22114. "required": ["id", "providerID"],
  22115. "additionalProperties": false
  22116. },
  22117. "version": {
  22118. "type": "string"
  22119. },
  22120. "metadata": {
  22121. "type": "object"
  22122. },
  22123. "time": {
  22124. "type": "object",
  22125. "properties": {
  22126. "created": {
  22127. "type": "integer",
  22128. "minimum": 0
  22129. },
  22130. "updated": {
  22131. "type": "integer",
  22132. "minimum": 0
  22133. },
  22134. "compacting": {
  22135. "type": "integer",
  22136. "minimum": 0
  22137. },
  22138. "archived": {
  22139. "type": "number"
  22140. }
  22141. },
  22142. "required": ["created", "updated"],
  22143. "additionalProperties": false
  22144. },
  22145. "permission": {
  22146. "$ref": "#/components/schemas/PermissionRuleset"
  22147. },
  22148. "revert": {
  22149. "type": "object",
  22150. "properties": {
  22151. "messageID": {
  22152. "type": "string",
  22153. "pattern": "^msg"
  22154. },
  22155. "partID": {
  22156. "type": "string",
  22157. "pattern": "^prt"
  22158. },
  22159. "snapshot": {
  22160. "type": "string"
  22161. },
  22162. "diff": {
  22163. "type": "string"
  22164. }
  22165. },
  22166. "required": ["messageID"],
  22167. "additionalProperties": false
  22168. },
  22169. "project": {
  22170. "anyOf": [
  22171. {
  22172. "$ref": "#/components/schemas/ProjectSummary"
  22173. },
  22174. {
  22175. "type": "null"
  22176. }
  22177. ]
  22178. }
  22179. },
  22180. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22181. "additionalProperties": false
  22182. },
  22183. "McpResource": {
  22184. "type": "object",
  22185. "properties": {
  22186. "name": {
  22187. "type": "string"
  22188. },
  22189. "uri": {
  22190. "type": "string"
  22191. },
  22192. "description": {
  22193. "type": "string"
  22194. },
  22195. "mimeType": {
  22196. "type": "string"
  22197. },
  22198. "client": {
  22199. "type": "string"
  22200. }
  22201. },
  22202. "required": ["name", "uri", "client"],
  22203. "additionalProperties": false
  22204. },
  22205. "Symbol": {
  22206. "type": "object",
  22207. "properties": {
  22208. "name": {
  22209. "type": "string"
  22210. },
  22211. "kind": {
  22212. "type": "integer",
  22213. "minimum": 0
  22214. },
  22215. "location": {
  22216. "type": "object",
  22217. "properties": {
  22218. "uri": {
  22219. "type": "string"
  22220. },
  22221. "range": {
  22222. "$ref": "#/components/schemas/Range"
  22223. }
  22224. },
  22225. "required": ["uri", "range"],
  22226. "additionalProperties": false
  22227. }
  22228. },
  22229. "required": ["name", "kind", "location"],
  22230. "additionalProperties": false
  22231. },
  22232. "FileNode": {
  22233. "type": "object",
  22234. "properties": {
  22235. "name": {
  22236. "type": "string"
  22237. },
  22238. "path": {
  22239. "type": "string"
  22240. },
  22241. "absolute": {
  22242. "type": "string"
  22243. },
  22244. "type": {
  22245. "type": "string",
  22246. "enum": ["file", "directory"]
  22247. },
  22248. "ignored": {
  22249. "type": "boolean"
  22250. }
  22251. },
  22252. "required": ["name", "path", "absolute", "type", "ignored"],
  22253. "additionalProperties": false
  22254. },
  22255. "FileContent": {
  22256. "type": "object",
  22257. "properties": {
  22258. "type": {
  22259. "type": "string",
  22260. "enum": ["text", "binary"]
  22261. },
  22262. "content": {
  22263. "type": "string"
  22264. },
  22265. "diff": {
  22266. "type": "string"
  22267. },
  22268. "patch": {
  22269. "type": "object",
  22270. "properties": {
  22271. "oldFileName": {
  22272. "type": "string"
  22273. },
  22274. "newFileName": {
  22275. "type": "string"
  22276. },
  22277. "oldHeader": {
  22278. "type": "string"
  22279. },
  22280. "newHeader": {
  22281. "type": "string"
  22282. },
  22283. "hunks": {
  22284. "type": "array",
  22285. "items": {
  22286. "type": "object",
  22287. "properties": {
  22288. "oldStart": {
  22289. "type": "integer",
  22290. "minimum": 0
  22291. },
  22292. "oldLines": {
  22293. "type": "integer",
  22294. "minimum": 0
  22295. },
  22296. "newStart": {
  22297. "type": "integer",
  22298. "minimum": 0
  22299. },
  22300. "newLines": {
  22301. "type": "integer",
  22302. "minimum": 0
  22303. },
  22304. "lines": {
  22305. "type": "array",
  22306. "items": {
  22307. "type": "string"
  22308. }
  22309. }
  22310. },
  22311. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22312. "additionalProperties": false
  22313. }
  22314. },
  22315. "index": {
  22316. "type": "string"
  22317. }
  22318. },
  22319. "required": ["oldFileName", "newFileName", "hunks"],
  22320. "additionalProperties": false
  22321. },
  22322. "encoding": {
  22323. "type": "string",
  22324. "enum": ["base64"]
  22325. },
  22326. "mimeType": {
  22327. "type": "string"
  22328. }
  22329. },
  22330. "required": ["type", "content"],
  22331. "additionalProperties": false
  22332. },
  22333. "File": {
  22334. "type": "object",
  22335. "properties": {
  22336. "path": {
  22337. "type": "string"
  22338. },
  22339. "added": {
  22340. "type": "integer",
  22341. "minimum": 0
  22342. },
  22343. "removed": {
  22344. "type": "integer",
  22345. "minimum": 0
  22346. },
  22347. "status": {
  22348. "type": "string",
  22349. "enum": ["added", "deleted", "modified"]
  22350. }
  22351. },
  22352. "required": ["path", "added", "removed", "status"],
  22353. "additionalProperties": false
  22354. },
  22355. "Path": {
  22356. "type": "object",
  22357. "properties": {
  22358. "home": {
  22359. "type": "string"
  22360. },
  22361. "state": {
  22362. "type": "string"
  22363. },
  22364. "config": {
  22365. "type": "string"
  22366. },
  22367. "worktree": {
  22368. "type": "string"
  22369. },
  22370. "directory": {
  22371. "type": "string"
  22372. }
  22373. },
  22374. "required": ["home", "state", "config", "worktree", "directory"],
  22375. "additionalProperties": false
  22376. },
  22377. "VcsInfo": {
  22378. "type": "object",
  22379. "properties": {
  22380. "branch": {
  22381. "type": "string"
  22382. },
  22383. "default_branch": {
  22384. "type": "string"
  22385. }
  22386. },
  22387. "additionalProperties": false
  22388. },
  22389. "VcsFileStatus": {
  22390. "type": "object",
  22391. "properties": {
  22392. "file": {
  22393. "type": "string"
  22394. },
  22395. "additions": {
  22396. "type": "number"
  22397. },
  22398. "deletions": {
  22399. "type": "number"
  22400. },
  22401. "status": {
  22402. "type": "string",
  22403. "enum": ["added", "deleted", "modified"]
  22404. }
  22405. },
  22406. "required": ["file", "additions", "deletions", "status"],
  22407. "additionalProperties": false
  22408. },
  22409. "VcsFileDiff": {
  22410. "type": "object",
  22411. "properties": {
  22412. "file": {
  22413. "type": "string"
  22414. },
  22415. "patch": {
  22416. "type": "string"
  22417. },
  22418. "additions": {
  22419. "type": "number"
  22420. },
  22421. "deletions": {
  22422. "type": "number"
  22423. },
  22424. "status": {
  22425. "type": "string",
  22426. "enum": ["added", "deleted", "modified"]
  22427. }
  22428. },
  22429. "required": ["file", "additions", "deletions"],
  22430. "additionalProperties": false
  22431. },
  22432. "VcsApplyError": {
  22433. "type": "object",
  22434. "properties": {
  22435. "name": {
  22436. "type": "string",
  22437. "enum": ["VcsApplyError"]
  22438. },
  22439. "data": {
  22440. "type": "object",
  22441. "properties": {
  22442. "message": {
  22443. "type": "string"
  22444. },
  22445. "reason": {
  22446. "type": "string",
  22447. "enum": ["non-git", "not-clean"]
  22448. }
  22449. },
  22450. "required": ["message", "reason"],
  22451. "additionalProperties": false
  22452. }
  22453. },
  22454. "required": ["name", "data"],
  22455. "additionalProperties": false
  22456. },
  22457. "Command": {
  22458. "type": "object",
  22459. "properties": {
  22460. "name": {
  22461. "type": "string"
  22462. },
  22463. "description": {
  22464. "type": "string"
  22465. },
  22466. "agent": {
  22467. "type": "string"
  22468. },
  22469. "model": {
  22470. "type": "string"
  22471. },
  22472. "source": {
  22473. "type": "string",
  22474. "enum": ["command", "mcp", "skill"]
  22475. },
  22476. "template": {
  22477. "type": "string"
  22478. },
  22479. "subtask": {
  22480. "type": "boolean"
  22481. },
  22482. "hints": {
  22483. "type": "array",
  22484. "items": {
  22485. "type": "string"
  22486. }
  22487. }
  22488. },
  22489. "required": ["name", "template", "hints"],
  22490. "additionalProperties": false
  22491. },
  22492. "Agent": {
  22493. "type": "object",
  22494. "properties": {
  22495. "name": {
  22496. "type": "string"
  22497. },
  22498. "description": {
  22499. "type": "string"
  22500. },
  22501. "mode": {
  22502. "type": "string",
  22503. "enum": ["subagent", "primary", "all"]
  22504. },
  22505. "native": {
  22506. "type": "boolean"
  22507. },
  22508. "hidden": {
  22509. "type": "boolean"
  22510. },
  22511. "topP": {
  22512. "type": "number"
  22513. },
  22514. "temperature": {
  22515. "type": "number"
  22516. },
  22517. "color": {
  22518. "type": "string"
  22519. },
  22520. "permission": {
  22521. "$ref": "#/components/schemas/PermissionRuleset"
  22522. },
  22523. "model": {
  22524. "type": "object",
  22525. "properties": {
  22526. "modelID": {
  22527. "type": "string"
  22528. },
  22529. "providerID": {
  22530. "type": "string"
  22531. }
  22532. },
  22533. "required": ["modelID", "providerID"],
  22534. "additionalProperties": false
  22535. },
  22536. "variant": {
  22537. "type": "string"
  22538. },
  22539. "prompt": {
  22540. "type": "string"
  22541. },
  22542. "options": {
  22543. "type": "object"
  22544. },
  22545. "steps": {
  22546. "type": "number"
  22547. }
  22548. },
  22549. "required": ["name", "mode", "permission", "options"],
  22550. "additionalProperties": false
  22551. },
  22552. "LSPStatus": {
  22553. "type": "object",
  22554. "properties": {
  22555. "id": {
  22556. "type": "string"
  22557. },
  22558. "name": {
  22559. "type": "string"
  22560. },
  22561. "root": {
  22562. "type": "string"
  22563. },
  22564. "status": {
  22565. "type": "string",
  22566. "enum": ["connected", "error"]
  22567. }
  22568. },
  22569. "required": ["id", "name", "root", "status"],
  22570. "additionalProperties": false
  22571. },
  22572. "FormatterStatus": {
  22573. "type": "object",
  22574. "properties": {
  22575. "name": {
  22576. "type": "string"
  22577. },
  22578. "extensions": {
  22579. "type": "array",
  22580. "items": {
  22581. "type": "string"
  22582. }
  22583. },
  22584. "enabled": {
  22585. "type": "boolean"
  22586. }
  22587. },
  22588. "required": ["name", "extensions", "enabled"],
  22589. "additionalProperties": false
  22590. },
  22591. "MCPStatusConnected": {
  22592. "type": "object",
  22593. "properties": {
  22594. "status": {
  22595. "type": "string",
  22596. "enum": ["connected"]
  22597. }
  22598. },
  22599. "required": ["status"],
  22600. "additionalProperties": false
  22601. },
  22602. "MCPStatusDisabled": {
  22603. "type": "object",
  22604. "properties": {
  22605. "status": {
  22606. "type": "string",
  22607. "enum": ["disabled"]
  22608. }
  22609. },
  22610. "required": ["status"],
  22611. "additionalProperties": false
  22612. },
  22613. "MCPStatusFailed": {
  22614. "type": "object",
  22615. "properties": {
  22616. "status": {
  22617. "type": "string",
  22618. "enum": ["failed"]
  22619. },
  22620. "error": {
  22621. "type": "string"
  22622. }
  22623. },
  22624. "required": ["status", "error"],
  22625. "additionalProperties": false
  22626. },
  22627. "MCPStatusNeedsAuth": {
  22628. "type": "object",
  22629. "properties": {
  22630. "status": {
  22631. "type": "string",
  22632. "enum": ["needs_auth"]
  22633. }
  22634. },
  22635. "required": ["status"],
  22636. "additionalProperties": false
  22637. },
  22638. "MCPStatusNeedsClientRegistration": {
  22639. "type": "object",
  22640. "properties": {
  22641. "status": {
  22642. "type": "string",
  22643. "enum": ["needs_client_registration"]
  22644. },
  22645. "error": {
  22646. "type": "string"
  22647. }
  22648. },
  22649. "required": ["status", "error"],
  22650. "additionalProperties": false
  22651. },
  22652. "MCPStatus": {
  22653. "anyOf": [
  22654. {
  22655. "$ref": "#/components/schemas/MCPStatusConnected"
  22656. },
  22657. {
  22658. "$ref": "#/components/schemas/MCPStatusDisabled"
  22659. },
  22660. {
  22661. "$ref": "#/components/schemas/MCPStatusFailed"
  22662. },
  22663. {
  22664. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22665. },
  22666. {
  22667. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22668. }
  22669. ]
  22670. },
  22671. "McpUnsupportedOAuthError": {
  22672. "type": "object",
  22673. "properties": {
  22674. "error": {
  22675. "type": "string"
  22676. }
  22677. },
  22678. "required": ["error"],
  22679. "additionalProperties": false
  22680. },
  22681. "McpServerNotFoundError": {
  22682. "type": "object",
  22683. "properties": {
  22684. "_tag": {
  22685. "type": "string",
  22686. "enum": ["McpServerNotFoundError"]
  22687. },
  22688. "name": {
  22689. "type": "string"
  22690. },
  22691. "message": {
  22692. "type": "string"
  22693. }
  22694. },
  22695. "required": ["_tag", "name", "message"],
  22696. "additionalProperties": false
  22697. },
  22698. "Project": {
  22699. "type": "object",
  22700. "properties": {
  22701. "id": {
  22702. "type": "string"
  22703. },
  22704. "worktree": {
  22705. "type": "string"
  22706. },
  22707. "vcs": {
  22708. "type": "string",
  22709. "enum": ["git"]
  22710. },
  22711. "name": {
  22712. "type": "string"
  22713. },
  22714. "icon": {
  22715. "type": "object",
  22716. "properties": {
  22717. "url": {
  22718. "type": "string"
  22719. },
  22720. "override": {
  22721. "type": "string"
  22722. },
  22723. "color": {
  22724. "type": "string"
  22725. }
  22726. },
  22727. "additionalProperties": false
  22728. },
  22729. "commands": {
  22730. "type": "object",
  22731. "properties": {
  22732. "start": {
  22733. "type": "string",
  22734. "description": "Startup script to run when creating a new workspace (worktree)"
  22735. }
  22736. },
  22737. "additionalProperties": false
  22738. },
  22739. "time": {
  22740. "type": "object",
  22741. "properties": {
  22742. "created": {
  22743. "type": "integer",
  22744. "minimum": 0
  22745. },
  22746. "updated": {
  22747. "type": "integer",
  22748. "minimum": 0
  22749. },
  22750. "initialized": {
  22751. "type": "integer",
  22752. "minimum": 0
  22753. }
  22754. },
  22755. "required": ["created", "updated"],
  22756. "additionalProperties": false
  22757. },
  22758. "sandboxes": {
  22759. "type": "array",
  22760. "items": {
  22761. "type": "string"
  22762. }
  22763. }
  22764. },
  22765. "required": ["id", "worktree", "time", "sandboxes"],
  22766. "additionalProperties": false
  22767. },
  22768. "ProjectNotFoundError": {
  22769. "type": "object",
  22770. "properties": {
  22771. "_tag": {
  22772. "type": "string",
  22773. "enum": ["ProjectNotFoundError"]
  22774. },
  22775. "projectID": {
  22776. "type": "string"
  22777. },
  22778. "message": {
  22779. "type": "string"
  22780. }
  22781. },
  22782. "required": ["_tag", "projectID", "message"],
  22783. "additionalProperties": false
  22784. },
  22785. "PtyNotFoundError": {
  22786. "type": "object",
  22787. "properties": {
  22788. "_tag": {
  22789. "type": "string",
  22790. "enum": ["PtyNotFoundError"]
  22791. },
  22792. "ptyID": {
  22793. "type": "string"
  22794. },
  22795. "message": {
  22796. "type": "string"
  22797. }
  22798. },
  22799. "required": ["_tag", "ptyID", "message"],
  22800. "additionalProperties": false
  22801. },
  22802. "PtyForbiddenError": {
  22803. "type": "object",
  22804. "properties": {
  22805. "_tag": {
  22806. "type": "string",
  22807. "enum": ["PtyForbiddenError"]
  22808. },
  22809. "message": {
  22810. "type": "string"
  22811. }
  22812. },
  22813. "required": ["_tag", "message"],
  22814. "additionalProperties": false
  22815. },
  22816. "QuestionRequest": {
  22817. "type": "object",
  22818. "properties": {
  22819. "id": {
  22820. "type": "string",
  22821. "pattern": "^que"
  22822. },
  22823. "sessionID": {
  22824. "type": "string",
  22825. "pattern": "^ses"
  22826. },
  22827. "questions": {
  22828. "type": "array",
  22829. "items": {
  22830. "$ref": "#/components/schemas/QuestionInfo"
  22831. },
  22832. "description": "Questions to ask"
  22833. },
  22834. "tool": {
  22835. "$ref": "#/components/schemas/QuestionTool"
  22836. }
  22837. },
  22838. "required": ["id", "sessionID", "questions"],
  22839. "additionalProperties": false
  22840. },
  22841. "QuestionNotFoundError": {
  22842. "type": "object",
  22843. "properties": {
  22844. "_tag": {
  22845. "type": "string",
  22846. "enum": ["QuestionNotFoundError"]
  22847. },
  22848. "requestID": {
  22849. "type": "string"
  22850. },
  22851. "message": {
  22852. "type": "string"
  22853. }
  22854. },
  22855. "required": ["_tag", "requestID", "message"],
  22856. "additionalProperties": false
  22857. },
  22858. "PermissionRequest": {
  22859. "type": "object",
  22860. "properties": {
  22861. "id": {
  22862. "type": "string",
  22863. "pattern": "^per"
  22864. },
  22865. "sessionID": {
  22866. "type": "string",
  22867. "pattern": "^ses"
  22868. },
  22869. "permission": {
  22870. "type": "string"
  22871. },
  22872. "patterns": {
  22873. "type": "array",
  22874. "items": {
  22875. "type": "string"
  22876. }
  22877. },
  22878. "metadata": {
  22879. "type": "object"
  22880. },
  22881. "always": {
  22882. "type": "array",
  22883. "items": {
  22884. "type": "string"
  22885. }
  22886. },
  22887. "tool": {
  22888. "type": "object",
  22889. "properties": {
  22890. "messageID": {
  22891. "type": "string"
  22892. },
  22893. "callID": {
  22894. "type": "string"
  22895. }
  22896. },
  22897. "required": ["messageID", "callID"],
  22898. "additionalProperties": false
  22899. }
  22900. },
  22901. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22902. "additionalProperties": false
  22903. },
  22904. "PermissionNotFoundError": {
  22905. "type": "object",
  22906. "properties": {
  22907. "_tag": {
  22908. "type": "string",
  22909. "enum": ["PermissionNotFoundError"]
  22910. },
  22911. "requestID": {
  22912. "type": "string"
  22913. },
  22914. "message": {
  22915. "type": "string"
  22916. }
  22917. },
  22918. "required": ["_tag", "requestID", "message"],
  22919. "additionalProperties": false
  22920. },
  22921. "ProviderAuthMethod": {
  22922. "type": "object",
  22923. "properties": {
  22924. "type": {
  22925. "type": "string",
  22926. "enum": ["oauth", "api"]
  22927. },
  22928. "label": {
  22929. "type": "string"
  22930. },
  22931. "prompts": {
  22932. "type": "array",
  22933. "items": {
  22934. "anyOf": [
  22935. {
  22936. "type": "object",
  22937. "properties": {
  22938. "type": {
  22939. "type": "string",
  22940. "enum": ["text"]
  22941. },
  22942. "key": {
  22943. "type": "string"
  22944. },
  22945. "message": {
  22946. "type": "string"
  22947. },
  22948. "placeholder": {
  22949. "type": "string"
  22950. },
  22951. "when": {
  22952. "type": "object",
  22953. "properties": {
  22954. "key": {
  22955. "type": "string"
  22956. },
  22957. "op": {
  22958. "type": "string",
  22959. "enum": ["eq", "neq"]
  22960. },
  22961. "value": {
  22962. "type": "string"
  22963. }
  22964. },
  22965. "required": ["key", "op", "value"],
  22966. "additionalProperties": false
  22967. }
  22968. },
  22969. "required": ["type", "key", "message"],
  22970. "additionalProperties": false
  22971. },
  22972. {
  22973. "type": "object",
  22974. "properties": {
  22975. "type": {
  22976. "type": "string",
  22977. "enum": ["select"]
  22978. },
  22979. "key": {
  22980. "type": "string"
  22981. },
  22982. "message": {
  22983. "type": "string"
  22984. },
  22985. "options": {
  22986. "type": "array",
  22987. "items": {
  22988. "type": "object",
  22989. "properties": {
  22990. "label": {
  22991. "type": "string"
  22992. },
  22993. "value": {
  22994. "type": "string"
  22995. },
  22996. "hint": {
  22997. "type": "string"
  22998. }
  22999. },
  23000. "required": ["label", "value"],
  23001. "additionalProperties": false
  23002. }
  23003. },
  23004. "when": {
  23005. "type": "object",
  23006. "properties": {
  23007. "key": {
  23008. "type": "string"
  23009. },
  23010. "op": {
  23011. "type": "string",
  23012. "enum": ["eq", "neq"]
  23013. },
  23014. "value": {
  23015. "type": "string"
  23016. }
  23017. },
  23018. "required": ["key", "op", "value"],
  23019. "additionalProperties": false
  23020. }
  23021. },
  23022. "required": ["type", "key", "message", "options"],
  23023. "additionalProperties": false
  23024. }
  23025. ]
  23026. }
  23027. }
  23028. },
  23029. "required": ["type", "label"],
  23030. "additionalProperties": false
  23031. },
  23032. "ProviderAuthAuthorization": {
  23033. "type": "object",
  23034. "properties": {
  23035. "url": {
  23036. "type": "string"
  23037. },
  23038. "method": {
  23039. "type": "string",
  23040. "enum": ["auto", "code"]
  23041. },
  23042. "instructions": {
  23043. "type": "string"
  23044. }
  23045. },
  23046. "required": ["url", "method", "instructions"],
  23047. "additionalProperties": false
  23048. },
  23049. "ProviderAuthError1": {
  23050. "type": "object",
  23051. "properties": {
  23052. "name": {
  23053. "type": "string",
  23054. "enum": [
  23055. "BadRequest",
  23056. "ProviderAuthOauthMissing",
  23057. "ProviderAuthOauthCodeMissing",
  23058. "ProviderAuthOauthCallbackFailed",
  23059. "ProviderAuthValidationFailed"
  23060. ]
  23061. },
  23062. "data": {
  23063. "type": "object",
  23064. "properties": {
  23065. "providerID": {
  23066. "type": "string"
  23067. },
  23068. "field": {
  23069. "type": "string"
  23070. },
  23071. "message": {
  23072. "type": "string"
  23073. },
  23074. "kind": {
  23075. "type": "string"
  23076. }
  23077. },
  23078. "additionalProperties": false
  23079. }
  23080. },
  23081. "required": ["name", "data"],
  23082. "additionalProperties": false
  23083. },
  23084. "NotFoundError": {
  23085. "type": "object",
  23086. "required": ["name", "data"],
  23087. "properties": {
  23088. "name": {
  23089. "type": "string",
  23090. "enum": ["NotFoundError"]
  23091. },
  23092. "data": {
  23093. "type": "object",
  23094. "required": ["message"],
  23095. "properties": {
  23096. "message": {
  23097. "type": "string"
  23098. }
  23099. }
  23100. }
  23101. }
  23102. },
  23103. "TextPartInput": {
  23104. "type": "object",
  23105. "properties": {
  23106. "id": {
  23107. "type": "string",
  23108. "pattern": "^prt"
  23109. },
  23110. "type": {
  23111. "type": "string",
  23112. "enum": ["text"]
  23113. },
  23114. "text": {
  23115. "type": "string"
  23116. },
  23117. "synthetic": {
  23118. "type": "boolean"
  23119. },
  23120. "ignored": {
  23121. "type": "boolean"
  23122. },
  23123. "time": {
  23124. "type": "object",
  23125. "properties": {
  23126. "start": {
  23127. "type": "integer",
  23128. "minimum": 0
  23129. },
  23130. "end": {
  23131. "type": "integer",
  23132. "minimum": 0
  23133. }
  23134. },
  23135. "required": ["start"],
  23136. "additionalProperties": false
  23137. },
  23138. "metadata": {
  23139. "type": "object"
  23140. }
  23141. },
  23142. "required": ["type", "text"],
  23143. "additionalProperties": false
  23144. },
  23145. "FilePartInput": {
  23146. "type": "object",
  23147. "properties": {
  23148. "id": {
  23149. "type": "string",
  23150. "pattern": "^prt"
  23151. },
  23152. "type": {
  23153. "type": "string",
  23154. "enum": ["file"]
  23155. },
  23156. "mime": {
  23157. "type": "string"
  23158. },
  23159. "filename": {
  23160. "type": "string"
  23161. },
  23162. "url": {
  23163. "type": "string"
  23164. },
  23165. "source": {
  23166. "$ref": "#/components/schemas/FilePartSource"
  23167. }
  23168. },
  23169. "required": ["type", "mime", "url"],
  23170. "additionalProperties": false
  23171. },
  23172. "AgentPartInput": {
  23173. "type": "object",
  23174. "properties": {
  23175. "id": {
  23176. "type": "string",
  23177. "pattern": "^prt"
  23178. },
  23179. "type": {
  23180. "type": "string",
  23181. "enum": ["agent"]
  23182. },
  23183. "name": {
  23184. "type": "string"
  23185. },
  23186. "source": {
  23187. "type": "object",
  23188. "properties": {
  23189. "value": {
  23190. "type": "string"
  23191. },
  23192. "start": {
  23193. "type": "integer",
  23194. "minimum": 0
  23195. },
  23196. "end": {
  23197. "type": "integer",
  23198. "minimum": 0
  23199. }
  23200. },
  23201. "required": ["value", "start", "end"],
  23202. "additionalProperties": false
  23203. }
  23204. },
  23205. "required": ["type", "name"],
  23206. "additionalProperties": false
  23207. },
  23208. "SubtaskPartInput": {
  23209. "type": "object",
  23210. "properties": {
  23211. "id": {
  23212. "type": "string",
  23213. "pattern": "^prt"
  23214. },
  23215. "type": {
  23216. "type": "string",
  23217. "enum": ["subtask"]
  23218. },
  23219. "prompt": {
  23220. "type": "string"
  23221. },
  23222. "description": {
  23223. "type": "string"
  23224. },
  23225. "agent": {
  23226. "type": "string"
  23227. },
  23228. "model": {
  23229. "type": "object",
  23230. "properties": {
  23231. "providerID": {
  23232. "type": "string"
  23233. },
  23234. "modelID": {
  23235. "type": "string"
  23236. }
  23237. },
  23238. "required": ["providerID", "modelID"],
  23239. "additionalProperties": false
  23240. },
  23241. "command": {
  23242. "type": "string"
  23243. }
  23244. },
  23245. "required": ["type", "prompt", "description", "agent"],
  23246. "additionalProperties": false
  23247. },
  23248. "SessionBusyError": {
  23249. "type": "object",
  23250. "properties": {
  23251. "_tag": {
  23252. "type": "string",
  23253. "enum": ["SessionBusyError"]
  23254. },
  23255. "sessionID": {
  23256. "type": "string"
  23257. },
  23258. "message": {
  23259. "type": "string"
  23260. }
  23261. },
  23262. "required": ["_tag", "sessionID", "message"],
  23263. "additionalProperties": false
  23264. },
  23265. "EventTuiPromptAppend": {
  23266. "type": "object",
  23267. "properties": {
  23268. "type": {
  23269. "type": "string",
  23270. "enum": ["tui.prompt.append"]
  23271. },
  23272. "properties": {
  23273. "type": "object",
  23274. "properties": {
  23275. "text": {
  23276. "type": "string"
  23277. }
  23278. },
  23279. "required": ["text"],
  23280. "additionalProperties": false
  23281. }
  23282. },
  23283. "required": ["type", "properties"],
  23284. "additionalProperties": false
  23285. },
  23286. "EventTuiCommandExecute": {
  23287. "type": "object",
  23288. "properties": {
  23289. "type": {
  23290. "type": "string",
  23291. "enum": ["tui.command.execute"]
  23292. },
  23293. "properties": {
  23294. "type": "object",
  23295. "properties": {
  23296. "command": {
  23297. "anyOf": [
  23298. {
  23299. "type": "string",
  23300. "enum": [
  23301. "session.list",
  23302. "session.new",
  23303. "session.share",
  23304. "session.interrupt",
  23305. "session.compact",
  23306. "session.page.up",
  23307. "session.page.down",
  23308. "session.line.up",
  23309. "session.line.down",
  23310. "session.half.page.up",
  23311. "session.half.page.down",
  23312. "session.first",
  23313. "session.last",
  23314. "prompt.clear",
  23315. "prompt.submit",
  23316. "agent.cycle"
  23317. ]
  23318. },
  23319. {
  23320. "type": "string"
  23321. }
  23322. ]
  23323. }
  23324. },
  23325. "required": ["command"],
  23326. "additionalProperties": false
  23327. }
  23328. },
  23329. "required": ["type", "properties"],
  23330. "additionalProperties": false
  23331. },
  23332. "EventTuiToastShow": {
  23333. "type": "object",
  23334. "properties": {
  23335. "type": {
  23336. "type": "string",
  23337. "enum": ["tui.toast.show"]
  23338. },
  23339. "properties": {
  23340. "type": "object",
  23341. "properties": {
  23342. "title": {
  23343. "type": "string"
  23344. },
  23345. "message": {
  23346. "type": "string"
  23347. },
  23348. "variant": {
  23349. "type": "string",
  23350. "enum": ["info", "success", "warning", "error"]
  23351. },
  23352. "duration": {
  23353. "type": "integer",
  23354. "exclusiveMinimum": 0
  23355. }
  23356. },
  23357. "required": ["message", "variant"],
  23358. "additionalProperties": false
  23359. }
  23360. },
  23361. "required": ["type", "properties"],
  23362. "additionalProperties": false
  23363. },
  23364. "EventTuiSessionSelect": {
  23365. "type": "object",
  23366. "properties": {
  23367. "type": {
  23368. "type": "string",
  23369. "enum": ["tui.session.select"]
  23370. },
  23371. "properties": {
  23372. "type": "object",
  23373. "properties": {
  23374. "sessionID": {
  23375. "type": "string",
  23376. "pattern": "^ses",
  23377. "description": "Session ID to navigate to"
  23378. }
  23379. },
  23380. "required": ["sessionID"],
  23381. "additionalProperties": false
  23382. }
  23383. },
  23384. "required": ["type", "properties"],
  23385. "additionalProperties": false
  23386. },
  23387. "Workspace": {
  23388. "type": "object",
  23389. "properties": {
  23390. "id": {
  23391. "type": "string",
  23392. "pattern": "^wrk"
  23393. },
  23394. "type": {
  23395. "type": "string"
  23396. },
  23397. "name": {
  23398. "type": "string"
  23399. },
  23400. "branch": {
  23401. "anyOf": [
  23402. {
  23403. "type": "string"
  23404. },
  23405. {
  23406. "type": "null"
  23407. }
  23408. ]
  23409. },
  23410. "directory": {
  23411. "anyOf": [
  23412. {
  23413. "type": "string"
  23414. },
  23415. {
  23416. "type": "null"
  23417. }
  23418. ]
  23419. },
  23420. "extra": {
  23421. "anyOf": [
  23422. {},
  23423. {
  23424. "type": "null"
  23425. }
  23426. ]
  23427. },
  23428. "projectID": {
  23429. "type": "string"
  23430. },
  23431. "timeUsed": {
  23432. "anyOf": [
  23433. {
  23434. "type": "number"
  23435. },
  23436. {
  23437. "type": "string",
  23438. "enum": ["NaN"]
  23439. },
  23440. {
  23441. "type": "string",
  23442. "enum": ["Infinity"]
  23443. },
  23444. {
  23445. "type": "string",
  23446. "enum": ["-Infinity"]
  23447. },
  23448. {
  23449. "type": "string",
  23450. "enum": ["Infinity", "-Infinity", "NaN"]
  23451. }
  23452. ]
  23453. }
  23454. },
  23455. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23456. "additionalProperties": false
  23457. },
  23458. "WorkspaceCreateError": {
  23459. "type": "object",
  23460. "properties": {
  23461. "name": {
  23462. "type": "string",
  23463. "enum": ["WorkspaceCreateError"]
  23464. },
  23465. "data": {
  23466. "type": "object",
  23467. "properties": {
  23468. "message": {
  23469. "type": "string"
  23470. }
  23471. },
  23472. "required": ["message"],
  23473. "additionalProperties": false
  23474. }
  23475. },
  23476. "required": ["name", "data"],
  23477. "additionalProperties": false
  23478. },
  23479. "WorkspaceWarpError": {
  23480. "type": "object",
  23481. "properties": {
  23482. "name": {
  23483. "type": "string",
  23484. "enum": ["WorkspaceWarpError"]
  23485. },
  23486. "data": {
  23487. "type": "object",
  23488. "properties": {
  23489. "message": {
  23490. "type": "string"
  23491. }
  23492. },
  23493. "required": ["message"],
  23494. "additionalProperties": false
  23495. }
  23496. },
  23497. "required": ["name", "data"],
  23498. "additionalProperties": false
  23499. },
  23500. "UnauthorizedError": {
  23501. "type": "object",
  23502. "properties": {
  23503. "_tag": {
  23504. "type": "string",
  23505. "enum": ["UnauthorizedError"]
  23506. },
  23507. "message": {
  23508. "type": "string"
  23509. }
  23510. },
  23511. "required": ["_tag", "message"],
  23512. "additionalProperties": false
  23513. },
  23514. "SessionsResponse": {
  23515. "type": "object",
  23516. "properties": {
  23517. "data": {
  23518. "type": "array",
  23519. "items": {
  23520. "$ref": "#/components/schemas/SessionV2Info"
  23521. }
  23522. },
  23523. "cursor": {
  23524. "type": "object",
  23525. "properties": {
  23526. "previous": {
  23527. "type": "string"
  23528. },
  23529. "next": {
  23530. "type": "string"
  23531. }
  23532. },
  23533. "additionalProperties": false
  23534. }
  23535. },
  23536. "required": ["data", "cursor"],
  23537. "additionalProperties": false
  23538. },
  23539. "InvalidCursorError": {
  23540. "type": "object",
  23541. "properties": {
  23542. "_tag": {
  23543. "type": "string",
  23544. "enum": ["InvalidCursorError"]
  23545. },
  23546. "message": {
  23547. "type": "string"
  23548. }
  23549. },
  23550. "required": ["_tag", "message"],
  23551. "additionalProperties": false
  23552. },
  23553. "SessionNotFoundError": {
  23554. "type": "object",
  23555. "properties": {
  23556. "_tag": {
  23557. "type": "string",
  23558. "enum": ["SessionNotFoundError"]
  23559. },
  23560. "sessionID": {
  23561. "type": "string"
  23562. },
  23563. "message": {
  23564. "type": "string"
  23565. }
  23566. },
  23567. "required": ["_tag", "sessionID", "message"],
  23568. "additionalProperties": false
  23569. },
  23570. "ConflictError": {
  23571. "type": "object",
  23572. "properties": {
  23573. "_tag": {
  23574. "type": "string",
  23575. "enum": ["ConflictError"]
  23576. },
  23577. "message": {
  23578. "type": "string"
  23579. },
  23580. "resource": {
  23581. "type": "string"
  23582. }
  23583. },
  23584. "required": ["_tag", "message"],
  23585. "additionalProperties": false
  23586. },
  23587. "ServiceUnavailableError": {
  23588. "type": "object",
  23589. "properties": {
  23590. "_tag": {
  23591. "type": "string",
  23592. "enum": ["ServiceUnavailableError"]
  23593. },
  23594. "message": {
  23595. "type": "string"
  23596. },
  23597. "service": {
  23598. "type": "string"
  23599. }
  23600. },
  23601. "required": ["_tag", "message"],
  23602. "additionalProperties": false
  23603. },
  23604. "MessageNotFoundError": {
  23605. "type": "object",
  23606. "properties": {
  23607. "_tag": {
  23608. "type": "string",
  23609. "enum": ["MessageNotFoundError"]
  23610. },
  23611. "sessionID": {
  23612. "type": "string"
  23613. },
  23614. "messageID": {
  23615. "type": "string"
  23616. },
  23617. "message": {
  23618. "type": "string"
  23619. }
  23620. },
  23621. "required": ["_tag", "sessionID", "messageID", "message"],
  23622. "additionalProperties": false
  23623. },
  23624. "UnknownError1": {
  23625. "type": "object",
  23626. "properties": {
  23627. "_tag": {
  23628. "type": "string",
  23629. "enum": ["UnknownError"]
  23630. },
  23631. "message": {
  23632. "type": "string"
  23633. },
  23634. "ref": {
  23635. "type": "string"
  23636. }
  23637. },
  23638. "required": ["_tag", "message"],
  23639. "additionalProperties": false
  23640. },
  23641. "SessionMessagesResponse": {
  23642. "type": "object",
  23643. "properties": {
  23644. "data": {
  23645. "type": "array",
  23646. "items": {
  23647. "$ref": "#/components/schemas/SessionMessage"
  23648. }
  23649. },
  23650. "cursor": {
  23651. "type": "object",
  23652. "properties": {
  23653. "previous": {
  23654. "type": "string"
  23655. },
  23656. "next": {
  23657. "type": "string"
  23658. }
  23659. },
  23660. "additionalProperties": false
  23661. }
  23662. },
  23663. "required": ["data", "cursor"],
  23664. "additionalProperties": false
  23665. },
  23666. "ProviderNotFoundError": {
  23667. "type": "object",
  23668. "properties": {
  23669. "_tag": {
  23670. "type": "string",
  23671. "enum": ["ProviderNotFoundError"]
  23672. },
  23673. "providerID": {
  23674. "type": "string"
  23675. },
  23676. "message": {
  23677. "type": "string"
  23678. }
  23679. },
  23680. "required": ["_tag", "providerID", "message"],
  23681. "additionalProperties": false
  23682. },
  23683. "V2Event": {
  23684. "anyOf": [
  23685. {
  23686. "$ref": "#/components/schemas/V2EventModels-devRefreshed"
  23687. },
  23688. {
  23689. "$ref": "#/components/schemas/V2EventIntegrationUpdated"
  23690. },
  23691. {
  23692. "$ref": "#/components/schemas/V2EventIntegrationConnectionUpdated"
  23693. },
  23694. {
  23695. "$ref": "#/components/schemas/V2EventCatalogUpdated"
  23696. },
  23697. {
  23698. "$ref": "#/components/schemas/V2EventSessionCreated"
  23699. },
  23700. {
  23701. "$ref": "#/components/schemas/V2EventSessionUpdated"
  23702. },
  23703. {
  23704. "$ref": "#/components/schemas/V2EventSessionDeleted"
  23705. },
  23706. {
  23707. "$ref": "#/components/schemas/V2EventMessageUpdated"
  23708. },
  23709. {
  23710. "$ref": "#/components/schemas/V2EventMessageRemoved"
  23711. },
  23712. {
  23713. "$ref": "#/components/schemas/V2EventMessagePartUpdated"
  23714. },
  23715. {
  23716. "$ref": "#/components/schemas/V2EventMessagePartRemoved"
  23717. },
  23718. {
  23719. "$ref": "#/components/schemas/V2EventSessionNextAgentSwitched"
  23720. },
  23721. {
  23722. "$ref": "#/components/schemas/V2EventSessionNextModelSwitched"
  23723. },
  23724. {
  23725. "$ref": "#/components/schemas/V2EventSessionNextMoved"
  23726. },
  23727. {
  23728. "$ref": "#/components/schemas/V2EventSessionNextPrompted"
  23729. },
  23730. {
  23731. "$ref": "#/components/schemas/V2EventSessionNextPromptAdmitted"
  23732. },
  23733. {
  23734. "$ref": "#/components/schemas/V2EventSessionNextContextUpdated"
  23735. },
  23736. {
  23737. "$ref": "#/components/schemas/V2EventSessionNextSynthetic"
  23738. },
  23739. {
  23740. "$ref": "#/components/schemas/V2EventSessionNextShellStarted"
  23741. },
  23742. {
  23743. "$ref": "#/components/schemas/V2EventSessionNextShellEnded"
  23744. },
  23745. {
  23746. "$ref": "#/components/schemas/V2EventSessionNextStepStarted"
  23747. },
  23748. {
  23749. "$ref": "#/components/schemas/V2EventSessionNextStepEnded"
  23750. },
  23751. {
  23752. "$ref": "#/components/schemas/V2EventSessionNextStepFailed"
  23753. },
  23754. {
  23755. "$ref": "#/components/schemas/V2EventSessionNextTextStarted"
  23756. },
  23757. {
  23758. "$ref": "#/components/schemas/V2EventSessionNextTextDelta"
  23759. },
  23760. {
  23761. "$ref": "#/components/schemas/V2EventSessionNextTextEnded"
  23762. },
  23763. {
  23764. "$ref": "#/components/schemas/V2EventSessionNextReasoningStarted"
  23765. },
  23766. {
  23767. "$ref": "#/components/schemas/V2EventSessionNextReasoningDelta"
  23768. },
  23769. {
  23770. "$ref": "#/components/schemas/V2EventSessionNextReasoningEnded"
  23771. },
  23772. {
  23773. "$ref": "#/components/schemas/V2EventSessionNextToolInputStarted"
  23774. },
  23775. {
  23776. "$ref": "#/components/schemas/V2EventSessionNextToolInputDelta"
  23777. },
  23778. {
  23779. "$ref": "#/components/schemas/V2EventSessionNextToolInputEnded"
  23780. },
  23781. {
  23782. "$ref": "#/components/schemas/V2EventSessionNextToolCalled"
  23783. },
  23784. {
  23785. "$ref": "#/components/schemas/V2EventSessionNextToolProgress"
  23786. },
  23787. {
  23788. "$ref": "#/components/schemas/V2EventSessionNextToolSuccess"
  23789. },
  23790. {
  23791. "$ref": "#/components/schemas/V2EventSessionNextToolFailed"
  23792. },
  23793. {
  23794. "$ref": "#/components/schemas/V2EventSessionNextRetried"
  23795. },
  23796. {
  23797. "$ref": "#/components/schemas/V2EventSessionNextCompactionStarted"
  23798. },
  23799. {
  23800. "$ref": "#/components/schemas/V2EventSessionNextCompactionDelta"
  23801. },
  23802. {
  23803. "$ref": "#/components/schemas/V2EventSessionNextCompactionEnded"
  23804. },
  23805. {
  23806. "$ref": "#/components/schemas/V2EventSessionNextRevertStaged"
  23807. },
  23808. {
  23809. "$ref": "#/components/schemas/V2EventSessionNextRevertCleared"
  23810. },
  23811. {
  23812. "$ref": "#/components/schemas/V2EventSessionNextRevertCommitted"
  23813. },
  23814. {
  23815. "$ref": "#/components/schemas/V2EventMessagePartDelta"
  23816. },
  23817. {
  23818. "$ref": "#/components/schemas/V2EventSessionDiff"
  23819. },
  23820. {
  23821. "$ref": "#/components/schemas/V2EventSessionError"
  23822. },
  23823. {
  23824. "$ref": "#/components/schemas/V2EventInstallationUpdated"
  23825. },
  23826. {
  23827. "$ref": "#/components/schemas/V2EventInstallationUpdate-available"
  23828. },
  23829. {
  23830. "$ref": "#/components/schemas/V2EventFileEdited"
  23831. },
  23832. {
  23833. "$ref": "#/components/schemas/V2EventReferenceUpdated"
  23834. },
  23835. {
  23836. "$ref": "#/components/schemas/V2EventPermissionV2Asked"
  23837. },
  23838. {
  23839. "$ref": "#/components/schemas/V2EventPermissionV2Replied"
  23840. },
  23841. {
  23842. "$ref": "#/components/schemas/V2EventPluginAdded"
  23843. },
  23844. {
  23845. "$ref": "#/components/schemas/V2EventProjectDirectoriesUpdated"
  23846. },
  23847. {
  23848. "$ref": "#/components/schemas/V2EventFileWatcherUpdated"
  23849. },
  23850. {
  23851. "$ref": "#/components/schemas/V2EventPtyCreated"
  23852. },
  23853. {
  23854. "$ref": "#/components/schemas/V2EventPtyUpdated"
  23855. },
  23856. {
  23857. "$ref": "#/components/schemas/V2EventPtyExited"
  23858. },
  23859. {
  23860. "$ref": "#/components/schemas/V2EventPtyDeleted"
  23861. },
  23862. {
  23863. "$ref": "#/components/schemas/V2EventQuestionV2Asked"
  23864. },
  23865. {
  23866. "$ref": "#/components/schemas/V2EventQuestionV2Replied"
  23867. },
  23868. {
  23869. "$ref": "#/components/schemas/V2EventQuestionV2Rejected"
  23870. },
  23871. {
  23872. "$ref": "#/components/schemas/V2EventTodoUpdated"
  23873. },
  23874. {
  23875. "$ref": "#/components/schemas/V2EventLspUpdated"
  23876. },
  23877. {
  23878. "$ref": "#/components/schemas/V2EventPermissionAsked"
  23879. },
  23880. {
  23881. "$ref": "#/components/schemas/V2EventPermissionReplied"
  23882. },
  23883. {
  23884. "$ref": "#/components/schemas/V2EventTuiPromptAppend"
  23885. },
  23886. {
  23887. "$ref": "#/components/schemas/V2EventTuiCommandExecute"
  23888. },
  23889. {
  23890. "$ref": "#/components/schemas/V2EventTuiToastShow"
  23891. },
  23892. {
  23893. "$ref": "#/components/schemas/V2EventTuiSessionSelect"
  23894. },
  23895. {
  23896. "$ref": "#/components/schemas/V2EventMcpToolsChanged"
  23897. },
  23898. {
  23899. "$ref": "#/components/schemas/V2EventMcpBrowserOpenFailed"
  23900. },
  23901. {
  23902. "$ref": "#/components/schemas/V2EventCommandExecuted"
  23903. },
  23904. {
  23905. "$ref": "#/components/schemas/V2EventProjectUpdated"
  23906. },
  23907. {
  23908. "$ref": "#/components/schemas/V2EventSessionStatus"
  23909. },
  23910. {
  23911. "$ref": "#/components/schemas/V2EventSessionIdle"
  23912. },
  23913. {
  23914. "$ref": "#/components/schemas/V2EventQuestionAsked"
  23915. },
  23916. {
  23917. "$ref": "#/components/schemas/V2EventQuestionReplied"
  23918. },
  23919. {
  23920. "$ref": "#/components/schemas/V2EventQuestionRejected"
  23921. },
  23922. {
  23923. "$ref": "#/components/schemas/V2EventSessionCompacted"
  23924. },
  23925. {
  23926. "$ref": "#/components/schemas/V2EventVcsBranchUpdated"
  23927. },
  23928. {
  23929. "$ref": "#/components/schemas/V2EventWorkspaceReady"
  23930. },
  23931. {
  23932. "$ref": "#/components/schemas/V2EventWorkspaceFailed"
  23933. },
  23934. {
  23935. "$ref": "#/components/schemas/V2EventWorkspaceStatus"
  23936. },
  23937. {
  23938. "$ref": "#/components/schemas/V2EventWorktreeReady"
  23939. },
  23940. {
  23941. "$ref": "#/components/schemas/V2EventWorktreeFailed"
  23942. },
  23943. {
  23944. "$ref": "#/components/schemas/V2EventServerConnected"
  23945. },
  23946. {
  23947. "$ref": "#/components/schemas/V2EventGlobalDisposed"
  23948. }
  23949. ]
  23950. },
  23951. "ForbiddenError": {
  23952. "type": "object",
  23953. "properties": {
  23954. "_tag": {
  23955. "type": "string",
  23956. "enum": ["ForbiddenError"]
  23957. },
  23958. "message": {
  23959. "type": "string"
  23960. }
  23961. },
  23962. "required": ["_tag", "message"],
  23963. "additionalProperties": false
  23964. },
  23965. "ProjectCopyError": {
  23966. "type": "object",
  23967. "properties": {
  23968. "name": {
  23969. "type": "string",
  23970. "enum": ["ProjectCopyError"]
  23971. },
  23972. "data": {
  23973. "type": "object",
  23974. "properties": {
  23975. "message": {
  23976. "type": "string"
  23977. },
  23978. "forceRequired": {
  23979. "type": "boolean"
  23980. }
  23981. },
  23982. "required": ["message"],
  23983. "additionalProperties": false
  23984. }
  23985. },
  23986. "required": ["name", "data"],
  23987. "additionalProperties": false
  23988. },
  23989. "effect_HttpApiError_Forbidden": {
  23990. "type": "object",
  23991. "properties": {
  23992. "_tag": {
  23993. "type": "string",
  23994. "enum": ["Forbidden"]
  23995. }
  23996. },
  23997. "required": ["_tag"],
  23998. "additionalProperties": false
  23999. },
  24000. "Event.tui.prompt.append": {
  24001. "type": "object",
  24002. "properties": {
  24003. "id": {
  24004. "type": "string",
  24005. "pattern": "^evt_"
  24006. },
  24007. "type": {
  24008. "type": "string",
  24009. "enum": ["tui.prompt.append"]
  24010. },
  24011. "properties": {
  24012. "type": "object",
  24013. "properties": {
  24014. "text": {
  24015. "type": "string"
  24016. }
  24017. },
  24018. "required": ["text"],
  24019. "additionalProperties": false
  24020. }
  24021. },
  24022. "required": ["id", "type", "properties"],
  24023. "additionalProperties": false
  24024. },
  24025. "Event.tui.command.execute": {
  24026. "type": "object",
  24027. "properties": {
  24028. "id": {
  24029. "type": "string",
  24030. "pattern": "^evt_"
  24031. },
  24032. "type": {
  24033. "type": "string",
  24034. "enum": ["tui.command.execute"]
  24035. },
  24036. "properties": {
  24037. "type": "object",
  24038. "properties": {
  24039. "command": {
  24040. "anyOf": [
  24041. {
  24042. "type": "string",
  24043. "enum": [
  24044. "session.list",
  24045. "session.new",
  24046. "session.share",
  24047. "session.interrupt",
  24048. "session.compact",
  24049. "session.page.up",
  24050. "session.page.down",
  24051. "session.line.up",
  24052. "session.line.down",
  24053. "session.half.page.up",
  24054. "session.half.page.down",
  24055. "session.first",
  24056. "session.last",
  24057. "prompt.clear",
  24058. "prompt.submit",
  24059. "agent.cycle"
  24060. ]
  24061. },
  24062. {
  24063. "type": "string"
  24064. }
  24065. ]
  24066. }
  24067. },
  24068. "required": ["command"],
  24069. "additionalProperties": false
  24070. }
  24071. },
  24072. "required": ["id", "type", "properties"],
  24073. "additionalProperties": false
  24074. },
  24075. "Event.tui.toast.show": {
  24076. "type": "object",
  24077. "properties": {
  24078. "id": {
  24079. "type": "string",
  24080. "pattern": "^evt_"
  24081. },
  24082. "type": {
  24083. "type": "string",
  24084. "enum": ["tui.toast.show"]
  24085. },
  24086. "properties": {
  24087. "type": "object",
  24088. "properties": {
  24089. "title": {
  24090. "type": "string"
  24091. },
  24092. "message": {
  24093. "type": "string"
  24094. },
  24095. "variant": {
  24096. "type": "string",
  24097. "enum": ["info", "success", "warning", "error"]
  24098. },
  24099. "duration": {
  24100. "type": "integer",
  24101. "exclusiveMinimum": 0
  24102. }
  24103. },
  24104. "required": ["message", "variant"],
  24105. "additionalProperties": false
  24106. }
  24107. },
  24108. "required": ["id", "type", "properties"],
  24109. "additionalProperties": false
  24110. },
  24111. "Event.tui.session.select": {
  24112. "type": "object",
  24113. "properties": {
  24114. "id": {
  24115. "type": "string",
  24116. "pattern": "^evt_"
  24117. },
  24118. "type": {
  24119. "type": "string",
  24120. "enum": ["tui.session.select"]
  24121. },
  24122. "properties": {
  24123. "type": "object",
  24124. "properties": {
  24125. "sessionID": {
  24126. "type": "string",
  24127. "pattern": "^ses",
  24128. "description": "Session ID to navigate to"
  24129. }
  24130. },
  24131. "required": ["sessionID"],
  24132. "additionalProperties": false
  24133. }
  24134. },
  24135. "required": ["id", "type", "properties"],
  24136. "additionalProperties": false
  24137. },
  24138. "CredentialValue": {
  24139. "anyOf": [
  24140. {
  24141. "$ref": "#/components/schemas/CredentialOAuth"
  24142. },
  24143. {
  24144. "$ref": "#/components/schemas/CredentialKey"
  24145. }
  24146. ]
  24147. },
  24148. "IntegrationInputs": {
  24149. "type": "object",
  24150. "additionalProperties": {
  24151. "type": "string"
  24152. }
  24153. },
  24154. "IntegrationMethod": {
  24155. "anyOf": [
  24156. {
  24157. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24158. },
  24159. {
  24160. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24161. },
  24162. {
  24163. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24164. }
  24165. ]
  24166. },
  24167. "IntegrationRef": {
  24168. "type": "object",
  24169. "properties": {
  24170. "id": {
  24171. "type": "string"
  24172. },
  24173. "name": {
  24174. "type": "string"
  24175. }
  24176. },
  24177. "required": ["id", "name"],
  24178. "additionalProperties": false
  24179. },
  24180. "SkillV2Source": {
  24181. "anyOf": [
  24182. {
  24183. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24184. },
  24185. {
  24186. "$ref": "#/components/schemas/SkillV2UrlSource"
  24187. },
  24188. {
  24189. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24190. }
  24191. ]
  24192. },
  24193. "MoveSessionDestination": {
  24194. "type": "object",
  24195. "properties": {
  24196. "directory": {
  24197. "type": "string"
  24198. }
  24199. },
  24200. "required": ["directory"],
  24201. "additionalProperties": false
  24202. },
  24203. "LocationRef": {
  24204. "type": "object",
  24205. "properties": {
  24206. "directory": {
  24207. "type": "string"
  24208. },
  24209. "workspaceID": {
  24210. "type": "string",
  24211. "pattern": "^wrk"
  24212. }
  24213. },
  24214. "required": ["directory"],
  24215. "additionalProperties": false
  24216. },
  24217. "PromptSource": {
  24218. "type": "object",
  24219. "properties": {
  24220. "start": {
  24221. "type": "number"
  24222. },
  24223. "end": {
  24224. "type": "number"
  24225. },
  24226. "text": {
  24227. "type": "string"
  24228. }
  24229. },
  24230. "required": ["start", "end", "text"],
  24231. "additionalProperties": false
  24232. },
  24233. "PromptFileAttachment": {
  24234. "type": "object",
  24235. "properties": {
  24236. "uri": {
  24237. "type": "string"
  24238. },
  24239. "mime": {
  24240. "type": "string"
  24241. },
  24242. "name": {
  24243. "type": "string"
  24244. },
  24245. "description": {
  24246. "type": "string"
  24247. },
  24248. "source": {
  24249. "$ref": "#/components/schemas/PromptSource"
  24250. }
  24251. },
  24252. "required": ["uri", "mime"],
  24253. "additionalProperties": false
  24254. },
  24255. "PromptAgentAttachment": {
  24256. "type": "object",
  24257. "properties": {
  24258. "name": {
  24259. "type": "string"
  24260. },
  24261. "source": {
  24262. "$ref": "#/components/schemas/PromptSource"
  24263. }
  24264. },
  24265. "required": ["name"],
  24266. "additionalProperties": false
  24267. },
  24268. "SessionErrorUnknown": {
  24269. "type": "object",
  24270. "properties": {
  24271. "type": {
  24272. "type": "string",
  24273. "enum": ["unknown"]
  24274. },
  24275. "message": {
  24276. "type": "string"
  24277. }
  24278. },
  24279. "required": ["type", "message"],
  24280. "additionalProperties": false
  24281. },
  24282. "ToolTextContent": {
  24283. "type": "object",
  24284. "properties": {
  24285. "type": {
  24286. "type": "string",
  24287. "enum": ["text"]
  24288. },
  24289. "text": {
  24290. "type": "string"
  24291. }
  24292. },
  24293. "required": ["type", "text"],
  24294. "additionalProperties": false
  24295. },
  24296. "ToolFileContent": {
  24297. "type": "object",
  24298. "properties": {
  24299. "type": {
  24300. "type": "string",
  24301. "enum": ["file"]
  24302. },
  24303. "uri": {
  24304. "type": "string"
  24305. },
  24306. "mime": {
  24307. "type": "string"
  24308. },
  24309. "name": {
  24310. "type": "string"
  24311. }
  24312. },
  24313. "required": ["type", "uri", "mime"],
  24314. "additionalProperties": false
  24315. },
  24316. "SessionNextRetry_error": {
  24317. "type": "object",
  24318. "properties": {
  24319. "message": {
  24320. "type": "string"
  24321. },
  24322. "statusCode": {
  24323. "type": "number"
  24324. },
  24325. "isRetryable": {
  24326. "type": "boolean"
  24327. },
  24328. "responseHeaders": {
  24329. "type": "object",
  24330. "additionalProperties": {
  24331. "type": "string"
  24332. }
  24333. },
  24334. "responseBody": {
  24335. "type": "string"
  24336. },
  24337. "metadata": {
  24338. "type": "object",
  24339. "additionalProperties": {
  24340. "type": "string"
  24341. }
  24342. }
  24343. },
  24344. "required": ["message", "isRetryable"],
  24345. "additionalProperties": false
  24346. },
  24347. "FileDiff": {
  24348. "type": "object",
  24349. "properties": {
  24350. "path": {
  24351. "type": "string"
  24352. },
  24353. "status": {
  24354. "type": "string",
  24355. "enum": ["added", "modified", "deleted"]
  24356. },
  24357. "additions": {
  24358. "type": "integer",
  24359. "minimum": 0
  24360. },
  24361. "deletions": {
  24362. "type": "integer",
  24363. "minimum": 0
  24364. },
  24365. "patch": {
  24366. "type": "string"
  24367. }
  24368. },
  24369. "required": ["path", "status", "additions", "deletions", "patch"],
  24370. "additionalProperties": false
  24371. },
  24372. "PermissionV2Source": {
  24373. "type": "object",
  24374. "properties": {
  24375. "type": {
  24376. "type": "string",
  24377. "enum": ["tool"]
  24378. },
  24379. "messageID": {
  24380. "type": "string"
  24381. },
  24382. "callID": {
  24383. "type": "string"
  24384. }
  24385. },
  24386. "required": ["type", "messageID", "callID"],
  24387. "additionalProperties": false
  24388. },
  24389. "PermissionV2Reply": {
  24390. "type": "string",
  24391. "enum": ["once", "always", "reject"]
  24392. },
  24393. "QuestionV2Option": {
  24394. "type": "object",
  24395. "properties": {
  24396. "label": {
  24397. "type": "string",
  24398. "description": "Display text (1-5 words, concise)"
  24399. },
  24400. "description": {
  24401. "type": "string",
  24402. "description": "Explanation of choice"
  24403. }
  24404. },
  24405. "required": ["label", "description"],
  24406. "additionalProperties": false
  24407. },
  24408. "QuestionV2Info": {
  24409. "type": "object",
  24410. "properties": {
  24411. "question": {
  24412. "type": "string",
  24413. "description": "Complete question"
  24414. },
  24415. "header": {
  24416. "type": "string",
  24417. "description": "Very short label (max 30 chars)"
  24418. },
  24419. "options": {
  24420. "type": "array",
  24421. "items": {
  24422. "$ref": "#/components/schemas/QuestionV2Option"
  24423. },
  24424. "description": "Available choices"
  24425. },
  24426. "multiple": {
  24427. "type": "boolean"
  24428. },
  24429. "custom": {
  24430. "type": "boolean"
  24431. }
  24432. },
  24433. "required": ["question", "header", "options"],
  24434. "additionalProperties": false
  24435. },
  24436. "QuestionV2Tool": {
  24437. "type": "object",
  24438. "properties": {
  24439. "messageID": {
  24440. "type": "string"
  24441. },
  24442. "callID": {
  24443. "type": "string"
  24444. }
  24445. },
  24446. "required": ["messageID", "callID"],
  24447. "additionalProperties": false
  24448. },
  24449. "QuestionV2Answer": {
  24450. "type": "array",
  24451. "items": {
  24452. "type": "string"
  24453. }
  24454. },
  24455. "EventServerInstanceDisposed": {
  24456. "type": "object",
  24457. "properties": {
  24458. "id": {
  24459. "type": "string"
  24460. },
  24461. "type": {
  24462. "type": "string",
  24463. "enum": ["server.instance.disposed"]
  24464. },
  24465. "properties": {
  24466. "type": "object",
  24467. "properties": {
  24468. "directory": {
  24469. "type": "string"
  24470. }
  24471. },
  24472. "required": ["directory"],
  24473. "additionalProperties": false
  24474. }
  24475. },
  24476. "required": ["id", "type", "properties"],
  24477. "additionalProperties": false
  24478. },
  24479. "SyncEventSessionCreated": {
  24480. "type": "object",
  24481. "properties": {
  24482. "type": {
  24483. "type": "string",
  24484. "enum": ["sync"]
  24485. },
  24486. "id": {
  24487. "type": "string",
  24488. "pattern": "^evt_"
  24489. },
  24490. "syncEvent": {
  24491. "type": "object",
  24492. "properties": {
  24493. "type": {
  24494. "type": "string",
  24495. "enum": ["session.created.1"]
  24496. },
  24497. "id": {
  24498. "type": "string",
  24499. "pattern": "^evt_"
  24500. },
  24501. "seq": {
  24502. "type": "number"
  24503. },
  24504. "aggregateID": {
  24505. "type": "string"
  24506. },
  24507. "data": {
  24508. "type": "object",
  24509. "properties": {
  24510. "sessionID": {
  24511. "type": "string",
  24512. "pattern": "^ses"
  24513. },
  24514. "info": {
  24515. "$ref": "#/components/schemas/Session"
  24516. }
  24517. },
  24518. "required": ["sessionID", "info"],
  24519. "additionalProperties": false
  24520. }
  24521. },
  24522. "required": ["type", "id", "seq", "aggregateID", "data"],
  24523. "additionalProperties": false
  24524. }
  24525. },
  24526. "required": ["type", "id", "syncEvent"],
  24527. "additionalProperties": false
  24528. },
  24529. "SyncEventSessionUpdated": {
  24530. "type": "object",
  24531. "properties": {
  24532. "type": {
  24533. "type": "string",
  24534. "enum": ["sync"]
  24535. },
  24536. "id": {
  24537. "type": "string",
  24538. "pattern": "^evt_"
  24539. },
  24540. "syncEvent": {
  24541. "type": "object",
  24542. "properties": {
  24543. "type": {
  24544. "type": "string",
  24545. "enum": ["session.updated.1"]
  24546. },
  24547. "id": {
  24548. "type": "string",
  24549. "pattern": "^evt_"
  24550. },
  24551. "seq": {
  24552. "type": "number"
  24553. },
  24554. "aggregateID": {
  24555. "type": "string"
  24556. },
  24557. "data": {
  24558. "type": "object",
  24559. "properties": {
  24560. "sessionID": {
  24561. "type": "string",
  24562. "pattern": "^ses"
  24563. },
  24564. "info": {
  24565. "$ref": "#/components/schemas/Session"
  24566. }
  24567. },
  24568. "required": ["sessionID", "info"],
  24569. "additionalProperties": false
  24570. }
  24571. },
  24572. "required": ["type", "id", "seq", "aggregateID", "data"],
  24573. "additionalProperties": false
  24574. }
  24575. },
  24576. "required": ["type", "id", "syncEvent"],
  24577. "additionalProperties": false
  24578. },
  24579. "SyncEventSessionDeleted": {
  24580. "type": "object",
  24581. "properties": {
  24582. "type": {
  24583. "type": "string",
  24584. "enum": ["sync"]
  24585. },
  24586. "id": {
  24587. "type": "string",
  24588. "pattern": "^evt_"
  24589. },
  24590. "syncEvent": {
  24591. "type": "object",
  24592. "properties": {
  24593. "type": {
  24594. "type": "string",
  24595. "enum": ["session.deleted.1"]
  24596. },
  24597. "id": {
  24598. "type": "string",
  24599. "pattern": "^evt_"
  24600. },
  24601. "seq": {
  24602. "type": "number"
  24603. },
  24604. "aggregateID": {
  24605. "type": "string"
  24606. },
  24607. "data": {
  24608. "type": "object",
  24609. "properties": {
  24610. "sessionID": {
  24611. "type": "string",
  24612. "pattern": "^ses"
  24613. },
  24614. "info": {
  24615. "$ref": "#/components/schemas/Session"
  24616. }
  24617. },
  24618. "required": ["sessionID", "info"],
  24619. "additionalProperties": false
  24620. }
  24621. },
  24622. "required": ["type", "id", "seq", "aggregateID", "data"],
  24623. "additionalProperties": false
  24624. }
  24625. },
  24626. "required": ["type", "id", "syncEvent"],
  24627. "additionalProperties": false
  24628. },
  24629. "SyncEventMessageUpdated": {
  24630. "type": "object",
  24631. "properties": {
  24632. "type": {
  24633. "type": "string",
  24634. "enum": ["sync"]
  24635. },
  24636. "id": {
  24637. "type": "string",
  24638. "pattern": "^evt_"
  24639. },
  24640. "syncEvent": {
  24641. "type": "object",
  24642. "properties": {
  24643. "type": {
  24644. "type": "string",
  24645. "enum": ["message.updated.1"]
  24646. },
  24647. "id": {
  24648. "type": "string",
  24649. "pattern": "^evt_"
  24650. },
  24651. "seq": {
  24652. "type": "number"
  24653. },
  24654. "aggregateID": {
  24655. "type": "string"
  24656. },
  24657. "data": {
  24658. "type": "object",
  24659. "properties": {
  24660. "sessionID": {
  24661. "type": "string",
  24662. "pattern": "^ses"
  24663. },
  24664. "info": {
  24665. "$ref": "#/components/schemas/Message"
  24666. }
  24667. },
  24668. "required": ["sessionID", "info"],
  24669. "additionalProperties": false
  24670. }
  24671. },
  24672. "required": ["type", "id", "seq", "aggregateID", "data"],
  24673. "additionalProperties": false
  24674. }
  24675. },
  24676. "required": ["type", "id", "syncEvent"],
  24677. "additionalProperties": false
  24678. },
  24679. "SyncEventMessageRemoved": {
  24680. "type": "object",
  24681. "properties": {
  24682. "type": {
  24683. "type": "string",
  24684. "enum": ["sync"]
  24685. },
  24686. "id": {
  24687. "type": "string",
  24688. "pattern": "^evt_"
  24689. },
  24690. "syncEvent": {
  24691. "type": "object",
  24692. "properties": {
  24693. "type": {
  24694. "type": "string",
  24695. "enum": ["message.removed.1"]
  24696. },
  24697. "id": {
  24698. "type": "string",
  24699. "pattern": "^evt_"
  24700. },
  24701. "seq": {
  24702. "type": "number"
  24703. },
  24704. "aggregateID": {
  24705. "type": "string"
  24706. },
  24707. "data": {
  24708. "type": "object",
  24709. "properties": {
  24710. "sessionID": {
  24711. "type": "string",
  24712. "pattern": "^ses"
  24713. },
  24714. "messageID": {
  24715. "type": "string",
  24716. "pattern": "^msg"
  24717. }
  24718. },
  24719. "required": ["sessionID", "messageID"],
  24720. "additionalProperties": false
  24721. }
  24722. },
  24723. "required": ["type", "id", "seq", "aggregateID", "data"],
  24724. "additionalProperties": false
  24725. }
  24726. },
  24727. "required": ["type", "id", "syncEvent"],
  24728. "additionalProperties": false
  24729. },
  24730. "SyncEventMessagePartUpdated": {
  24731. "type": "object",
  24732. "properties": {
  24733. "type": {
  24734. "type": "string",
  24735. "enum": ["sync"]
  24736. },
  24737. "id": {
  24738. "type": "string",
  24739. "pattern": "^evt_"
  24740. },
  24741. "syncEvent": {
  24742. "type": "object",
  24743. "properties": {
  24744. "type": {
  24745. "type": "string",
  24746. "enum": ["message.part.updated.1"]
  24747. },
  24748. "id": {
  24749. "type": "string",
  24750. "pattern": "^evt_"
  24751. },
  24752. "seq": {
  24753. "type": "number"
  24754. },
  24755. "aggregateID": {
  24756. "type": "string"
  24757. },
  24758. "data": {
  24759. "type": "object",
  24760. "properties": {
  24761. "sessionID": {
  24762. "type": "string",
  24763. "pattern": "^ses"
  24764. },
  24765. "part": {
  24766. "$ref": "#/components/schemas/Part"
  24767. },
  24768. "time": {
  24769. "type": "number"
  24770. }
  24771. },
  24772. "required": ["sessionID", "part", "time"],
  24773. "additionalProperties": false
  24774. }
  24775. },
  24776. "required": ["type", "id", "seq", "aggregateID", "data"],
  24777. "additionalProperties": false
  24778. }
  24779. },
  24780. "required": ["type", "id", "syncEvent"],
  24781. "additionalProperties": false
  24782. },
  24783. "SyncEventMessagePartRemoved": {
  24784. "type": "object",
  24785. "properties": {
  24786. "type": {
  24787. "type": "string",
  24788. "enum": ["sync"]
  24789. },
  24790. "id": {
  24791. "type": "string",
  24792. "pattern": "^evt_"
  24793. },
  24794. "syncEvent": {
  24795. "type": "object",
  24796. "properties": {
  24797. "type": {
  24798. "type": "string",
  24799. "enum": ["message.part.removed.1"]
  24800. },
  24801. "id": {
  24802. "type": "string",
  24803. "pattern": "^evt_"
  24804. },
  24805. "seq": {
  24806. "type": "number"
  24807. },
  24808. "aggregateID": {
  24809. "type": "string"
  24810. },
  24811. "data": {
  24812. "type": "object",
  24813. "properties": {
  24814. "sessionID": {
  24815. "type": "string",
  24816. "pattern": "^ses"
  24817. },
  24818. "messageID": {
  24819. "type": "string",
  24820. "pattern": "^msg"
  24821. },
  24822. "partID": {
  24823. "type": "string",
  24824. "pattern": "^prt"
  24825. }
  24826. },
  24827. "required": ["sessionID", "messageID", "partID"],
  24828. "additionalProperties": false
  24829. }
  24830. },
  24831. "required": ["type", "id", "seq", "aggregateID", "data"],
  24832. "additionalProperties": false
  24833. }
  24834. },
  24835. "required": ["type", "id", "syncEvent"],
  24836. "additionalProperties": false
  24837. },
  24838. "SyncEventSessionNextAgentSwitched": {
  24839. "type": "object",
  24840. "properties": {
  24841. "type": {
  24842. "type": "string",
  24843. "enum": ["sync"]
  24844. },
  24845. "id": {
  24846. "type": "string",
  24847. "pattern": "^evt_"
  24848. },
  24849. "syncEvent": {
  24850. "type": "object",
  24851. "properties": {
  24852. "type": {
  24853. "type": "string",
  24854. "enum": ["session.next.agent.switched.1"]
  24855. },
  24856. "id": {
  24857. "type": "string",
  24858. "pattern": "^evt_"
  24859. },
  24860. "seq": {
  24861. "type": "number"
  24862. },
  24863. "aggregateID": {
  24864. "type": "string"
  24865. },
  24866. "data": {
  24867. "type": "object",
  24868. "properties": {
  24869. "timestamp": {
  24870. "type": "number"
  24871. },
  24872. "sessionID": {
  24873. "type": "string",
  24874. "pattern": "^ses"
  24875. },
  24876. "messageID": {
  24877. "type": "string",
  24878. "pattern": "^msg_"
  24879. },
  24880. "agent": {
  24881. "type": "string"
  24882. }
  24883. },
  24884. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24885. "additionalProperties": false
  24886. }
  24887. },
  24888. "required": ["type", "id", "seq", "aggregateID", "data"],
  24889. "additionalProperties": false
  24890. }
  24891. },
  24892. "required": ["type", "id", "syncEvent"],
  24893. "additionalProperties": false
  24894. },
  24895. "SyncEventSessionNextModelSwitched": {
  24896. "type": "object",
  24897. "properties": {
  24898. "type": {
  24899. "type": "string",
  24900. "enum": ["sync"]
  24901. },
  24902. "id": {
  24903. "type": "string",
  24904. "pattern": "^evt_"
  24905. },
  24906. "syncEvent": {
  24907. "type": "object",
  24908. "properties": {
  24909. "type": {
  24910. "type": "string",
  24911. "enum": ["session.next.model.switched.1"]
  24912. },
  24913. "id": {
  24914. "type": "string",
  24915. "pattern": "^evt_"
  24916. },
  24917. "seq": {
  24918. "type": "number"
  24919. },
  24920. "aggregateID": {
  24921. "type": "string"
  24922. },
  24923. "data": {
  24924. "type": "object",
  24925. "properties": {
  24926. "timestamp": {
  24927. "type": "number"
  24928. },
  24929. "sessionID": {
  24930. "type": "string",
  24931. "pattern": "^ses"
  24932. },
  24933. "messageID": {
  24934. "type": "string",
  24935. "pattern": "^msg_"
  24936. },
  24937. "model": {
  24938. "type": "object",
  24939. "properties": {
  24940. "id": {
  24941. "type": "string"
  24942. },
  24943. "providerID": {
  24944. "type": "string"
  24945. },
  24946. "variant": {
  24947. "type": "string"
  24948. }
  24949. },
  24950. "required": ["id", "providerID"],
  24951. "additionalProperties": false
  24952. }
  24953. },
  24954. "required": ["timestamp", "sessionID", "messageID", "model"],
  24955. "additionalProperties": false
  24956. }
  24957. },
  24958. "required": ["type", "id", "seq", "aggregateID", "data"],
  24959. "additionalProperties": false
  24960. }
  24961. },
  24962. "required": ["type", "id", "syncEvent"],
  24963. "additionalProperties": false
  24964. },
  24965. "SyncEventSessionNextMoved": {
  24966. "type": "object",
  24967. "properties": {
  24968. "type": {
  24969. "type": "string",
  24970. "enum": ["sync"]
  24971. },
  24972. "id": {
  24973. "type": "string",
  24974. "pattern": "^evt_"
  24975. },
  24976. "syncEvent": {
  24977. "type": "object",
  24978. "properties": {
  24979. "type": {
  24980. "type": "string",
  24981. "enum": ["session.next.moved.1"]
  24982. },
  24983. "id": {
  24984. "type": "string",
  24985. "pattern": "^evt_"
  24986. },
  24987. "seq": {
  24988. "type": "number"
  24989. },
  24990. "aggregateID": {
  24991. "type": "string"
  24992. },
  24993. "data": {
  24994. "type": "object",
  24995. "properties": {
  24996. "timestamp": {
  24997. "type": "number"
  24998. },
  24999. "sessionID": {
  25000. "type": "string",
  25001. "pattern": "^ses"
  25002. },
  25003. "location": {
  25004. "$ref": "#/components/schemas/LocationRef"
  25005. },
  25006. "subdirectory": {
  25007. "type": "string"
  25008. }
  25009. },
  25010. "required": ["timestamp", "sessionID", "location"],
  25011. "additionalProperties": false
  25012. }
  25013. },
  25014. "required": ["type", "id", "seq", "aggregateID", "data"],
  25015. "additionalProperties": false
  25016. }
  25017. },
  25018. "required": ["type", "id", "syncEvent"],
  25019. "additionalProperties": false
  25020. },
  25021. "SyncEventSessionNextPrompted": {
  25022. "type": "object",
  25023. "properties": {
  25024. "type": {
  25025. "type": "string",
  25026. "enum": ["sync"]
  25027. },
  25028. "id": {
  25029. "type": "string",
  25030. "pattern": "^evt_"
  25031. },
  25032. "syncEvent": {
  25033. "type": "object",
  25034. "properties": {
  25035. "type": {
  25036. "type": "string",
  25037. "enum": ["session.next.prompted.1"]
  25038. },
  25039. "id": {
  25040. "type": "string",
  25041. "pattern": "^evt_"
  25042. },
  25043. "seq": {
  25044. "type": "number"
  25045. },
  25046. "aggregateID": {
  25047. "type": "string"
  25048. },
  25049. "data": {
  25050. "type": "object",
  25051. "properties": {
  25052. "timestamp": {
  25053. "type": "number"
  25054. },
  25055. "sessionID": {
  25056. "type": "string",
  25057. "pattern": "^ses"
  25058. },
  25059. "messageID": {
  25060. "type": "string",
  25061. "pattern": "^msg_"
  25062. },
  25063. "prompt": {
  25064. "$ref": "#/components/schemas/Prompt"
  25065. },
  25066. "delivery": {
  25067. "type": "string",
  25068. "enum": ["steer", "queue"]
  25069. }
  25070. },
  25071. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25072. "additionalProperties": false
  25073. }
  25074. },
  25075. "required": ["type", "id", "seq", "aggregateID", "data"],
  25076. "additionalProperties": false
  25077. }
  25078. },
  25079. "required": ["type", "id", "syncEvent"],
  25080. "additionalProperties": false
  25081. },
  25082. "SyncEventSessionNextPromptAdmitted": {
  25083. "type": "object",
  25084. "properties": {
  25085. "type": {
  25086. "type": "string",
  25087. "enum": ["sync"]
  25088. },
  25089. "id": {
  25090. "type": "string",
  25091. "pattern": "^evt_"
  25092. },
  25093. "syncEvent": {
  25094. "type": "object",
  25095. "properties": {
  25096. "type": {
  25097. "type": "string",
  25098. "enum": ["session.next.prompt.admitted.1"]
  25099. },
  25100. "id": {
  25101. "type": "string",
  25102. "pattern": "^evt_"
  25103. },
  25104. "seq": {
  25105. "type": "number"
  25106. },
  25107. "aggregateID": {
  25108. "type": "string"
  25109. },
  25110. "data": {
  25111. "type": "object",
  25112. "properties": {
  25113. "timestamp": {
  25114. "type": "number"
  25115. },
  25116. "sessionID": {
  25117. "type": "string",
  25118. "pattern": "^ses"
  25119. },
  25120. "messageID": {
  25121. "type": "string",
  25122. "pattern": "^msg_"
  25123. },
  25124. "prompt": {
  25125. "$ref": "#/components/schemas/Prompt"
  25126. },
  25127. "delivery": {
  25128. "type": "string",
  25129. "enum": ["steer", "queue"]
  25130. }
  25131. },
  25132. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25133. "additionalProperties": false
  25134. }
  25135. },
  25136. "required": ["type", "id", "seq", "aggregateID", "data"],
  25137. "additionalProperties": false
  25138. }
  25139. },
  25140. "required": ["type", "id", "syncEvent"],
  25141. "additionalProperties": false
  25142. },
  25143. "SyncEventSessionNextContextUpdated": {
  25144. "type": "object",
  25145. "properties": {
  25146. "type": {
  25147. "type": "string",
  25148. "enum": ["sync"]
  25149. },
  25150. "id": {
  25151. "type": "string",
  25152. "pattern": "^evt_"
  25153. },
  25154. "syncEvent": {
  25155. "type": "object",
  25156. "properties": {
  25157. "type": {
  25158. "type": "string",
  25159. "enum": ["session.next.context.updated.1"]
  25160. },
  25161. "id": {
  25162. "type": "string",
  25163. "pattern": "^evt_"
  25164. },
  25165. "seq": {
  25166. "type": "number"
  25167. },
  25168. "aggregateID": {
  25169. "type": "string"
  25170. },
  25171. "data": {
  25172. "type": "object",
  25173. "properties": {
  25174. "timestamp": {
  25175. "type": "number"
  25176. },
  25177. "sessionID": {
  25178. "type": "string",
  25179. "pattern": "^ses"
  25180. },
  25181. "messageID": {
  25182. "type": "string",
  25183. "pattern": "^msg_"
  25184. },
  25185. "text": {
  25186. "type": "string"
  25187. }
  25188. },
  25189. "required": ["timestamp", "sessionID", "messageID", "text"],
  25190. "additionalProperties": false
  25191. }
  25192. },
  25193. "required": ["type", "id", "seq", "aggregateID", "data"],
  25194. "additionalProperties": false
  25195. }
  25196. },
  25197. "required": ["type", "id", "syncEvent"],
  25198. "additionalProperties": false
  25199. },
  25200. "SyncEventSessionNextSynthetic": {
  25201. "type": "object",
  25202. "properties": {
  25203. "type": {
  25204. "type": "string",
  25205. "enum": ["sync"]
  25206. },
  25207. "id": {
  25208. "type": "string",
  25209. "pattern": "^evt_"
  25210. },
  25211. "syncEvent": {
  25212. "type": "object",
  25213. "properties": {
  25214. "type": {
  25215. "type": "string",
  25216. "enum": ["session.next.synthetic.1"]
  25217. },
  25218. "id": {
  25219. "type": "string",
  25220. "pattern": "^evt_"
  25221. },
  25222. "seq": {
  25223. "type": "number"
  25224. },
  25225. "aggregateID": {
  25226. "type": "string"
  25227. },
  25228. "data": {
  25229. "type": "object",
  25230. "properties": {
  25231. "timestamp": {
  25232. "type": "number"
  25233. },
  25234. "sessionID": {
  25235. "type": "string",
  25236. "pattern": "^ses"
  25237. },
  25238. "messageID": {
  25239. "type": "string",
  25240. "pattern": "^msg_"
  25241. },
  25242. "text": {
  25243. "type": "string"
  25244. }
  25245. },
  25246. "required": ["timestamp", "sessionID", "messageID", "text"],
  25247. "additionalProperties": false
  25248. }
  25249. },
  25250. "required": ["type", "id", "seq", "aggregateID", "data"],
  25251. "additionalProperties": false
  25252. }
  25253. },
  25254. "required": ["type", "id", "syncEvent"],
  25255. "additionalProperties": false
  25256. },
  25257. "SyncEventSessionNextShellStarted": {
  25258. "type": "object",
  25259. "properties": {
  25260. "type": {
  25261. "type": "string",
  25262. "enum": ["sync"]
  25263. },
  25264. "id": {
  25265. "type": "string",
  25266. "pattern": "^evt_"
  25267. },
  25268. "syncEvent": {
  25269. "type": "object",
  25270. "properties": {
  25271. "type": {
  25272. "type": "string",
  25273. "enum": ["session.next.shell.started.1"]
  25274. },
  25275. "id": {
  25276. "type": "string",
  25277. "pattern": "^evt_"
  25278. },
  25279. "seq": {
  25280. "type": "number"
  25281. },
  25282. "aggregateID": {
  25283. "type": "string"
  25284. },
  25285. "data": {
  25286. "type": "object",
  25287. "properties": {
  25288. "timestamp": {
  25289. "type": "number"
  25290. },
  25291. "sessionID": {
  25292. "type": "string",
  25293. "pattern": "^ses"
  25294. },
  25295. "messageID": {
  25296. "type": "string",
  25297. "pattern": "^msg_"
  25298. },
  25299. "callID": {
  25300. "type": "string"
  25301. },
  25302. "command": {
  25303. "type": "string"
  25304. }
  25305. },
  25306. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25307. "additionalProperties": false
  25308. }
  25309. },
  25310. "required": ["type", "id", "seq", "aggregateID", "data"],
  25311. "additionalProperties": false
  25312. }
  25313. },
  25314. "required": ["type", "id", "syncEvent"],
  25315. "additionalProperties": false
  25316. },
  25317. "SyncEventSessionNextShellEnded": {
  25318. "type": "object",
  25319. "properties": {
  25320. "type": {
  25321. "type": "string",
  25322. "enum": ["sync"]
  25323. },
  25324. "id": {
  25325. "type": "string",
  25326. "pattern": "^evt_"
  25327. },
  25328. "syncEvent": {
  25329. "type": "object",
  25330. "properties": {
  25331. "type": {
  25332. "type": "string",
  25333. "enum": ["session.next.shell.ended.1"]
  25334. },
  25335. "id": {
  25336. "type": "string",
  25337. "pattern": "^evt_"
  25338. },
  25339. "seq": {
  25340. "type": "number"
  25341. },
  25342. "aggregateID": {
  25343. "type": "string"
  25344. },
  25345. "data": {
  25346. "type": "object",
  25347. "properties": {
  25348. "timestamp": {
  25349. "type": "number"
  25350. },
  25351. "sessionID": {
  25352. "type": "string",
  25353. "pattern": "^ses"
  25354. },
  25355. "callID": {
  25356. "type": "string"
  25357. },
  25358. "output": {
  25359. "type": "string"
  25360. }
  25361. },
  25362. "required": ["timestamp", "sessionID", "callID", "output"],
  25363. "additionalProperties": false
  25364. }
  25365. },
  25366. "required": ["type", "id", "seq", "aggregateID", "data"],
  25367. "additionalProperties": false
  25368. }
  25369. },
  25370. "required": ["type", "id", "syncEvent"],
  25371. "additionalProperties": false
  25372. },
  25373. "SyncEventSessionNextStepStarted": {
  25374. "type": "object",
  25375. "properties": {
  25376. "type": {
  25377. "type": "string",
  25378. "enum": ["sync"]
  25379. },
  25380. "id": {
  25381. "type": "string",
  25382. "pattern": "^evt_"
  25383. },
  25384. "syncEvent": {
  25385. "type": "object",
  25386. "properties": {
  25387. "type": {
  25388. "type": "string",
  25389. "enum": ["session.next.step.started.1"]
  25390. },
  25391. "id": {
  25392. "type": "string",
  25393. "pattern": "^evt_"
  25394. },
  25395. "seq": {
  25396. "type": "number"
  25397. },
  25398. "aggregateID": {
  25399. "type": "string"
  25400. },
  25401. "data": {
  25402. "type": "object",
  25403. "properties": {
  25404. "timestamp": {
  25405. "type": "number"
  25406. },
  25407. "sessionID": {
  25408. "type": "string",
  25409. "pattern": "^ses"
  25410. },
  25411. "assistantMessageID": {
  25412. "type": "string",
  25413. "pattern": "^msg_"
  25414. },
  25415. "agent": {
  25416. "type": "string"
  25417. },
  25418. "model": {
  25419. "type": "object",
  25420. "properties": {
  25421. "id": {
  25422. "type": "string"
  25423. },
  25424. "providerID": {
  25425. "type": "string"
  25426. },
  25427. "variant": {
  25428. "type": "string"
  25429. }
  25430. },
  25431. "required": ["id", "providerID"],
  25432. "additionalProperties": false
  25433. },
  25434. "snapshot": {
  25435. "type": "string"
  25436. }
  25437. },
  25438. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25439. "additionalProperties": false
  25440. }
  25441. },
  25442. "required": ["type", "id", "seq", "aggregateID", "data"],
  25443. "additionalProperties": false
  25444. }
  25445. },
  25446. "required": ["type", "id", "syncEvent"],
  25447. "additionalProperties": false
  25448. },
  25449. "SyncEventSessionNextStepEnded": {
  25450. "type": "object",
  25451. "properties": {
  25452. "type": {
  25453. "type": "string",
  25454. "enum": ["sync"]
  25455. },
  25456. "id": {
  25457. "type": "string",
  25458. "pattern": "^evt_"
  25459. },
  25460. "syncEvent": {
  25461. "type": "object",
  25462. "properties": {
  25463. "type": {
  25464. "type": "string",
  25465. "enum": ["session.next.step.ended.2"]
  25466. },
  25467. "id": {
  25468. "type": "string",
  25469. "pattern": "^evt_"
  25470. },
  25471. "seq": {
  25472. "type": "number"
  25473. },
  25474. "aggregateID": {
  25475. "type": "string"
  25476. },
  25477. "data": {
  25478. "type": "object",
  25479. "properties": {
  25480. "timestamp": {
  25481. "type": "number"
  25482. },
  25483. "sessionID": {
  25484. "type": "string",
  25485. "pattern": "^ses"
  25486. },
  25487. "assistantMessageID": {
  25488. "type": "string",
  25489. "pattern": "^msg_"
  25490. },
  25491. "finish": {
  25492. "type": "string"
  25493. },
  25494. "cost": {
  25495. "type": "number"
  25496. },
  25497. "tokens": {
  25498. "type": "object",
  25499. "properties": {
  25500. "input": {
  25501. "type": "number"
  25502. },
  25503. "output": {
  25504. "type": "number"
  25505. },
  25506. "reasoning": {
  25507. "type": "number"
  25508. },
  25509. "cache": {
  25510. "type": "object",
  25511. "properties": {
  25512. "read": {
  25513. "type": "number"
  25514. },
  25515. "write": {
  25516. "type": "number"
  25517. }
  25518. },
  25519. "required": ["read", "write"],
  25520. "additionalProperties": false
  25521. }
  25522. },
  25523. "required": ["input", "output", "reasoning", "cache"],
  25524. "additionalProperties": false
  25525. },
  25526. "snapshot": {
  25527. "type": "string"
  25528. },
  25529. "files": {
  25530. "type": "array",
  25531. "items": {
  25532. "type": "string"
  25533. }
  25534. }
  25535. },
  25536. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25537. "additionalProperties": false
  25538. }
  25539. },
  25540. "required": ["type", "id", "seq", "aggregateID", "data"],
  25541. "additionalProperties": false
  25542. }
  25543. },
  25544. "required": ["type", "id", "syncEvent"],
  25545. "additionalProperties": false
  25546. },
  25547. "SyncEventSessionNextStepFailed": {
  25548. "type": "object",
  25549. "properties": {
  25550. "type": {
  25551. "type": "string",
  25552. "enum": ["sync"]
  25553. },
  25554. "id": {
  25555. "type": "string",
  25556. "pattern": "^evt_"
  25557. },
  25558. "syncEvent": {
  25559. "type": "object",
  25560. "properties": {
  25561. "type": {
  25562. "type": "string",
  25563. "enum": ["session.next.step.failed.2"]
  25564. },
  25565. "id": {
  25566. "type": "string",
  25567. "pattern": "^evt_"
  25568. },
  25569. "seq": {
  25570. "type": "number"
  25571. },
  25572. "aggregateID": {
  25573. "type": "string"
  25574. },
  25575. "data": {
  25576. "type": "object",
  25577. "properties": {
  25578. "timestamp": {
  25579. "type": "number"
  25580. },
  25581. "sessionID": {
  25582. "type": "string",
  25583. "pattern": "^ses"
  25584. },
  25585. "assistantMessageID": {
  25586. "type": "string",
  25587. "pattern": "^msg_"
  25588. },
  25589. "error": {
  25590. "$ref": "#/components/schemas/SessionErrorUnknown"
  25591. }
  25592. },
  25593. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25594. "additionalProperties": false
  25595. }
  25596. },
  25597. "required": ["type", "id", "seq", "aggregateID", "data"],
  25598. "additionalProperties": false
  25599. }
  25600. },
  25601. "required": ["type", "id", "syncEvent"],
  25602. "additionalProperties": false
  25603. },
  25604. "SyncEventSessionNextTextStarted": {
  25605. "type": "object",
  25606. "properties": {
  25607. "type": {
  25608. "type": "string",
  25609. "enum": ["sync"]
  25610. },
  25611. "id": {
  25612. "type": "string",
  25613. "pattern": "^evt_"
  25614. },
  25615. "syncEvent": {
  25616. "type": "object",
  25617. "properties": {
  25618. "type": {
  25619. "type": "string",
  25620. "enum": ["session.next.text.started.1"]
  25621. },
  25622. "id": {
  25623. "type": "string",
  25624. "pattern": "^evt_"
  25625. },
  25626. "seq": {
  25627. "type": "number"
  25628. },
  25629. "aggregateID": {
  25630. "type": "string"
  25631. },
  25632. "data": {
  25633. "type": "object",
  25634. "properties": {
  25635. "timestamp": {
  25636. "type": "number"
  25637. },
  25638. "sessionID": {
  25639. "type": "string",
  25640. "pattern": "^ses"
  25641. },
  25642. "assistantMessageID": {
  25643. "type": "string",
  25644. "pattern": "^msg_"
  25645. },
  25646. "textID": {
  25647. "type": "string"
  25648. }
  25649. },
  25650. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25651. "additionalProperties": false
  25652. }
  25653. },
  25654. "required": ["type", "id", "seq", "aggregateID", "data"],
  25655. "additionalProperties": false
  25656. }
  25657. },
  25658. "required": ["type", "id", "syncEvent"],
  25659. "additionalProperties": false
  25660. },
  25661. "SyncEventSessionNextTextEnded": {
  25662. "type": "object",
  25663. "properties": {
  25664. "type": {
  25665. "type": "string",
  25666. "enum": ["sync"]
  25667. },
  25668. "id": {
  25669. "type": "string",
  25670. "pattern": "^evt_"
  25671. },
  25672. "syncEvent": {
  25673. "type": "object",
  25674. "properties": {
  25675. "type": {
  25676. "type": "string",
  25677. "enum": ["session.next.text.ended.1"]
  25678. },
  25679. "id": {
  25680. "type": "string",
  25681. "pattern": "^evt_"
  25682. },
  25683. "seq": {
  25684. "type": "number"
  25685. },
  25686. "aggregateID": {
  25687. "type": "string"
  25688. },
  25689. "data": {
  25690. "type": "object",
  25691. "properties": {
  25692. "timestamp": {
  25693. "type": "number"
  25694. },
  25695. "sessionID": {
  25696. "type": "string",
  25697. "pattern": "^ses"
  25698. },
  25699. "assistantMessageID": {
  25700. "type": "string",
  25701. "pattern": "^msg_"
  25702. },
  25703. "textID": {
  25704. "type": "string"
  25705. },
  25706. "text": {
  25707. "type": "string"
  25708. }
  25709. },
  25710. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25711. "additionalProperties": false
  25712. }
  25713. },
  25714. "required": ["type", "id", "seq", "aggregateID", "data"],
  25715. "additionalProperties": false
  25716. }
  25717. },
  25718. "required": ["type", "id", "syncEvent"],
  25719. "additionalProperties": false
  25720. },
  25721. "SyncEventSessionNextReasoningStarted": {
  25722. "type": "object",
  25723. "properties": {
  25724. "type": {
  25725. "type": "string",
  25726. "enum": ["sync"]
  25727. },
  25728. "id": {
  25729. "type": "string",
  25730. "pattern": "^evt_"
  25731. },
  25732. "syncEvent": {
  25733. "type": "object",
  25734. "properties": {
  25735. "type": {
  25736. "type": "string",
  25737. "enum": ["session.next.reasoning.started.1"]
  25738. },
  25739. "id": {
  25740. "type": "string",
  25741. "pattern": "^evt_"
  25742. },
  25743. "seq": {
  25744. "type": "number"
  25745. },
  25746. "aggregateID": {
  25747. "type": "string"
  25748. },
  25749. "data": {
  25750. "type": "object",
  25751. "properties": {
  25752. "timestamp": {
  25753. "type": "number"
  25754. },
  25755. "sessionID": {
  25756. "type": "string",
  25757. "pattern": "^ses"
  25758. },
  25759. "assistantMessageID": {
  25760. "type": "string",
  25761. "pattern": "^msg_"
  25762. },
  25763. "reasoningID": {
  25764. "type": "string"
  25765. },
  25766. "providerMetadata": {
  25767. "type": "object",
  25768. "additionalProperties": {
  25769. "type": "object"
  25770. }
  25771. }
  25772. },
  25773. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25774. "additionalProperties": false
  25775. }
  25776. },
  25777. "required": ["type", "id", "seq", "aggregateID", "data"],
  25778. "additionalProperties": false
  25779. }
  25780. },
  25781. "required": ["type", "id", "syncEvent"],
  25782. "additionalProperties": false
  25783. },
  25784. "SyncEventSessionNextReasoningEnded": {
  25785. "type": "object",
  25786. "properties": {
  25787. "type": {
  25788. "type": "string",
  25789. "enum": ["sync"]
  25790. },
  25791. "id": {
  25792. "type": "string",
  25793. "pattern": "^evt_"
  25794. },
  25795. "syncEvent": {
  25796. "type": "object",
  25797. "properties": {
  25798. "type": {
  25799. "type": "string",
  25800. "enum": ["session.next.reasoning.ended.1"]
  25801. },
  25802. "id": {
  25803. "type": "string",
  25804. "pattern": "^evt_"
  25805. },
  25806. "seq": {
  25807. "type": "number"
  25808. },
  25809. "aggregateID": {
  25810. "type": "string"
  25811. },
  25812. "data": {
  25813. "type": "object",
  25814. "properties": {
  25815. "timestamp": {
  25816. "type": "number"
  25817. },
  25818. "sessionID": {
  25819. "type": "string",
  25820. "pattern": "^ses"
  25821. },
  25822. "assistantMessageID": {
  25823. "type": "string",
  25824. "pattern": "^msg_"
  25825. },
  25826. "reasoningID": {
  25827. "type": "string"
  25828. },
  25829. "text": {
  25830. "type": "string"
  25831. },
  25832. "providerMetadata": {
  25833. "type": "object",
  25834. "additionalProperties": {
  25835. "type": "object"
  25836. }
  25837. }
  25838. },
  25839. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25840. "additionalProperties": false
  25841. }
  25842. },
  25843. "required": ["type", "id", "seq", "aggregateID", "data"],
  25844. "additionalProperties": false
  25845. }
  25846. },
  25847. "required": ["type", "id", "syncEvent"],
  25848. "additionalProperties": false
  25849. },
  25850. "SyncEventSessionNextToolInputStarted": {
  25851. "type": "object",
  25852. "properties": {
  25853. "type": {
  25854. "type": "string",
  25855. "enum": ["sync"]
  25856. },
  25857. "id": {
  25858. "type": "string",
  25859. "pattern": "^evt_"
  25860. },
  25861. "syncEvent": {
  25862. "type": "object",
  25863. "properties": {
  25864. "type": {
  25865. "type": "string",
  25866. "enum": ["session.next.tool.input.started.1"]
  25867. },
  25868. "id": {
  25869. "type": "string",
  25870. "pattern": "^evt_"
  25871. },
  25872. "seq": {
  25873. "type": "number"
  25874. },
  25875. "aggregateID": {
  25876. "type": "string"
  25877. },
  25878. "data": {
  25879. "type": "object",
  25880. "properties": {
  25881. "timestamp": {
  25882. "type": "number"
  25883. },
  25884. "sessionID": {
  25885. "type": "string",
  25886. "pattern": "^ses"
  25887. },
  25888. "assistantMessageID": {
  25889. "type": "string",
  25890. "pattern": "^msg_"
  25891. },
  25892. "callID": {
  25893. "type": "string"
  25894. },
  25895. "name": {
  25896. "type": "string"
  25897. }
  25898. },
  25899. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25900. "additionalProperties": false
  25901. }
  25902. },
  25903. "required": ["type", "id", "seq", "aggregateID", "data"],
  25904. "additionalProperties": false
  25905. }
  25906. },
  25907. "required": ["type", "id", "syncEvent"],
  25908. "additionalProperties": false
  25909. },
  25910. "SyncEventSessionNextToolInputEnded": {
  25911. "type": "object",
  25912. "properties": {
  25913. "type": {
  25914. "type": "string",
  25915. "enum": ["sync"]
  25916. },
  25917. "id": {
  25918. "type": "string",
  25919. "pattern": "^evt_"
  25920. },
  25921. "syncEvent": {
  25922. "type": "object",
  25923. "properties": {
  25924. "type": {
  25925. "type": "string",
  25926. "enum": ["session.next.tool.input.ended.1"]
  25927. },
  25928. "id": {
  25929. "type": "string",
  25930. "pattern": "^evt_"
  25931. },
  25932. "seq": {
  25933. "type": "number"
  25934. },
  25935. "aggregateID": {
  25936. "type": "string"
  25937. },
  25938. "data": {
  25939. "type": "object",
  25940. "properties": {
  25941. "timestamp": {
  25942. "type": "number"
  25943. },
  25944. "sessionID": {
  25945. "type": "string",
  25946. "pattern": "^ses"
  25947. },
  25948. "assistantMessageID": {
  25949. "type": "string",
  25950. "pattern": "^msg_"
  25951. },
  25952. "callID": {
  25953. "type": "string"
  25954. },
  25955. "text": {
  25956. "type": "string"
  25957. }
  25958. },
  25959. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25960. "additionalProperties": false
  25961. }
  25962. },
  25963. "required": ["type", "id", "seq", "aggregateID", "data"],
  25964. "additionalProperties": false
  25965. }
  25966. },
  25967. "required": ["type", "id", "syncEvent"],
  25968. "additionalProperties": false
  25969. },
  25970. "SyncEventSessionNextToolCalled": {
  25971. "type": "object",
  25972. "properties": {
  25973. "type": {
  25974. "type": "string",
  25975. "enum": ["sync"]
  25976. },
  25977. "id": {
  25978. "type": "string",
  25979. "pattern": "^evt_"
  25980. },
  25981. "syncEvent": {
  25982. "type": "object",
  25983. "properties": {
  25984. "type": {
  25985. "type": "string",
  25986. "enum": ["session.next.tool.called.1"]
  25987. },
  25988. "id": {
  25989. "type": "string",
  25990. "pattern": "^evt_"
  25991. },
  25992. "seq": {
  25993. "type": "number"
  25994. },
  25995. "aggregateID": {
  25996. "type": "string"
  25997. },
  25998. "data": {
  25999. "type": "object",
  26000. "properties": {
  26001. "timestamp": {
  26002. "type": "number"
  26003. },
  26004. "sessionID": {
  26005. "type": "string",
  26006. "pattern": "^ses"
  26007. },
  26008. "assistantMessageID": {
  26009. "type": "string",
  26010. "pattern": "^msg_"
  26011. },
  26012. "callID": {
  26013. "type": "string"
  26014. },
  26015. "tool": {
  26016. "type": "string"
  26017. },
  26018. "input": {
  26019. "type": "object"
  26020. },
  26021. "provider": {
  26022. "type": "object",
  26023. "properties": {
  26024. "executed": {
  26025. "type": "boolean"
  26026. },
  26027. "metadata": {
  26028. "type": "object",
  26029. "additionalProperties": {
  26030. "type": "object"
  26031. }
  26032. }
  26033. },
  26034. "required": ["executed"],
  26035. "additionalProperties": false
  26036. }
  26037. },
  26038. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26039. "additionalProperties": false
  26040. }
  26041. },
  26042. "required": ["type", "id", "seq", "aggregateID", "data"],
  26043. "additionalProperties": false
  26044. }
  26045. },
  26046. "required": ["type", "id", "syncEvent"],
  26047. "additionalProperties": false
  26048. },
  26049. "SyncEventSessionNextToolProgress": {
  26050. "type": "object",
  26051. "properties": {
  26052. "type": {
  26053. "type": "string",
  26054. "enum": ["sync"]
  26055. },
  26056. "id": {
  26057. "type": "string",
  26058. "pattern": "^evt_"
  26059. },
  26060. "syncEvent": {
  26061. "type": "object",
  26062. "properties": {
  26063. "type": {
  26064. "type": "string",
  26065. "enum": ["session.next.tool.progress.1"]
  26066. },
  26067. "id": {
  26068. "type": "string",
  26069. "pattern": "^evt_"
  26070. },
  26071. "seq": {
  26072. "type": "number"
  26073. },
  26074. "aggregateID": {
  26075. "type": "string"
  26076. },
  26077. "data": {
  26078. "type": "object",
  26079. "properties": {
  26080. "timestamp": {
  26081. "type": "number"
  26082. },
  26083. "sessionID": {
  26084. "type": "string",
  26085. "pattern": "^ses"
  26086. },
  26087. "assistantMessageID": {
  26088. "type": "string",
  26089. "pattern": "^msg_"
  26090. },
  26091. "callID": {
  26092. "type": "string"
  26093. },
  26094. "structured": {
  26095. "type": "object"
  26096. },
  26097. "content": {
  26098. "type": "array",
  26099. "items": {
  26100. "anyOf": [
  26101. {
  26102. "$ref": "#/components/schemas/ToolTextContent"
  26103. },
  26104. {
  26105. "$ref": "#/components/schemas/ToolFileContent"
  26106. }
  26107. ]
  26108. }
  26109. }
  26110. },
  26111. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26112. "additionalProperties": false
  26113. }
  26114. },
  26115. "required": ["type", "id", "seq", "aggregateID", "data"],
  26116. "additionalProperties": false
  26117. }
  26118. },
  26119. "required": ["type", "id", "syncEvent"],
  26120. "additionalProperties": false
  26121. },
  26122. "SyncEventSessionNextToolSuccess": {
  26123. "type": "object",
  26124. "properties": {
  26125. "type": {
  26126. "type": "string",
  26127. "enum": ["sync"]
  26128. },
  26129. "id": {
  26130. "type": "string",
  26131. "pattern": "^evt_"
  26132. },
  26133. "syncEvent": {
  26134. "type": "object",
  26135. "properties": {
  26136. "type": {
  26137. "type": "string",
  26138. "enum": ["session.next.tool.success.1"]
  26139. },
  26140. "id": {
  26141. "type": "string",
  26142. "pattern": "^evt_"
  26143. },
  26144. "seq": {
  26145. "type": "number"
  26146. },
  26147. "aggregateID": {
  26148. "type": "string"
  26149. },
  26150. "data": {
  26151. "type": "object",
  26152. "properties": {
  26153. "timestamp": {
  26154. "type": "number"
  26155. },
  26156. "sessionID": {
  26157. "type": "string",
  26158. "pattern": "^ses"
  26159. },
  26160. "assistantMessageID": {
  26161. "type": "string",
  26162. "pattern": "^msg_"
  26163. },
  26164. "callID": {
  26165. "type": "string"
  26166. },
  26167. "structured": {
  26168. "type": "object"
  26169. },
  26170. "content": {
  26171. "type": "array",
  26172. "items": {
  26173. "anyOf": [
  26174. {
  26175. "$ref": "#/components/schemas/ToolTextContent"
  26176. },
  26177. {
  26178. "$ref": "#/components/schemas/ToolFileContent"
  26179. }
  26180. ]
  26181. }
  26182. },
  26183. "outputPaths": {
  26184. "type": "array",
  26185. "items": {
  26186. "type": "string"
  26187. }
  26188. },
  26189. "result": {},
  26190. "provider": {
  26191. "type": "object",
  26192. "properties": {
  26193. "executed": {
  26194. "type": "boolean"
  26195. },
  26196. "metadata": {
  26197. "type": "object",
  26198. "additionalProperties": {
  26199. "type": "object"
  26200. }
  26201. }
  26202. },
  26203. "required": ["executed"],
  26204. "additionalProperties": false
  26205. }
  26206. },
  26207. "required": [
  26208. "timestamp",
  26209. "sessionID",
  26210. "assistantMessageID",
  26211. "callID",
  26212. "structured",
  26213. "content",
  26214. "provider"
  26215. ],
  26216. "additionalProperties": false
  26217. }
  26218. },
  26219. "required": ["type", "id", "seq", "aggregateID", "data"],
  26220. "additionalProperties": false
  26221. }
  26222. },
  26223. "required": ["type", "id", "syncEvent"],
  26224. "additionalProperties": false
  26225. },
  26226. "SyncEventSessionNextToolFailed": {
  26227. "type": "object",
  26228. "properties": {
  26229. "type": {
  26230. "type": "string",
  26231. "enum": ["sync"]
  26232. },
  26233. "id": {
  26234. "type": "string",
  26235. "pattern": "^evt_"
  26236. },
  26237. "syncEvent": {
  26238. "type": "object",
  26239. "properties": {
  26240. "type": {
  26241. "type": "string",
  26242. "enum": ["session.next.tool.failed.1"]
  26243. },
  26244. "id": {
  26245. "type": "string",
  26246. "pattern": "^evt_"
  26247. },
  26248. "seq": {
  26249. "type": "number"
  26250. },
  26251. "aggregateID": {
  26252. "type": "string"
  26253. },
  26254. "data": {
  26255. "type": "object",
  26256. "properties": {
  26257. "timestamp": {
  26258. "type": "number"
  26259. },
  26260. "sessionID": {
  26261. "type": "string",
  26262. "pattern": "^ses"
  26263. },
  26264. "assistantMessageID": {
  26265. "type": "string",
  26266. "pattern": "^msg_"
  26267. },
  26268. "callID": {
  26269. "type": "string"
  26270. },
  26271. "error": {
  26272. "$ref": "#/components/schemas/SessionErrorUnknown"
  26273. },
  26274. "result": {},
  26275. "provider": {
  26276. "type": "object",
  26277. "properties": {
  26278. "executed": {
  26279. "type": "boolean"
  26280. },
  26281. "metadata": {
  26282. "type": "object",
  26283. "additionalProperties": {
  26284. "type": "object"
  26285. }
  26286. }
  26287. },
  26288. "required": ["executed"],
  26289. "additionalProperties": false
  26290. }
  26291. },
  26292. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26293. "additionalProperties": false
  26294. }
  26295. },
  26296. "required": ["type", "id", "seq", "aggregateID", "data"],
  26297. "additionalProperties": false
  26298. }
  26299. },
  26300. "required": ["type", "id", "syncEvent"],
  26301. "additionalProperties": false
  26302. },
  26303. "SyncEventSessionNextRetried": {
  26304. "type": "object",
  26305. "properties": {
  26306. "type": {
  26307. "type": "string",
  26308. "enum": ["sync"]
  26309. },
  26310. "id": {
  26311. "type": "string",
  26312. "pattern": "^evt_"
  26313. },
  26314. "syncEvent": {
  26315. "type": "object",
  26316. "properties": {
  26317. "type": {
  26318. "type": "string",
  26319. "enum": ["session.next.retried.1"]
  26320. },
  26321. "id": {
  26322. "type": "string",
  26323. "pattern": "^evt_"
  26324. },
  26325. "seq": {
  26326. "type": "number"
  26327. },
  26328. "aggregateID": {
  26329. "type": "string"
  26330. },
  26331. "data": {
  26332. "type": "object",
  26333. "properties": {
  26334. "timestamp": {
  26335. "type": "number"
  26336. },
  26337. "sessionID": {
  26338. "type": "string",
  26339. "pattern": "^ses"
  26340. },
  26341. "attempt": {
  26342. "type": "number"
  26343. },
  26344. "error": {
  26345. "$ref": "#/components/schemas/SessionNextRetry_error"
  26346. }
  26347. },
  26348. "required": ["timestamp", "sessionID", "attempt", "error"],
  26349. "additionalProperties": false
  26350. }
  26351. },
  26352. "required": ["type", "id", "seq", "aggregateID", "data"],
  26353. "additionalProperties": false
  26354. }
  26355. },
  26356. "required": ["type", "id", "syncEvent"],
  26357. "additionalProperties": false
  26358. },
  26359. "SyncEventSessionNextCompactionStarted": {
  26360. "type": "object",
  26361. "properties": {
  26362. "type": {
  26363. "type": "string",
  26364. "enum": ["sync"]
  26365. },
  26366. "id": {
  26367. "type": "string",
  26368. "pattern": "^evt_"
  26369. },
  26370. "syncEvent": {
  26371. "type": "object",
  26372. "properties": {
  26373. "type": {
  26374. "type": "string",
  26375. "enum": ["session.next.compaction.started.1"]
  26376. },
  26377. "id": {
  26378. "type": "string",
  26379. "pattern": "^evt_"
  26380. },
  26381. "seq": {
  26382. "type": "number"
  26383. },
  26384. "aggregateID": {
  26385. "type": "string"
  26386. },
  26387. "data": {
  26388. "type": "object",
  26389. "properties": {
  26390. "timestamp": {
  26391. "type": "number"
  26392. },
  26393. "sessionID": {
  26394. "type": "string",
  26395. "pattern": "^ses"
  26396. },
  26397. "messageID": {
  26398. "type": "string",
  26399. "pattern": "^msg_"
  26400. },
  26401. "reason": {
  26402. "type": "string",
  26403. "enum": ["auto", "manual"]
  26404. }
  26405. },
  26406. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26407. "additionalProperties": false
  26408. }
  26409. },
  26410. "required": ["type", "id", "seq", "aggregateID", "data"],
  26411. "additionalProperties": false
  26412. }
  26413. },
  26414. "required": ["type", "id", "syncEvent"],
  26415. "additionalProperties": false
  26416. },
  26417. "SyncEventSessionNextCompactionEnded": {
  26418. "type": "object",
  26419. "properties": {
  26420. "type": {
  26421. "type": "string",
  26422. "enum": ["sync"]
  26423. },
  26424. "id": {
  26425. "type": "string",
  26426. "pattern": "^evt_"
  26427. },
  26428. "syncEvent": {
  26429. "type": "object",
  26430. "properties": {
  26431. "type": {
  26432. "type": "string",
  26433. "enum": ["session.next.compaction.ended.1"]
  26434. },
  26435. "id": {
  26436. "type": "string",
  26437. "pattern": "^evt_"
  26438. },
  26439. "seq": {
  26440. "type": "number"
  26441. },
  26442. "aggregateID": {
  26443. "type": "string"
  26444. },
  26445. "data": {
  26446. "type": "object",
  26447. "properties": {
  26448. "timestamp": {
  26449. "type": "number"
  26450. },
  26451. "sessionID": {
  26452. "type": "string",
  26453. "pattern": "^ses"
  26454. },
  26455. "messageID": {
  26456. "type": "string",
  26457. "pattern": "^msg_"
  26458. },
  26459. "reason": {
  26460. "type": "string",
  26461. "enum": ["auto", "manual"]
  26462. },
  26463. "text": {
  26464. "type": "string"
  26465. },
  26466. "recent": {
  26467. "type": "string"
  26468. }
  26469. },
  26470. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26471. "additionalProperties": false
  26472. }
  26473. },
  26474. "required": ["type", "id", "seq", "aggregateID", "data"],
  26475. "additionalProperties": false
  26476. }
  26477. },
  26478. "required": ["type", "id", "syncEvent"],
  26479. "additionalProperties": false
  26480. },
  26481. "SyncEventSessionNextRevertStaged": {
  26482. "type": "object",
  26483. "properties": {
  26484. "type": {
  26485. "type": "string",
  26486. "enum": ["sync"]
  26487. },
  26488. "id": {
  26489. "type": "string",
  26490. "pattern": "^evt_"
  26491. },
  26492. "syncEvent": {
  26493. "type": "object",
  26494. "properties": {
  26495. "type": {
  26496. "type": "string",
  26497. "enum": ["session.next.revert.staged.1"]
  26498. },
  26499. "id": {
  26500. "type": "string",
  26501. "pattern": "^evt_"
  26502. },
  26503. "seq": {
  26504. "type": "number"
  26505. },
  26506. "aggregateID": {
  26507. "type": "string"
  26508. },
  26509. "data": {
  26510. "type": "object",
  26511. "properties": {
  26512. "timestamp": {
  26513. "type": "number"
  26514. },
  26515. "sessionID": {
  26516. "type": "string",
  26517. "pattern": "^ses"
  26518. },
  26519. "revert": {
  26520. "type": "object",
  26521. "properties": {
  26522. "messageID": {
  26523. "type": "string",
  26524. "pattern": "^msg_"
  26525. },
  26526. "partID": {
  26527. "type": "string"
  26528. },
  26529. "snapshot": {
  26530. "type": "string"
  26531. },
  26532. "diff": {
  26533. "type": "string"
  26534. },
  26535. "files": {
  26536. "type": "array",
  26537. "items": {
  26538. "$ref": "#/components/schemas/FileDiff"
  26539. }
  26540. }
  26541. },
  26542. "required": ["messageID"],
  26543. "additionalProperties": false
  26544. }
  26545. },
  26546. "required": ["timestamp", "sessionID", "revert"],
  26547. "additionalProperties": false
  26548. }
  26549. },
  26550. "required": ["type", "id", "seq", "aggregateID", "data"],
  26551. "additionalProperties": false
  26552. }
  26553. },
  26554. "required": ["type", "id", "syncEvent"],
  26555. "additionalProperties": false
  26556. },
  26557. "SyncEventSessionNextRevertCleared": {
  26558. "type": "object",
  26559. "properties": {
  26560. "type": {
  26561. "type": "string",
  26562. "enum": ["sync"]
  26563. },
  26564. "id": {
  26565. "type": "string",
  26566. "pattern": "^evt_"
  26567. },
  26568. "syncEvent": {
  26569. "type": "object",
  26570. "properties": {
  26571. "type": {
  26572. "type": "string",
  26573. "enum": ["session.next.revert.cleared.1"]
  26574. },
  26575. "id": {
  26576. "type": "string",
  26577. "pattern": "^evt_"
  26578. },
  26579. "seq": {
  26580. "type": "number"
  26581. },
  26582. "aggregateID": {
  26583. "type": "string"
  26584. },
  26585. "data": {
  26586. "type": "object",
  26587. "properties": {
  26588. "timestamp": {
  26589. "type": "number"
  26590. },
  26591. "sessionID": {
  26592. "type": "string",
  26593. "pattern": "^ses"
  26594. }
  26595. },
  26596. "required": ["timestamp", "sessionID"],
  26597. "additionalProperties": false
  26598. }
  26599. },
  26600. "required": ["type", "id", "seq", "aggregateID", "data"],
  26601. "additionalProperties": false
  26602. }
  26603. },
  26604. "required": ["type", "id", "syncEvent"],
  26605. "additionalProperties": false
  26606. },
  26607. "SyncEventSessionNextRevertCommitted": {
  26608. "type": "object",
  26609. "properties": {
  26610. "type": {
  26611. "type": "string",
  26612. "enum": ["sync"]
  26613. },
  26614. "id": {
  26615. "type": "string",
  26616. "pattern": "^evt_"
  26617. },
  26618. "syncEvent": {
  26619. "type": "object",
  26620. "properties": {
  26621. "type": {
  26622. "type": "string",
  26623. "enum": ["session.next.revert.committed.1"]
  26624. },
  26625. "id": {
  26626. "type": "string",
  26627. "pattern": "^evt_"
  26628. },
  26629. "seq": {
  26630. "type": "number"
  26631. },
  26632. "aggregateID": {
  26633. "type": "string"
  26634. },
  26635. "data": {
  26636. "type": "object",
  26637. "properties": {
  26638. "timestamp": {
  26639. "type": "number"
  26640. },
  26641. "sessionID": {
  26642. "type": "string",
  26643. "pattern": "^ses"
  26644. },
  26645. "messageID": {
  26646. "type": "string",
  26647. "pattern": "^msg_"
  26648. }
  26649. },
  26650. "required": ["timestamp", "sessionID", "messageID"],
  26651. "additionalProperties": false
  26652. }
  26653. },
  26654. "required": ["type", "id", "seq", "aggregateID", "data"],
  26655. "additionalProperties": false
  26656. }
  26657. },
  26658. "required": ["type", "id", "syncEvent"],
  26659. "additionalProperties": false
  26660. },
  26661. "ConfigV2ReferenceGit": {
  26662. "type": "object",
  26663. "properties": {
  26664. "repository": {
  26665. "type": "string"
  26666. },
  26667. "branch": {
  26668. "type": "string"
  26669. },
  26670. "description": {
  26671. "type": "string"
  26672. },
  26673. "hidden": {
  26674. "type": "boolean"
  26675. }
  26676. },
  26677. "required": ["repository"],
  26678. "additionalProperties": false
  26679. },
  26680. "ConfigV2ReferenceLocal": {
  26681. "type": "object",
  26682. "properties": {
  26683. "path": {
  26684. "type": "string"
  26685. },
  26686. "description": {
  26687. "type": "string"
  26688. },
  26689. "hidden": {
  26690. "type": "boolean"
  26691. }
  26692. },
  26693. "required": ["path"],
  26694. "additionalProperties": false
  26695. },
  26696. "PolicyEffect": {
  26697. "type": "string",
  26698. "enum": ["allow", "deny"]
  26699. },
  26700. "ConfigV2ExperimentalPolicy": {
  26701. "type": "object",
  26702. "properties": {
  26703. "action": {
  26704. "type": "string",
  26705. "enum": ["provider.use"]
  26706. },
  26707. "effect": {
  26708. "$ref": "#/components/schemas/PolicyEffect"
  26709. },
  26710. "resource": {
  26711. "type": "string"
  26712. }
  26713. },
  26714. "required": ["action", "effect", "resource"],
  26715. "additionalProperties": false
  26716. },
  26717. "ProjectDirectories": {
  26718. "type": "array",
  26719. "items": {
  26720. "type": "object",
  26721. "properties": {
  26722. "directory": {
  26723. "type": "string"
  26724. },
  26725. "strategy": {
  26726. "type": "string"
  26727. }
  26728. },
  26729. "required": ["directory"],
  26730. "additionalProperties": false
  26731. }
  26732. },
  26733. "LocationInfo": {
  26734. "type": "object",
  26735. "properties": {
  26736. "directory": {
  26737. "type": "string"
  26738. },
  26739. "workspaceID": {
  26740. "type": "string",
  26741. "pattern": "^wrk"
  26742. },
  26743. "project": {
  26744. "type": "object",
  26745. "properties": {
  26746. "id": {
  26747. "type": "string"
  26748. },
  26749. "directory": {
  26750. "type": "string"
  26751. }
  26752. },
  26753. "required": ["id", "directory"],
  26754. "additionalProperties": false
  26755. }
  26756. },
  26757. "required": ["directory", "project"],
  26758. "additionalProperties": false
  26759. },
  26760. "PermissionV2Effect": {
  26761. "type": "string",
  26762. "enum": ["allow", "deny", "ask"]
  26763. },
  26764. "PermissionV2Rule": {
  26765. "type": "object",
  26766. "properties": {
  26767. "action": {
  26768. "type": "string"
  26769. },
  26770. "resource": {
  26771. "type": "string"
  26772. },
  26773. "effect": {
  26774. "$ref": "#/components/schemas/PermissionV2Effect"
  26775. }
  26776. },
  26777. "required": ["action", "resource", "effect"],
  26778. "additionalProperties": false
  26779. },
  26780. "PermissionV2Ruleset": {
  26781. "type": "array",
  26782. "items": {
  26783. "$ref": "#/components/schemas/PermissionV2Rule"
  26784. }
  26785. },
  26786. "AgentV2Info": {
  26787. "type": "object",
  26788. "properties": {
  26789. "id": {
  26790. "type": "string"
  26791. },
  26792. "model": {
  26793. "type": "object",
  26794. "properties": {
  26795. "id": {
  26796. "type": "string"
  26797. },
  26798. "providerID": {
  26799. "type": "string"
  26800. },
  26801. "variant": {
  26802. "type": "string"
  26803. }
  26804. },
  26805. "required": ["id", "providerID"],
  26806. "additionalProperties": false
  26807. },
  26808. "request": {
  26809. "type": "object",
  26810. "properties": {
  26811. "headers": {
  26812. "type": "object",
  26813. "additionalProperties": {
  26814. "type": "string"
  26815. }
  26816. },
  26817. "body": {
  26818. "type": "object"
  26819. }
  26820. },
  26821. "required": ["headers", "body"],
  26822. "additionalProperties": false
  26823. },
  26824. "system": {
  26825. "type": "string"
  26826. },
  26827. "description": {
  26828. "type": "string"
  26829. },
  26830. "mode": {
  26831. "type": "string",
  26832. "enum": ["subagent", "primary", "all"]
  26833. },
  26834. "hidden": {
  26835. "type": "boolean"
  26836. },
  26837. "color": {
  26838. "anyOf": [
  26839. {
  26840. "type": "string",
  26841. "pattern": "^#[0-9a-fA-F]{6}$"
  26842. },
  26843. {
  26844. "type": "string",
  26845. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  26846. }
  26847. ]
  26848. },
  26849. "steps": {
  26850. "type": "integer",
  26851. "exclusiveMinimum": 0
  26852. },
  26853. "permissions": {
  26854. "$ref": "#/components/schemas/PermissionV2Ruleset"
  26855. }
  26856. },
  26857. "required": ["id", "request", "mode", "hidden", "permissions"],
  26858. "additionalProperties": false
  26859. },
  26860. "SessionV2Info": {
  26861. "type": "object",
  26862. "properties": {
  26863. "id": {
  26864. "type": "string",
  26865. "pattern": "^ses"
  26866. },
  26867. "parentID": {
  26868. "type": "string",
  26869. "pattern": "^ses"
  26870. },
  26871. "projectID": {
  26872. "type": "string"
  26873. },
  26874. "agent": {
  26875. "type": "string"
  26876. },
  26877. "model": {
  26878. "type": "object",
  26879. "properties": {
  26880. "id": {
  26881. "type": "string"
  26882. },
  26883. "providerID": {
  26884. "type": "string"
  26885. },
  26886. "variant": {
  26887. "type": "string"
  26888. }
  26889. },
  26890. "required": ["id", "providerID"],
  26891. "additionalProperties": false
  26892. },
  26893. "cost": {
  26894. "type": "number"
  26895. },
  26896. "tokens": {
  26897. "type": "object",
  26898. "properties": {
  26899. "input": {
  26900. "type": "number"
  26901. },
  26902. "output": {
  26903. "type": "number"
  26904. },
  26905. "reasoning": {
  26906. "type": "number"
  26907. },
  26908. "cache": {
  26909. "type": "object",
  26910. "properties": {
  26911. "read": {
  26912. "type": "number"
  26913. },
  26914. "write": {
  26915. "type": "number"
  26916. }
  26917. },
  26918. "required": ["read", "write"],
  26919. "additionalProperties": false
  26920. }
  26921. },
  26922. "required": ["input", "output", "reasoning", "cache"],
  26923. "additionalProperties": false
  26924. },
  26925. "time": {
  26926. "type": "object",
  26927. "properties": {
  26928. "created": {
  26929. "type": "number"
  26930. },
  26931. "updated": {
  26932. "type": "number"
  26933. },
  26934. "archived": {
  26935. "type": "number"
  26936. }
  26937. },
  26938. "required": ["created", "updated"],
  26939. "additionalProperties": false
  26940. },
  26941. "title": {
  26942. "type": "string"
  26943. },
  26944. "location": {
  26945. "$ref": "#/components/schemas/LocationRef"
  26946. },
  26947. "subpath": {
  26948. "type": "string"
  26949. },
  26950. "revert": {
  26951. "type": "object",
  26952. "properties": {
  26953. "messageID": {
  26954. "type": "string",
  26955. "pattern": "^msg_"
  26956. },
  26957. "partID": {
  26958. "type": "string"
  26959. },
  26960. "snapshot": {
  26961. "type": "string"
  26962. },
  26963. "diff": {
  26964. "type": "string"
  26965. },
  26966. "files": {
  26967. "type": "array",
  26968. "items": {
  26969. "$ref": "#/components/schemas/FileDiff"
  26970. }
  26971. }
  26972. },
  26973. "required": ["messageID"],
  26974. "additionalProperties": false
  26975. }
  26976. },
  26977. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26978. "additionalProperties": false
  26979. },
  26980. "SessionInputAdmitted": {
  26981. "type": "object",
  26982. "properties": {
  26983. "admittedSeq": {
  26984. "type": "integer",
  26985. "minimum": 0
  26986. },
  26987. "id": {
  26988. "type": "string",
  26989. "pattern": "^msg_"
  26990. },
  26991. "sessionID": {
  26992. "type": "string",
  26993. "pattern": "^ses"
  26994. },
  26995. "prompt": {
  26996. "$ref": "#/components/schemas/Prompt"
  26997. },
  26998. "delivery": {
  26999. "type": "string",
  27000. "enum": ["steer", "queue"]
  27001. },
  27002. "timeCreated": {
  27003. "type": "number"
  27004. },
  27005. "promotedSeq": {
  27006. "type": "integer",
  27007. "minimum": 0
  27008. }
  27009. },
  27010. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27011. "additionalProperties": false
  27012. },
  27013. "SessionMessageAgentSwitched": {
  27014. "type": "object",
  27015. "properties": {
  27016. "id": {
  27017. "type": "string",
  27018. "pattern": "^msg_"
  27019. },
  27020. "metadata": {
  27021. "type": "object"
  27022. },
  27023. "time": {
  27024. "type": "object",
  27025. "properties": {
  27026. "created": {
  27027. "type": "number"
  27028. }
  27029. },
  27030. "required": ["created"],
  27031. "additionalProperties": false
  27032. },
  27033. "type": {
  27034. "type": "string",
  27035. "enum": ["agent-switched"]
  27036. },
  27037. "agent": {
  27038. "type": "string"
  27039. }
  27040. },
  27041. "required": ["id", "time", "type", "agent"],
  27042. "additionalProperties": false
  27043. },
  27044. "SessionMessageModelSwitched": {
  27045. "type": "object",
  27046. "properties": {
  27047. "id": {
  27048. "type": "string",
  27049. "pattern": "^msg_"
  27050. },
  27051. "metadata": {
  27052. "type": "object"
  27053. },
  27054. "time": {
  27055. "type": "object",
  27056. "properties": {
  27057. "created": {
  27058. "type": "number"
  27059. }
  27060. },
  27061. "required": ["created"],
  27062. "additionalProperties": false
  27063. },
  27064. "type": {
  27065. "type": "string",
  27066. "enum": ["model-switched"]
  27067. },
  27068. "model": {
  27069. "type": "object",
  27070. "properties": {
  27071. "id": {
  27072. "type": "string"
  27073. },
  27074. "providerID": {
  27075. "type": "string"
  27076. },
  27077. "variant": {
  27078. "type": "string"
  27079. }
  27080. },
  27081. "required": ["id", "providerID"],
  27082. "additionalProperties": false
  27083. }
  27084. },
  27085. "required": ["id", "time", "type", "model"],
  27086. "additionalProperties": false
  27087. },
  27088. "SessionMessageUser": {
  27089. "type": "object",
  27090. "properties": {
  27091. "id": {
  27092. "type": "string",
  27093. "pattern": "^msg_"
  27094. },
  27095. "metadata": {
  27096. "type": "object"
  27097. },
  27098. "time": {
  27099. "type": "object",
  27100. "properties": {
  27101. "created": {
  27102. "type": "number"
  27103. }
  27104. },
  27105. "required": ["created"],
  27106. "additionalProperties": false
  27107. },
  27108. "text": {
  27109. "type": "string"
  27110. },
  27111. "files": {
  27112. "type": "array",
  27113. "items": {
  27114. "$ref": "#/components/schemas/PromptFileAttachment"
  27115. }
  27116. },
  27117. "agents": {
  27118. "type": "array",
  27119. "items": {
  27120. "$ref": "#/components/schemas/PromptAgentAttachment"
  27121. }
  27122. },
  27123. "type": {
  27124. "type": "string",
  27125. "enum": ["user"]
  27126. }
  27127. },
  27128. "required": ["id", "time", "text", "type"],
  27129. "additionalProperties": false
  27130. },
  27131. "SessionMessageSynthetic": {
  27132. "type": "object",
  27133. "properties": {
  27134. "id": {
  27135. "type": "string",
  27136. "pattern": "^msg_"
  27137. },
  27138. "metadata": {
  27139. "type": "object"
  27140. },
  27141. "time": {
  27142. "type": "object",
  27143. "properties": {
  27144. "created": {
  27145. "type": "number"
  27146. }
  27147. },
  27148. "required": ["created"],
  27149. "additionalProperties": false
  27150. },
  27151. "sessionID": {
  27152. "type": "string",
  27153. "pattern": "^ses"
  27154. },
  27155. "text": {
  27156. "type": "string"
  27157. },
  27158. "type": {
  27159. "type": "string",
  27160. "enum": ["synthetic"]
  27161. }
  27162. },
  27163. "required": ["id", "time", "sessionID", "text", "type"],
  27164. "additionalProperties": false
  27165. },
  27166. "SessionMessageSystem": {
  27167. "type": "object",
  27168. "properties": {
  27169. "id": {
  27170. "type": "string",
  27171. "pattern": "^msg_"
  27172. },
  27173. "metadata": {
  27174. "type": "object"
  27175. },
  27176. "time": {
  27177. "type": "object",
  27178. "properties": {
  27179. "created": {
  27180. "type": "number"
  27181. }
  27182. },
  27183. "required": ["created"],
  27184. "additionalProperties": false
  27185. },
  27186. "type": {
  27187. "type": "string",
  27188. "enum": ["system"]
  27189. },
  27190. "text": {
  27191. "type": "string"
  27192. }
  27193. },
  27194. "required": ["id", "time", "type", "text"],
  27195. "additionalProperties": false
  27196. },
  27197. "SessionMessageShell": {
  27198. "type": "object",
  27199. "properties": {
  27200. "id": {
  27201. "type": "string",
  27202. "pattern": "^msg_"
  27203. },
  27204. "metadata": {
  27205. "type": "object"
  27206. },
  27207. "time": {
  27208. "type": "object",
  27209. "properties": {
  27210. "created": {
  27211. "type": "number"
  27212. },
  27213. "completed": {
  27214. "type": "number"
  27215. }
  27216. },
  27217. "required": ["created"],
  27218. "additionalProperties": false
  27219. },
  27220. "type": {
  27221. "type": "string",
  27222. "enum": ["shell"]
  27223. },
  27224. "callID": {
  27225. "type": "string"
  27226. },
  27227. "command": {
  27228. "type": "string"
  27229. },
  27230. "output": {
  27231. "type": "string"
  27232. }
  27233. },
  27234. "required": ["id", "time", "type", "callID", "command", "output"],
  27235. "additionalProperties": false
  27236. },
  27237. "SessionMessageAssistantText": {
  27238. "type": "object",
  27239. "properties": {
  27240. "type": {
  27241. "type": "string",
  27242. "enum": ["text"]
  27243. },
  27244. "id": {
  27245. "type": "string"
  27246. },
  27247. "text": {
  27248. "type": "string"
  27249. }
  27250. },
  27251. "required": ["type", "id", "text"],
  27252. "additionalProperties": false
  27253. },
  27254. "SessionMessageAssistantReasoning": {
  27255. "type": "object",
  27256. "properties": {
  27257. "type": {
  27258. "type": "string",
  27259. "enum": ["reasoning"]
  27260. },
  27261. "id": {
  27262. "type": "string"
  27263. },
  27264. "text": {
  27265. "type": "string"
  27266. },
  27267. "providerMetadata": {
  27268. "type": "object",
  27269. "additionalProperties": {
  27270. "type": "object"
  27271. }
  27272. }
  27273. },
  27274. "required": ["type", "id", "text"],
  27275. "additionalProperties": false
  27276. },
  27277. "SessionMessageToolStatePending": {
  27278. "type": "object",
  27279. "properties": {
  27280. "status": {
  27281. "type": "string",
  27282. "enum": ["pending"]
  27283. },
  27284. "input": {
  27285. "type": "string"
  27286. }
  27287. },
  27288. "required": ["status", "input"],
  27289. "additionalProperties": false
  27290. },
  27291. "SessionMessageToolStateRunning": {
  27292. "type": "object",
  27293. "properties": {
  27294. "status": {
  27295. "type": "string",
  27296. "enum": ["running"]
  27297. },
  27298. "input": {
  27299. "type": "object"
  27300. },
  27301. "structured": {
  27302. "type": "object"
  27303. },
  27304. "content": {
  27305. "type": "array",
  27306. "items": {
  27307. "anyOf": [
  27308. {
  27309. "$ref": "#/components/schemas/ToolTextContent"
  27310. },
  27311. {
  27312. "$ref": "#/components/schemas/ToolFileContent"
  27313. }
  27314. ]
  27315. }
  27316. }
  27317. },
  27318. "required": ["status", "input", "structured", "content"],
  27319. "additionalProperties": false
  27320. },
  27321. "SessionMessageToolStateCompleted": {
  27322. "type": "object",
  27323. "properties": {
  27324. "status": {
  27325. "type": "string",
  27326. "enum": ["completed"]
  27327. },
  27328. "input": {
  27329. "type": "object"
  27330. },
  27331. "attachments": {
  27332. "type": "array",
  27333. "items": {
  27334. "$ref": "#/components/schemas/PromptFileAttachment"
  27335. }
  27336. },
  27337. "content": {
  27338. "type": "array",
  27339. "items": {
  27340. "anyOf": [
  27341. {
  27342. "$ref": "#/components/schemas/ToolTextContent"
  27343. },
  27344. {
  27345. "$ref": "#/components/schemas/ToolFileContent"
  27346. }
  27347. ]
  27348. }
  27349. },
  27350. "outputPaths": {
  27351. "type": "array",
  27352. "items": {
  27353. "type": "string"
  27354. }
  27355. },
  27356. "structured": {
  27357. "type": "object"
  27358. },
  27359. "result": {}
  27360. },
  27361. "required": ["status", "input", "content", "structured"],
  27362. "additionalProperties": false
  27363. },
  27364. "SessionMessageToolStateError": {
  27365. "type": "object",
  27366. "properties": {
  27367. "status": {
  27368. "type": "string",
  27369. "enum": ["error"]
  27370. },
  27371. "input": {
  27372. "type": "object"
  27373. },
  27374. "content": {
  27375. "type": "array",
  27376. "items": {
  27377. "anyOf": [
  27378. {
  27379. "$ref": "#/components/schemas/ToolTextContent"
  27380. },
  27381. {
  27382. "$ref": "#/components/schemas/ToolFileContent"
  27383. }
  27384. ]
  27385. }
  27386. },
  27387. "structured": {
  27388. "type": "object"
  27389. },
  27390. "error": {
  27391. "$ref": "#/components/schemas/SessionErrorUnknown"
  27392. },
  27393. "result": {}
  27394. },
  27395. "required": ["status", "input", "content", "structured", "error"],
  27396. "additionalProperties": false
  27397. },
  27398. "SessionMessageAssistantTool": {
  27399. "type": "object",
  27400. "properties": {
  27401. "type": {
  27402. "type": "string",
  27403. "enum": ["tool"]
  27404. },
  27405. "id": {
  27406. "type": "string"
  27407. },
  27408. "name": {
  27409. "type": "string"
  27410. },
  27411. "provider": {
  27412. "type": "object",
  27413. "properties": {
  27414. "executed": {
  27415. "type": "boolean"
  27416. },
  27417. "metadata": {
  27418. "type": "object",
  27419. "additionalProperties": {
  27420. "type": "object"
  27421. }
  27422. },
  27423. "resultMetadata": {
  27424. "type": "object",
  27425. "additionalProperties": {
  27426. "type": "object"
  27427. }
  27428. }
  27429. },
  27430. "required": ["executed"],
  27431. "additionalProperties": false
  27432. },
  27433. "state": {
  27434. "anyOf": [
  27435. {
  27436. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27437. },
  27438. {
  27439. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27440. },
  27441. {
  27442. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27443. },
  27444. {
  27445. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27446. }
  27447. ]
  27448. },
  27449. "time": {
  27450. "type": "object",
  27451. "properties": {
  27452. "created": {
  27453. "type": "number"
  27454. },
  27455. "ran": {
  27456. "type": "number"
  27457. },
  27458. "completed": {
  27459. "type": "number"
  27460. },
  27461. "pruned": {
  27462. "type": "number"
  27463. }
  27464. },
  27465. "required": ["created"],
  27466. "additionalProperties": false
  27467. }
  27468. },
  27469. "required": ["type", "id", "name", "state", "time"],
  27470. "additionalProperties": false
  27471. },
  27472. "SessionMessageAssistant": {
  27473. "type": "object",
  27474. "properties": {
  27475. "id": {
  27476. "type": "string",
  27477. "pattern": "^msg_"
  27478. },
  27479. "metadata": {
  27480. "type": "object"
  27481. },
  27482. "time": {
  27483. "type": "object",
  27484. "properties": {
  27485. "created": {
  27486. "type": "number"
  27487. },
  27488. "completed": {
  27489. "type": "number"
  27490. }
  27491. },
  27492. "required": ["created"],
  27493. "additionalProperties": false
  27494. },
  27495. "type": {
  27496. "type": "string",
  27497. "enum": ["assistant"]
  27498. },
  27499. "agent": {
  27500. "type": "string"
  27501. },
  27502. "model": {
  27503. "type": "object",
  27504. "properties": {
  27505. "id": {
  27506. "type": "string"
  27507. },
  27508. "providerID": {
  27509. "type": "string"
  27510. },
  27511. "variant": {
  27512. "type": "string"
  27513. }
  27514. },
  27515. "required": ["id", "providerID"],
  27516. "additionalProperties": false
  27517. },
  27518. "content": {
  27519. "type": "array",
  27520. "items": {
  27521. "anyOf": [
  27522. {
  27523. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27524. },
  27525. {
  27526. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27527. },
  27528. {
  27529. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27530. }
  27531. ]
  27532. }
  27533. },
  27534. "snapshot": {
  27535. "type": "object",
  27536. "properties": {
  27537. "start": {
  27538. "type": "string"
  27539. },
  27540. "end": {
  27541. "type": "string"
  27542. },
  27543. "files": {
  27544. "type": "array",
  27545. "items": {
  27546. "type": "string"
  27547. }
  27548. }
  27549. },
  27550. "additionalProperties": false
  27551. },
  27552. "finish": {
  27553. "type": "string"
  27554. },
  27555. "cost": {
  27556. "type": "number"
  27557. },
  27558. "tokens": {
  27559. "type": "object",
  27560. "properties": {
  27561. "input": {
  27562. "type": "number"
  27563. },
  27564. "output": {
  27565. "type": "number"
  27566. },
  27567. "reasoning": {
  27568. "type": "number"
  27569. },
  27570. "cache": {
  27571. "type": "object",
  27572. "properties": {
  27573. "read": {
  27574. "type": "number"
  27575. },
  27576. "write": {
  27577. "type": "number"
  27578. }
  27579. },
  27580. "required": ["read", "write"],
  27581. "additionalProperties": false
  27582. }
  27583. },
  27584. "required": ["input", "output", "reasoning", "cache"],
  27585. "additionalProperties": false
  27586. },
  27587. "error": {
  27588. "$ref": "#/components/schemas/SessionErrorUnknown"
  27589. }
  27590. },
  27591. "required": ["id", "time", "type", "agent", "model", "content"],
  27592. "additionalProperties": false
  27593. },
  27594. "SessionMessageCompaction": {
  27595. "type": "object",
  27596. "properties": {
  27597. "type": {
  27598. "type": "string",
  27599. "enum": ["compaction"]
  27600. },
  27601. "reason": {
  27602. "type": "string",
  27603. "enum": ["auto", "manual"]
  27604. },
  27605. "summary": {
  27606. "type": "string"
  27607. },
  27608. "recent": {
  27609. "type": "string"
  27610. },
  27611. "id": {
  27612. "type": "string",
  27613. "pattern": "^msg_"
  27614. },
  27615. "metadata": {
  27616. "type": "object"
  27617. },
  27618. "time": {
  27619. "type": "object",
  27620. "properties": {
  27621. "created": {
  27622. "type": "number"
  27623. }
  27624. },
  27625. "required": ["created"],
  27626. "additionalProperties": false
  27627. }
  27628. },
  27629. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27630. "additionalProperties": false
  27631. },
  27632. "SessionMessage": {
  27633. "anyOf": [
  27634. {
  27635. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27636. },
  27637. {
  27638. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27639. },
  27640. {
  27641. "$ref": "#/components/schemas/SessionMessageUser"
  27642. },
  27643. {
  27644. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27645. },
  27646. {
  27647. "$ref": "#/components/schemas/SessionMessageSystem"
  27648. },
  27649. {
  27650. "$ref": "#/components/schemas/SessionMessageShell"
  27651. },
  27652. {
  27653. "$ref": "#/components/schemas/SessionMessageAssistant"
  27654. },
  27655. {
  27656. "$ref": "#/components/schemas/SessionMessageCompaction"
  27657. }
  27658. ]
  27659. },
  27660. "ModelV2Info": {
  27661. "type": "object",
  27662. "properties": {
  27663. "id": {
  27664. "type": "string"
  27665. },
  27666. "providerID": {
  27667. "type": "string"
  27668. },
  27669. "family": {
  27670. "type": "string"
  27671. },
  27672. "name": {
  27673. "type": "string"
  27674. },
  27675. "api": {
  27676. "anyOf": [
  27677. {
  27678. "type": "object",
  27679. "properties": {
  27680. "id": {
  27681. "type": "string"
  27682. },
  27683. "type": {
  27684. "type": "string",
  27685. "enum": ["aisdk"]
  27686. },
  27687. "package": {
  27688. "type": "string"
  27689. },
  27690. "url": {
  27691. "type": "string"
  27692. },
  27693. "settings": {
  27694. "type": "object"
  27695. }
  27696. },
  27697. "required": ["id", "type", "package"],
  27698. "additionalProperties": false
  27699. },
  27700. {
  27701. "type": "object",
  27702. "properties": {
  27703. "id": {
  27704. "type": "string"
  27705. },
  27706. "type": {
  27707. "type": "string",
  27708. "enum": ["native"]
  27709. },
  27710. "url": {
  27711. "type": "string"
  27712. },
  27713. "settings": {
  27714. "type": "object"
  27715. }
  27716. },
  27717. "required": ["id", "type", "settings"],
  27718. "additionalProperties": false
  27719. }
  27720. ]
  27721. },
  27722. "capabilities": {
  27723. "type": "object",
  27724. "properties": {
  27725. "tools": {
  27726. "type": "boolean"
  27727. },
  27728. "input": {
  27729. "type": "array",
  27730. "items": {
  27731. "type": "string"
  27732. }
  27733. },
  27734. "output": {
  27735. "type": "array",
  27736. "items": {
  27737. "type": "string"
  27738. }
  27739. }
  27740. },
  27741. "required": ["tools", "input", "output"],
  27742. "additionalProperties": false
  27743. },
  27744. "request": {
  27745. "type": "object",
  27746. "properties": {
  27747. "headers": {
  27748. "type": "object",
  27749. "additionalProperties": {
  27750. "type": "string"
  27751. }
  27752. },
  27753. "body": {
  27754. "type": "object"
  27755. },
  27756. "variant": {
  27757. "type": "string"
  27758. }
  27759. },
  27760. "required": ["headers", "body"],
  27761. "additionalProperties": false
  27762. },
  27763. "variants": {
  27764. "type": "array",
  27765. "items": {
  27766. "type": "object",
  27767. "properties": {
  27768. "id": {
  27769. "type": "string"
  27770. },
  27771. "headers": {
  27772. "type": "object",
  27773. "additionalProperties": {
  27774. "type": "string"
  27775. }
  27776. },
  27777. "body": {
  27778. "type": "object"
  27779. }
  27780. },
  27781. "required": ["id", "headers", "body"],
  27782. "additionalProperties": false
  27783. }
  27784. },
  27785. "time": {
  27786. "type": "object",
  27787. "properties": {
  27788. "released": {
  27789. "type": "number"
  27790. }
  27791. },
  27792. "required": ["released"],
  27793. "additionalProperties": false
  27794. },
  27795. "cost": {
  27796. "type": "array",
  27797. "items": {
  27798. "type": "object",
  27799. "properties": {
  27800. "tier": {
  27801. "type": "object",
  27802. "properties": {
  27803. "type": {
  27804. "type": "string",
  27805. "enum": ["context"]
  27806. },
  27807. "size": {
  27808. "type": "integer"
  27809. }
  27810. },
  27811. "required": ["type", "size"],
  27812. "additionalProperties": false
  27813. },
  27814. "input": {
  27815. "type": "number"
  27816. },
  27817. "output": {
  27818. "type": "number"
  27819. },
  27820. "cache": {
  27821. "type": "object",
  27822. "properties": {
  27823. "read": {
  27824. "type": "number"
  27825. },
  27826. "write": {
  27827. "type": "number"
  27828. }
  27829. },
  27830. "required": ["read", "write"],
  27831. "additionalProperties": false
  27832. }
  27833. },
  27834. "required": ["input", "output", "cache"],
  27835. "additionalProperties": false
  27836. }
  27837. },
  27838. "status": {
  27839. "type": "string",
  27840. "enum": ["alpha", "beta", "deprecated", "active"]
  27841. },
  27842. "enabled": {
  27843. "type": "boolean"
  27844. },
  27845. "limit": {
  27846. "type": "object",
  27847. "properties": {
  27848. "context": {
  27849. "type": "integer"
  27850. },
  27851. "input": {
  27852. "type": "integer"
  27853. },
  27854. "output": {
  27855. "type": "integer"
  27856. }
  27857. },
  27858. "required": ["context", "output"],
  27859. "additionalProperties": false
  27860. }
  27861. },
  27862. "required": [
  27863. "id",
  27864. "providerID",
  27865. "name",
  27866. "api",
  27867. "capabilities",
  27868. "request",
  27869. "variants",
  27870. "time",
  27871. "cost",
  27872. "status",
  27873. "enabled",
  27874. "limit"
  27875. ],
  27876. "additionalProperties": false
  27877. },
  27878. "ProviderV2Info": {
  27879. "type": "object",
  27880. "properties": {
  27881. "id": {
  27882. "type": "string"
  27883. },
  27884. "integrationID": {
  27885. "type": "string"
  27886. },
  27887. "name": {
  27888. "type": "string"
  27889. },
  27890. "disabled": {
  27891. "type": "boolean"
  27892. },
  27893. "api": {
  27894. "anyOf": [
  27895. {
  27896. "type": "object",
  27897. "properties": {
  27898. "type": {
  27899. "type": "string",
  27900. "enum": ["aisdk"]
  27901. },
  27902. "package": {
  27903. "type": "string"
  27904. },
  27905. "url": {
  27906. "type": "string"
  27907. },
  27908. "settings": {
  27909. "type": "object"
  27910. }
  27911. },
  27912. "required": ["type", "package"],
  27913. "additionalProperties": false
  27914. },
  27915. {
  27916. "type": "object",
  27917. "properties": {
  27918. "type": {
  27919. "type": "string",
  27920. "enum": ["native"]
  27921. },
  27922. "url": {
  27923. "type": "string"
  27924. },
  27925. "settings": {
  27926. "type": "object"
  27927. }
  27928. },
  27929. "required": ["type", "settings"],
  27930. "additionalProperties": false
  27931. }
  27932. ]
  27933. },
  27934. "request": {
  27935. "type": "object",
  27936. "properties": {
  27937. "headers": {
  27938. "type": "object",
  27939. "additionalProperties": {
  27940. "type": "string"
  27941. }
  27942. },
  27943. "body": {
  27944. "type": "object"
  27945. }
  27946. },
  27947. "required": ["headers", "body"],
  27948. "additionalProperties": false
  27949. }
  27950. },
  27951. "required": ["id", "name", "api", "request"],
  27952. "additionalProperties": false
  27953. },
  27954. "IntegrationWhen": {
  27955. "type": "object",
  27956. "properties": {
  27957. "key": {
  27958. "type": "string"
  27959. },
  27960. "op": {
  27961. "type": "string",
  27962. "enum": ["eq", "neq"]
  27963. },
  27964. "value": {
  27965. "type": "string"
  27966. }
  27967. },
  27968. "required": ["key", "op", "value"],
  27969. "additionalProperties": false
  27970. },
  27971. "IntegrationTextPrompt": {
  27972. "type": "object",
  27973. "properties": {
  27974. "type": {
  27975. "type": "string",
  27976. "enum": ["text"]
  27977. },
  27978. "key": {
  27979. "type": "string"
  27980. },
  27981. "message": {
  27982. "type": "string"
  27983. },
  27984. "placeholder": {
  27985. "type": "string"
  27986. },
  27987. "when": {
  27988. "$ref": "#/components/schemas/IntegrationWhen"
  27989. }
  27990. },
  27991. "required": ["type", "key", "message"],
  27992. "additionalProperties": false
  27993. },
  27994. "IntegrationSelectPrompt": {
  27995. "type": "object",
  27996. "properties": {
  27997. "type": {
  27998. "type": "string",
  27999. "enum": ["select"]
  28000. },
  28001. "key": {
  28002. "type": "string"
  28003. },
  28004. "message": {
  28005. "type": "string"
  28006. },
  28007. "options": {
  28008. "type": "array",
  28009. "items": {
  28010. "type": "object",
  28011. "properties": {
  28012. "label": {
  28013. "type": "string"
  28014. },
  28015. "value": {
  28016. "type": "string"
  28017. },
  28018. "hint": {
  28019. "type": "string"
  28020. }
  28021. },
  28022. "required": ["label", "value"],
  28023. "additionalProperties": false
  28024. }
  28025. },
  28026. "when": {
  28027. "$ref": "#/components/schemas/IntegrationWhen"
  28028. }
  28029. },
  28030. "required": ["type", "key", "message", "options"],
  28031. "additionalProperties": false
  28032. },
  28033. "IntegrationOAuthMethod": {
  28034. "type": "object",
  28035. "properties": {
  28036. "id": {
  28037. "type": "string"
  28038. },
  28039. "type": {
  28040. "type": "string",
  28041. "enum": ["oauth"]
  28042. },
  28043. "label": {
  28044. "type": "string"
  28045. },
  28046. "prompts": {
  28047. "type": "array",
  28048. "items": {
  28049. "anyOf": [
  28050. {
  28051. "$ref": "#/components/schemas/IntegrationTextPrompt"
  28052. },
  28053. {
  28054. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  28055. }
  28056. ]
  28057. }
  28058. }
  28059. },
  28060. "required": ["id", "type", "label"],
  28061. "additionalProperties": false
  28062. },
  28063. "IntegrationKeyMethod": {
  28064. "type": "object",
  28065. "properties": {
  28066. "type": {
  28067. "type": "string",
  28068. "enum": ["key"]
  28069. },
  28070. "label": {
  28071. "type": "string"
  28072. }
  28073. },
  28074. "required": ["type"],
  28075. "additionalProperties": false
  28076. },
  28077. "IntegrationEnvMethod": {
  28078. "type": "object",
  28079. "properties": {
  28080. "type": {
  28081. "type": "string",
  28082. "enum": ["env"]
  28083. },
  28084. "names": {
  28085. "type": "array",
  28086. "items": {
  28087. "type": "string"
  28088. }
  28089. }
  28090. },
  28091. "required": ["type", "names"],
  28092. "additionalProperties": false
  28093. },
  28094. "ConnectionCredentialInfo": {
  28095. "type": "object",
  28096. "properties": {
  28097. "type": {
  28098. "type": "string",
  28099. "enum": ["credential"]
  28100. },
  28101. "id": {
  28102. "type": "string"
  28103. },
  28104. "label": {
  28105. "type": "string"
  28106. }
  28107. },
  28108. "required": ["type", "id", "label"],
  28109. "additionalProperties": false
  28110. },
  28111. "ConnectionEnvInfo": {
  28112. "type": "object",
  28113. "properties": {
  28114. "type": {
  28115. "type": "string",
  28116. "enum": ["env"]
  28117. },
  28118. "name": {
  28119. "type": "string"
  28120. }
  28121. },
  28122. "required": ["type", "name"],
  28123. "additionalProperties": false
  28124. },
  28125. "ConnectionInfo": {
  28126. "anyOf": [
  28127. {
  28128. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  28129. },
  28130. {
  28131. "$ref": "#/components/schemas/ConnectionEnvInfo"
  28132. }
  28133. ]
  28134. },
  28135. "IntegrationInfo": {
  28136. "type": "object",
  28137. "properties": {
  28138. "id": {
  28139. "type": "string"
  28140. },
  28141. "name": {
  28142. "type": "string"
  28143. },
  28144. "methods": {
  28145. "type": "array",
  28146. "items": {
  28147. "$ref": "#/components/schemas/IntegrationMethod"
  28148. }
  28149. },
  28150. "connections": {
  28151. "type": "array",
  28152. "items": {
  28153. "$ref": "#/components/schemas/ConnectionInfo"
  28154. }
  28155. }
  28156. },
  28157. "required": ["id", "name", "methods", "connections"],
  28158. "additionalProperties": false
  28159. },
  28160. "IntegrationAttempt": {
  28161. "type": "object",
  28162. "properties": {
  28163. "attemptID": {
  28164. "type": "string"
  28165. },
  28166. "url": {
  28167. "type": "string"
  28168. },
  28169. "instructions": {
  28170. "type": "string"
  28171. },
  28172. "mode": {
  28173. "type": "string",
  28174. "enum": ["auto", "code"]
  28175. },
  28176. "time": {
  28177. "type": "object",
  28178. "properties": {
  28179. "created": {
  28180. "anyOf": [
  28181. {
  28182. "type": "number"
  28183. },
  28184. {
  28185. "type": "string",
  28186. "enum": ["NaN"]
  28187. },
  28188. {
  28189. "type": "string",
  28190. "enum": ["Infinity"]
  28191. },
  28192. {
  28193. "type": "string",
  28194. "enum": ["-Infinity"]
  28195. },
  28196. {
  28197. "type": "string",
  28198. "enum": ["Infinity", "-Infinity", "NaN"]
  28199. }
  28200. ]
  28201. },
  28202. "expires": {
  28203. "anyOf": [
  28204. {
  28205. "type": "number"
  28206. },
  28207. {
  28208. "type": "string",
  28209. "enum": ["NaN"]
  28210. },
  28211. {
  28212. "type": "string",
  28213. "enum": ["Infinity"]
  28214. },
  28215. {
  28216. "type": "string",
  28217. "enum": ["-Infinity"]
  28218. },
  28219. {
  28220. "type": "string",
  28221. "enum": ["Infinity", "-Infinity", "NaN"]
  28222. }
  28223. ]
  28224. }
  28225. },
  28226. "required": ["created", "expires"],
  28227. "additionalProperties": false
  28228. }
  28229. },
  28230. "required": ["attemptID", "url", "instructions", "mode", "time"],
  28231. "additionalProperties": false
  28232. },
  28233. "PermissionV2Request": {
  28234. "type": "object",
  28235. "properties": {
  28236. "id": {
  28237. "type": "string",
  28238. "pattern": "^per"
  28239. },
  28240. "sessionID": {
  28241. "type": "string",
  28242. "pattern": "^ses"
  28243. },
  28244. "action": {
  28245. "type": "string"
  28246. },
  28247. "resources": {
  28248. "type": "array",
  28249. "items": {
  28250. "type": "string"
  28251. }
  28252. },
  28253. "save": {
  28254. "type": "array",
  28255. "items": {
  28256. "type": "string"
  28257. }
  28258. },
  28259. "metadata": {
  28260. "type": "object"
  28261. },
  28262. "source": {
  28263. "$ref": "#/components/schemas/PermissionV2Source"
  28264. }
  28265. },
  28266. "required": ["id", "sessionID", "action", "resources"],
  28267. "additionalProperties": false
  28268. },
  28269. "PermissionSavedInfo": {
  28270. "type": "object",
  28271. "properties": {
  28272. "id": {
  28273. "type": "string"
  28274. },
  28275. "projectID": {
  28276. "type": "string"
  28277. },
  28278. "action": {
  28279. "type": "string"
  28280. },
  28281. "resource": {
  28282. "type": "string"
  28283. }
  28284. },
  28285. "required": ["id", "projectID", "action", "resource"],
  28286. "additionalProperties": false
  28287. },
  28288. "FileSystemEntry": {
  28289. "type": "object",
  28290. "properties": {
  28291. "path": {
  28292. "type": "string"
  28293. },
  28294. "type": {
  28295. "type": "string",
  28296. "enum": ["file", "directory"]
  28297. }
  28298. },
  28299. "required": ["path", "type"],
  28300. "additionalProperties": false
  28301. },
  28302. "CommandV2Info": {
  28303. "type": "object",
  28304. "properties": {
  28305. "name": {
  28306. "type": "string"
  28307. },
  28308. "template": {
  28309. "type": "string"
  28310. },
  28311. "description": {
  28312. "type": "string"
  28313. },
  28314. "agent": {
  28315. "type": "string"
  28316. },
  28317. "model": {
  28318. "type": "object",
  28319. "properties": {
  28320. "id": {
  28321. "type": "string"
  28322. },
  28323. "providerID": {
  28324. "type": "string"
  28325. },
  28326. "variant": {
  28327. "type": "string"
  28328. }
  28329. },
  28330. "required": ["id", "providerID"],
  28331. "additionalProperties": false
  28332. },
  28333. "subtask": {
  28334. "type": "boolean"
  28335. }
  28336. },
  28337. "required": ["name", "template"],
  28338. "additionalProperties": false
  28339. },
  28340. "SkillV2Info": {
  28341. "type": "object",
  28342. "properties": {
  28343. "name": {
  28344. "type": "string"
  28345. },
  28346. "description": {
  28347. "type": "string"
  28348. },
  28349. "slash": {
  28350. "type": "boolean"
  28351. },
  28352. "location": {
  28353. "type": "string"
  28354. },
  28355. "content": {
  28356. "type": "string"
  28357. }
  28358. },
  28359. "required": ["name", "location", "content"],
  28360. "additionalProperties": false
  28361. },
  28362. "V2EventModels-devRefreshed": {
  28363. "type": "object",
  28364. "properties": {
  28365. "id": {
  28366. "type": "string",
  28367. "pattern": "^evt_"
  28368. },
  28369. "metadata": {
  28370. "type": "object"
  28371. },
  28372. "durable": {
  28373. "type": "object",
  28374. "properties": {
  28375. "aggregateID": {
  28376. "type": "string"
  28377. },
  28378. "seq": {
  28379. "type": "integer"
  28380. },
  28381. "version": {
  28382. "type": "integer"
  28383. }
  28384. },
  28385. "required": ["aggregateID", "seq", "version"],
  28386. "additionalProperties": false
  28387. },
  28388. "location": {
  28389. "$ref": "#/components/schemas/LocationRef"
  28390. },
  28391. "type": {
  28392. "type": "string",
  28393. "enum": ["models-dev.refreshed"]
  28394. },
  28395. "data": {
  28396. "type": "object",
  28397. "properties": {}
  28398. }
  28399. },
  28400. "required": ["id", "type", "data"],
  28401. "additionalProperties": false
  28402. },
  28403. "V2EventIntegrationUpdated": {
  28404. "type": "object",
  28405. "properties": {
  28406. "id": {
  28407. "type": "string",
  28408. "pattern": "^evt_"
  28409. },
  28410. "metadata": {
  28411. "type": "object"
  28412. },
  28413. "durable": {
  28414. "type": "object",
  28415. "properties": {
  28416. "aggregateID": {
  28417. "type": "string"
  28418. },
  28419. "seq": {
  28420. "type": "integer"
  28421. },
  28422. "version": {
  28423. "type": "integer"
  28424. }
  28425. },
  28426. "required": ["aggregateID", "seq", "version"],
  28427. "additionalProperties": false
  28428. },
  28429. "location": {
  28430. "$ref": "#/components/schemas/LocationRef"
  28431. },
  28432. "type": {
  28433. "type": "string",
  28434. "enum": ["integration.updated"]
  28435. },
  28436. "data": {
  28437. "type": "object",
  28438. "properties": {}
  28439. }
  28440. },
  28441. "required": ["id", "type", "data"],
  28442. "additionalProperties": false
  28443. },
  28444. "V2EventIntegrationConnectionUpdated": {
  28445. "type": "object",
  28446. "properties": {
  28447. "id": {
  28448. "type": "string",
  28449. "pattern": "^evt_"
  28450. },
  28451. "metadata": {
  28452. "type": "object"
  28453. },
  28454. "durable": {
  28455. "type": "object",
  28456. "properties": {
  28457. "aggregateID": {
  28458. "type": "string"
  28459. },
  28460. "seq": {
  28461. "type": "integer"
  28462. },
  28463. "version": {
  28464. "type": "integer"
  28465. }
  28466. },
  28467. "required": ["aggregateID", "seq", "version"],
  28468. "additionalProperties": false
  28469. },
  28470. "location": {
  28471. "$ref": "#/components/schemas/LocationRef"
  28472. },
  28473. "type": {
  28474. "type": "string",
  28475. "enum": ["integration.connection.updated"]
  28476. },
  28477. "data": {
  28478. "type": "object",
  28479. "properties": {
  28480. "integrationID": {
  28481. "type": "string"
  28482. }
  28483. },
  28484. "required": ["integrationID"],
  28485. "additionalProperties": false
  28486. }
  28487. },
  28488. "required": ["id", "type", "data"],
  28489. "additionalProperties": false
  28490. },
  28491. "V2EventCatalogUpdated": {
  28492. "type": "object",
  28493. "properties": {
  28494. "id": {
  28495. "type": "string",
  28496. "pattern": "^evt_"
  28497. },
  28498. "metadata": {
  28499. "type": "object"
  28500. },
  28501. "durable": {
  28502. "type": "object",
  28503. "properties": {
  28504. "aggregateID": {
  28505. "type": "string"
  28506. },
  28507. "seq": {
  28508. "type": "integer"
  28509. },
  28510. "version": {
  28511. "type": "integer"
  28512. }
  28513. },
  28514. "required": ["aggregateID", "seq", "version"],
  28515. "additionalProperties": false
  28516. },
  28517. "location": {
  28518. "$ref": "#/components/schemas/LocationRef"
  28519. },
  28520. "type": {
  28521. "type": "string",
  28522. "enum": ["catalog.updated"]
  28523. },
  28524. "data": {
  28525. "type": "object",
  28526. "properties": {}
  28527. }
  28528. },
  28529. "required": ["id", "type", "data"],
  28530. "additionalProperties": false
  28531. },
  28532. "V2EventSessionCreated": {
  28533. "type": "object",
  28534. "properties": {
  28535. "id": {
  28536. "type": "string",
  28537. "pattern": "^evt_"
  28538. },
  28539. "metadata": {
  28540. "type": "object"
  28541. },
  28542. "durable": {
  28543. "type": "object",
  28544. "properties": {
  28545. "aggregateID": {
  28546. "type": "string"
  28547. },
  28548. "seq": {
  28549. "type": "integer"
  28550. },
  28551. "version": {
  28552. "type": "integer"
  28553. }
  28554. },
  28555. "required": ["aggregateID", "seq", "version"],
  28556. "additionalProperties": false
  28557. },
  28558. "location": {
  28559. "$ref": "#/components/schemas/LocationRef"
  28560. },
  28561. "type": {
  28562. "type": "string",
  28563. "enum": ["session.created"]
  28564. },
  28565. "data": {
  28566. "type": "object",
  28567. "properties": {
  28568. "sessionID": {
  28569. "type": "string",
  28570. "pattern": "^ses"
  28571. },
  28572. "info": {
  28573. "$ref": "#/components/schemas/Session"
  28574. }
  28575. },
  28576. "required": ["sessionID", "info"],
  28577. "additionalProperties": false
  28578. }
  28579. },
  28580. "required": ["id", "type", "data"],
  28581. "additionalProperties": false
  28582. },
  28583. "V2EventSessionUpdated": {
  28584. "type": "object",
  28585. "properties": {
  28586. "id": {
  28587. "type": "string",
  28588. "pattern": "^evt_"
  28589. },
  28590. "metadata": {
  28591. "type": "object"
  28592. },
  28593. "durable": {
  28594. "type": "object",
  28595. "properties": {
  28596. "aggregateID": {
  28597. "type": "string"
  28598. },
  28599. "seq": {
  28600. "type": "integer"
  28601. },
  28602. "version": {
  28603. "type": "integer"
  28604. }
  28605. },
  28606. "required": ["aggregateID", "seq", "version"],
  28607. "additionalProperties": false
  28608. },
  28609. "location": {
  28610. "$ref": "#/components/schemas/LocationRef"
  28611. },
  28612. "type": {
  28613. "type": "string",
  28614. "enum": ["session.updated"]
  28615. },
  28616. "data": {
  28617. "type": "object",
  28618. "properties": {
  28619. "sessionID": {
  28620. "type": "string",
  28621. "pattern": "^ses"
  28622. },
  28623. "info": {
  28624. "$ref": "#/components/schemas/Session"
  28625. }
  28626. },
  28627. "required": ["sessionID", "info"],
  28628. "additionalProperties": false
  28629. }
  28630. },
  28631. "required": ["id", "type", "data"],
  28632. "additionalProperties": false
  28633. },
  28634. "V2EventSessionDeleted": {
  28635. "type": "object",
  28636. "properties": {
  28637. "id": {
  28638. "type": "string",
  28639. "pattern": "^evt_"
  28640. },
  28641. "metadata": {
  28642. "type": "object"
  28643. },
  28644. "durable": {
  28645. "type": "object",
  28646. "properties": {
  28647. "aggregateID": {
  28648. "type": "string"
  28649. },
  28650. "seq": {
  28651. "type": "integer"
  28652. },
  28653. "version": {
  28654. "type": "integer"
  28655. }
  28656. },
  28657. "required": ["aggregateID", "seq", "version"],
  28658. "additionalProperties": false
  28659. },
  28660. "location": {
  28661. "$ref": "#/components/schemas/LocationRef"
  28662. },
  28663. "type": {
  28664. "type": "string",
  28665. "enum": ["session.deleted"]
  28666. },
  28667. "data": {
  28668. "type": "object",
  28669. "properties": {
  28670. "sessionID": {
  28671. "type": "string",
  28672. "pattern": "^ses"
  28673. },
  28674. "info": {
  28675. "$ref": "#/components/schemas/Session"
  28676. }
  28677. },
  28678. "required": ["sessionID", "info"],
  28679. "additionalProperties": false
  28680. }
  28681. },
  28682. "required": ["id", "type", "data"],
  28683. "additionalProperties": false
  28684. },
  28685. "V2EventMessageUpdated": {
  28686. "type": "object",
  28687. "properties": {
  28688. "id": {
  28689. "type": "string",
  28690. "pattern": "^evt_"
  28691. },
  28692. "metadata": {
  28693. "type": "object"
  28694. },
  28695. "durable": {
  28696. "type": "object",
  28697. "properties": {
  28698. "aggregateID": {
  28699. "type": "string"
  28700. },
  28701. "seq": {
  28702. "type": "integer"
  28703. },
  28704. "version": {
  28705. "type": "integer"
  28706. }
  28707. },
  28708. "required": ["aggregateID", "seq", "version"],
  28709. "additionalProperties": false
  28710. },
  28711. "location": {
  28712. "$ref": "#/components/schemas/LocationRef"
  28713. },
  28714. "type": {
  28715. "type": "string",
  28716. "enum": ["message.updated"]
  28717. },
  28718. "data": {
  28719. "type": "object",
  28720. "properties": {
  28721. "sessionID": {
  28722. "type": "string",
  28723. "pattern": "^ses"
  28724. },
  28725. "info": {
  28726. "$ref": "#/components/schemas/Message"
  28727. }
  28728. },
  28729. "required": ["sessionID", "info"],
  28730. "additionalProperties": false
  28731. }
  28732. },
  28733. "required": ["id", "type", "data"],
  28734. "additionalProperties": false
  28735. },
  28736. "V2EventMessageRemoved": {
  28737. "type": "object",
  28738. "properties": {
  28739. "id": {
  28740. "type": "string",
  28741. "pattern": "^evt_"
  28742. },
  28743. "metadata": {
  28744. "type": "object"
  28745. },
  28746. "durable": {
  28747. "type": "object",
  28748. "properties": {
  28749. "aggregateID": {
  28750. "type": "string"
  28751. },
  28752. "seq": {
  28753. "type": "integer"
  28754. },
  28755. "version": {
  28756. "type": "integer"
  28757. }
  28758. },
  28759. "required": ["aggregateID", "seq", "version"],
  28760. "additionalProperties": false
  28761. },
  28762. "location": {
  28763. "$ref": "#/components/schemas/LocationRef"
  28764. },
  28765. "type": {
  28766. "type": "string",
  28767. "enum": ["message.removed"]
  28768. },
  28769. "data": {
  28770. "type": "object",
  28771. "properties": {
  28772. "sessionID": {
  28773. "type": "string",
  28774. "pattern": "^ses"
  28775. },
  28776. "messageID": {
  28777. "type": "string",
  28778. "pattern": "^msg"
  28779. }
  28780. },
  28781. "required": ["sessionID", "messageID"],
  28782. "additionalProperties": false
  28783. }
  28784. },
  28785. "required": ["id", "type", "data"],
  28786. "additionalProperties": false
  28787. },
  28788. "V2EventMessagePartUpdated": {
  28789. "type": "object",
  28790. "properties": {
  28791. "id": {
  28792. "type": "string",
  28793. "pattern": "^evt_"
  28794. },
  28795. "metadata": {
  28796. "type": "object"
  28797. },
  28798. "durable": {
  28799. "type": "object",
  28800. "properties": {
  28801. "aggregateID": {
  28802. "type": "string"
  28803. },
  28804. "seq": {
  28805. "type": "integer"
  28806. },
  28807. "version": {
  28808. "type": "integer"
  28809. }
  28810. },
  28811. "required": ["aggregateID", "seq", "version"],
  28812. "additionalProperties": false
  28813. },
  28814. "location": {
  28815. "$ref": "#/components/schemas/LocationRef"
  28816. },
  28817. "type": {
  28818. "type": "string",
  28819. "enum": ["message.part.updated"]
  28820. },
  28821. "data": {
  28822. "type": "object",
  28823. "properties": {
  28824. "sessionID": {
  28825. "type": "string",
  28826. "pattern": "^ses"
  28827. },
  28828. "part": {
  28829. "$ref": "#/components/schemas/Part"
  28830. },
  28831. "time": {
  28832. "type": "number"
  28833. }
  28834. },
  28835. "required": ["sessionID", "part", "time"],
  28836. "additionalProperties": false
  28837. }
  28838. },
  28839. "required": ["id", "type", "data"],
  28840. "additionalProperties": false
  28841. },
  28842. "V2EventMessagePartRemoved": {
  28843. "type": "object",
  28844. "properties": {
  28845. "id": {
  28846. "type": "string",
  28847. "pattern": "^evt_"
  28848. },
  28849. "metadata": {
  28850. "type": "object"
  28851. },
  28852. "durable": {
  28853. "type": "object",
  28854. "properties": {
  28855. "aggregateID": {
  28856. "type": "string"
  28857. },
  28858. "seq": {
  28859. "type": "integer"
  28860. },
  28861. "version": {
  28862. "type": "integer"
  28863. }
  28864. },
  28865. "required": ["aggregateID", "seq", "version"],
  28866. "additionalProperties": false
  28867. },
  28868. "location": {
  28869. "$ref": "#/components/schemas/LocationRef"
  28870. },
  28871. "type": {
  28872. "type": "string",
  28873. "enum": ["message.part.removed"]
  28874. },
  28875. "data": {
  28876. "type": "object",
  28877. "properties": {
  28878. "sessionID": {
  28879. "type": "string",
  28880. "pattern": "^ses"
  28881. },
  28882. "messageID": {
  28883. "type": "string",
  28884. "pattern": "^msg"
  28885. },
  28886. "partID": {
  28887. "type": "string",
  28888. "pattern": "^prt"
  28889. }
  28890. },
  28891. "required": ["sessionID", "messageID", "partID"],
  28892. "additionalProperties": false
  28893. }
  28894. },
  28895. "required": ["id", "type", "data"],
  28896. "additionalProperties": false
  28897. },
  28898. "V2EventSessionNextAgentSwitched": {
  28899. "type": "object",
  28900. "properties": {
  28901. "id": {
  28902. "type": "string",
  28903. "pattern": "^evt_"
  28904. },
  28905. "metadata": {
  28906. "type": "object"
  28907. },
  28908. "durable": {
  28909. "type": "object",
  28910. "properties": {
  28911. "aggregateID": {
  28912. "type": "string"
  28913. },
  28914. "seq": {
  28915. "type": "integer"
  28916. },
  28917. "version": {
  28918. "type": "integer"
  28919. }
  28920. },
  28921. "required": ["aggregateID", "seq", "version"],
  28922. "additionalProperties": false
  28923. },
  28924. "location": {
  28925. "$ref": "#/components/schemas/LocationRef"
  28926. },
  28927. "type": {
  28928. "type": "string",
  28929. "enum": ["session.next.agent.switched"]
  28930. },
  28931. "data": {
  28932. "type": "object",
  28933. "properties": {
  28934. "timestamp": {
  28935. "type": "number"
  28936. },
  28937. "sessionID": {
  28938. "type": "string",
  28939. "pattern": "^ses"
  28940. },
  28941. "messageID": {
  28942. "type": "string",
  28943. "pattern": "^msg_"
  28944. },
  28945. "agent": {
  28946. "type": "string"
  28947. }
  28948. },
  28949. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28950. "additionalProperties": false
  28951. }
  28952. },
  28953. "required": ["id", "type", "data"],
  28954. "additionalProperties": false
  28955. },
  28956. "V2EventSessionNextModelSwitched": {
  28957. "type": "object",
  28958. "properties": {
  28959. "id": {
  28960. "type": "string",
  28961. "pattern": "^evt_"
  28962. },
  28963. "metadata": {
  28964. "type": "object"
  28965. },
  28966. "durable": {
  28967. "type": "object",
  28968. "properties": {
  28969. "aggregateID": {
  28970. "type": "string"
  28971. },
  28972. "seq": {
  28973. "type": "integer"
  28974. },
  28975. "version": {
  28976. "type": "integer"
  28977. }
  28978. },
  28979. "required": ["aggregateID", "seq", "version"],
  28980. "additionalProperties": false
  28981. },
  28982. "location": {
  28983. "$ref": "#/components/schemas/LocationRef"
  28984. },
  28985. "type": {
  28986. "type": "string",
  28987. "enum": ["session.next.model.switched"]
  28988. },
  28989. "data": {
  28990. "type": "object",
  28991. "properties": {
  28992. "timestamp": {
  28993. "type": "number"
  28994. },
  28995. "sessionID": {
  28996. "type": "string",
  28997. "pattern": "^ses"
  28998. },
  28999. "messageID": {
  29000. "type": "string",
  29001. "pattern": "^msg_"
  29002. },
  29003. "model": {
  29004. "type": "object",
  29005. "properties": {
  29006. "id": {
  29007. "type": "string"
  29008. },
  29009. "providerID": {
  29010. "type": "string"
  29011. },
  29012. "variant": {
  29013. "type": "string"
  29014. }
  29015. },
  29016. "required": ["id", "providerID"],
  29017. "additionalProperties": false
  29018. }
  29019. },
  29020. "required": ["timestamp", "sessionID", "messageID", "model"],
  29021. "additionalProperties": false
  29022. }
  29023. },
  29024. "required": ["id", "type", "data"],
  29025. "additionalProperties": false
  29026. },
  29027. "V2EventSessionNextMoved": {
  29028. "type": "object",
  29029. "properties": {
  29030. "id": {
  29031. "type": "string",
  29032. "pattern": "^evt_"
  29033. },
  29034. "metadata": {
  29035. "type": "object"
  29036. },
  29037. "durable": {
  29038. "type": "object",
  29039. "properties": {
  29040. "aggregateID": {
  29041. "type": "string"
  29042. },
  29043. "seq": {
  29044. "type": "integer"
  29045. },
  29046. "version": {
  29047. "type": "integer"
  29048. }
  29049. },
  29050. "required": ["aggregateID", "seq", "version"],
  29051. "additionalProperties": false
  29052. },
  29053. "location": {
  29054. "$ref": "#/components/schemas/LocationRef"
  29055. },
  29056. "type": {
  29057. "type": "string",
  29058. "enum": ["session.next.moved"]
  29059. },
  29060. "data": {
  29061. "type": "object",
  29062. "properties": {
  29063. "timestamp": {
  29064. "type": "number"
  29065. },
  29066. "sessionID": {
  29067. "type": "string",
  29068. "pattern": "^ses"
  29069. },
  29070. "location": {
  29071. "$ref": "#/components/schemas/LocationRef"
  29072. },
  29073. "subdirectory": {
  29074. "type": "string"
  29075. }
  29076. },
  29077. "required": ["timestamp", "sessionID", "location"],
  29078. "additionalProperties": false
  29079. }
  29080. },
  29081. "required": ["id", "type", "data"],
  29082. "additionalProperties": false
  29083. },
  29084. "V2EventSessionNextPrompted": {
  29085. "type": "object",
  29086. "properties": {
  29087. "id": {
  29088. "type": "string",
  29089. "pattern": "^evt_"
  29090. },
  29091. "metadata": {
  29092. "type": "object"
  29093. },
  29094. "durable": {
  29095. "type": "object",
  29096. "properties": {
  29097. "aggregateID": {
  29098. "type": "string"
  29099. },
  29100. "seq": {
  29101. "type": "integer"
  29102. },
  29103. "version": {
  29104. "type": "integer"
  29105. }
  29106. },
  29107. "required": ["aggregateID", "seq", "version"],
  29108. "additionalProperties": false
  29109. },
  29110. "location": {
  29111. "$ref": "#/components/schemas/LocationRef"
  29112. },
  29113. "type": {
  29114. "type": "string",
  29115. "enum": ["session.next.prompted"]
  29116. },
  29117. "data": {
  29118. "type": "object",
  29119. "properties": {
  29120. "timestamp": {
  29121. "type": "number"
  29122. },
  29123. "sessionID": {
  29124. "type": "string",
  29125. "pattern": "^ses"
  29126. },
  29127. "messageID": {
  29128. "type": "string",
  29129. "pattern": "^msg_"
  29130. },
  29131. "prompt": {
  29132. "$ref": "#/components/schemas/Prompt"
  29133. },
  29134. "delivery": {
  29135. "type": "string",
  29136. "enum": ["steer", "queue"]
  29137. }
  29138. },
  29139. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  29140. "additionalProperties": false
  29141. }
  29142. },
  29143. "required": ["id", "type", "data"],
  29144. "additionalProperties": false
  29145. },
  29146. "V2EventSessionNextPromptAdmitted": {
  29147. "type": "object",
  29148. "properties": {
  29149. "id": {
  29150. "type": "string",
  29151. "pattern": "^evt_"
  29152. },
  29153. "metadata": {
  29154. "type": "object"
  29155. },
  29156. "durable": {
  29157. "type": "object",
  29158. "properties": {
  29159. "aggregateID": {
  29160. "type": "string"
  29161. },
  29162. "seq": {
  29163. "type": "integer"
  29164. },
  29165. "version": {
  29166. "type": "integer"
  29167. }
  29168. },
  29169. "required": ["aggregateID", "seq", "version"],
  29170. "additionalProperties": false
  29171. },
  29172. "location": {
  29173. "$ref": "#/components/schemas/LocationRef"
  29174. },
  29175. "type": {
  29176. "type": "string",
  29177. "enum": ["session.next.prompt.admitted"]
  29178. },
  29179. "data": {
  29180. "type": "object",
  29181. "properties": {
  29182. "timestamp": {
  29183. "type": "number"
  29184. },
  29185. "sessionID": {
  29186. "type": "string",
  29187. "pattern": "^ses"
  29188. },
  29189. "messageID": {
  29190. "type": "string",
  29191. "pattern": "^msg_"
  29192. },
  29193. "prompt": {
  29194. "$ref": "#/components/schemas/Prompt"
  29195. },
  29196. "delivery": {
  29197. "type": "string",
  29198. "enum": ["steer", "queue"]
  29199. }
  29200. },
  29201. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  29202. "additionalProperties": false
  29203. }
  29204. },
  29205. "required": ["id", "type", "data"],
  29206. "additionalProperties": false
  29207. },
  29208. "V2EventSessionNextContextUpdated": {
  29209. "type": "object",
  29210. "properties": {
  29211. "id": {
  29212. "type": "string",
  29213. "pattern": "^evt_"
  29214. },
  29215. "metadata": {
  29216. "type": "object"
  29217. },
  29218. "durable": {
  29219. "type": "object",
  29220. "properties": {
  29221. "aggregateID": {
  29222. "type": "string"
  29223. },
  29224. "seq": {
  29225. "type": "integer"
  29226. },
  29227. "version": {
  29228. "type": "integer"
  29229. }
  29230. },
  29231. "required": ["aggregateID", "seq", "version"],
  29232. "additionalProperties": false
  29233. },
  29234. "location": {
  29235. "$ref": "#/components/schemas/LocationRef"
  29236. },
  29237. "type": {
  29238. "type": "string",
  29239. "enum": ["session.next.context.updated"]
  29240. },
  29241. "data": {
  29242. "type": "object",
  29243. "properties": {
  29244. "timestamp": {
  29245. "type": "number"
  29246. },
  29247. "sessionID": {
  29248. "type": "string",
  29249. "pattern": "^ses"
  29250. },
  29251. "messageID": {
  29252. "type": "string",
  29253. "pattern": "^msg_"
  29254. },
  29255. "text": {
  29256. "type": "string"
  29257. }
  29258. },
  29259. "required": ["timestamp", "sessionID", "messageID", "text"],
  29260. "additionalProperties": false
  29261. }
  29262. },
  29263. "required": ["id", "type", "data"],
  29264. "additionalProperties": false
  29265. },
  29266. "V2EventSessionNextSynthetic": {
  29267. "type": "object",
  29268. "properties": {
  29269. "id": {
  29270. "type": "string",
  29271. "pattern": "^evt_"
  29272. },
  29273. "metadata": {
  29274. "type": "object"
  29275. },
  29276. "durable": {
  29277. "type": "object",
  29278. "properties": {
  29279. "aggregateID": {
  29280. "type": "string"
  29281. },
  29282. "seq": {
  29283. "type": "integer"
  29284. },
  29285. "version": {
  29286. "type": "integer"
  29287. }
  29288. },
  29289. "required": ["aggregateID", "seq", "version"],
  29290. "additionalProperties": false
  29291. },
  29292. "location": {
  29293. "$ref": "#/components/schemas/LocationRef"
  29294. },
  29295. "type": {
  29296. "type": "string",
  29297. "enum": ["session.next.synthetic"]
  29298. },
  29299. "data": {
  29300. "type": "object",
  29301. "properties": {
  29302. "timestamp": {
  29303. "type": "number"
  29304. },
  29305. "sessionID": {
  29306. "type": "string",
  29307. "pattern": "^ses"
  29308. },
  29309. "messageID": {
  29310. "type": "string",
  29311. "pattern": "^msg_"
  29312. },
  29313. "text": {
  29314. "type": "string"
  29315. }
  29316. },
  29317. "required": ["timestamp", "sessionID", "messageID", "text"],
  29318. "additionalProperties": false
  29319. }
  29320. },
  29321. "required": ["id", "type", "data"],
  29322. "additionalProperties": false
  29323. },
  29324. "V2EventSessionNextShellStarted": {
  29325. "type": "object",
  29326. "properties": {
  29327. "id": {
  29328. "type": "string",
  29329. "pattern": "^evt_"
  29330. },
  29331. "metadata": {
  29332. "type": "object"
  29333. },
  29334. "durable": {
  29335. "type": "object",
  29336. "properties": {
  29337. "aggregateID": {
  29338. "type": "string"
  29339. },
  29340. "seq": {
  29341. "type": "integer"
  29342. },
  29343. "version": {
  29344. "type": "integer"
  29345. }
  29346. },
  29347. "required": ["aggregateID", "seq", "version"],
  29348. "additionalProperties": false
  29349. },
  29350. "location": {
  29351. "$ref": "#/components/schemas/LocationRef"
  29352. },
  29353. "type": {
  29354. "type": "string",
  29355. "enum": ["session.next.shell.started"]
  29356. },
  29357. "data": {
  29358. "type": "object",
  29359. "properties": {
  29360. "timestamp": {
  29361. "type": "number"
  29362. },
  29363. "sessionID": {
  29364. "type": "string",
  29365. "pattern": "^ses"
  29366. },
  29367. "messageID": {
  29368. "type": "string",
  29369. "pattern": "^msg_"
  29370. },
  29371. "callID": {
  29372. "type": "string"
  29373. },
  29374. "command": {
  29375. "type": "string"
  29376. }
  29377. },
  29378. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  29379. "additionalProperties": false
  29380. }
  29381. },
  29382. "required": ["id", "type", "data"],
  29383. "additionalProperties": false
  29384. },
  29385. "V2EventSessionNextShellEnded": {
  29386. "type": "object",
  29387. "properties": {
  29388. "id": {
  29389. "type": "string",
  29390. "pattern": "^evt_"
  29391. },
  29392. "metadata": {
  29393. "type": "object"
  29394. },
  29395. "durable": {
  29396. "type": "object",
  29397. "properties": {
  29398. "aggregateID": {
  29399. "type": "string"
  29400. },
  29401. "seq": {
  29402. "type": "integer"
  29403. },
  29404. "version": {
  29405. "type": "integer"
  29406. }
  29407. },
  29408. "required": ["aggregateID", "seq", "version"],
  29409. "additionalProperties": false
  29410. },
  29411. "location": {
  29412. "$ref": "#/components/schemas/LocationRef"
  29413. },
  29414. "type": {
  29415. "type": "string",
  29416. "enum": ["session.next.shell.ended"]
  29417. },
  29418. "data": {
  29419. "type": "object",
  29420. "properties": {
  29421. "timestamp": {
  29422. "type": "number"
  29423. },
  29424. "sessionID": {
  29425. "type": "string",
  29426. "pattern": "^ses"
  29427. },
  29428. "callID": {
  29429. "type": "string"
  29430. },
  29431. "output": {
  29432. "type": "string"
  29433. }
  29434. },
  29435. "required": ["timestamp", "sessionID", "callID", "output"],
  29436. "additionalProperties": false
  29437. }
  29438. },
  29439. "required": ["id", "type", "data"],
  29440. "additionalProperties": false
  29441. },
  29442. "V2EventSessionNextStepStarted": {
  29443. "type": "object",
  29444. "properties": {
  29445. "id": {
  29446. "type": "string",
  29447. "pattern": "^evt_"
  29448. },
  29449. "metadata": {
  29450. "type": "object"
  29451. },
  29452. "durable": {
  29453. "type": "object",
  29454. "properties": {
  29455. "aggregateID": {
  29456. "type": "string"
  29457. },
  29458. "seq": {
  29459. "type": "integer"
  29460. },
  29461. "version": {
  29462. "type": "integer"
  29463. }
  29464. },
  29465. "required": ["aggregateID", "seq", "version"],
  29466. "additionalProperties": false
  29467. },
  29468. "location": {
  29469. "$ref": "#/components/schemas/LocationRef"
  29470. },
  29471. "type": {
  29472. "type": "string",
  29473. "enum": ["session.next.step.started"]
  29474. },
  29475. "data": {
  29476. "type": "object",
  29477. "properties": {
  29478. "timestamp": {
  29479. "type": "number"
  29480. },
  29481. "sessionID": {
  29482. "type": "string",
  29483. "pattern": "^ses"
  29484. },
  29485. "assistantMessageID": {
  29486. "type": "string",
  29487. "pattern": "^msg_"
  29488. },
  29489. "agent": {
  29490. "type": "string"
  29491. },
  29492. "model": {
  29493. "type": "object",
  29494. "properties": {
  29495. "id": {
  29496. "type": "string"
  29497. },
  29498. "providerID": {
  29499. "type": "string"
  29500. },
  29501. "variant": {
  29502. "type": "string"
  29503. }
  29504. },
  29505. "required": ["id", "providerID"],
  29506. "additionalProperties": false
  29507. },
  29508. "snapshot": {
  29509. "type": "string"
  29510. }
  29511. },
  29512. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  29513. "additionalProperties": false
  29514. }
  29515. },
  29516. "required": ["id", "type", "data"],
  29517. "additionalProperties": false
  29518. },
  29519. "V2EventSessionNextStepEnded": {
  29520. "type": "object",
  29521. "properties": {
  29522. "id": {
  29523. "type": "string",
  29524. "pattern": "^evt_"
  29525. },
  29526. "metadata": {
  29527. "type": "object"
  29528. },
  29529. "durable": {
  29530. "type": "object",
  29531. "properties": {
  29532. "aggregateID": {
  29533. "type": "string"
  29534. },
  29535. "seq": {
  29536. "type": "integer"
  29537. },
  29538. "version": {
  29539. "type": "integer"
  29540. }
  29541. },
  29542. "required": ["aggregateID", "seq", "version"],
  29543. "additionalProperties": false
  29544. },
  29545. "location": {
  29546. "$ref": "#/components/schemas/LocationRef"
  29547. },
  29548. "type": {
  29549. "type": "string",
  29550. "enum": ["session.next.step.ended"]
  29551. },
  29552. "data": {
  29553. "type": "object",
  29554. "properties": {
  29555. "timestamp": {
  29556. "type": "number"
  29557. },
  29558. "sessionID": {
  29559. "type": "string",
  29560. "pattern": "^ses"
  29561. },
  29562. "assistantMessageID": {
  29563. "type": "string",
  29564. "pattern": "^msg_"
  29565. },
  29566. "finish": {
  29567. "type": "string"
  29568. },
  29569. "cost": {
  29570. "type": "number"
  29571. },
  29572. "tokens": {
  29573. "type": "object",
  29574. "properties": {
  29575. "input": {
  29576. "type": "number"
  29577. },
  29578. "output": {
  29579. "type": "number"
  29580. },
  29581. "reasoning": {
  29582. "type": "number"
  29583. },
  29584. "cache": {
  29585. "type": "object",
  29586. "properties": {
  29587. "read": {
  29588. "type": "number"
  29589. },
  29590. "write": {
  29591. "type": "number"
  29592. }
  29593. },
  29594. "required": ["read", "write"],
  29595. "additionalProperties": false
  29596. }
  29597. },
  29598. "required": ["input", "output", "reasoning", "cache"],
  29599. "additionalProperties": false
  29600. },
  29601. "snapshot": {
  29602. "type": "string"
  29603. },
  29604. "files": {
  29605. "type": "array",
  29606. "items": {
  29607. "type": "string"
  29608. }
  29609. }
  29610. },
  29611. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  29612. "additionalProperties": false
  29613. }
  29614. },
  29615. "required": ["id", "type", "data"],
  29616. "additionalProperties": false
  29617. },
  29618. "V2EventSessionNextStepFailed": {
  29619. "type": "object",
  29620. "properties": {
  29621. "id": {
  29622. "type": "string",
  29623. "pattern": "^evt_"
  29624. },
  29625. "metadata": {
  29626. "type": "object"
  29627. },
  29628. "durable": {
  29629. "type": "object",
  29630. "properties": {
  29631. "aggregateID": {
  29632. "type": "string"
  29633. },
  29634. "seq": {
  29635. "type": "integer"
  29636. },
  29637. "version": {
  29638. "type": "integer"
  29639. }
  29640. },
  29641. "required": ["aggregateID", "seq", "version"],
  29642. "additionalProperties": false
  29643. },
  29644. "location": {
  29645. "$ref": "#/components/schemas/LocationRef"
  29646. },
  29647. "type": {
  29648. "type": "string",
  29649. "enum": ["session.next.step.failed"]
  29650. },
  29651. "data": {
  29652. "type": "object",
  29653. "properties": {
  29654. "timestamp": {
  29655. "type": "number"
  29656. },
  29657. "sessionID": {
  29658. "type": "string",
  29659. "pattern": "^ses"
  29660. },
  29661. "assistantMessageID": {
  29662. "type": "string",
  29663. "pattern": "^msg_"
  29664. },
  29665. "error": {
  29666. "$ref": "#/components/schemas/SessionErrorUnknown"
  29667. }
  29668. },
  29669. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  29670. "additionalProperties": false
  29671. }
  29672. },
  29673. "required": ["id", "type", "data"],
  29674. "additionalProperties": false
  29675. },
  29676. "V2EventSessionNextTextStarted": {
  29677. "type": "object",
  29678. "properties": {
  29679. "id": {
  29680. "type": "string",
  29681. "pattern": "^evt_"
  29682. },
  29683. "metadata": {
  29684. "type": "object"
  29685. },
  29686. "durable": {
  29687. "type": "object",
  29688. "properties": {
  29689. "aggregateID": {
  29690. "type": "string"
  29691. },
  29692. "seq": {
  29693. "type": "integer"
  29694. },
  29695. "version": {
  29696. "type": "integer"
  29697. }
  29698. },
  29699. "required": ["aggregateID", "seq", "version"],
  29700. "additionalProperties": false
  29701. },
  29702. "location": {
  29703. "$ref": "#/components/schemas/LocationRef"
  29704. },
  29705. "type": {
  29706. "type": "string",
  29707. "enum": ["session.next.text.started"]
  29708. },
  29709. "data": {
  29710. "type": "object",
  29711. "properties": {
  29712. "timestamp": {
  29713. "type": "number"
  29714. },
  29715. "sessionID": {
  29716. "type": "string",
  29717. "pattern": "^ses"
  29718. },
  29719. "assistantMessageID": {
  29720. "type": "string",
  29721. "pattern": "^msg_"
  29722. },
  29723. "textID": {
  29724. "type": "string"
  29725. }
  29726. },
  29727. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  29728. "additionalProperties": false
  29729. }
  29730. },
  29731. "required": ["id", "type", "data"],
  29732. "additionalProperties": false
  29733. },
  29734. "V2EventSessionNextTextDelta": {
  29735. "type": "object",
  29736. "properties": {
  29737. "id": {
  29738. "type": "string",
  29739. "pattern": "^evt_"
  29740. },
  29741. "metadata": {
  29742. "type": "object"
  29743. },
  29744. "durable": {
  29745. "type": "object",
  29746. "properties": {
  29747. "aggregateID": {
  29748. "type": "string"
  29749. },
  29750. "seq": {
  29751. "type": "integer"
  29752. },
  29753. "version": {
  29754. "type": "integer"
  29755. }
  29756. },
  29757. "required": ["aggregateID", "seq", "version"],
  29758. "additionalProperties": false
  29759. },
  29760. "location": {
  29761. "$ref": "#/components/schemas/LocationRef"
  29762. },
  29763. "type": {
  29764. "type": "string",
  29765. "enum": ["session.next.text.delta"]
  29766. },
  29767. "data": {
  29768. "type": "object",
  29769. "properties": {
  29770. "timestamp": {
  29771. "type": "number"
  29772. },
  29773. "sessionID": {
  29774. "type": "string",
  29775. "pattern": "^ses"
  29776. },
  29777. "assistantMessageID": {
  29778. "type": "string",
  29779. "pattern": "^msg_"
  29780. },
  29781. "textID": {
  29782. "type": "string"
  29783. },
  29784. "delta": {
  29785. "type": "string"
  29786. }
  29787. },
  29788. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  29789. "additionalProperties": false
  29790. }
  29791. },
  29792. "required": ["id", "type", "data"],
  29793. "additionalProperties": false
  29794. },
  29795. "V2EventSessionNextTextEnded": {
  29796. "type": "object",
  29797. "properties": {
  29798. "id": {
  29799. "type": "string",
  29800. "pattern": "^evt_"
  29801. },
  29802. "metadata": {
  29803. "type": "object"
  29804. },
  29805. "durable": {
  29806. "type": "object",
  29807. "properties": {
  29808. "aggregateID": {
  29809. "type": "string"
  29810. },
  29811. "seq": {
  29812. "type": "integer"
  29813. },
  29814. "version": {
  29815. "type": "integer"
  29816. }
  29817. },
  29818. "required": ["aggregateID", "seq", "version"],
  29819. "additionalProperties": false
  29820. },
  29821. "location": {
  29822. "$ref": "#/components/schemas/LocationRef"
  29823. },
  29824. "type": {
  29825. "type": "string",
  29826. "enum": ["session.next.text.ended"]
  29827. },
  29828. "data": {
  29829. "type": "object",
  29830. "properties": {
  29831. "timestamp": {
  29832. "type": "number"
  29833. },
  29834. "sessionID": {
  29835. "type": "string",
  29836. "pattern": "^ses"
  29837. },
  29838. "assistantMessageID": {
  29839. "type": "string",
  29840. "pattern": "^msg_"
  29841. },
  29842. "textID": {
  29843. "type": "string"
  29844. },
  29845. "text": {
  29846. "type": "string"
  29847. }
  29848. },
  29849. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  29850. "additionalProperties": false
  29851. }
  29852. },
  29853. "required": ["id", "type", "data"],
  29854. "additionalProperties": false
  29855. },
  29856. "V2EventSessionNextReasoningStarted": {
  29857. "type": "object",
  29858. "properties": {
  29859. "id": {
  29860. "type": "string",
  29861. "pattern": "^evt_"
  29862. },
  29863. "metadata": {
  29864. "type": "object"
  29865. },
  29866. "durable": {
  29867. "type": "object",
  29868. "properties": {
  29869. "aggregateID": {
  29870. "type": "string"
  29871. },
  29872. "seq": {
  29873. "type": "integer"
  29874. },
  29875. "version": {
  29876. "type": "integer"
  29877. }
  29878. },
  29879. "required": ["aggregateID", "seq", "version"],
  29880. "additionalProperties": false
  29881. },
  29882. "location": {
  29883. "$ref": "#/components/schemas/LocationRef"
  29884. },
  29885. "type": {
  29886. "type": "string",
  29887. "enum": ["session.next.reasoning.started"]
  29888. },
  29889. "data": {
  29890. "type": "object",
  29891. "properties": {
  29892. "timestamp": {
  29893. "type": "number"
  29894. },
  29895. "sessionID": {
  29896. "type": "string",
  29897. "pattern": "^ses"
  29898. },
  29899. "assistantMessageID": {
  29900. "type": "string",
  29901. "pattern": "^msg_"
  29902. },
  29903. "reasoningID": {
  29904. "type": "string"
  29905. },
  29906. "providerMetadata": {
  29907. "type": "object",
  29908. "additionalProperties": {
  29909. "type": "object"
  29910. }
  29911. }
  29912. },
  29913. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29914. "additionalProperties": false
  29915. }
  29916. },
  29917. "required": ["id", "type", "data"],
  29918. "additionalProperties": false
  29919. },
  29920. "V2EventSessionNextReasoningDelta": {
  29921. "type": "object",
  29922. "properties": {
  29923. "id": {
  29924. "type": "string",
  29925. "pattern": "^evt_"
  29926. },
  29927. "metadata": {
  29928. "type": "object"
  29929. },
  29930. "durable": {
  29931. "type": "object",
  29932. "properties": {
  29933. "aggregateID": {
  29934. "type": "string"
  29935. },
  29936. "seq": {
  29937. "type": "integer"
  29938. },
  29939. "version": {
  29940. "type": "integer"
  29941. }
  29942. },
  29943. "required": ["aggregateID", "seq", "version"],
  29944. "additionalProperties": false
  29945. },
  29946. "location": {
  29947. "$ref": "#/components/schemas/LocationRef"
  29948. },
  29949. "type": {
  29950. "type": "string",
  29951. "enum": ["session.next.reasoning.delta"]
  29952. },
  29953. "data": {
  29954. "type": "object",
  29955. "properties": {
  29956. "timestamp": {
  29957. "type": "number"
  29958. },
  29959. "sessionID": {
  29960. "type": "string",
  29961. "pattern": "^ses"
  29962. },
  29963. "assistantMessageID": {
  29964. "type": "string",
  29965. "pattern": "^msg_"
  29966. },
  29967. "reasoningID": {
  29968. "type": "string"
  29969. },
  29970. "delta": {
  29971. "type": "string"
  29972. }
  29973. },
  29974. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  29975. "additionalProperties": false
  29976. }
  29977. },
  29978. "required": ["id", "type", "data"],
  29979. "additionalProperties": false
  29980. },
  29981. "V2EventSessionNextReasoningEnded": {
  29982. "type": "object",
  29983. "properties": {
  29984. "id": {
  29985. "type": "string",
  29986. "pattern": "^evt_"
  29987. },
  29988. "metadata": {
  29989. "type": "object"
  29990. },
  29991. "durable": {
  29992. "type": "object",
  29993. "properties": {
  29994. "aggregateID": {
  29995. "type": "string"
  29996. },
  29997. "seq": {
  29998. "type": "integer"
  29999. },
  30000. "version": {
  30001. "type": "integer"
  30002. }
  30003. },
  30004. "required": ["aggregateID", "seq", "version"],
  30005. "additionalProperties": false
  30006. },
  30007. "location": {
  30008. "$ref": "#/components/schemas/LocationRef"
  30009. },
  30010. "type": {
  30011. "type": "string",
  30012. "enum": ["session.next.reasoning.ended"]
  30013. },
  30014. "data": {
  30015. "type": "object",
  30016. "properties": {
  30017. "timestamp": {
  30018. "type": "number"
  30019. },
  30020. "sessionID": {
  30021. "type": "string",
  30022. "pattern": "^ses"
  30023. },
  30024. "assistantMessageID": {
  30025. "type": "string",
  30026. "pattern": "^msg_"
  30027. },
  30028. "reasoningID": {
  30029. "type": "string"
  30030. },
  30031. "text": {
  30032. "type": "string"
  30033. },
  30034. "providerMetadata": {
  30035. "type": "object",
  30036. "additionalProperties": {
  30037. "type": "object"
  30038. }
  30039. }
  30040. },
  30041. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  30042. "additionalProperties": false
  30043. }
  30044. },
  30045. "required": ["id", "type", "data"],
  30046. "additionalProperties": false
  30047. },
  30048. "V2EventSessionNextToolInputStarted": {
  30049. "type": "object",
  30050. "properties": {
  30051. "id": {
  30052. "type": "string",
  30053. "pattern": "^evt_"
  30054. },
  30055. "metadata": {
  30056. "type": "object"
  30057. },
  30058. "durable": {
  30059. "type": "object",
  30060. "properties": {
  30061. "aggregateID": {
  30062. "type": "string"
  30063. },
  30064. "seq": {
  30065. "type": "integer"
  30066. },
  30067. "version": {
  30068. "type": "integer"
  30069. }
  30070. },
  30071. "required": ["aggregateID", "seq", "version"],
  30072. "additionalProperties": false
  30073. },
  30074. "location": {
  30075. "$ref": "#/components/schemas/LocationRef"
  30076. },
  30077. "type": {
  30078. "type": "string",
  30079. "enum": ["session.next.tool.input.started"]
  30080. },
  30081. "data": {
  30082. "type": "object",
  30083. "properties": {
  30084. "timestamp": {
  30085. "type": "number"
  30086. },
  30087. "sessionID": {
  30088. "type": "string",
  30089. "pattern": "^ses"
  30090. },
  30091. "assistantMessageID": {
  30092. "type": "string",
  30093. "pattern": "^msg_"
  30094. },
  30095. "callID": {
  30096. "type": "string"
  30097. },
  30098. "name": {
  30099. "type": "string"
  30100. }
  30101. },
  30102. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  30103. "additionalProperties": false
  30104. }
  30105. },
  30106. "required": ["id", "type", "data"],
  30107. "additionalProperties": false
  30108. },
  30109. "V2EventSessionNextToolInputDelta": {
  30110. "type": "object",
  30111. "properties": {
  30112. "id": {
  30113. "type": "string",
  30114. "pattern": "^evt_"
  30115. },
  30116. "metadata": {
  30117. "type": "object"
  30118. },
  30119. "durable": {
  30120. "type": "object",
  30121. "properties": {
  30122. "aggregateID": {
  30123. "type": "string"
  30124. },
  30125. "seq": {
  30126. "type": "integer"
  30127. },
  30128. "version": {
  30129. "type": "integer"
  30130. }
  30131. },
  30132. "required": ["aggregateID", "seq", "version"],
  30133. "additionalProperties": false
  30134. },
  30135. "location": {
  30136. "$ref": "#/components/schemas/LocationRef"
  30137. },
  30138. "type": {
  30139. "type": "string",
  30140. "enum": ["session.next.tool.input.delta"]
  30141. },
  30142. "data": {
  30143. "type": "object",
  30144. "properties": {
  30145. "timestamp": {
  30146. "type": "number"
  30147. },
  30148. "sessionID": {
  30149. "type": "string",
  30150. "pattern": "^ses"
  30151. },
  30152. "assistantMessageID": {
  30153. "type": "string",
  30154. "pattern": "^msg_"
  30155. },
  30156. "callID": {
  30157. "type": "string"
  30158. },
  30159. "delta": {
  30160. "type": "string"
  30161. }
  30162. },
  30163. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  30164. "additionalProperties": false
  30165. }
  30166. },
  30167. "required": ["id", "type", "data"],
  30168. "additionalProperties": false
  30169. },
  30170. "V2EventSessionNextToolInputEnded": {
  30171. "type": "object",
  30172. "properties": {
  30173. "id": {
  30174. "type": "string",
  30175. "pattern": "^evt_"
  30176. },
  30177. "metadata": {
  30178. "type": "object"
  30179. },
  30180. "durable": {
  30181. "type": "object",
  30182. "properties": {
  30183. "aggregateID": {
  30184. "type": "string"
  30185. },
  30186. "seq": {
  30187. "type": "integer"
  30188. },
  30189. "version": {
  30190. "type": "integer"
  30191. }
  30192. },
  30193. "required": ["aggregateID", "seq", "version"],
  30194. "additionalProperties": false
  30195. },
  30196. "location": {
  30197. "$ref": "#/components/schemas/LocationRef"
  30198. },
  30199. "type": {
  30200. "type": "string",
  30201. "enum": ["session.next.tool.input.ended"]
  30202. },
  30203. "data": {
  30204. "type": "object",
  30205. "properties": {
  30206. "timestamp": {
  30207. "type": "number"
  30208. },
  30209. "sessionID": {
  30210. "type": "string",
  30211. "pattern": "^ses"
  30212. },
  30213. "assistantMessageID": {
  30214. "type": "string",
  30215. "pattern": "^msg_"
  30216. },
  30217. "callID": {
  30218. "type": "string"
  30219. },
  30220. "text": {
  30221. "type": "string"
  30222. }
  30223. },
  30224. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  30225. "additionalProperties": false
  30226. }
  30227. },
  30228. "required": ["id", "type", "data"],
  30229. "additionalProperties": false
  30230. },
  30231. "V2EventSessionNextToolCalled": {
  30232. "type": "object",
  30233. "properties": {
  30234. "id": {
  30235. "type": "string",
  30236. "pattern": "^evt_"
  30237. },
  30238. "metadata": {
  30239. "type": "object"
  30240. },
  30241. "durable": {
  30242. "type": "object",
  30243. "properties": {
  30244. "aggregateID": {
  30245. "type": "string"
  30246. },
  30247. "seq": {
  30248. "type": "integer"
  30249. },
  30250. "version": {
  30251. "type": "integer"
  30252. }
  30253. },
  30254. "required": ["aggregateID", "seq", "version"],
  30255. "additionalProperties": false
  30256. },
  30257. "location": {
  30258. "$ref": "#/components/schemas/LocationRef"
  30259. },
  30260. "type": {
  30261. "type": "string",
  30262. "enum": ["session.next.tool.called"]
  30263. },
  30264. "data": {
  30265. "type": "object",
  30266. "properties": {
  30267. "timestamp": {
  30268. "type": "number"
  30269. },
  30270. "sessionID": {
  30271. "type": "string",
  30272. "pattern": "^ses"
  30273. },
  30274. "assistantMessageID": {
  30275. "type": "string",
  30276. "pattern": "^msg_"
  30277. },
  30278. "callID": {
  30279. "type": "string"
  30280. },
  30281. "tool": {
  30282. "type": "string"
  30283. },
  30284. "input": {
  30285. "type": "object"
  30286. },
  30287. "provider": {
  30288. "type": "object",
  30289. "properties": {
  30290. "executed": {
  30291. "type": "boolean"
  30292. },
  30293. "metadata": {
  30294. "type": "object",
  30295. "additionalProperties": {
  30296. "type": "object"
  30297. }
  30298. }
  30299. },
  30300. "required": ["executed"],
  30301. "additionalProperties": false
  30302. }
  30303. },
  30304. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  30305. "additionalProperties": false
  30306. }
  30307. },
  30308. "required": ["id", "type", "data"],
  30309. "additionalProperties": false
  30310. },
  30311. "V2EventSessionNextToolProgress": {
  30312. "type": "object",
  30313. "properties": {
  30314. "id": {
  30315. "type": "string",
  30316. "pattern": "^evt_"
  30317. },
  30318. "metadata": {
  30319. "type": "object"
  30320. },
  30321. "durable": {
  30322. "type": "object",
  30323. "properties": {
  30324. "aggregateID": {
  30325. "type": "string"
  30326. },
  30327. "seq": {
  30328. "type": "integer"
  30329. },
  30330. "version": {
  30331. "type": "integer"
  30332. }
  30333. },
  30334. "required": ["aggregateID", "seq", "version"],
  30335. "additionalProperties": false
  30336. },
  30337. "location": {
  30338. "$ref": "#/components/schemas/LocationRef"
  30339. },
  30340. "type": {
  30341. "type": "string",
  30342. "enum": ["session.next.tool.progress"]
  30343. },
  30344. "data": {
  30345. "type": "object",
  30346. "properties": {
  30347. "timestamp": {
  30348. "type": "number"
  30349. },
  30350. "sessionID": {
  30351. "type": "string",
  30352. "pattern": "^ses"
  30353. },
  30354. "assistantMessageID": {
  30355. "type": "string",
  30356. "pattern": "^msg_"
  30357. },
  30358. "callID": {
  30359. "type": "string"
  30360. },
  30361. "structured": {
  30362. "type": "object"
  30363. },
  30364. "content": {
  30365. "type": "array",
  30366. "items": {
  30367. "anyOf": [
  30368. {
  30369. "$ref": "#/components/schemas/ToolTextContent"
  30370. },
  30371. {
  30372. "$ref": "#/components/schemas/ToolFileContent"
  30373. }
  30374. ]
  30375. }
  30376. }
  30377. },
  30378. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  30379. "additionalProperties": false
  30380. }
  30381. },
  30382. "required": ["id", "type", "data"],
  30383. "additionalProperties": false
  30384. },
  30385. "V2EventSessionNextToolSuccess": {
  30386. "type": "object",
  30387. "properties": {
  30388. "id": {
  30389. "type": "string",
  30390. "pattern": "^evt_"
  30391. },
  30392. "metadata": {
  30393. "type": "object"
  30394. },
  30395. "durable": {
  30396. "type": "object",
  30397. "properties": {
  30398. "aggregateID": {
  30399. "type": "string"
  30400. },
  30401. "seq": {
  30402. "type": "integer"
  30403. },
  30404. "version": {
  30405. "type": "integer"
  30406. }
  30407. },
  30408. "required": ["aggregateID", "seq", "version"],
  30409. "additionalProperties": false
  30410. },
  30411. "location": {
  30412. "$ref": "#/components/schemas/LocationRef"
  30413. },
  30414. "type": {
  30415. "type": "string",
  30416. "enum": ["session.next.tool.success"]
  30417. },
  30418. "data": {
  30419. "type": "object",
  30420. "properties": {
  30421. "timestamp": {
  30422. "type": "number"
  30423. },
  30424. "sessionID": {
  30425. "type": "string",
  30426. "pattern": "^ses"
  30427. },
  30428. "assistantMessageID": {
  30429. "type": "string",
  30430. "pattern": "^msg_"
  30431. },
  30432. "callID": {
  30433. "type": "string"
  30434. },
  30435. "structured": {
  30436. "type": "object"
  30437. },
  30438. "content": {
  30439. "type": "array",
  30440. "items": {
  30441. "anyOf": [
  30442. {
  30443. "$ref": "#/components/schemas/ToolTextContent"
  30444. },
  30445. {
  30446. "$ref": "#/components/schemas/ToolFileContent"
  30447. }
  30448. ]
  30449. }
  30450. },
  30451. "outputPaths": {
  30452. "type": "array",
  30453. "items": {
  30454. "type": "string"
  30455. }
  30456. },
  30457. "result": {},
  30458. "provider": {
  30459. "type": "object",
  30460. "properties": {
  30461. "executed": {
  30462. "type": "boolean"
  30463. },
  30464. "metadata": {
  30465. "type": "object",
  30466. "additionalProperties": {
  30467. "type": "object"
  30468. }
  30469. }
  30470. },
  30471. "required": ["executed"],
  30472. "additionalProperties": false
  30473. }
  30474. },
  30475. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  30476. "additionalProperties": false
  30477. }
  30478. },
  30479. "required": ["id", "type", "data"],
  30480. "additionalProperties": false
  30481. },
  30482. "V2EventSessionNextToolFailed": {
  30483. "type": "object",
  30484. "properties": {
  30485. "id": {
  30486. "type": "string",
  30487. "pattern": "^evt_"
  30488. },
  30489. "metadata": {
  30490. "type": "object"
  30491. },
  30492. "durable": {
  30493. "type": "object",
  30494. "properties": {
  30495. "aggregateID": {
  30496. "type": "string"
  30497. },
  30498. "seq": {
  30499. "type": "integer"
  30500. },
  30501. "version": {
  30502. "type": "integer"
  30503. }
  30504. },
  30505. "required": ["aggregateID", "seq", "version"],
  30506. "additionalProperties": false
  30507. },
  30508. "location": {
  30509. "$ref": "#/components/schemas/LocationRef"
  30510. },
  30511. "type": {
  30512. "type": "string",
  30513. "enum": ["session.next.tool.failed"]
  30514. },
  30515. "data": {
  30516. "type": "object",
  30517. "properties": {
  30518. "timestamp": {
  30519. "type": "number"
  30520. },
  30521. "sessionID": {
  30522. "type": "string",
  30523. "pattern": "^ses"
  30524. },
  30525. "assistantMessageID": {
  30526. "type": "string",
  30527. "pattern": "^msg_"
  30528. },
  30529. "callID": {
  30530. "type": "string"
  30531. },
  30532. "error": {
  30533. "$ref": "#/components/schemas/SessionErrorUnknown"
  30534. },
  30535. "result": {},
  30536. "provider": {
  30537. "type": "object",
  30538. "properties": {
  30539. "executed": {
  30540. "type": "boolean"
  30541. },
  30542. "metadata": {
  30543. "type": "object",
  30544. "additionalProperties": {
  30545. "type": "object"
  30546. }
  30547. }
  30548. },
  30549. "required": ["executed"],
  30550. "additionalProperties": false
  30551. }
  30552. },
  30553. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  30554. "additionalProperties": false
  30555. }
  30556. },
  30557. "required": ["id", "type", "data"],
  30558. "additionalProperties": false
  30559. },
  30560. "V2EventSessionNextRetried": {
  30561. "type": "object",
  30562. "properties": {
  30563. "id": {
  30564. "type": "string",
  30565. "pattern": "^evt_"
  30566. },
  30567. "metadata": {
  30568. "type": "object"
  30569. },
  30570. "durable": {
  30571. "type": "object",
  30572. "properties": {
  30573. "aggregateID": {
  30574. "type": "string"
  30575. },
  30576. "seq": {
  30577. "type": "integer"
  30578. },
  30579. "version": {
  30580. "type": "integer"
  30581. }
  30582. },
  30583. "required": ["aggregateID", "seq", "version"],
  30584. "additionalProperties": false
  30585. },
  30586. "location": {
  30587. "$ref": "#/components/schemas/LocationRef"
  30588. },
  30589. "type": {
  30590. "type": "string",
  30591. "enum": ["session.next.retried"]
  30592. },
  30593. "data": {
  30594. "type": "object",
  30595. "properties": {
  30596. "timestamp": {
  30597. "type": "number"
  30598. },
  30599. "sessionID": {
  30600. "type": "string",
  30601. "pattern": "^ses"
  30602. },
  30603. "attempt": {
  30604. "type": "number"
  30605. },
  30606. "error": {
  30607. "$ref": "#/components/schemas/SessionNextRetry_error"
  30608. }
  30609. },
  30610. "required": ["timestamp", "sessionID", "attempt", "error"],
  30611. "additionalProperties": false
  30612. }
  30613. },
  30614. "required": ["id", "type", "data"],
  30615. "additionalProperties": false
  30616. },
  30617. "V2EventSessionNextCompactionStarted": {
  30618. "type": "object",
  30619. "properties": {
  30620. "id": {
  30621. "type": "string",
  30622. "pattern": "^evt_"
  30623. },
  30624. "metadata": {
  30625. "type": "object"
  30626. },
  30627. "durable": {
  30628. "type": "object",
  30629. "properties": {
  30630. "aggregateID": {
  30631. "type": "string"
  30632. },
  30633. "seq": {
  30634. "type": "integer"
  30635. },
  30636. "version": {
  30637. "type": "integer"
  30638. }
  30639. },
  30640. "required": ["aggregateID", "seq", "version"],
  30641. "additionalProperties": false
  30642. },
  30643. "location": {
  30644. "$ref": "#/components/schemas/LocationRef"
  30645. },
  30646. "type": {
  30647. "type": "string",
  30648. "enum": ["session.next.compaction.started"]
  30649. },
  30650. "data": {
  30651. "type": "object",
  30652. "properties": {
  30653. "timestamp": {
  30654. "type": "number"
  30655. },
  30656. "sessionID": {
  30657. "type": "string",
  30658. "pattern": "^ses"
  30659. },
  30660. "messageID": {
  30661. "type": "string",
  30662. "pattern": "^msg_"
  30663. },
  30664. "reason": {
  30665. "type": "string",
  30666. "enum": ["auto", "manual"]
  30667. }
  30668. },
  30669. "required": ["timestamp", "sessionID", "messageID", "reason"],
  30670. "additionalProperties": false
  30671. }
  30672. },
  30673. "required": ["id", "type", "data"],
  30674. "additionalProperties": false
  30675. },
  30676. "V2EventSessionNextCompactionDelta": {
  30677. "type": "object",
  30678. "properties": {
  30679. "id": {
  30680. "type": "string",
  30681. "pattern": "^evt_"
  30682. },
  30683. "metadata": {
  30684. "type": "object"
  30685. },
  30686. "durable": {
  30687. "type": "object",
  30688. "properties": {
  30689. "aggregateID": {
  30690. "type": "string"
  30691. },
  30692. "seq": {
  30693. "type": "integer"
  30694. },
  30695. "version": {
  30696. "type": "integer"
  30697. }
  30698. },
  30699. "required": ["aggregateID", "seq", "version"],
  30700. "additionalProperties": false
  30701. },
  30702. "location": {
  30703. "$ref": "#/components/schemas/LocationRef"
  30704. },
  30705. "type": {
  30706. "type": "string",
  30707. "enum": ["session.next.compaction.delta"]
  30708. },
  30709. "data": {
  30710. "type": "object",
  30711. "properties": {
  30712. "timestamp": {
  30713. "type": "number"
  30714. },
  30715. "sessionID": {
  30716. "type": "string",
  30717. "pattern": "^ses"
  30718. },
  30719. "messageID": {
  30720. "type": "string",
  30721. "pattern": "^msg_"
  30722. },
  30723. "text": {
  30724. "type": "string"
  30725. }
  30726. },
  30727. "required": ["timestamp", "sessionID", "messageID", "text"],
  30728. "additionalProperties": false
  30729. }
  30730. },
  30731. "required": ["id", "type", "data"],
  30732. "additionalProperties": false
  30733. },
  30734. "V2EventSessionNextCompactionEnded": {
  30735. "type": "object",
  30736. "properties": {
  30737. "id": {
  30738. "type": "string",
  30739. "pattern": "^evt_"
  30740. },
  30741. "metadata": {
  30742. "type": "object"
  30743. },
  30744. "durable": {
  30745. "type": "object",
  30746. "properties": {
  30747. "aggregateID": {
  30748. "type": "string"
  30749. },
  30750. "seq": {
  30751. "type": "integer"
  30752. },
  30753. "version": {
  30754. "type": "integer"
  30755. }
  30756. },
  30757. "required": ["aggregateID", "seq", "version"],
  30758. "additionalProperties": false
  30759. },
  30760. "location": {
  30761. "$ref": "#/components/schemas/LocationRef"
  30762. },
  30763. "type": {
  30764. "type": "string",
  30765. "enum": ["session.next.compaction.ended"]
  30766. },
  30767. "data": {
  30768. "type": "object",
  30769. "properties": {
  30770. "timestamp": {
  30771. "type": "number"
  30772. },
  30773. "sessionID": {
  30774. "type": "string",
  30775. "pattern": "^ses"
  30776. },
  30777. "messageID": {
  30778. "type": "string",
  30779. "pattern": "^msg_"
  30780. },
  30781. "reason": {
  30782. "type": "string",
  30783. "enum": ["auto", "manual"]
  30784. },
  30785. "text": {
  30786. "type": "string"
  30787. },
  30788. "recent": {
  30789. "type": "string"
  30790. }
  30791. },
  30792. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  30793. "additionalProperties": false
  30794. }
  30795. },
  30796. "required": ["id", "type", "data"],
  30797. "additionalProperties": false
  30798. },
  30799. "V2EventSessionNextRevertStaged": {
  30800. "type": "object",
  30801. "properties": {
  30802. "id": {
  30803. "type": "string",
  30804. "pattern": "^evt_"
  30805. },
  30806. "metadata": {
  30807. "type": "object"
  30808. },
  30809. "durable": {
  30810. "type": "object",
  30811. "properties": {
  30812. "aggregateID": {
  30813. "type": "string"
  30814. },
  30815. "seq": {
  30816. "type": "integer"
  30817. },
  30818. "version": {
  30819. "type": "integer"
  30820. }
  30821. },
  30822. "required": ["aggregateID", "seq", "version"],
  30823. "additionalProperties": false
  30824. },
  30825. "location": {
  30826. "$ref": "#/components/schemas/LocationRef"
  30827. },
  30828. "type": {
  30829. "type": "string",
  30830. "enum": ["session.next.revert.staged"]
  30831. },
  30832. "data": {
  30833. "type": "object",
  30834. "properties": {
  30835. "timestamp": {
  30836. "type": "number"
  30837. },
  30838. "sessionID": {
  30839. "type": "string",
  30840. "pattern": "^ses"
  30841. },
  30842. "revert": {
  30843. "type": "object",
  30844. "properties": {
  30845. "messageID": {
  30846. "type": "string",
  30847. "pattern": "^msg_"
  30848. },
  30849. "partID": {
  30850. "type": "string"
  30851. },
  30852. "snapshot": {
  30853. "type": "string"
  30854. },
  30855. "diff": {
  30856. "type": "string"
  30857. },
  30858. "files": {
  30859. "type": "array",
  30860. "items": {
  30861. "$ref": "#/components/schemas/FileDiff"
  30862. }
  30863. }
  30864. },
  30865. "required": ["messageID"],
  30866. "additionalProperties": false
  30867. }
  30868. },
  30869. "required": ["timestamp", "sessionID", "revert"],
  30870. "additionalProperties": false
  30871. }
  30872. },
  30873. "required": ["id", "type", "data"],
  30874. "additionalProperties": false
  30875. },
  30876. "V2EventSessionNextRevertCleared": {
  30877. "type": "object",
  30878. "properties": {
  30879. "id": {
  30880. "type": "string",
  30881. "pattern": "^evt_"
  30882. },
  30883. "metadata": {
  30884. "type": "object"
  30885. },
  30886. "durable": {
  30887. "type": "object",
  30888. "properties": {
  30889. "aggregateID": {
  30890. "type": "string"
  30891. },
  30892. "seq": {
  30893. "type": "integer"
  30894. },
  30895. "version": {
  30896. "type": "integer"
  30897. }
  30898. },
  30899. "required": ["aggregateID", "seq", "version"],
  30900. "additionalProperties": false
  30901. },
  30902. "location": {
  30903. "$ref": "#/components/schemas/LocationRef"
  30904. },
  30905. "type": {
  30906. "type": "string",
  30907. "enum": ["session.next.revert.cleared"]
  30908. },
  30909. "data": {
  30910. "type": "object",
  30911. "properties": {
  30912. "timestamp": {
  30913. "type": "number"
  30914. },
  30915. "sessionID": {
  30916. "type": "string",
  30917. "pattern": "^ses"
  30918. }
  30919. },
  30920. "required": ["timestamp", "sessionID"],
  30921. "additionalProperties": false
  30922. }
  30923. },
  30924. "required": ["id", "type", "data"],
  30925. "additionalProperties": false
  30926. },
  30927. "V2EventSessionNextRevertCommitted": {
  30928. "type": "object",
  30929. "properties": {
  30930. "id": {
  30931. "type": "string",
  30932. "pattern": "^evt_"
  30933. },
  30934. "metadata": {
  30935. "type": "object"
  30936. },
  30937. "durable": {
  30938. "type": "object",
  30939. "properties": {
  30940. "aggregateID": {
  30941. "type": "string"
  30942. },
  30943. "seq": {
  30944. "type": "integer"
  30945. },
  30946. "version": {
  30947. "type": "integer"
  30948. }
  30949. },
  30950. "required": ["aggregateID", "seq", "version"],
  30951. "additionalProperties": false
  30952. },
  30953. "location": {
  30954. "$ref": "#/components/schemas/LocationRef"
  30955. },
  30956. "type": {
  30957. "type": "string",
  30958. "enum": ["session.next.revert.committed"]
  30959. },
  30960. "data": {
  30961. "type": "object",
  30962. "properties": {
  30963. "timestamp": {
  30964. "type": "number"
  30965. },
  30966. "sessionID": {
  30967. "type": "string",
  30968. "pattern": "^ses"
  30969. },
  30970. "messageID": {
  30971. "type": "string",
  30972. "pattern": "^msg_"
  30973. }
  30974. },
  30975. "required": ["timestamp", "sessionID", "messageID"],
  30976. "additionalProperties": false
  30977. }
  30978. },
  30979. "required": ["id", "type", "data"],
  30980. "additionalProperties": false
  30981. },
  30982. "V2EventMessagePartDelta": {
  30983. "type": "object",
  30984. "properties": {
  30985. "id": {
  30986. "type": "string",
  30987. "pattern": "^evt_"
  30988. },
  30989. "metadata": {
  30990. "type": "object"
  30991. },
  30992. "durable": {
  30993. "type": "object",
  30994. "properties": {
  30995. "aggregateID": {
  30996. "type": "string"
  30997. },
  30998. "seq": {
  30999. "type": "integer"
  31000. },
  31001. "version": {
  31002. "type": "integer"
  31003. }
  31004. },
  31005. "required": ["aggregateID", "seq", "version"],
  31006. "additionalProperties": false
  31007. },
  31008. "location": {
  31009. "$ref": "#/components/schemas/LocationRef"
  31010. },
  31011. "type": {
  31012. "type": "string",
  31013. "enum": ["message.part.delta"]
  31014. },
  31015. "data": {
  31016. "type": "object",
  31017. "properties": {
  31018. "sessionID": {
  31019. "type": "string",
  31020. "pattern": "^ses"
  31021. },
  31022. "messageID": {
  31023. "type": "string",
  31024. "pattern": "^msg"
  31025. },
  31026. "partID": {
  31027. "type": "string",
  31028. "pattern": "^prt"
  31029. },
  31030. "field": {
  31031. "type": "string"
  31032. },
  31033. "delta": {
  31034. "type": "string"
  31035. }
  31036. },
  31037. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  31038. "additionalProperties": false
  31039. }
  31040. },
  31041. "required": ["id", "type", "data"],
  31042. "additionalProperties": false
  31043. },
  31044. "V2EventSessionDiff": {
  31045. "type": "object",
  31046. "properties": {
  31047. "id": {
  31048. "type": "string",
  31049. "pattern": "^evt_"
  31050. },
  31051. "metadata": {
  31052. "type": "object"
  31053. },
  31054. "durable": {
  31055. "type": "object",
  31056. "properties": {
  31057. "aggregateID": {
  31058. "type": "string"
  31059. },
  31060. "seq": {
  31061. "type": "integer"
  31062. },
  31063. "version": {
  31064. "type": "integer"
  31065. }
  31066. },
  31067. "required": ["aggregateID", "seq", "version"],
  31068. "additionalProperties": false
  31069. },
  31070. "location": {
  31071. "$ref": "#/components/schemas/LocationRef"
  31072. },
  31073. "type": {
  31074. "type": "string",
  31075. "enum": ["session.diff"]
  31076. },
  31077. "data": {
  31078. "type": "object",
  31079. "properties": {
  31080. "sessionID": {
  31081. "type": "string",
  31082. "pattern": "^ses"
  31083. },
  31084. "diff": {
  31085. "type": "array",
  31086. "items": {
  31087. "$ref": "#/components/schemas/SnapshotFileDiff"
  31088. }
  31089. }
  31090. },
  31091. "required": ["sessionID", "diff"],
  31092. "additionalProperties": false
  31093. }
  31094. },
  31095. "required": ["id", "type", "data"],
  31096. "additionalProperties": false
  31097. },
  31098. "V2EventSessionError": {
  31099. "type": "object",
  31100. "properties": {
  31101. "id": {
  31102. "type": "string",
  31103. "pattern": "^evt_"
  31104. },
  31105. "metadata": {
  31106. "type": "object"
  31107. },
  31108. "durable": {
  31109. "type": "object",
  31110. "properties": {
  31111. "aggregateID": {
  31112. "type": "string"
  31113. },
  31114. "seq": {
  31115. "type": "integer"
  31116. },
  31117. "version": {
  31118. "type": "integer"
  31119. }
  31120. },
  31121. "required": ["aggregateID", "seq", "version"],
  31122. "additionalProperties": false
  31123. },
  31124. "location": {
  31125. "$ref": "#/components/schemas/LocationRef"
  31126. },
  31127. "type": {
  31128. "type": "string",
  31129. "enum": ["session.error"]
  31130. },
  31131. "data": {
  31132. "type": "object",
  31133. "properties": {
  31134. "sessionID": {
  31135. "type": "string",
  31136. "pattern": "^ses"
  31137. },
  31138. "error": {
  31139. "anyOf": [
  31140. {
  31141. "$ref": "#/components/schemas/ProviderAuthError"
  31142. },
  31143. {
  31144. "$ref": "#/components/schemas/UnknownError"
  31145. },
  31146. {
  31147. "$ref": "#/components/schemas/MessageOutputLengthError"
  31148. },
  31149. {
  31150. "$ref": "#/components/schemas/MessageAbortedError"
  31151. },
  31152. {
  31153. "$ref": "#/components/schemas/StructuredOutputError"
  31154. },
  31155. {
  31156. "$ref": "#/components/schemas/ContextOverflowError"
  31157. },
  31158. {
  31159. "$ref": "#/components/schemas/ContentFilterError"
  31160. },
  31161. {
  31162. "$ref": "#/components/schemas/APIError"
  31163. }
  31164. ]
  31165. }
  31166. },
  31167. "additionalProperties": false
  31168. }
  31169. },
  31170. "required": ["id", "type", "data"],
  31171. "additionalProperties": false
  31172. },
  31173. "V2EventInstallationUpdated": {
  31174. "type": "object",
  31175. "properties": {
  31176. "id": {
  31177. "type": "string",
  31178. "pattern": "^evt_"
  31179. },
  31180. "metadata": {
  31181. "type": "object"
  31182. },
  31183. "durable": {
  31184. "type": "object",
  31185. "properties": {
  31186. "aggregateID": {
  31187. "type": "string"
  31188. },
  31189. "seq": {
  31190. "type": "integer"
  31191. },
  31192. "version": {
  31193. "type": "integer"
  31194. }
  31195. },
  31196. "required": ["aggregateID", "seq", "version"],
  31197. "additionalProperties": false
  31198. },
  31199. "location": {
  31200. "$ref": "#/components/schemas/LocationRef"
  31201. },
  31202. "type": {
  31203. "type": "string",
  31204. "enum": ["installation.updated"]
  31205. },
  31206. "data": {
  31207. "type": "object",
  31208. "properties": {
  31209. "version": {
  31210. "type": "string"
  31211. }
  31212. },
  31213. "required": ["version"],
  31214. "additionalProperties": false
  31215. }
  31216. },
  31217. "required": ["id", "type", "data"],
  31218. "additionalProperties": false
  31219. },
  31220. "V2EventInstallationUpdate-available": {
  31221. "type": "object",
  31222. "properties": {
  31223. "id": {
  31224. "type": "string",
  31225. "pattern": "^evt_"
  31226. },
  31227. "metadata": {
  31228. "type": "object"
  31229. },
  31230. "durable": {
  31231. "type": "object",
  31232. "properties": {
  31233. "aggregateID": {
  31234. "type": "string"
  31235. },
  31236. "seq": {
  31237. "type": "integer"
  31238. },
  31239. "version": {
  31240. "type": "integer"
  31241. }
  31242. },
  31243. "required": ["aggregateID", "seq", "version"],
  31244. "additionalProperties": false
  31245. },
  31246. "location": {
  31247. "$ref": "#/components/schemas/LocationRef"
  31248. },
  31249. "type": {
  31250. "type": "string",
  31251. "enum": ["installation.update-available"]
  31252. },
  31253. "data": {
  31254. "type": "object",
  31255. "properties": {
  31256. "version": {
  31257. "type": "string"
  31258. }
  31259. },
  31260. "required": ["version"],
  31261. "additionalProperties": false
  31262. }
  31263. },
  31264. "required": ["id", "type", "data"],
  31265. "additionalProperties": false
  31266. },
  31267. "V2EventFileEdited": {
  31268. "type": "object",
  31269. "properties": {
  31270. "id": {
  31271. "type": "string",
  31272. "pattern": "^evt_"
  31273. },
  31274. "metadata": {
  31275. "type": "object"
  31276. },
  31277. "durable": {
  31278. "type": "object",
  31279. "properties": {
  31280. "aggregateID": {
  31281. "type": "string"
  31282. },
  31283. "seq": {
  31284. "type": "integer"
  31285. },
  31286. "version": {
  31287. "type": "integer"
  31288. }
  31289. },
  31290. "required": ["aggregateID", "seq", "version"],
  31291. "additionalProperties": false
  31292. },
  31293. "location": {
  31294. "$ref": "#/components/schemas/LocationRef"
  31295. },
  31296. "type": {
  31297. "type": "string",
  31298. "enum": ["file.edited"]
  31299. },
  31300. "data": {
  31301. "type": "object",
  31302. "properties": {
  31303. "file": {
  31304. "type": "string"
  31305. }
  31306. },
  31307. "required": ["file"],
  31308. "additionalProperties": false
  31309. }
  31310. },
  31311. "required": ["id", "type", "data"],
  31312. "additionalProperties": false
  31313. },
  31314. "V2EventReferenceUpdated": {
  31315. "type": "object",
  31316. "properties": {
  31317. "id": {
  31318. "type": "string",
  31319. "pattern": "^evt_"
  31320. },
  31321. "metadata": {
  31322. "type": "object"
  31323. },
  31324. "durable": {
  31325. "type": "object",
  31326. "properties": {
  31327. "aggregateID": {
  31328. "type": "string"
  31329. },
  31330. "seq": {
  31331. "type": "integer"
  31332. },
  31333. "version": {
  31334. "type": "integer"
  31335. }
  31336. },
  31337. "required": ["aggregateID", "seq", "version"],
  31338. "additionalProperties": false
  31339. },
  31340. "location": {
  31341. "$ref": "#/components/schemas/LocationRef"
  31342. },
  31343. "type": {
  31344. "type": "string",
  31345. "enum": ["reference.updated"]
  31346. },
  31347. "data": {
  31348. "type": "object",
  31349. "properties": {}
  31350. }
  31351. },
  31352. "required": ["id", "type", "data"],
  31353. "additionalProperties": false
  31354. },
  31355. "V2EventPermissionV2Asked": {
  31356. "type": "object",
  31357. "properties": {
  31358. "id": {
  31359. "type": "string",
  31360. "pattern": "^evt_"
  31361. },
  31362. "metadata": {
  31363. "type": "object"
  31364. },
  31365. "durable": {
  31366. "type": "object",
  31367. "properties": {
  31368. "aggregateID": {
  31369. "type": "string"
  31370. },
  31371. "seq": {
  31372. "type": "integer"
  31373. },
  31374. "version": {
  31375. "type": "integer"
  31376. }
  31377. },
  31378. "required": ["aggregateID", "seq", "version"],
  31379. "additionalProperties": false
  31380. },
  31381. "location": {
  31382. "$ref": "#/components/schemas/LocationRef"
  31383. },
  31384. "type": {
  31385. "type": "string",
  31386. "enum": ["permission.v2.asked"]
  31387. },
  31388. "data": {
  31389. "type": "object",
  31390. "properties": {
  31391. "id": {
  31392. "type": "string",
  31393. "pattern": "^per"
  31394. },
  31395. "sessionID": {
  31396. "type": "string",
  31397. "pattern": "^ses"
  31398. },
  31399. "action": {
  31400. "type": "string"
  31401. },
  31402. "resources": {
  31403. "type": "array",
  31404. "items": {
  31405. "type": "string"
  31406. }
  31407. },
  31408. "save": {
  31409. "type": "array",
  31410. "items": {
  31411. "type": "string"
  31412. }
  31413. },
  31414. "metadata": {
  31415. "type": "object"
  31416. },
  31417. "source": {
  31418. "$ref": "#/components/schemas/PermissionV2Source"
  31419. }
  31420. },
  31421. "required": ["id", "sessionID", "action", "resources"],
  31422. "additionalProperties": false
  31423. }
  31424. },
  31425. "required": ["id", "type", "data"],
  31426. "additionalProperties": false
  31427. },
  31428. "V2EventPermissionV2Replied": {
  31429. "type": "object",
  31430. "properties": {
  31431. "id": {
  31432. "type": "string",
  31433. "pattern": "^evt_"
  31434. },
  31435. "metadata": {
  31436. "type": "object"
  31437. },
  31438. "durable": {
  31439. "type": "object",
  31440. "properties": {
  31441. "aggregateID": {
  31442. "type": "string"
  31443. },
  31444. "seq": {
  31445. "type": "integer"
  31446. },
  31447. "version": {
  31448. "type": "integer"
  31449. }
  31450. },
  31451. "required": ["aggregateID", "seq", "version"],
  31452. "additionalProperties": false
  31453. },
  31454. "location": {
  31455. "$ref": "#/components/schemas/LocationRef"
  31456. },
  31457. "type": {
  31458. "type": "string",
  31459. "enum": ["permission.v2.replied"]
  31460. },
  31461. "data": {
  31462. "type": "object",
  31463. "properties": {
  31464. "sessionID": {
  31465. "type": "string",
  31466. "pattern": "^ses"
  31467. },
  31468. "requestID": {
  31469. "type": "string",
  31470. "pattern": "^per"
  31471. },
  31472. "reply": {
  31473. "$ref": "#/components/schemas/PermissionV2Reply"
  31474. }
  31475. },
  31476. "required": ["sessionID", "requestID", "reply"],
  31477. "additionalProperties": false
  31478. }
  31479. },
  31480. "required": ["id", "type", "data"],
  31481. "additionalProperties": false
  31482. },
  31483. "V2EventPluginAdded": {
  31484. "type": "object",
  31485. "properties": {
  31486. "id": {
  31487. "type": "string",
  31488. "pattern": "^evt_"
  31489. },
  31490. "metadata": {
  31491. "type": "object"
  31492. },
  31493. "durable": {
  31494. "type": "object",
  31495. "properties": {
  31496. "aggregateID": {
  31497. "type": "string"
  31498. },
  31499. "seq": {
  31500. "type": "integer"
  31501. },
  31502. "version": {
  31503. "type": "integer"
  31504. }
  31505. },
  31506. "required": ["aggregateID", "seq", "version"],
  31507. "additionalProperties": false
  31508. },
  31509. "location": {
  31510. "$ref": "#/components/schemas/LocationRef"
  31511. },
  31512. "type": {
  31513. "type": "string",
  31514. "enum": ["plugin.added"]
  31515. },
  31516. "data": {
  31517. "type": "object",
  31518. "properties": {
  31519. "id": {
  31520. "type": "string"
  31521. }
  31522. },
  31523. "required": ["id"],
  31524. "additionalProperties": false
  31525. }
  31526. },
  31527. "required": ["id", "type", "data"],
  31528. "additionalProperties": false
  31529. },
  31530. "V2EventProjectDirectoriesUpdated": {
  31531. "type": "object",
  31532. "properties": {
  31533. "id": {
  31534. "type": "string",
  31535. "pattern": "^evt_"
  31536. },
  31537. "metadata": {
  31538. "type": "object"
  31539. },
  31540. "durable": {
  31541. "type": "object",
  31542. "properties": {
  31543. "aggregateID": {
  31544. "type": "string"
  31545. },
  31546. "seq": {
  31547. "type": "integer"
  31548. },
  31549. "version": {
  31550. "type": "integer"
  31551. }
  31552. },
  31553. "required": ["aggregateID", "seq", "version"],
  31554. "additionalProperties": false
  31555. },
  31556. "location": {
  31557. "$ref": "#/components/schemas/LocationRef"
  31558. },
  31559. "type": {
  31560. "type": "string",
  31561. "enum": ["project.directories.updated"]
  31562. },
  31563. "data": {
  31564. "type": "object",
  31565. "properties": {
  31566. "projectID": {
  31567. "type": "string"
  31568. }
  31569. },
  31570. "required": ["projectID"],
  31571. "additionalProperties": false
  31572. }
  31573. },
  31574. "required": ["id", "type", "data"],
  31575. "additionalProperties": false
  31576. },
  31577. "V2EventFileWatcherUpdated": {
  31578. "type": "object",
  31579. "properties": {
  31580. "id": {
  31581. "type": "string",
  31582. "pattern": "^evt_"
  31583. },
  31584. "metadata": {
  31585. "type": "object"
  31586. },
  31587. "durable": {
  31588. "type": "object",
  31589. "properties": {
  31590. "aggregateID": {
  31591. "type": "string"
  31592. },
  31593. "seq": {
  31594. "type": "integer"
  31595. },
  31596. "version": {
  31597. "type": "integer"
  31598. }
  31599. },
  31600. "required": ["aggregateID", "seq", "version"],
  31601. "additionalProperties": false
  31602. },
  31603. "location": {
  31604. "$ref": "#/components/schemas/LocationRef"
  31605. },
  31606. "type": {
  31607. "type": "string",
  31608. "enum": ["file.watcher.updated"]
  31609. },
  31610. "data": {
  31611. "type": "object",
  31612. "properties": {
  31613. "file": {
  31614. "type": "string"
  31615. },
  31616. "event": {
  31617. "type": "string",
  31618. "enum": ["add", "change", "unlink"]
  31619. }
  31620. },
  31621. "required": ["file", "event"],
  31622. "additionalProperties": false
  31623. }
  31624. },
  31625. "required": ["id", "type", "data"],
  31626. "additionalProperties": false
  31627. },
  31628. "V2EventPtyCreated": {
  31629. "type": "object",
  31630. "properties": {
  31631. "id": {
  31632. "type": "string",
  31633. "pattern": "^evt_"
  31634. },
  31635. "metadata": {
  31636. "type": "object"
  31637. },
  31638. "durable": {
  31639. "type": "object",
  31640. "properties": {
  31641. "aggregateID": {
  31642. "type": "string"
  31643. },
  31644. "seq": {
  31645. "type": "integer"
  31646. },
  31647. "version": {
  31648. "type": "integer"
  31649. }
  31650. },
  31651. "required": ["aggregateID", "seq", "version"],
  31652. "additionalProperties": false
  31653. },
  31654. "location": {
  31655. "$ref": "#/components/schemas/LocationRef"
  31656. },
  31657. "type": {
  31658. "type": "string",
  31659. "enum": ["pty.created"]
  31660. },
  31661. "data": {
  31662. "type": "object",
  31663. "properties": {
  31664. "info": {
  31665. "$ref": "#/components/schemas/Pty"
  31666. }
  31667. },
  31668. "required": ["info"],
  31669. "additionalProperties": false
  31670. }
  31671. },
  31672. "required": ["id", "type", "data"],
  31673. "additionalProperties": false
  31674. },
  31675. "V2EventPtyUpdated": {
  31676. "type": "object",
  31677. "properties": {
  31678. "id": {
  31679. "type": "string",
  31680. "pattern": "^evt_"
  31681. },
  31682. "metadata": {
  31683. "type": "object"
  31684. },
  31685. "durable": {
  31686. "type": "object",
  31687. "properties": {
  31688. "aggregateID": {
  31689. "type": "string"
  31690. },
  31691. "seq": {
  31692. "type": "integer"
  31693. },
  31694. "version": {
  31695. "type": "integer"
  31696. }
  31697. },
  31698. "required": ["aggregateID", "seq", "version"],
  31699. "additionalProperties": false
  31700. },
  31701. "location": {
  31702. "$ref": "#/components/schemas/LocationRef"
  31703. },
  31704. "type": {
  31705. "type": "string",
  31706. "enum": ["pty.updated"]
  31707. },
  31708. "data": {
  31709. "type": "object",
  31710. "properties": {
  31711. "info": {
  31712. "$ref": "#/components/schemas/Pty"
  31713. }
  31714. },
  31715. "required": ["info"],
  31716. "additionalProperties": false
  31717. }
  31718. },
  31719. "required": ["id", "type", "data"],
  31720. "additionalProperties": false
  31721. },
  31722. "V2EventPtyExited": {
  31723. "type": "object",
  31724. "properties": {
  31725. "id": {
  31726. "type": "string",
  31727. "pattern": "^evt_"
  31728. },
  31729. "metadata": {
  31730. "type": "object"
  31731. },
  31732. "durable": {
  31733. "type": "object",
  31734. "properties": {
  31735. "aggregateID": {
  31736. "type": "string"
  31737. },
  31738. "seq": {
  31739. "type": "integer"
  31740. },
  31741. "version": {
  31742. "type": "integer"
  31743. }
  31744. },
  31745. "required": ["aggregateID", "seq", "version"],
  31746. "additionalProperties": false
  31747. },
  31748. "location": {
  31749. "$ref": "#/components/schemas/LocationRef"
  31750. },
  31751. "type": {
  31752. "type": "string",
  31753. "enum": ["pty.exited"]
  31754. },
  31755. "data": {
  31756. "type": "object",
  31757. "properties": {
  31758. "id": {
  31759. "type": "string",
  31760. "pattern": "^pty"
  31761. },
  31762. "exitCode": {
  31763. "type": "integer",
  31764. "minimum": 0
  31765. }
  31766. },
  31767. "required": ["id", "exitCode"],
  31768. "additionalProperties": false
  31769. }
  31770. },
  31771. "required": ["id", "type", "data"],
  31772. "additionalProperties": false
  31773. },
  31774. "V2EventPtyDeleted": {
  31775. "type": "object",
  31776. "properties": {
  31777. "id": {
  31778. "type": "string",
  31779. "pattern": "^evt_"
  31780. },
  31781. "metadata": {
  31782. "type": "object"
  31783. },
  31784. "durable": {
  31785. "type": "object",
  31786. "properties": {
  31787. "aggregateID": {
  31788. "type": "string"
  31789. },
  31790. "seq": {
  31791. "type": "integer"
  31792. },
  31793. "version": {
  31794. "type": "integer"
  31795. }
  31796. },
  31797. "required": ["aggregateID", "seq", "version"],
  31798. "additionalProperties": false
  31799. },
  31800. "location": {
  31801. "$ref": "#/components/schemas/LocationRef"
  31802. },
  31803. "type": {
  31804. "type": "string",
  31805. "enum": ["pty.deleted"]
  31806. },
  31807. "data": {
  31808. "type": "object",
  31809. "properties": {
  31810. "id": {
  31811. "type": "string",
  31812. "pattern": "^pty"
  31813. }
  31814. },
  31815. "required": ["id"],
  31816. "additionalProperties": false
  31817. }
  31818. },
  31819. "required": ["id", "type", "data"],
  31820. "additionalProperties": false
  31821. },
  31822. "V2EventQuestionV2Asked": {
  31823. "type": "object",
  31824. "properties": {
  31825. "id": {
  31826. "type": "string",
  31827. "pattern": "^evt_"
  31828. },
  31829. "metadata": {
  31830. "type": "object"
  31831. },
  31832. "durable": {
  31833. "type": "object",
  31834. "properties": {
  31835. "aggregateID": {
  31836. "type": "string"
  31837. },
  31838. "seq": {
  31839. "type": "integer"
  31840. },
  31841. "version": {
  31842. "type": "integer"
  31843. }
  31844. },
  31845. "required": ["aggregateID", "seq", "version"],
  31846. "additionalProperties": false
  31847. },
  31848. "location": {
  31849. "$ref": "#/components/schemas/LocationRef"
  31850. },
  31851. "type": {
  31852. "type": "string",
  31853. "enum": ["question.v2.asked"]
  31854. },
  31855. "data": {
  31856. "type": "object",
  31857. "properties": {
  31858. "id": {
  31859. "type": "string",
  31860. "pattern": "^que"
  31861. },
  31862. "sessionID": {
  31863. "type": "string",
  31864. "pattern": "^ses"
  31865. },
  31866. "questions": {
  31867. "type": "array",
  31868. "items": {
  31869. "$ref": "#/components/schemas/QuestionV2Info"
  31870. },
  31871. "description": "Questions to ask"
  31872. },
  31873. "tool": {
  31874. "$ref": "#/components/schemas/QuestionV2Tool"
  31875. }
  31876. },
  31877. "required": ["id", "sessionID", "questions"],
  31878. "additionalProperties": false
  31879. }
  31880. },
  31881. "required": ["id", "type", "data"],
  31882. "additionalProperties": false
  31883. },
  31884. "V2EventQuestionV2Replied": {
  31885. "type": "object",
  31886. "properties": {
  31887. "id": {
  31888. "type": "string",
  31889. "pattern": "^evt_"
  31890. },
  31891. "metadata": {
  31892. "type": "object"
  31893. },
  31894. "durable": {
  31895. "type": "object",
  31896. "properties": {
  31897. "aggregateID": {
  31898. "type": "string"
  31899. },
  31900. "seq": {
  31901. "type": "integer"
  31902. },
  31903. "version": {
  31904. "type": "integer"
  31905. }
  31906. },
  31907. "required": ["aggregateID", "seq", "version"],
  31908. "additionalProperties": false
  31909. },
  31910. "location": {
  31911. "$ref": "#/components/schemas/LocationRef"
  31912. },
  31913. "type": {
  31914. "type": "string",
  31915. "enum": ["question.v2.replied"]
  31916. },
  31917. "data": {
  31918. "type": "object",
  31919. "properties": {
  31920. "sessionID": {
  31921. "type": "string",
  31922. "pattern": "^ses"
  31923. },
  31924. "requestID": {
  31925. "type": "string",
  31926. "pattern": "^que"
  31927. },
  31928. "answers": {
  31929. "type": "array",
  31930. "items": {
  31931. "$ref": "#/components/schemas/QuestionV2Answer"
  31932. }
  31933. }
  31934. },
  31935. "required": ["sessionID", "requestID", "answers"],
  31936. "additionalProperties": false
  31937. }
  31938. },
  31939. "required": ["id", "type", "data"],
  31940. "additionalProperties": false
  31941. },
  31942. "V2EventQuestionV2Rejected": {
  31943. "type": "object",
  31944. "properties": {
  31945. "id": {
  31946. "type": "string",
  31947. "pattern": "^evt_"
  31948. },
  31949. "metadata": {
  31950. "type": "object"
  31951. },
  31952. "durable": {
  31953. "type": "object",
  31954. "properties": {
  31955. "aggregateID": {
  31956. "type": "string"
  31957. },
  31958. "seq": {
  31959. "type": "integer"
  31960. },
  31961. "version": {
  31962. "type": "integer"
  31963. }
  31964. },
  31965. "required": ["aggregateID", "seq", "version"],
  31966. "additionalProperties": false
  31967. },
  31968. "location": {
  31969. "$ref": "#/components/schemas/LocationRef"
  31970. },
  31971. "type": {
  31972. "type": "string",
  31973. "enum": ["question.v2.rejected"]
  31974. },
  31975. "data": {
  31976. "type": "object",
  31977. "properties": {
  31978. "sessionID": {
  31979. "type": "string",
  31980. "pattern": "^ses"
  31981. },
  31982. "requestID": {
  31983. "type": "string",
  31984. "pattern": "^que"
  31985. }
  31986. },
  31987. "required": ["sessionID", "requestID"],
  31988. "additionalProperties": false
  31989. }
  31990. },
  31991. "required": ["id", "type", "data"],
  31992. "additionalProperties": false
  31993. },
  31994. "V2EventTodoUpdated": {
  31995. "type": "object",
  31996. "properties": {
  31997. "id": {
  31998. "type": "string",
  31999. "pattern": "^evt_"
  32000. },
  32001. "metadata": {
  32002. "type": "object"
  32003. },
  32004. "durable": {
  32005. "type": "object",
  32006. "properties": {
  32007. "aggregateID": {
  32008. "type": "string"
  32009. },
  32010. "seq": {
  32011. "type": "integer"
  32012. },
  32013. "version": {
  32014. "type": "integer"
  32015. }
  32016. },
  32017. "required": ["aggregateID", "seq", "version"],
  32018. "additionalProperties": false
  32019. },
  32020. "location": {
  32021. "$ref": "#/components/schemas/LocationRef"
  32022. },
  32023. "type": {
  32024. "type": "string",
  32025. "enum": ["todo.updated"]
  32026. },
  32027. "data": {
  32028. "type": "object",
  32029. "properties": {
  32030. "sessionID": {
  32031. "type": "string",
  32032. "pattern": "^ses"
  32033. },
  32034. "todos": {
  32035. "type": "array",
  32036. "items": {
  32037. "$ref": "#/components/schemas/Todo"
  32038. }
  32039. }
  32040. },
  32041. "required": ["sessionID", "todos"],
  32042. "additionalProperties": false
  32043. }
  32044. },
  32045. "required": ["id", "type", "data"],
  32046. "additionalProperties": false
  32047. },
  32048. "V2EventLspUpdated": {
  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": ["lsp.updated"]
  32080. },
  32081. "data": {
  32082. "type": "object",
  32083. "properties": {}
  32084. }
  32085. },
  32086. "required": ["id", "type", "data"],
  32087. "additionalProperties": false
  32088. },
  32089. "V2EventPermissionAsked": {
  32090. "type": "object",
  32091. "properties": {
  32092. "id": {
  32093. "type": "string",
  32094. "pattern": "^evt_"
  32095. },
  32096. "metadata": {
  32097. "type": "object"
  32098. },
  32099. "durable": {
  32100. "type": "object",
  32101. "properties": {
  32102. "aggregateID": {
  32103. "type": "string"
  32104. },
  32105. "seq": {
  32106. "type": "integer"
  32107. },
  32108. "version": {
  32109. "type": "integer"
  32110. }
  32111. },
  32112. "required": ["aggregateID", "seq", "version"],
  32113. "additionalProperties": false
  32114. },
  32115. "location": {
  32116. "$ref": "#/components/schemas/LocationRef"
  32117. },
  32118. "type": {
  32119. "type": "string",
  32120. "enum": ["permission.asked"]
  32121. },
  32122. "data": {
  32123. "type": "object",
  32124. "properties": {
  32125. "id": {
  32126. "type": "string",
  32127. "pattern": "^per"
  32128. },
  32129. "sessionID": {
  32130. "type": "string",
  32131. "pattern": "^ses"
  32132. },
  32133. "permission": {
  32134. "type": "string"
  32135. },
  32136. "patterns": {
  32137. "type": "array",
  32138. "items": {
  32139. "type": "string"
  32140. }
  32141. },
  32142. "metadata": {
  32143. "type": "object"
  32144. },
  32145. "always": {
  32146. "type": "array",
  32147. "items": {
  32148. "type": "string"
  32149. }
  32150. },
  32151. "tool": {
  32152. "type": "object",
  32153. "properties": {
  32154. "messageID": {
  32155. "type": "string"
  32156. },
  32157. "callID": {
  32158. "type": "string"
  32159. }
  32160. },
  32161. "required": ["messageID", "callID"],
  32162. "additionalProperties": false
  32163. }
  32164. },
  32165. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  32166. "additionalProperties": false
  32167. }
  32168. },
  32169. "required": ["id", "type", "data"],
  32170. "additionalProperties": false
  32171. },
  32172. "V2EventPermissionReplied": {
  32173. "type": "object",
  32174. "properties": {
  32175. "id": {
  32176. "type": "string",
  32177. "pattern": "^evt_"
  32178. },
  32179. "metadata": {
  32180. "type": "object"
  32181. },
  32182. "durable": {
  32183. "type": "object",
  32184. "properties": {
  32185. "aggregateID": {
  32186. "type": "string"
  32187. },
  32188. "seq": {
  32189. "type": "integer"
  32190. },
  32191. "version": {
  32192. "type": "integer"
  32193. }
  32194. },
  32195. "required": ["aggregateID", "seq", "version"],
  32196. "additionalProperties": false
  32197. },
  32198. "location": {
  32199. "$ref": "#/components/schemas/LocationRef"
  32200. },
  32201. "type": {
  32202. "type": "string",
  32203. "enum": ["permission.replied"]
  32204. },
  32205. "data": {
  32206. "type": "object",
  32207. "properties": {
  32208. "sessionID": {
  32209. "type": "string",
  32210. "pattern": "^ses"
  32211. },
  32212. "requestID": {
  32213. "type": "string",
  32214. "pattern": "^per"
  32215. },
  32216. "reply": {
  32217. "type": "string",
  32218. "enum": ["once", "always", "reject"]
  32219. }
  32220. },
  32221. "required": ["sessionID", "requestID", "reply"],
  32222. "additionalProperties": false
  32223. }
  32224. },
  32225. "required": ["id", "type", "data"],
  32226. "additionalProperties": false
  32227. },
  32228. "V2EventTuiPromptAppend": {
  32229. "type": "object",
  32230. "properties": {
  32231. "id": {
  32232. "type": "string",
  32233. "pattern": "^evt_"
  32234. },
  32235. "metadata": {
  32236. "type": "object"
  32237. },
  32238. "durable": {
  32239. "type": "object",
  32240. "properties": {
  32241. "aggregateID": {
  32242. "type": "string"
  32243. },
  32244. "seq": {
  32245. "type": "integer"
  32246. },
  32247. "version": {
  32248. "type": "integer"
  32249. }
  32250. },
  32251. "required": ["aggregateID", "seq", "version"],
  32252. "additionalProperties": false
  32253. },
  32254. "location": {
  32255. "$ref": "#/components/schemas/LocationRef"
  32256. },
  32257. "type": {
  32258. "type": "string",
  32259. "enum": ["tui.prompt.append"]
  32260. },
  32261. "data": {
  32262. "type": "object",
  32263. "properties": {
  32264. "text": {
  32265. "type": "string"
  32266. }
  32267. },
  32268. "required": ["text"],
  32269. "additionalProperties": false
  32270. }
  32271. },
  32272. "required": ["id", "type", "data"],
  32273. "additionalProperties": false
  32274. },
  32275. "V2EventTuiCommandExecute": {
  32276. "type": "object",
  32277. "properties": {
  32278. "id": {
  32279. "type": "string",
  32280. "pattern": "^evt_"
  32281. },
  32282. "metadata": {
  32283. "type": "object"
  32284. },
  32285. "durable": {
  32286. "type": "object",
  32287. "properties": {
  32288. "aggregateID": {
  32289. "type": "string"
  32290. },
  32291. "seq": {
  32292. "type": "integer"
  32293. },
  32294. "version": {
  32295. "type": "integer"
  32296. }
  32297. },
  32298. "required": ["aggregateID", "seq", "version"],
  32299. "additionalProperties": false
  32300. },
  32301. "location": {
  32302. "$ref": "#/components/schemas/LocationRef"
  32303. },
  32304. "type": {
  32305. "type": "string",
  32306. "enum": ["tui.command.execute"]
  32307. },
  32308. "data": {
  32309. "type": "object",
  32310. "properties": {
  32311. "command": {
  32312. "anyOf": [
  32313. {
  32314. "type": "string",
  32315. "enum": [
  32316. "session.list",
  32317. "session.new",
  32318. "session.share",
  32319. "session.interrupt",
  32320. "session.compact",
  32321. "session.page.up",
  32322. "session.page.down",
  32323. "session.line.up",
  32324. "session.line.down",
  32325. "session.half.page.up",
  32326. "session.half.page.down",
  32327. "session.first",
  32328. "session.last",
  32329. "prompt.clear",
  32330. "prompt.submit",
  32331. "agent.cycle"
  32332. ]
  32333. },
  32334. {
  32335. "type": "string"
  32336. }
  32337. ]
  32338. }
  32339. },
  32340. "required": ["command"],
  32341. "additionalProperties": false
  32342. }
  32343. },
  32344. "required": ["id", "type", "data"],
  32345. "additionalProperties": false
  32346. },
  32347. "V2EventTuiToastShow": {
  32348. "type": "object",
  32349. "properties": {
  32350. "id": {
  32351. "type": "string",
  32352. "pattern": "^evt_"
  32353. },
  32354. "metadata": {
  32355. "type": "object"
  32356. },
  32357. "durable": {
  32358. "type": "object",
  32359. "properties": {
  32360. "aggregateID": {
  32361. "type": "string"
  32362. },
  32363. "seq": {
  32364. "type": "integer"
  32365. },
  32366. "version": {
  32367. "type": "integer"
  32368. }
  32369. },
  32370. "required": ["aggregateID", "seq", "version"],
  32371. "additionalProperties": false
  32372. },
  32373. "location": {
  32374. "$ref": "#/components/schemas/LocationRef"
  32375. },
  32376. "type": {
  32377. "type": "string",
  32378. "enum": ["tui.toast.show"]
  32379. },
  32380. "data": {
  32381. "type": "object",
  32382. "properties": {
  32383. "title": {
  32384. "type": "string"
  32385. },
  32386. "message": {
  32387. "type": "string"
  32388. },
  32389. "variant": {
  32390. "type": "string",
  32391. "enum": ["info", "success", "warning", "error"]
  32392. },
  32393. "duration": {
  32394. "type": "integer",
  32395. "exclusiveMinimum": 0
  32396. }
  32397. },
  32398. "required": ["message", "variant"],
  32399. "additionalProperties": false
  32400. }
  32401. },
  32402. "required": ["id", "type", "data"],
  32403. "additionalProperties": false
  32404. },
  32405. "V2EventTuiSessionSelect": {
  32406. "type": "object",
  32407. "properties": {
  32408. "id": {
  32409. "type": "string",
  32410. "pattern": "^evt_"
  32411. },
  32412. "metadata": {
  32413. "type": "object"
  32414. },
  32415. "durable": {
  32416. "type": "object",
  32417. "properties": {
  32418. "aggregateID": {
  32419. "type": "string"
  32420. },
  32421. "seq": {
  32422. "type": "integer"
  32423. },
  32424. "version": {
  32425. "type": "integer"
  32426. }
  32427. },
  32428. "required": ["aggregateID", "seq", "version"],
  32429. "additionalProperties": false
  32430. },
  32431. "location": {
  32432. "$ref": "#/components/schemas/LocationRef"
  32433. },
  32434. "type": {
  32435. "type": "string",
  32436. "enum": ["tui.session.select"]
  32437. },
  32438. "data": {
  32439. "type": "object",
  32440. "properties": {
  32441. "sessionID": {
  32442. "type": "string",
  32443. "pattern": "^ses",
  32444. "description": "Session ID to navigate to"
  32445. }
  32446. },
  32447. "required": ["sessionID"],
  32448. "additionalProperties": false
  32449. }
  32450. },
  32451. "required": ["id", "type", "data"],
  32452. "additionalProperties": false
  32453. },
  32454. "V2EventMcpToolsChanged": {
  32455. "type": "object",
  32456. "properties": {
  32457. "id": {
  32458. "type": "string",
  32459. "pattern": "^evt_"
  32460. },
  32461. "metadata": {
  32462. "type": "object"
  32463. },
  32464. "durable": {
  32465. "type": "object",
  32466. "properties": {
  32467. "aggregateID": {
  32468. "type": "string"
  32469. },
  32470. "seq": {
  32471. "type": "integer"
  32472. },
  32473. "version": {
  32474. "type": "integer"
  32475. }
  32476. },
  32477. "required": ["aggregateID", "seq", "version"],
  32478. "additionalProperties": false
  32479. },
  32480. "location": {
  32481. "$ref": "#/components/schemas/LocationRef"
  32482. },
  32483. "type": {
  32484. "type": "string",
  32485. "enum": ["mcp.tools.changed"]
  32486. },
  32487. "data": {
  32488. "type": "object",
  32489. "properties": {
  32490. "server": {
  32491. "type": "string"
  32492. }
  32493. },
  32494. "required": ["server"],
  32495. "additionalProperties": false
  32496. }
  32497. },
  32498. "required": ["id", "type", "data"],
  32499. "additionalProperties": false
  32500. },
  32501. "V2EventMcpBrowserOpenFailed": {
  32502. "type": "object",
  32503. "properties": {
  32504. "id": {
  32505. "type": "string",
  32506. "pattern": "^evt_"
  32507. },
  32508. "metadata": {
  32509. "type": "object"
  32510. },
  32511. "durable": {
  32512. "type": "object",
  32513. "properties": {
  32514. "aggregateID": {
  32515. "type": "string"
  32516. },
  32517. "seq": {
  32518. "type": "integer"
  32519. },
  32520. "version": {
  32521. "type": "integer"
  32522. }
  32523. },
  32524. "required": ["aggregateID", "seq", "version"],
  32525. "additionalProperties": false
  32526. },
  32527. "location": {
  32528. "$ref": "#/components/schemas/LocationRef"
  32529. },
  32530. "type": {
  32531. "type": "string",
  32532. "enum": ["mcp.browser.open.failed"]
  32533. },
  32534. "data": {
  32535. "type": "object",
  32536. "properties": {
  32537. "mcpName": {
  32538. "type": "string"
  32539. },
  32540. "url": {
  32541. "type": "string"
  32542. }
  32543. },
  32544. "required": ["mcpName", "url"],
  32545. "additionalProperties": false
  32546. }
  32547. },
  32548. "required": ["id", "type", "data"],
  32549. "additionalProperties": false
  32550. },
  32551. "V2EventCommandExecuted": {
  32552. "type": "object",
  32553. "properties": {
  32554. "id": {
  32555. "type": "string",
  32556. "pattern": "^evt_"
  32557. },
  32558. "metadata": {
  32559. "type": "object"
  32560. },
  32561. "durable": {
  32562. "type": "object",
  32563. "properties": {
  32564. "aggregateID": {
  32565. "type": "string"
  32566. },
  32567. "seq": {
  32568. "type": "integer"
  32569. },
  32570. "version": {
  32571. "type": "integer"
  32572. }
  32573. },
  32574. "required": ["aggregateID", "seq", "version"],
  32575. "additionalProperties": false
  32576. },
  32577. "location": {
  32578. "$ref": "#/components/schemas/LocationRef"
  32579. },
  32580. "type": {
  32581. "type": "string",
  32582. "enum": ["command.executed"]
  32583. },
  32584. "data": {
  32585. "type": "object",
  32586. "properties": {
  32587. "name": {
  32588. "type": "string"
  32589. },
  32590. "sessionID": {
  32591. "type": "string",
  32592. "pattern": "^ses"
  32593. },
  32594. "arguments": {
  32595. "type": "string"
  32596. },
  32597. "messageID": {
  32598. "type": "string",
  32599. "pattern": "^msg"
  32600. }
  32601. },
  32602. "required": ["name", "sessionID", "arguments", "messageID"],
  32603. "additionalProperties": false
  32604. }
  32605. },
  32606. "required": ["id", "type", "data"],
  32607. "additionalProperties": false
  32608. },
  32609. "V2EventProjectUpdated": {
  32610. "type": "object",
  32611. "properties": {
  32612. "id": {
  32613. "type": "string",
  32614. "pattern": "^evt_"
  32615. },
  32616. "metadata": {
  32617. "type": "object"
  32618. },
  32619. "durable": {
  32620. "type": "object",
  32621. "properties": {
  32622. "aggregateID": {
  32623. "type": "string"
  32624. },
  32625. "seq": {
  32626. "type": "integer"
  32627. },
  32628. "version": {
  32629. "type": "integer"
  32630. }
  32631. },
  32632. "required": ["aggregateID", "seq", "version"],
  32633. "additionalProperties": false
  32634. },
  32635. "location": {
  32636. "$ref": "#/components/schemas/LocationRef"
  32637. },
  32638. "type": {
  32639. "type": "string",
  32640. "enum": ["project.updated"]
  32641. },
  32642. "data": {
  32643. "type": "object",
  32644. "properties": {
  32645. "id": {
  32646. "type": "string"
  32647. },
  32648. "worktree": {
  32649. "type": "string"
  32650. },
  32651. "vcs": {
  32652. "type": "string",
  32653. "enum": ["git"]
  32654. },
  32655. "name": {
  32656. "type": "string"
  32657. },
  32658. "icon": {
  32659. "type": "object",
  32660. "properties": {
  32661. "url": {
  32662. "type": "string"
  32663. },
  32664. "override": {
  32665. "type": "string"
  32666. },
  32667. "color": {
  32668. "type": "string"
  32669. }
  32670. },
  32671. "additionalProperties": false
  32672. },
  32673. "commands": {
  32674. "type": "object",
  32675. "properties": {
  32676. "start": {
  32677. "type": "string",
  32678. "description": "Startup script to run when creating a new workspace (worktree)"
  32679. }
  32680. },
  32681. "additionalProperties": false
  32682. },
  32683. "time": {
  32684. "type": "object",
  32685. "properties": {
  32686. "created": {
  32687. "type": "integer",
  32688. "minimum": 0
  32689. },
  32690. "updated": {
  32691. "type": "integer",
  32692. "minimum": 0
  32693. },
  32694. "initialized": {
  32695. "type": "integer",
  32696. "minimum": 0
  32697. }
  32698. },
  32699. "required": ["created", "updated"],
  32700. "additionalProperties": false
  32701. },
  32702. "sandboxes": {
  32703. "type": "array",
  32704. "items": {
  32705. "type": "string"
  32706. }
  32707. }
  32708. },
  32709. "required": ["id", "worktree", "time", "sandboxes"],
  32710. "additionalProperties": false
  32711. }
  32712. },
  32713. "required": ["id", "type", "data"],
  32714. "additionalProperties": false
  32715. },
  32716. "V2EventSessionStatus": {
  32717. "type": "object",
  32718. "properties": {
  32719. "id": {
  32720. "type": "string",
  32721. "pattern": "^evt_"
  32722. },
  32723. "metadata": {
  32724. "type": "object"
  32725. },
  32726. "durable": {
  32727. "type": "object",
  32728. "properties": {
  32729. "aggregateID": {
  32730. "type": "string"
  32731. },
  32732. "seq": {
  32733. "type": "integer"
  32734. },
  32735. "version": {
  32736. "type": "integer"
  32737. }
  32738. },
  32739. "required": ["aggregateID", "seq", "version"],
  32740. "additionalProperties": false
  32741. },
  32742. "location": {
  32743. "$ref": "#/components/schemas/LocationRef"
  32744. },
  32745. "type": {
  32746. "type": "string",
  32747. "enum": ["session.status"]
  32748. },
  32749. "data": {
  32750. "type": "object",
  32751. "properties": {
  32752. "sessionID": {
  32753. "type": "string",
  32754. "pattern": "^ses"
  32755. },
  32756. "status": {
  32757. "$ref": "#/components/schemas/SessionStatus"
  32758. }
  32759. },
  32760. "required": ["sessionID", "status"],
  32761. "additionalProperties": false
  32762. }
  32763. },
  32764. "required": ["id", "type", "data"],
  32765. "additionalProperties": false
  32766. },
  32767. "V2EventSessionIdle": {
  32768. "type": "object",
  32769. "properties": {
  32770. "id": {
  32771. "type": "string",
  32772. "pattern": "^evt_"
  32773. },
  32774. "metadata": {
  32775. "type": "object"
  32776. },
  32777. "durable": {
  32778. "type": "object",
  32779. "properties": {
  32780. "aggregateID": {
  32781. "type": "string"
  32782. },
  32783. "seq": {
  32784. "type": "integer"
  32785. },
  32786. "version": {
  32787. "type": "integer"
  32788. }
  32789. },
  32790. "required": ["aggregateID", "seq", "version"],
  32791. "additionalProperties": false
  32792. },
  32793. "location": {
  32794. "$ref": "#/components/schemas/LocationRef"
  32795. },
  32796. "type": {
  32797. "type": "string",
  32798. "enum": ["session.idle"]
  32799. },
  32800. "data": {
  32801. "type": "object",
  32802. "properties": {
  32803. "sessionID": {
  32804. "type": "string",
  32805. "pattern": "^ses"
  32806. }
  32807. },
  32808. "required": ["sessionID"],
  32809. "additionalProperties": false
  32810. }
  32811. },
  32812. "required": ["id", "type", "data"],
  32813. "additionalProperties": false
  32814. },
  32815. "V2EventQuestionAsked": {
  32816. "type": "object",
  32817. "properties": {
  32818. "id": {
  32819. "type": "string",
  32820. "pattern": "^evt_"
  32821. },
  32822. "metadata": {
  32823. "type": "object"
  32824. },
  32825. "durable": {
  32826. "type": "object",
  32827. "properties": {
  32828. "aggregateID": {
  32829. "type": "string"
  32830. },
  32831. "seq": {
  32832. "type": "integer"
  32833. },
  32834. "version": {
  32835. "type": "integer"
  32836. }
  32837. },
  32838. "required": ["aggregateID", "seq", "version"],
  32839. "additionalProperties": false
  32840. },
  32841. "location": {
  32842. "$ref": "#/components/schemas/LocationRef"
  32843. },
  32844. "type": {
  32845. "type": "string",
  32846. "enum": ["question.asked"]
  32847. },
  32848. "data": {
  32849. "type": "object",
  32850. "properties": {
  32851. "id": {
  32852. "type": "string",
  32853. "pattern": "^que"
  32854. },
  32855. "sessionID": {
  32856. "type": "string",
  32857. "pattern": "^ses"
  32858. },
  32859. "questions": {
  32860. "type": "array",
  32861. "items": {
  32862. "$ref": "#/components/schemas/QuestionInfo"
  32863. },
  32864. "description": "Questions to ask"
  32865. },
  32866. "tool": {
  32867. "$ref": "#/components/schemas/QuestionTool"
  32868. }
  32869. },
  32870. "required": ["id", "sessionID", "questions"],
  32871. "additionalProperties": false
  32872. }
  32873. },
  32874. "required": ["id", "type", "data"],
  32875. "additionalProperties": false
  32876. },
  32877. "V2EventQuestionReplied": {
  32878. "type": "object",
  32879. "properties": {
  32880. "id": {
  32881. "type": "string",
  32882. "pattern": "^evt_"
  32883. },
  32884. "metadata": {
  32885. "type": "object"
  32886. },
  32887. "durable": {
  32888. "type": "object",
  32889. "properties": {
  32890. "aggregateID": {
  32891. "type": "string"
  32892. },
  32893. "seq": {
  32894. "type": "integer"
  32895. },
  32896. "version": {
  32897. "type": "integer"
  32898. }
  32899. },
  32900. "required": ["aggregateID", "seq", "version"],
  32901. "additionalProperties": false
  32902. },
  32903. "location": {
  32904. "$ref": "#/components/schemas/LocationRef"
  32905. },
  32906. "type": {
  32907. "type": "string",
  32908. "enum": ["question.replied"]
  32909. },
  32910. "data": {
  32911. "type": "object",
  32912. "properties": {
  32913. "sessionID": {
  32914. "type": "string",
  32915. "pattern": "^ses"
  32916. },
  32917. "requestID": {
  32918. "type": "string",
  32919. "pattern": "^que"
  32920. },
  32921. "answers": {
  32922. "type": "array",
  32923. "items": {
  32924. "$ref": "#/components/schemas/QuestionAnswer"
  32925. }
  32926. }
  32927. },
  32928. "required": ["sessionID", "requestID", "answers"],
  32929. "additionalProperties": false
  32930. }
  32931. },
  32932. "required": ["id", "type", "data"],
  32933. "additionalProperties": false
  32934. },
  32935. "V2EventQuestionRejected": {
  32936. "type": "object",
  32937. "properties": {
  32938. "id": {
  32939. "type": "string",
  32940. "pattern": "^evt_"
  32941. },
  32942. "metadata": {
  32943. "type": "object"
  32944. },
  32945. "durable": {
  32946. "type": "object",
  32947. "properties": {
  32948. "aggregateID": {
  32949. "type": "string"
  32950. },
  32951. "seq": {
  32952. "type": "integer"
  32953. },
  32954. "version": {
  32955. "type": "integer"
  32956. }
  32957. },
  32958. "required": ["aggregateID", "seq", "version"],
  32959. "additionalProperties": false
  32960. },
  32961. "location": {
  32962. "$ref": "#/components/schemas/LocationRef"
  32963. },
  32964. "type": {
  32965. "type": "string",
  32966. "enum": ["question.rejected"]
  32967. },
  32968. "data": {
  32969. "type": "object",
  32970. "properties": {
  32971. "sessionID": {
  32972. "type": "string",
  32973. "pattern": "^ses"
  32974. },
  32975. "requestID": {
  32976. "type": "string",
  32977. "pattern": "^que"
  32978. }
  32979. },
  32980. "required": ["sessionID", "requestID"],
  32981. "additionalProperties": false
  32982. }
  32983. },
  32984. "required": ["id", "type", "data"],
  32985. "additionalProperties": false
  32986. },
  32987. "V2EventSessionCompacted": {
  32988. "type": "object",
  32989. "properties": {
  32990. "id": {
  32991. "type": "string",
  32992. "pattern": "^evt_"
  32993. },
  32994. "metadata": {
  32995. "type": "object"
  32996. },
  32997. "durable": {
  32998. "type": "object",
  32999. "properties": {
  33000. "aggregateID": {
  33001. "type": "string"
  33002. },
  33003. "seq": {
  33004. "type": "integer"
  33005. },
  33006. "version": {
  33007. "type": "integer"
  33008. }
  33009. },
  33010. "required": ["aggregateID", "seq", "version"],
  33011. "additionalProperties": false
  33012. },
  33013. "location": {
  33014. "$ref": "#/components/schemas/LocationRef"
  33015. },
  33016. "type": {
  33017. "type": "string",
  33018. "enum": ["session.compacted"]
  33019. },
  33020. "data": {
  33021. "type": "object",
  33022. "properties": {
  33023. "sessionID": {
  33024. "type": "string",
  33025. "pattern": "^ses"
  33026. }
  33027. },
  33028. "required": ["sessionID"],
  33029. "additionalProperties": false
  33030. }
  33031. },
  33032. "required": ["id", "type", "data"],
  33033. "additionalProperties": false
  33034. },
  33035. "V2EventVcsBranchUpdated": {
  33036. "type": "object",
  33037. "properties": {
  33038. "id": {
  33039. "type": "string",
  33040. "pattern": "^evt_"
  33041. },
  33042. "metadata": {
  33043. "type": "object"
  33044. },
  33045. "durable": {
  33046. "type": "object",
  33047. "properties": {
  33048. "aggregateID": {
  33049. "type": "string"
  33050. },
  33051. "seq": {
  33052. "type": "integer"
  33053. },
  33054. "version": {
  33055. "type": "integer"
  33056. }
  33057. },
  33058. "required": ["aggregateID", "seq", "version"],
  33059. "additionalProperties": false
  33060. },
  33061. "location": {
  33062. "$ref": "#/components/schemas/LocationRef"
  33063. },
  33064. "type": {
  33065. "type": "string",
  33066. "enum": ["vcs.branch.updated"]
  33067. },
  33068. "data": {
  33069. "type": "object",
  33070. "properties": {
  33071. "branch": {
  33072. "type": "string"
  33073. }
  33074. },
  33075. "additionalProperties": false
  33076. }
  33077. },
  33078. "required": ["id", "type", "data"],
  33079. "additionalProperties": false
  33080. },
  33081. "V2EventWorkspaceReady": {
  33082. "type": "object",
  33083. "properties": {
  33084. "id": {
  33085. "type": "string",
  33086. "pattern": "^evt_"
  33087. },
  33088. "metadata": {
  33089. "type": "object"
  33090. },
  33091. "durable": {
  33092. "type": "object",
  33093. "properties": {
  33094. "aggregateID": {
  33095. "type": "string"
  33096. },
  33097. "seq": {
  33098. "type": "integer"
  33099. },
  33100. "version": {
  33101. "type": "integer"
  33102. }
  33103. },
  33104. "required": ["aggregateID", "seq", "version"],
  33105. "additionalProperties": false
  33106. },
  33107. "location": {
  33108. "$ref": "#/components/schemas/LocationRef"
  33109. },
  33110. "type": {
  33111. "type": "string",
  33112. "enum": ["workspace.ready"]
  33113. },
  33114. "data": {
  33115. "type": "object",
  33116. "properties": {
  33117. "name": {
  33118. "type": "string"
  33119. }
  33120. },
  33121. "required": ["name"],
  33122. "additionalProperties": false
  33123. }
  33124. },
  33125. "required": ["id", "type", "data"],
  33126. "additionalProperties": false
  33127. },
  33128. "V2EventWorkspaceFailed": {
  33129. "type": "object",
  33130. "properties": {
  33131. "id": {
  33132. "type": "string",
  33133. "pattern": "^evt_"
  33134. },
  33135. "metadata": {
  33136. "type": "object"
  33137. },
  33138. "durable": {
  33139. "type": "object",
  33140. "properties": {
  33141. "aggregateID": {
  33142. "type": "string"
  33143. },
  33144. "seq": {
  33145. "type": "integer"
  33146. },
  33147. "version": {
  33148. "type": "integer"
  33149. }
  33150. },
  33151. "required": ["aggregateID", "seq", "version"],
  33152. "additionalProperties": false
  33153. },
  33154. "location": {
  33155. "$ref": "#/components/schemas/LocationRef"
  33156. },
  33157. "type": {
  33158. "type": "string",
  33159. "enum": ["workspace.failed"]
  33160. },
  33161. "data": {
  33162. "type": "object",
  33163. "properties": {
  33164. "message": {
  33165. "type": "string"
  33166. }
  33167. },
  33168. "required": ["message"],
  33169. "additionalProperties": false
  33170. }
  33171. },
  33172. "required": ["id", "type", "data"],
  33173. "additionalProperties": false
  33174. },
  33175. "V2EventWorkspaceStatus": {
  33176. "type": "object",
  33177. "properties": {
  33178. "id": {
  33179. "type": "string",
  33180. "pattern": "^evt_"
  33181. },
  33182. "metadata": {
  33183. "type": "object"
  33184. },
  33185. "durable": {
  33186. "type": "object",
  33187. "properties": {
  33188. "aggregateID": {
  33189. "type": "string"
  33190. },
  33191. "seq": {
  33192. "type": "integer"
  33193. },
  33194. "version": {
  33195. "type": "integer"
  33196. }
  33197. },
  33198. "required": ["aggregateID", "seq", "version"],
  33199. "additionalProperties": false
  33200. },
  33201. "location": {
  33202. "$ref": "#/components/schemas/LocationRef"
  33203. },
  33204. "type": {
  33205. "type": "string",
  33206. "enum": ["workspace.status"]
  33207. },
  33208. "data": {
  33209. "type": "object",
  33210. "properties": {
  33211. "workspaceID": {
  33212. "type": "string",
  33213. "pattern": "^wrk"
  33214. },
  33215. "status": {
  33216. "type": "string",
  33217. "enum": ["connected", "connecting", "disconnected", "error"]
  33218. }
  33219. },
  33220. "required": ["workspaceID", "status"],
  33221. "additionalProperties": false
  33222. }
  33223. },
  33224. "required": ["id", "type", "data"],
  33225. "additionalProperties": false
  33226. },
  33227. "V2EventWorktreeReady": {
  33228. "type": "object",
  33229. "properties": {
  33230. "id": {
  33231. "type": "string",
  33232. "pattern": "^evt_"
  33233. },
  33234. "metadata": {
  33235. "type": "object"
  33236. },
  33237. "durable": {
  33238. "type": "object",
  33239. "properties": {
  33240. "aggregateID": {
  33241. "type": "string"
  33242. },
  33243. "seq": {
  33244. "type": "integer"
  33245. },
  33246. "version": {
  33247. "type": "integer"
  33248. }
  33249. },
  33250. "required": ["aggregateID", "seq", "version"],
  33251. "additionalProperties": false
  33252. },
  33253. "location": {
  33254. "$ref": "#/components/schemas/LocationRef"
  33255. },
  33256. "type": {
  33257. "type": "string",
  33258. "enum": ["worktree.ready"]
  33259. },
  33260. "data": {
  33261. "type": "object",
  33262. "properties": {
  33263. "name": {
  33264. "type": "string"
  33265. },
  33266. "branch": {
  33267. "type": "string"
  33268. }
  33269. },
  33270. "required": ["name"],
  33271. "additionalProperties": false
  33272. }
  33273. },
  33274. "required": ["id", "type", "data"],
  33275. "additionalProperties": false
  33276. },
  33277. "V2EventWorktreeFailed": {
  33278. "type": "object",
  33279. "properties": {
  33280. "id": {
  33281. "type": "string",
  33282. "pattern": "^evt_"
  33283. },
  33284. "metadata": {
  33285. "type": "object"
  33286. },
  33287. "durable": {
  33288. "type": "object",
  33289. "properties": {
  33290. "aggregateID": {
  33291. "type": "string"
  33292. },
  33293. "seq": {
  33294. "type": "integer"
  33295. },
  33296. "version": {
  33297. "type": "integer"
  33298. }
  33299. },
  33300. "required": ["aggregateID", "seq", "version"],
  33301. "additionalProperties": false
  33302. },
  33303. "location": {
  33304. "$ref": "#/components/schemas/LocationRef"
  33305. },
  33306. "type": {
  33307. "type": "string",
  33308. "enum": ["worktree.failed"]
  33309. },
  33310. "data": {
  33311. "type": "object",
  33312. "properties": {
  33313. "message": {
  33314. "type": "string"
  33315. }
  33316. },
  33317. "required": ["message"],
  33318. "additionalProperties": false
  33319. }
  33320. },
  33321. "required": ["id", "type", "data"],
  33322. "additionalProperties": false
  33323. },
  33324. "V2EventServerConnected": {
  33325. "type": "object",
  33326. "properties": {
  33327. "id": {
  33328. "type": "string",
  33329. "pattern": "^evt_"
  33330. },
  33331. "metadata": {
  33332. "type": "object"
  33333. },
  33334. "durable": {
  33335. "type": "object",
  33336. "properties": {
  33337. "aggregateID": {
  33338. "type": "string"
  33339. },
  33340. "seq": {
  33341. "type": "integer"
  33342. },
  33343. "version": {
  33344. "type": "integer"
  33345. }
  33346. },
  33347. "required": ["aggregateID", "seq", "version"],
  33348. "additionalProperties": false
  33349. },
  33350. "location": {
  33351. "$ref": "#/components/schemas/LocationRef"
  33352. },
  33353. "type": {
  33354. "type": "string",
  33355. "enum": ["server.connected"]
  33356. },
  33357. "data": {
  33358. "type": "object",
  33359. "properties": {}
  33360. }
  33361. },
  33362. "required": ["id", "type", "data"],
  33363. "additionalProperties": false
  33364. },
  33365. "V2EventGlobalDisposed": {
  33366. "type": "object",
  33367. "properties": {
  33368. "id": {
  33369. "type": "string",
  33370. "pattern": "^evt_"
  33371. },
  33372. "metadata": {
  33373. "type": "object"
  33374. },
  33375. "durable": {
  33376. "type": "object",
  33377. "properties": {
  33378. "aggregateID": {
  33379. "type": "string"
  33380. },
  33381. "seq": {
  33382. "type": "integer"
  33383. },
  33384. "version": {
  33385. "type": "integer"
  33386. }
  33387. },
  33388. "required": ["aggregateID", "seq", "version"],
  33389. "additionalProperties": false
  33390. },
  33391. "location": {
  33392. "$ref": "#/components/schemas/LocationRef"
  33393. },
  33394. "type": {
  33395. "type": "string",
  33396. "enum": ["global.disposed"]
  33397. },
  33398. "data": {
  33399. "type": "object",
  33400. "properties": {}
  33401. }
  33402. },
  33403. "required": ["id", "type", "data"],
  33404. "additionalProperties": false
  33405. },
  33406. "QuestionV2Request": {
  33407. "type": "object",
  33408. "properties": {
  33409. "id": {
  33410. "type": "string",
  33411. "pattern": "^que"
  33412. },
  33413. "sessionID": {
  33414. "type": "string",
  33415. "pattern": "^ses"
  33416. },
  33417. "questions": {
  33418. "type": "array",
  33419. "items": {
  33420. "$ref": "#/components/schemas/QuestionV2Info"
  33421. },
  33422. "description": "Questions to ask"
  33423. },
  33424. "tool": {
  33425. "$ref": "#/components/schemas/QuestionV2Tool"
  33426. }
  33427. },
  33428. "required": ["id", "sessionID", "questions"],
  33429. "additionalProperties": false
  33430. },
  33431. "QuestionV2Reply": {
  33432. "type": "object",
  33433. "properties": {
  33434. "answers": {
  33435. "type": "array",
  33436. "items": {
  33437. "$ref": "#/components/schemas/QuestionV2Answer"
  33438. },
  33439. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33440. }
  33441. },
  33442. "required": ["answers"],
  33443. "additionalProperties": false
  33444. },
  33445. "ReferenceLocalSource": {
  33446. "type": "object",
  33447. "properties": {
  33448. "type": {
  33449. "type": "string",
  33450. "enum": ["local"]
  33451. },
  33452. "path": {
  33453. "type": "string"
  33454. },
  33455. "description": {
  33456. "type": "string"
  33457. },
  33458. "hidden": {
  33459. "type": "boolean"
  33460. }
  33461. },
  33462. "required": ["type", "path"],
  33463. "additionalProperties": false
  33464. },
  33465. "ReferenceGitSource": {
  33466. "type": "object",
  33467. "properties": {
  33468. "type": {
  33469. "type": "string",
  33470. "enum": ["git"]
  33471. },
  33472. "repository": {
  33473. "type": "string"
  33474. },
  33475. "branch": {
  33476. "type": "string"
  33477. },
  33478. "description": {
  33479. "type": "string"
  33480. },
  33481. "hidden": {
  33482. "type": "boolean"
  33483. }
  33484. },
  33485. "required": ["type", "repository"],
  33486. "additionalProperties": false
  33487. },
  33488. "ReferenceInfo": {
  33489. "type": "object",
  33490. "properties": {
  33491. "name": {
  33492. "type": "string"
  33493. },
  33494. "path": {
  33495. "type": "string"
  33496. },
  33497. "description": {
  33498. "type": "string"
  33499. },
  33500. "hidden": {
  33501. "type": "boolean"
  33502. },
  33503. "source": {
  33504. "anyOf": [
  33505. {
  33506. "$ref": "#/components/schemas/ReferenceLocalSource"
  33507. },
  33508. {
  33509. "$ref": "#/components/schemas/ReferenceGitSource"
  33510. }
  33511. ]
  33512. }
  33513. },
  33514. "required": ["name", "path", "source"],
  33515. "additionalProperties": false
  33516. },
  33517. "ProjectCopyCopy": {
  33518. "type": "object",
  33519. "properties": {
  33520. "directory": {
  33521. "type": "string"
  33522. }
  33523. },
  33524. "required": ["directory"],
  33525. "additionalProperties": false
  33526. },
  33527. "EventModels-devRefreshed": {
  33528. "type": "object",
  33529. "properties": {
  33530. "id": {
  33531. "type": "string",
  33532. "pattern": "^evt_"
  33533. },
  33534. "type": {
  33535. "type": "string",
  33536. "enum": ["models-dev.refreshed"]
  33537. },
  33538. "properties": {
  33539. "type": "object",
  33540. "properties": {}
  33541. }
  33542. },
  33543. "required": ["id", "type", "properties"],
  33544. "additionalProperties": false
  33545. },
  33546. "EventIntegrationUpdated": {
  33547. "type": "object",
  33548. "properties": {
  33549. "id": {
  33550. "type": "string",
  33551. "pattern": "^evt_"
  33552. },
  33553. "type": {
  33554. "type": "string",
  33555. "enum": ["integration.updated"]
  33556. },
  33557. "properties": {
  33558. "type": "object",
  33559. "properties": {}
  33560. }
  33561. },
  33562. "required": ["id", "type", "properties"],
  33563. "additionalProperties": false
  33564. },
  33565. "EventIntegrationConnectionUpdated": {
  33566. "type": "object",
  33567. "properties": {
  33568. "id": {
  33569. "type": "string",
  33570. "pattern": "^evt_"
  33571. },
  33572. "type": {
  33573. "type": "string",
  33574. "enum": ["integration.connection.updated"]
  33575. },
  33576. "properties": {
  33577. "type": "object",
  33578. "properties": {
  33579. "integrationID": {
  33580. "type": "string"
  33581. }
  33582. },
  33583. "required": ["integrationID"],
  33584. "additionalProperties": false
  33585. }
  33586. },
  33587. "required": ["id", "type", "properties"],
  33588. "additionalProperties": false
  33589. },
  33590. "EventCatalogUpdated": {
  33591. "type": "object",
  33592. "properties": {
  33593. "id": {
  33594. "type": "string",
  33595. "pattern": "^evt_"
  33596. },
  33597. "type": {
  33598. "type": "string",
  33599. "enum": ["catalog.updated"]
  33600. },
  33601. "properties": {
  33602. "type": "object",
  33603. "properties": {}
  33604. }
  33605. },
  33606. "required": ["id", "type", "properties"],
  33607. "additionalProperties": false
  33608. },
  33609. "EventSessionCreated": {
  33610. "type": "object",
  33611. "properties": {
  33612. "id": {
  33613. "type": "string",
  33614. "pattern": "^evt_"
  33615. },
  33616. "type": {
  33617. "type": "string",
  33618. "enum": ["session.created"]
  33619. },
  33620. "properties": {
  33621. "type": "object",
  33622. "properties": {
  33623. "sessionID": {
  33624. "type": "string",
  33625. "pattern": "^ses"
  33626. },
  33627. "info": {
  33628. "$ref": "#/components/schemas/Session"
  33629. }
  33630. },
  33631. "required": ["sessionID", "info"],
  33632. "additionalProperties": false
  33633. }
  33634. },
  33635. "required": ["id", "type", "properties"],
  33636. "additionalProperties": false
  33637. },
  33638. "EventSessionUpdated": {
  33639. "type": "object",
  33640. "properties": {
  33641. "id": {
  33642. "type": "string",
  33643. "pattern": "^evt_"
  33644. },
  33645. "type": {
  33646. "type": "string",
  33647. "enum": ["session.updated"]
  33648. },
  33649. "properties": {
  33650. "type": "object",
  33651. "properties": {
  33652. "sessionID": {
  33653. "type": "string",
  33654. "pattern": "^ses"
  33655. },
  33656. "info": {
  33657. "$ref": "#/components/schemas/Session"
  33658. }
  33659. },
  33660. "required": ["sessionID", "info"],
  33661. "additionalProperties": false
  33662. }
  33663. },
  33664. "required": ["id", "type", "properties"],
  33665. "additionalProperties": false
  33666. },
  33667. "EventSessionDeleted": {
  33668. "type": "object",
  33669. "properties": {
  33670. "id": {
  33671. "type": "string",
  33672. "pattern": "^evt_"
  33673. },
  33674. "type": {
  33675. "type": "string",
  33676. "enum": ["session.deleted"]
  33677. },
  33678. "properties": {
  33679. "type": "object",
  33680. "properties": {
  33681. "sessionID": {
  33682. "type": "string",
  33683. "pattern": "^ses"
  33684. },
  33685. "info": {
  33686. "$ref": "#/components/schemas/Session"
  33687. }
  33688. },
  33689. "required": ["sessionID", "info"],
  33690. "additionalProperties": false
  33691. }
  33692. },
  33693. "required": ["id", "type", "properties"],
  33694. "additionalProperties": false
  33695. },
  33696. "EventMessageUpdated": {
  33697. "type": "object",
  33698. "properties": {
  33699. "id": {
  33700. "type": "string",
  33701. "pattern": "^evt_"
  33702. },
  33703. "type": {
  33704. "type": "string",
  33705. "enum": ["message.updated"]
  33706. },
  33707. "properties": {
  33708. "type": "object",
  33709. "properties": {
  33710. "sessionID": {
  33711. "type": "string",
  33712. "pattern": "^ses"
  33713. },
  33714. "info": {
  33715. "$ref": "#/components/schemas/Message"
  33716. }
  33717. },
  33718. "required": ["sessionID", "info"],
  33719. "additionalProperties": false
  33720. }
  33721. },
  33722. "required": ["id", "type", "properties"],
  33723. "additionalProperties": false
  33724. },
  33725. "EventMessageRemoved": {
  33726. "type": "object",
  33727. "properties": {
  33728. "id": {
  33729. "type": "string",
  33730. "pattern": "^evt_"
  33731. },
  33732. "type": {
  33733. "type": "string",
  33734. "enum": ["message.removed"]
  33735. },
  33736. "properties": {
  33737. "type": "object",
  33738. "properties": {
  33739. "sessionID": {
  33740. "type": "string",
  33741. "pattern": "^ses"
  33742. },
  33743. "messageID": {
  33744. "type": "string",
  33745. "pattern": "^msg"
  33746. }
  33747. },
  33748. "required": ["sessionID", "messageID"],
  33749. "additionalProperties": false
  33750. }
  33751. },
  33752. "required": ["id", "type", "properties"],
  33753. "additionalProperties": false
  33754. },
  33755. "EventMessagePartUpdated": {
  33756. "type": "object",
  33757. "properties": {
  33758. "id": {
  33759. "type": "string",
  33760. "pattern": "^evt_"
  33761. },
  33762. "type": {
  33763. "type": "string",
  33764. "enum": ["message.part.updated"]
  33765. },
  33766. "properties": {
  33767. "type": "object",
  33768. "properties": {
  33769. "sessionID": {
  33770. "type": "string",
  33771. "pattern": "^ses"
  33772. },
  33773. "part": {
  33774. "$ref": "#/components/schemas/Part"
  33775. },
  33776. "time": {
  33777. "type": "number"
  33778. }
  33779. },
  33780. "required": ["sessionID", "part", "time"],
  33781. "additionalProperties": false
  33782. }
  33783. },
  33784. "required": ["id", "type", "properties"],
  33785. "additionalProperties": false
  33786. },
  33787. "EventMessagePartRemoved": {
  33788. "type": "object",
  33789. "properties": {
  33790. "id": {
  33791. "type": "string",
  33792. "pattern": "^evt_"
  33793. },
  33794. "type": {
  33795. "type": "string",
  33796. "enum": ["message.part.removed"]
  33797. },
  33798. "properties": {
  33799. "type": "object",
  33800. "properties": {
  33801. "sessionID": {
  33802. "type": "string",
  33803. "pattern": "^ses"
  33804. },
  33805. "messageID": {
  33806. "type": "string",
  33807. "pattern": "^msg"
  33808. },
  33809. "partID": {
  33810. "type": "string",
  33811. "pattern": "^prt"
  33812. }
  33813. },
  33814. "required": ["sessionID", "messageID", "partID"],
  33815. "additionalProperties": false
  33816. }
  33817. },
  33818. "required": ["id", "type", "properties"],
  33819. "additionalProperties": false
  33820. },
  33821. "EventSessionNextAgentSwitched": {
  33822. "type": "object",
  33823. "properties": {
  33824. "id": {
  33825. "type": "string",
  33826. "pattern": "^evt_"
  33827. },
  33828. "type": {
  33829. "type": "string",
  33830. "enum": ["session.next.agent.switched"]
  33831. },
  33832. "properties": {
  33833. "type": "object",
  33834. "properties": {
  33835. "timestamp": {
  33836. "type": "number"
  33837. },
  33838. "sessionID": {
  33839. "type": "string",
  33840. "pattern": "^ses"
  33841. },
  33842. "messageID": {
  33843. "type": "string",
  33844. "pattern": "^msg_"
  33845. },
  33846. "agent": {
  33847. "type": "string"
  33848. }
  33849. },
  33850. "required": ["timestamp", "sessionID", "messageID", "agent"],
  33851. "additionalProperties": false
  33852. }
  33853. },
  33854. "required": ["id", "type", "properties"],
  33855. "additionalProperties": false
  33856. },
  33857. "EventSessionNextModelSwitched": {
  33858. "type": "object",
  33859. "properties": {
  33860. "id": {
  33861. "type": "string",
  33862. "pattern": "^evt_"
  33863. },
  33864. "type": {
  33865. "type": "string",
  33866. "enum": ["session.next.model.switched"]
  33867. },
  33868. "properties": {
  33869. "type": "object",
  33870. "properties": {
  33871. "timestamp": {
  33872. "type": "number"
  33873. },
  33874. "sessionID": {
  33875. "type": "string",
  33876. "pattern": "^ses"
  33877. },
  33878. "messageID": {
  33879. "type": "string",
  33880. "pattern": "^msg_"
  33881. },
  33882. "model": {
  33883. "type": "object",
  33884. "properties": {
  33885. "id": {
  33886. "type": "string"
  33887. },
  33888. "providerID": {
  33889. "type": "string"
  33890. },
  33891. "variant": {
  33892. "type": "string"
  33893. }
  33894. },
  33895. "required": ["id", "providerID"],
  33896. "additionalProperties": false
  33897. }
  33898. },
  33899. "required": ["timestamp", "sessionID", "messageID", "model"],
  33900. "additionalProperties": false
  33901. }
  33902. },
  33903. "required": ["id", "type", "properties"],
  33904. "additionalProperties": false
  33905. },
  33906. "EventSessionNextMoved": {
  33907. "type": "object",
  33908. "properties": {
  33909. "id": {
  33910. "type": "string",
  33911. "pattern": "^evt_"
  33912. },
  33913. "type": {
  33914. "type": "string",
  33915. "enum": ["session.next.moved"]
  33916. },
  33917. "properties": {
  33918. "type": "object",
  33919. "properties": {
  33920. "timestamp": {
  33921. "type": "number"
  33922. },
  33923. "sessionID": {
  33924. "type": "string",
  33925. "pattern": "^ses"
  33926. },
  33927. "location": {
  33928. "$ref": "#/components/schemas/LocationRef"
  33929. },
  33930. "subdirectory": {
  33931. "type": "string"
  33932. }
  33933. },
  33934. "required": ["timestamp", "sessionID", "location"],
  33935. "additionalProperties": false
  33936. }
  33937. },
  33938. "required": ["id", "type", "properties"],
  33939. "additionalProperties": false
  33940. },
  33941. "EventSessionNextPrompted": {
  33942. "type": "object",
  33943. "properties": {
  33944. "id": {
  33945. "type": "string",
  33946. "pattern": "^evt_"
  33947. },
  33948. "type": {
  33949. "type": "string",
  33950. "enum": ["session.next.prompted"]
  33951. },
  33952. "properties": {
  33953. "type": "object",
  33954. "properties": {
  33955. "timestamp": {
  33956. "type": "number"
  33957. },
  33958. "sessionID": {
  33959. "type": "string",
  33960. "pattern": "^ses"
  33961. },
  33962. "messageID": {
  33963. "type": "string",
  33964. "pattern": "^msg_"
  33965. },
  33966. "prompt": {
  33967. "$ref": "#/components/schemas/Prompt"
  33968. },
  33969. "delivery": {
  33970. "type": "string",
  33971. "enum": ["steer", "queue"]
  33972. }
  33973. },
  33974. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  33975. "additionalProperties": false
  33976. }
  33977. },
  33978. "required": ["id", "type", "properties"],
  33979. "additionalProperties": false
  33980. },
  33981. "EventSessionNextPromptAdmitted": {
  33982. "type": "object",
  33983. "properties": {
  33984. "id": {
  33985. "type": "string",
  33986. "pattern": "^evt_"
  33987. },
  33988. "type": {
  33989. "type": "string",
  33990. "enum": ["session.next.prompt.admitted"]
  33991. },
  33992. "properties": {
  33993. "type": "object",
  33994. "properties": {
  33995. "timestamp": {
  33996. "type": "number"
  33997. },
  33998. "sessionID": {
  33999. "type": "string",
  34000. "pattern": "^ses"
  34001. },
  34002. "messageID": {
  34003. "type": "string",
  34004. "pattern": "^msg_"
  34005. },
  34006. "prompt": {
  34007. "$ref": "#/components/schemas/Prompt"
  34008. },
  34009. "delivery": {
  34010. "type": "string",
  34011. "enum": ["steer", "queue"]
  34012. }
  34013. },
  34014. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34015. "additionalProperties": false
  34016. }
  34017. },
  34018. "required": ["id", "type", "properties"],
  34019. "additionalProperties": false
  34020. },
  34021. "EventSessionNextContextUpdated": {
  34022. "type": "object",
  34023. "properties": {
  34024. "id": {
  34025. "type": "string",
  34026. "pattern": "^evt_"
  34027. },
  34028. "type": {
  34029. "type": "string",
  34030. "enum": ["session.next.context.updated"]
  34031. },
  34032. "properties": {
  34033. "type": "object",
  34034. "properties": {
  34035. "timestamp": {
  34036. "type": "number"
  34037. },
  34038. "sessionID": {
  34039. "type": "string",
  34040. "pattern": "^ses"
  34041. },
  34042. "messageID": {
  34043. "type": "string",
  34044. "pattern": "^msg_"
  34045. },
  34046. "text": {
  34047. "type": "string"
  34048. }
  34049. },
  34050. "required": ["timestamp", "sessionID", "messageID", "text"],
  34051. "additionalProperties": false
  34052. }
  34053. },
  34054. "required": ["id", "type", "properties"],
  34055. "additionalProperties": false
  34056. },
  34057. "EventSessionNextSynthetic": {
  34058. "type": "object",
  34059. "properties": {
  34060. "id": {
  34061. "type": "string",
  34062. "pattern": "^evt_"
  34063. },
  34064. "type": {
  34065. "type": "string",
  34066. "enum": ["session.next.synthetic"]
  34067. },
  34068. "properties": {
  34069. "type": "object",
  34070. "properties": {
  34071. "timestamp": {
  34072. "type": "number"
  34073. },
  34074. "sessionID": {
  34075. "type": "string",
  34076. "pattern": "^ses"
  34077. },
  34078. "messageID": {
  34079. "type": "string",
  34080. "pattern": "^msg_"
  34081. },
  34082. "text": {
  34083. "type": "string"
  34084. }
  34085. },
  34086. "required": ["timestamp", "sessionID", "messageID", "text"],
  34087. "additionalProperties": false
  34088. }
  34089. },
  34090. "required": ["id", "type", "properties"],
  34091. "additionalProperties": false
  34092. },
  34093. "EventSessionNextShellStarted": {
  34094. "type": "object",
  34095. "properties": {
  34096. "id": {
  34097. "type": "string",
  34098. "pattern": "^evt_"
  34099. },
  34100. "type": {
  34101. "type": "string",
  34102. "enum": ["session.next.shell.started"]
  34103. },
  34104. "properties": {
  34105. "type": "object",
  34106. "properties": {
  34107. "timestamp": {
  34108. "type": "number"
  34109. },
  34110. "sessionID": {
  34111. "type": "string",
  34112. "pattern": "^ses"
  34113. },
  34114. "messageID": {
  34115. "type": "string",
  34116. "pattern": "^msg_"
  34117. },
  34118. "callID": {
  34119. "type": "string"
  34120. },
  34121. "command": {
  34122. "type": "string"
  34123. }
  34124. },
  34125. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  34126. "additionalProperties": false
  34127. }
  34128. },
  34129. "required": ["id", "type", "properties"],
  34130. "additionalProperties": false
  34131. },
  34132. "EventSessionNextShellEnded": {
  34133. "type": "object",
  34134. "properties": {
  34135. "id": {
  34136. "type": "string",
  34137. "pattern": "^evt_"
  34138. },
  34139. "type": {
  34140. "type": "string",
  34141. "enum": ["session.next.shell.ended"]
  34142. },
  34143. "properties": {
  34144. "type": "object",
  34145. "properties": {
  34146. "timestamp": {
  34147. "type": "number"
  34148. },
  34149. "sessionID": {
  34150. "type": "string",
  34151. "pattern": "^ses"
  34152. },
  34153. "callID": {
  34154. "type": "string"
  34155. },
  34156. "output": {
  34157. "type": "string"
  34158. }
  34159. },
  34160. "required": ["timestamp", "sessionID", "callID", "output"],
  34161. "additionalProperties": false
  34162. }
  34163. },
  34164. "required": ["id", "type", "properties"],
  34165. "additionalProperties": false
  34166. },
  34167. "EventSessionNextStepStarted": {
  34168. "type": "object",
  34169. "properties": {
  34170. "id": {
  34171. "type": "string",
  34172. "pattern": "^evt_"
  34173. },
  34174. "type": {
  34175. "type": "string",
  34176. "enum": ["session.next.step.started"]
  34177. },
  34178. "properties": {
  34179. "type": "object",
  34180. "properties": {
  34181. "timestamp": {
  34182. "type": "number"
  34183. },
  34184. "sessionID": {
  34185. "type": "string",
  34186. "pattern": "^ses"
  34187. },
  34188. "assistantMessageID": {
  34189. "type": "string",
  34190. "pattern": "^msg_"
  34191. },
  34192. "agent": {
  34193. "type": "string"
  34194. },
  34195. "model": {
  34196. "type": "object",
  34197. "properties": {
  34198. "id": {
  34199. "type": "string"
  34200. },
  34201. "providerID": {
  34202. "type": "string"
  34203. },
  34204. "variant": {
  34205. "type": "string"
  34206. }
  34207. },
  34208. "required": ["id", "providerID"],
  34209. "additionalProperties": false
  34210. },
  34211. "snapshot": {
  34212. "type": "string"
  34213. }
  34214. },
  34215. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  34216. "additionalProperties": false
  34217. }
  34218. },
  34219. "required": ["id", "type", "properties"],
  34220. "additionalProperties": false
  34221. },
  34222. "EventSessionNextStepEnded": {
  34223. "type": "object",
  34224. "properties": {
  34225. "id": {
  34226. "type": "string",
  34227. "pattern": "^evt_"
  34228. },
  34229. "type": {
  34230. "type": "string",
  34231. "enum": ["session.next.step.ended"]
  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. "finish": {
  34248. "type": "string"
  34249. },
  34250. "cost": {
  34251. "type": "number"
  34252. },
  34253. "tokens": {
  34254. "type": "object",
  34255. "properties": {
  34256. "input": {
  34257. "type": "number"
  34258. },
  34259. "output": {
  34260. "type": "number"
  34261. },
  34262. "reasoning": {
  34263. "type": "number"
  34264. },
  34265. "cache": {
  34266. "type": "object",
  34267. "properties": {
  34268. "read": {
  34269. "type": "number"
  34270. },
  34271. "write": {
  34272. "type": "number"
  34273. }
  34274. },
  34275. "required": ["read", "write"],
  34276. "additionalProperties": false
  34277. }
  34278. },
  34279. "required": ["input", "output", "reasoning", "cache"],
  34280. "additionalProperties": false
  34281. },
  34282. "snapshot": {
  34283. "type": "string"
  34284. },
  34285. "files": {
  34286. "type": "array",
  34287. "items": {
  34288. "type": "string"
  34289. }
  34290. }
  34291. },
  34292. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34293. "additionalProperties": false
  34294. }
  34295. },
  34296. "required": ["id", "type", "properties"],
  34297. "additionalProperties": false
  34298. },
  34299. "EventSessionNextStepFailed": {
  34300. "type": "object",
  34301. "properties": {
  34302. "id": {
  34303. "type": "string",
  34304. "pattern": "^evt_"
  34305. },
  34306. "type": {
  34307. "type": "string",
  34308. "enum": ["session.next.step.failed"]
  34309. },
  34310. "properties": {
  34311. "type": "object",
  34312. "properties": {
  34313. "timestamp": {
  34314. "type": "number"
  34315. },
  34316. "sessionID": {
  34317. "type": "string",
  34318. "pattern": "^ses"
  34319. },
  34320. "assistantMessageID": {
  34321. "type": "string",
  34322. "pattern": "^msg_"
  34323. },
  34324. "error": {
  34325. "$ref": "#/components/schemas/SessionErrorUnknown"
  34326. }
  34327. },
  34328. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34329. "additionalProperties": false
  34330. }
  34331. },
  34332. "required": ["id", "type", "properties"],
  34333. "additionalProperties": false
  34334. },
  34335. "EventSessionNextTextStarted": {
  34336. "type": "object",
  34337. "properties": {
  34338. "id": {
  34339. "type": "string",
  34340. "pattern": "^evt_"
  34341. },
  34342. "type": {
  34343. "type": "string",
  34344. "enum": ["session.next.text.started"]
  34345. },
  34346. "properties": {
  34347. "type": "object",
  34348. "properties": {
  34349. "timestamp": {
  34350. "type": "number"
  34351. },
  34352. "sessionID": {
  34353. "type": "string",
  34354. "pattern": "^ses"
  34355. },
  34356. "assistantMessageID": {
  34357. "type": "string",
  34358. "pattern": "^msg_"
  34359. },
  34360. "textID": {
  34361. "type": "string"
  34362. }
  34363. },
  34364. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34365. "additionalProperties": false
  34366. }
  34367. },
  34368. "required": ["id", "type", "properties"],
  34369. "additionalProperties": false
  34370. },
  34371. "EventSessionNextTextDelta": {
  34372. "type": "object",
  34373. "properties": {
  34374. "id": {
  34375. "type": "string",
  34376. "pattern": "^evt_"
  34377. },
  34378. "type": {
  34379. "type": "string",
  34380. "enum": ["session.next.text.delta"]
  34381. },
  34382. "properties": {
  34383. "type": "object",
  34384. "properties": {
  34385. "timestamp": {
  34386. "type": "number"
  34387. },
  34388. "sessionID": {
  34389. "type": "string",
  34390. "pattern": "^ses"
  34391. },
  34392. "assistantMessageID": {
  34393. "type": "string",
  34394. "pattern": "^msg_"
  34395. },
  34396. "textID": {
  34397. "type": "string"
  34398. },
  34399. "delta": {
  34400. "type": "string"
  34401. }
  34402. },
  34403. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34404. "additionalProperties": false
  34405. }
  34406. },
  34407. "required": ["id", "type", "properties"],
  34408. "additionalProperties": false
  34409. },
  34410. "EventSessionNextTextEnded": {
  34411. "type": "object",
  34412. "properties": {
  34413. "id": {
  34414. "type": "string",
  34415. "pattern": "^evt_"
  34416. },
  34417. "type": {
  34418. "type": "string",
  34419. "enum": ["session.next.text.ended"]
  34420. },
  34421. "properties": {
  34422. "type": "object",
  34423. "properties": {
  34424. "timestamp": {
  34425. "type": "number"
  34426. },
  34427. "sessionID": {
  34428. "type": "string",
  34429. "pattern": "^ses"
  34430. },
  34431. "assistantMessageID": {
  34432. "type": "string",
  34433. "pattern": "^msg_"
  34434. },
  34435. "textID": {
  34436. "type": "string"
  34437. },
  34438. "text": {
  34439. "type": "string"
  34440. }
  34441. },
  34442. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34443. "additionalProperties": false
  34444. }
  34445. },
  34446. "required": ["id", "type", "properties"],
  34447. "additionalProperties": false
  34448. },
  34449. "EventSessionNextReasoningStarted": {
  34450. "type": "object",
  34451. "properties": {
  34452. "id": {
  34453. "type": "string",
  34454. "pattern": "^evt_"
  34455. },
  34456. "type": {
  34457. "type": "string",
  34458. "enum": ["session.next.reasoning.started"]
  34459. },
  34460. "properties": {
  34461. "type": "object",
  34462. "properties": {
  34463. "timestamp": {
  34464. "type": "number"
  34465. },
  34466. "sessionID": {
  34467. "type": "string",
  34468. "pattern": "^ses"
  34469. },
  34470. "assistantMessageID": {
  34471. "type": "string",
  34472. "pattern": "^msg_"
  34473. },
  34474. "reasoningID": {
  34475. "type": "string"
  34476. },
  34477. "providerMetadata": {
  34478. "type": "object",
  34479. "additionalProperties": {
  34480. "type": "object"
  34481. }
  34482. }
  34483. },
  34484. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34485. "additionalProperties": false
  34486. }
  34487. },
  34488. "required": ["id", "type", "properties"],
  34489. "additionalProperties": false
  34490. },
  34491. "EventSessionNextReasoningDelta": {
  34492. "type": "object",
  34493. "properties": {
  34494. "id": {
  34495. "type": "string",
  34496. "pattern": "^evt_"
  34497. },
  34498. "type": {
  34499. "type": "string",
  34500. "enum": ["session.next.reasoning.delta"]
  34501. },
  34502. "properties": {
  34503. "type": "object",
  34504. "properties": {
  34505. "timestamp": {
  34506. "type": "number"
  34507. },
  34508. "sessionID": {
  34509. "type": "string",
  34510. "pattern": "^ses"
  34511. },
  34512. "assistantMessageID": {
  34513. "type": "string",
  34514. "pattern": "^msg_"
  34515. },
  34516. "reasoningID": {
  34517. "type": "string"
  34518. },
  34519. "delta": {
  34520. "type": "string"
  34521. }
  34522. },
  34523. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34524. "additionalProperties": false
  34525. }
  34526. },
  34527. "required": ["id", "type", "properties"],
  34528. "additionalProperties": false
  34529. },
  34530. "EventSessionNextReasoningEnded": {
  34531. "type": "object",
  34532. "properties": {
  34533. "id": {
  34534. "type": "string",
  34535. "pattern": "^evt_"
  34536. },
  34537. "type": {
  34538. "type": "string",
  34539. "enum": ["session.next.reasoning.ended"]
  34540. },
  34541. "properties": {
  34542. "type": "object",
  34543. "properties": {
  34544. "timestamp": {
  34545. "type": "number"
  34546. },
  34547. "sessionID": {
  34548. "type": "string",
  34549. "pattern": "^ses"
  34550. },
  34551. "assistantMessageID": {
  34552. "type": "string",
  34553. "pattern": "^msg_"
  34554. },
  34555. "reasoningID": {
  34556. "type": "string"
  34557. },
  34558. "text": {
  34559. "type": "string"
  34560. },
  34561. "providerMetadata": {
  34562. "type": "object",
  34563. "additionalProperties": {
  34564. "type": "object"
  34565. }
  34566. }
  34567. },
  34568. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34569. "additionalProperties": false
  34570. }
  34571. },
  34572. "required": ["id", "type", "properties"],
  34573. "additionalProperties": false
  34574. },
  34575. "EventSessionNextToolInputStarted": {
  34576. "type": "object",
  34577. "properties": {
  34578. "id": {
  34579. "type": "string",
  34580. "pattern": "^evt_"
  34581. },
  34582. "type": {
  34583. "type": "string",
  34584. "enum": ["session.next.tool.input.started"]
  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. "name": {
  34604. "type": "string"
  34605. }
  34606. },
  34607. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34608. "additionalProperties": false
  34609. }
  34610. },
  34611. "required": ["id", "type", "properties"],
  34612. "additionalProperties": false
  34613. },
  34614. "EventSessionNextToolInputDelta": {
  34615. "type": "object",
  34616. "properties": {
  34617. "id": {
  34618. "type": "string",
  34619. "pattern": "^evt_"
  34620. },
  34621. "type": {
  34622. "type": "string",
  34623. "enum": ["session.next.tool.input.delta"]
  34624. },
  34625. "properties": {
  34626. "type": "object",
  34627. "properties": {
  34628. "timestamp": {
  34629. "type": "number"
  34630. },
  34631. "sessionID": {
  34632. "type": "string",
  34633. "pattern": "^ses"
  34634. },
  34635. "assistantMessageID": {
  34636. "type": "string",
  34637. "pattern": "^msg_"
  34638. },
  34639. "callID": {
  34640. "type": "string"
  34641. },
  34642. "delta": {
  34643. "type": "string"
  34644. }
  34645. },
  34646. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34647. "additionalProperties": false
  34648. }
  34649. },
  34650. "required": ["id", "type", "properties"],
  34651. "additionalProperties": false
  34652. },
  34653. "EventSessionNextToolInputEnded": {
  34654. "type": "object",
  34655. "properties": {
  34656. "id": {
  34657. "type": "string",
  34658. "pattern": "^evt_"
  34659. },
  34660. "type": {
  34661. "type": "string",
  34662. "enum": ["session.next.tool.input.ended"]
  34663. },
  34664. "properties": {
  34665. "type": "object",
  34666. "properties": {
  34667. "timestamp": {
  34668. "type": "number"
  34669. },
  34670. "sessionID": {
  34671. "type": "string",
  34672. "pattern": "^ses"
  34673. },
  34674. "assistantMessageID": {
  34675. "type": "string",
  34676. "pattern": "^msg_"
  34677. },
  34678. "callID": {
  34679. "type": "string"
  34680. },
  34681. "text": {
  34682. "type": "string"
  34683. }
  34684. },
  34685. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34686. "additionalProperties": false
  34687. }
  34688. },
  34689. "required": ["id", "type", "properties"],
  34690. "additionalProperties": false
  34691. },
  34692. "EventSessionNextToolCalled": {
  34693. "type": "object",
  34694. "properties": {
  34695. "id": {
  34696. "type": "string",
  34697. "pattern": "^evt_"
  34698. },
  34699. "type": {
  34700. "type": "string",
  34701. "enum": ["session.next.tool.called"]
  34702. },
  34703. "properties": {
  34704. "type": "object",
  34705. "properties": {
  34706. "timestamp": {
  34707. "type": "number"
  34708. },
  34709. "sessionID": {
  34710. "type": "string",
  34711. "pattern": "^ses"
  34712. },
  34713. "assistantMessageID": {
  34714. "type": "string",
  34715. "pattern": "^msg_"
  34716. },
  34717. "callID": {
  34718. "type": "string"
  34719. },
  34720. "tool": {
  34721. "type": "string"
  34722. },
  34723. "input": {
  34724. "type": "object"
  34725. },
  34726. "provider": {
  34727. "type": "object",
  34728. "properties": {
  34729. "executed": {
  34730. "type": "boolean"
  34731. },
  34732. "metadata": {
  34733. "type": "object",
  34734. "additionalProperties": {
  34735. "type": "object"
  34736. }
  34737. }
  34738. },
  34739. "required": ["executed"],
  34740. "additionalProperties": false
  34741. }
  34742. },
  34743. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34744. "additionalProperties": false
  34745. }
  34746. },
  34747. "required": ["id", "type", "properties"],
  34748. "additionalProperties": false
  34749. },
  34750. "EventSessionNextToolProgress": {
  34751. "type": "object",
  34752. "properties": {
  34753. "id": {
  34754. "type": "string",
  34755. "pattern": "^evt_"
  34756. },
  34757. "type": {
  34758. "type": "string",
  34759. "enum": ["session.next.tool.progress"]
  34760. },
  34761. "properties": {
  34762. "type": "object",
  34763. "properties": {
  34764. "timestamp": {
  34765. "type": "number"
  34766. },
  34767. "sessionID": {
  34768. "type": "string",
  34769. "pattern": "^ses"
  34770. },
  34771. "assistantMessageID": {
  34772. "type": "string",
  34773. "pattern": "^msg_"
  34774. },
  34775. "callID": {
  34776. "type": "string"
  34777. },
  34778. "structured": {
  34779. "type": "object"
  34780. },
  34781. "content": {
  34782. "type": "array",
  34783. "items": {
  34784. "anyOf": [
  34785. {
  34786. "$ref": "#/components/schemas/ToolTextContent"
  34787. },
  34788. {
  34789. "$ref": "#/components/schemas/ToolFileContent"
  34790. }
  34791. ]
  34792. }
  34793. }
  34794. },
  34795. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  34796. "additionalProperties": false
  34797. }
  34798. },
  34799. "required": ["id", "type", "properties"],
  34800. "additionalProperties": false
  34801. },
  34802. "EventSessionNextToolSuccess": {
  34803. "type": "object",
  34804. "properties": {
  34805. "id": {
  34806. "type": "string",
  34807. "pattern": "^evt_"
  34808. },
  34809. "type": {
  34810. "type": "string",
  34811. "enum": ["session.next.tool.success"]
  34812. },
  34813. "properties": {
  34814. "type": "object",
  34815. "properties": {
  34816. "timestamp": {
  34817. "type": "number"
  34818. },
  34819. "sessionID": {
  34820. "type": "string",
  34821. "pattern": "^ses"
  34822. },
  34823. "assistantMessageID": {
  34824. "type": "string",
  34825. "pattern": "^msg_"
  34826. },
  34827. "callID": {
  34828. "type": "string"
  34829. },
  34830. "structured": {
  34831. "type": "object"
  34832. },
  34833. "content": {
  34834. "type": "array",
  34835. "items": {
  34836. "anyOf": [
  34837. {
  34838. "$ref": "#/components/schemas/ToolTextContent"
  34839. },
  34840. {
  34841. "$ref": "#/components/schemas/ToolFileContent"
  34842. }
  34843. ]
  34844. }
  34845. },
  34846. "outputPaths": {
  34847. "type": "array",
  34848. "items": {
  34849. "type": "string"
  34850. }
  34851. },
  34852. "result": {},
  34853. "provider": {
  34854. "type": "object",
  34855. "properties": {
  34856. "executed": {
  34857. "type": "boolean"
  34858. },
  34859. "metadata": {
  34860. "type": "object",
  34861. "additionalProperties": {
  34862. "type": "object"
  34863. }
  34864. }
  34865. },
  34866. "required": ["executed"],
  34867. "additionalProperties": false
  34868. }
  34869. },
  34870. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  34871. "additionalProperties": false
  34872. }
  34873. },
  34874. "required": ["id", "type", "properties"],
  34875. "additionalProperties": false
  34876. },
  34877. "EventSessionNextToolFailed": {
  34878. "type": "object",
  34879. "properties": {
  34880. "id": {
  34881. "type": "string",
  34882. "pattern": "^evt_"
  34883. },
  34884. "type": {
  34885. "type": "string",
  34886. "enum": ["session.next.tool.failed"]
  34887. },
  34888. "properties": {
  34889. "type": "object",
  34890. "properties": {
  34891. "timestamp": {
  34892. "type": "number"
  34893. },
  34894. "sessionID": {
  34895. "type": "string",
  34896. "pattern": "^ses"
  34897. },
  34898. "assistantMessageID": {
  34899. "type": "string",
  34900. "pattern": "^msg_"
  34901. },
  34902. "callID": {
  34903. "type": "string"
  34904. },
  34905. "error": {
  34906. "$ref": "#/components/schemas/SessionErrorUnknown"
  34907. },
  34908. "result": {},
  34909. "provider": {
  34910. "type": "object",
  34911. "properties": {
  34912. "executed": {
  34913. "type": "boolean"
  34914. },
  34915. "metadata": {
  34916. "type": "object",
  34917. "additionalProperties": {
  34918. "type": "object"
  34919. }
  34920. }
  34921. },
  34922. "required": ["executed"],
  34923. "additionalProperties": false
  34924. }
  34925. },
  34926. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  34927. "additionalProperties": false
  34928. }
  34929. },
  34930. "required": ["id", "type", "properties"],
  34931. "additionalProperties": false
  34932. },
  34933. "EventSessionNextRetried": {
  34934. "type": "object",
  34935. "properties": {
  34936. "id": {
  34937. "type": "string",
  34938. "pattern": "^evt_"
  34939. },
  34940. "type": {
  34941. "type": "string",
  34942. "enum": ["session.next.retried"]
  34943. },
  34944. "properties": {
  34945. "type": "object",
  34946. "properties": {
  34947. "timestamp": {
  34948. "type": "number"
  34949. },
  34950. "sessionID": {
  34951. "type": "string",
  34952. "pattern": "^ses"
  34953. },
  34954. "attempt": {
  34955. "type": "number"
  34956. },
  34957. "error": {
  34958. "$ref": "#/components/schemas/SessionNextRetry_error"
  34959. }
  34960. },
  34961. "required": ["timestamp", "sessionID", "attempt", "error"],
  34962. "additionalProperties": false
  34963. }
  34964. },
  34965. "required": ["id", "type", "properties"],
  34966. "additionalProperties": false
  34967. },
  34968. "EventSessionNextCompactionStarted": {
  34969. "type": "object",
  34970. "properties": {
  34971. "id": {
  34972. "type": "string",
  34973. "pattern": "^evt_"
  34974. },
  34975. "type": {
  34976. "type": "string",
  34977. "enum": ["session.next.compaction.started"]
  34978. },
  34979. "properties": {
  34980. "type": "object",
  34981. "properties": {
  34982. "timestamp": {
  34983. "type": "number"
  34984. },
  34985. "sessionID": {
  34986. "type": "string",
  34987. "pattern": "^ses"
  34988. },
  34989. "messageID": {
  34990. "type": "string",
  34991. "pattern": "^msg_"
  34992. },
  34993. "reason": {
  34994. "type": "string",
  34995. "enum": ["auto", "manual"]
  34996. }
  34997. },
  34998. "required": ["timestamp", "sessionID", "messageID", "reason"],
  34999. "additionalProperties": false
  35000. }
  35001. },
  35002. "required": ["id", "type", "properties"],
  35003. "additionalProperties": false
  35004. },
  35005. "EventSessionNextCompactionDelta": {
  35006. "type": "object",
  35007. "properties": {
  35008. "id": {
  35009. "type": "string",
  35010. "pattern": "^evt_"
  35011. },
  35012. "type": {
  35013. "type": "string",
  35014. "enum": ["session.next.compaction.delta"]
  35015. },
  35016. "properties": {
  35017. "type": "object",
  35018. "properties": {
  35019. "timestamp": {
  35020. "type": "number"
  35021. },
  35022. "sessionID": {
  35023. "type": "string",
  35024. "pattern": "^ses"
  35025. },
  35026. "messageID": {
  35027. "type": "string",
  35028. "pattern": "^msg_"
  35029. },
  35030. "text": {
  35031. "type": "string"
  35032. }
  35033. },
  35034. "required": ["timestamp", "sessionID", "messageID", "text"],
  35035. "additionalProperties": false
  35036. }
  35037. },
  35038. "required": ["id", "type", "properties"],
  35039. "additionalProperties": false
  35040. },
  35041. "EventSessionNextCompactionEnded": {
  35042. "type": "object",
  35043. "properties": {
  35044. "id": {
  35045. "type": "string",
  35046. "pattern": "^evt_"
  35047. },
  35048. "type": {
  35049. "type": "string",
  35050. "enum": ["session.next.compaction.ended"]
  35051. },
  35052. "properties": {
  35053. "type": "object",
  35054. "properties": {
  35055. "timestamp": {
  35056. "type": "number"
  35057. },
  35058. "sessionID": {
  35059. "type": "string",
  35060. "pattern": "^ses"
  35061. },
  35062. "messageID": {
  35063. "type": "string",
  35064. "pattern": "^msg_"
  35065. },
  35066. "reason": {
  35067. "type": "string",
  35068. "enum": ["auto", "manual"]
  35069. },
  35070. "text": {
  35071. "type": "string"
  35072. },
  35073. "recent": {
  35074. "type": "string"
  35075. }
  35076. },
  35077. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  35078. "additionalProperties": false
  35079. }
  35080. },
  35081. "required": ["id", "type", "properties"],
  35082. "additionalProperties": false
  35083. },
  35084. "EventSessionNextRevertStaged": {
  35085. "type": "object",
  35086. "properties": {
  35087. "id": {
  35088. "type": "string",
  35089. "pattern": "^evt_"
  35090. },
  35091. "type": {
  35092. "type": "string",
  35093. "enum": ["session.next.revert.staged"]
  35094. },
  35095. "properties": {
  35096. "type": "object",
  35097. "properties": {
  35098. "timestamp": {
  35099. "type": "number"
  35100. },
  35101. "sessionID": {
  35102. "type": "string",
  35103. "pattern": "^ses"
  35104. },
  35105. "revert": {
  35106. "type": "object",
  35107. "properties": {
  35108. "messageID": {
  35109. "type": "string",
  35110. "pattern": "^msg_"
  35111. },
  35112. "partID": {
  35113. "type": "string"
  35114. },
  35115. "snapshot": {
  35116. "type": "string"
  35117. },
  35118. "diff": {
  35119. "type": "string"
  35120. },
  35121. "files": {
  35122. "type": "array",
  35123. "items": {
  35124. "$ref": "#/components/schemas/FileDiff"
  35125. }
  35126. }
  35127. },
  35128. "required": ["messageID"],
  35129. "additionalProperties": false
  35130. }
  35131. },
  35132. "required": ["timestamp", "sessionID", "revert"],
  35133. "additionalProperties": false
  35134. }
  35135. },
  35136. "required": ["id", "type", "properties"],
  35137. "additionalProperties": false
  35138. },
  35139. "EventSessionNextRevertCleared": {
  35140. "type": "object",
  35141. "properties": {
  35142. "id": {
  35143. "type": "string",
  35144. "pattern": "^evt_"
  35145. },
  35146. "type": {
  35147. "type": "string",
  35148. "enum": ["session.next.revert.cleared"]
  35149. },
  35150. "properties": {
  35151. "type": "object",
  35152. "properties": {
  35153. "timestamp": {
  35154. "type": "number"
  35155. },
  35156. "sessionID": {
  35157. "type": "string",
  35158. "pattern": "^ses"
  35159. }
  35160. },
  35161. "required": ["timestamp", "sessionID"],
  35162. "additionalProperties": false
  35163. }
  35164. },
  35165. "required": ["id", "type", "properties"],
  35166. "additionalProperties": false
  35167. },
  35168. "EventSessionNextRevertCommitted": {
  35169. "type": "object",
  35170. "properties": {
  35171. "id": {
  35172. "type": "string",
  35173. "pattern": "^evt_"
  35174. },
  35175. "type": {
  35176. "type": "string",
  35177. "enum": ["session.next.revert.committed"]
  35178. },
  35179. "properties": {
  35180. "type": "object",
  35181. "properties": {
  35182. "timestamp": {
  35183. "type": "number"
  35184. },
  35185. "sessionID": {
  35186. "type": "string",
  35187. "pattern": "^ses"
  35188. },
  35189. "messageID": {
  35190. "type": "string",
  35191. "pattern": "^msg_"
  35192. }
  35193. },
  35194. "required": ["timestamp", "sessionID", "messageID"],
  35195. "additionalProperties": false
  35196. }
  35197. },
  35198. "required": ["id", "type", "properties"],
  35199. "additionalProperties": false
  35200. },
  35201. "EventMessagePartDelta": {
  35202. "type": "object",
  35203. "properties": {
  35204. "id": {
  35205. "type": "string",
  35206. "pattern": "^evt_"
  35207. },
  35208. "type": {
  35209. "type": "string",
  35210. "enum": ["message.part.delta"]
  35211. },
  35212. "properties": {
  35213. "type": "object",
  35214. "properties": {
  35215. "sessionID": {
  35216. "type": "string",
  35217. "pattern": "^ses"
  35218. },
  35219. "messageID": {
  35220. "type": "string",
  35221. "pattern": "^msg"
  35222. },
  35223. "partID": {
  35224. "type": "string",
  35225. "pattern": "^prt"
  35226. },
  35227. "field": {
  35228. "type": "string"
  35229. },
  35230. "delta": {
  35231. "type": "string"
  35232. }
  35233. },
  35234. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35235. "additionalProperties": false
  35236. }
  35237. },
  35238. "required": ["id", "type", "properties"],
  35239. "additionalProperties": false
  35240. },
  35241. "EventSessionDiff": {
  35242. "type": "object",
  35243. "properties": {
  35244. "id": {
  35245. "type": "string",
  35246. "pattern": "^evt_"
  35247. },
  35248. "type": {
  35249. "type": "string",
  35250. "enum": ["session.diff"]
  35251. },
  35252. "properties": {
  35253. "type": "object",
  35254. "properties": {
  35255. "sessionID": {
  35256. "type": "string",
  35257. "pattern": "^ses"
  35258. },
  35259. "diff": {
  35260. "type": "array",
  35261. "items": {
  35262. "$ref": "#/components/schemas/SnapshotFileDiff"
  35263. }
  35264. }
  35265. },
  35266. "required": ["sessionID", "diff"],
  35267. "additionalProperties": false
  35268. }
  35269. },
  35270. "required": ["id", "type", "properties"],
  35271. "additionalProperties": false
  35272. },
  35273. "EventSessionError": {
  35274. "type": "object",
  35275. "properties": {
  35276. "id": {
  35277. "type": "string",
  35278. "pattern": "^evt_"
  35279. },
  35280. "type": {
  35281. "type": "string",
  35282. "enum": ["session.error"]
  35283. },
  35284. "properties": {
  35285. "type": "object",
  35286. "properties": {
  35287. "sessionID": {
  35288. "type": "string",
  35289. "pattern": "^ses"
  35290. },
  35291. "error": {
  35292. "anyOf": [
  35293. {
  35294. "$ref": "#/components/schemas/ProviderAuthError"
  35295. },
  35296. {
  35297. "$ref": "#/components/schemas/UnknownError"
  35298. },
  35299. {
  35300. "$ref": "#/components/schemas/MessageOutputLengthError"
  35301. },
  35302. {
  35303. "$ref": "#/components/schemas/MessageAbortedError"
  35304. },
  35305. {
  35306. "$ref": "#/components/schemas/StructuredOutputError"
  35307. },
  35308. {
  35309. "$ref": "#/components/schemas/ContextOverflowError"
  35310. },
  35311. {
  35312. "$ref": "#/components/schemas/ContentFilterError"
  35313. },
  35314. {
  35315. "$ref": "#/components/schemas/APIError"
  35316. }
  35317. ]
  35318. }
  35319. },
  35320. "additionalProperties": false
  35321. }
  35322. },
  35323. "required": ["id", "type", "properties"],
  35324. "additionalProperties": false
  35325. },
  35326. "EventInstallationUpdated": {
  35327. "type": "object",
  35328. "properties": {
  35329. "id": {
  35330. "type": "string",
  35331. "pattern": "^evt_"
  35332. },
  35333. "type": {
  35334. "type": "string",
  35335. "enum": ["installation.updated"]
  35336. },
  35337. "properties": {
  35338. "type": "object",
  35339. "properties": {
  35340. "version": {
  35341. "type": "string"
  35342. }
  35343. },
  35344. "required": ["version"],
  35345. "additionalProperties": false
  35346. }
  35347. },
  35348. "required": ["id", "type", "properties"],
  35349. "additionalProperties": false
  35350. },
  35351. "EventInstallationUpdate-available": {
  35352. "type": "object",
  35353. "properties": {
  35354. "id": {
  35355. "type": "string",
  35356. "pattern": "^evt_"
  35357. },
  35358. "type": {
  35359. "type": "string",
  35360. "enum": ["installation.update-available"]
  35361. },
  35362. "properties": {
  35363. "type": "object",
  35364. "properties": {
  35365. "version": {
  35366. "type": "string"
  35367. }
  35368. },
  35369. "required": ["version"],
  35370. "additionalProperties": false
  35371. }
  35372. },
  35373. "required": ["id", "type", "properties"],
  35374. "additionalProperties": false
  35375. },
  35376. "EventFileEdited": {
  35377. "type": "object",
  35378. "properties": {
  35379. "id": {
  35380. "type": "string",
  35381. "pattern": "^evt_"
  35382. },
  35383. "type": {
  35384. "type": "string",
  35385. "enum": ["file.edited"]
  35386. },
  35387. "properties": {
  35388. "type": "object",
  35389. "properties": {
  35390. "file": {
  35391. "type": "string"
  35392. }
  35393. },
  35394. "required": ["file"],
  35395. "additionalProperties": false
  35396. }
  35397. },
  35398. "required": ["id", "type", "properties"],
  35399. "additionalProperties": false
  35400. },
  35401. "EventReferenceUpdated": {
  35402. "type": "object",
  35403. "properties": {
  35404. "id": {
  35405. "type": "string",
  35406. "pattern": "^evt_"
  35407. },
  35408. "type": {
  35409. "type": "string",
  35410. "enum": ["reference.updated"]
  35411. },
  35412. "properties": {
  35413. "type": "object",
  35414. "properties": {}
  35415. }
  35416. },
  35417. "required": ["id", "type", "properties"],
  35418. "additionalProperties": false
  35419. },
  35420. "EventPermissionV2Asked": {
  35421. "type": "object",
  35422. "properties": {
  35423. "id": {
  35424. "type": "string",
  35425. "pattern": "^evt_"
  35426. },
  35427. "type": {
  35428. "type": "string",
  35429. "enum": ["permission.v2.asked"]
  35430. },
  35431. "properties": {
  35432. "type": "object",
  35433. "properties": {
  35434. "id": {
  35435. "type": "string",
  35436. "pattern": "^per"
  35437. },
  35438. "sessionID": {
  35439. "type": "string",
  35440. "pattern": "^ses"
  35441. },
  35442. "action": {
  35443. "type": "string"
  35444. },
  35445. "resources": {
  35446. "type": "array",
  35447. "items": {
  35448. "type": "string"
  35449. }
  35450. },
  35451. "save": {
  35452. "type": "array",
  35453. "items": {
  35454. "type": "string"
  35455. }
  35456. },
  35457. "metadata": {
  35458. "type": "object"
  35459. },
  35460. "source": {
  35461. "$ref": "#/components/schemas/PermissionV2Source"
  35462. }
  35463. },
  35464. "required": ["id", "sessionID", "action", "resources"],
  35465. "additionalProperties": false
  35466. }
  35467. },
  35468. "required": ["id", "type", "properties"],
  35469. "additionalProperties": false
  35470. },
  35471. "EventPermissionV2Replied": {
  35472. "type": "object",
  35473. "properties": {
  35474. "id": {
  35475. "type": "string",
  35476. "pattern": "^evt_"
  35477. },
  35478. "type": {
  35479. "type": "string",
  35480. "enum": ["permission.v2.replied"]
  35481. },
  35482. "properties": {
  35483. "type": "object",
  35484. "properties": {
  35485. "sessionID": {
  35486. "type": "string",
  35487. "pattern": "^ses"
  35488. },
  35489. "requestID": {
  35490. "type": "string",
  35491. "pattern": "^per"
  35492. },
  35493. "reply": {
  35494. "$ref": "#/components/schemas/PermissionV2Reply"
  35495. }
  35496. },
  35497. "required": ["sessionID", "requestID", "reply"],
  35498. "additionalProperties": false
  35499. }
  35500. },
  35501. "required": ["id", "type", "properties"],
  35502. "additionalProperties": false
  35503. },
  35504. "EventPluginAdded": {
  35505. "type": "object",
  35506. "properties": {
  35507. "id": {
  35508. "type": "string",
  35509. "pattern": "^evt_"
  35510. },
  35511. "type": {
  35512. "type": "string",
  35513. "enum": ["plugin.added"]
  35514. },
  35515. "properties": {
  35516. "type": "object",
  35517. "properties": {
  35518. "id": {
  35519. "type": "string"
  35520. }
  35521. },
  35522. "required": ["id"],
  35523. "additionalProperties": false
  35524. }
  35525. },
  35526. "required": ["id", "type", "properties"],
  35527. "additionalProperties": false
  35528. },
  35529. "EventProjectDirectoriesUpdated": {
  35530. "type": "object",
  35531. "properties": {
  35532. "id": {
  35533. "type": "string",
  35534. "pattern": "^evt_"
  35535. },
  35536. "type": {
  35537. "type": "string",
  35538. "enum": ["project.directories.updated"]
  35539. },
  35540. "properties": {
  35541. "type": "object",
  35542. "properties": {
  35543. "projectID": {
  35544. "type": "string"
  35545. }
  35546. },
  35547. "required": ["projectID"],
  35548. "additionalProperties": false
  35549. }
  35550. },
  35551. "required": ["id", "type", "properties"],
  35552. "additionalProperties": false
  35553. },
  35554. "EventFileWatcherUpdated": {
  35555. "type": "object",
  35556. "properties": {
  35557. "id": {
  35558. "type": "string",
  35559. "pattern": "^evt_"
  35560. },
  35561. "type": {
  35562. "type": "string",
  35563. "enum": ["file.watcher.updated"]
  35564. },
  35565. "properties": {
  35566. "type": "object",
  35567. "properties": {
  35568. "file": {
  35569. "type": "string"
  35570. },
  35571. "event": {
  35572. "type": "string",
  35573. "enum": ["add", "change", "unlink"]
  35574. }
  35575. },
  35576. "required": ["file", "event"],
  35577. "additionalProperties": false
  35578. }
  35579. },
  35580. "required": ["id", "type", "properties"],
  35581. "additionalProperties": false
  35582. },
  35583. "EventPtyCreated": {
  35584. "type": "object",
  35585. "properties": {
  35586. "id": {
  35587. "type": "string",
  35588. "pattern": "^evt_"
  35589. },
  35590. "type": {
  35591. "type": "string",
  35592. "enum": ["pty.created"]
  35593. },
  35594. "properties": {
  35595. "type": "object",
  35596. "properties": {
  35597. "info": {
  35598. "$ref": "#/components/schemas/Pty"
  35599. }
  35600. },
  35601. "required": ["info"],
  35602. "additionalProperties": false
  35603. }
  35604. },
  35605. "required": ["id", "type", "properties"],
  35606. "additionalProperties": false
  35607. },
  35608. "EventPtyUpdated": {
  35609. "type": "object",
  35610. "properties": {
  35611. "id": {
  35612. "type": "string",
  35613. "pattern": "^evt_"
  35614. },
  35615. "type": {
  35616. "type": "string",
  35617. "enum": ["pty.updated"]
  35618. },
  35619. "properties": {
  35620. "type": "object",
  35621. "properties": {
  35622. "info": {
  35623. "$ref": "#/components/schemas/Pty"
  35624. }
  35625. },
  35626. "required": ["info"],
  35627. "additionalProperties": false
  35628. }
  35629. },
  35630. "required": ["id", "type", "properties"],
  35631. "additionalProperties": false
  35632. },
  35633. "EventPtyExited": {
  35634. "type": "object",
  35635. "properties": {
  35636. "id": {
  35637. "type": "string",
  35638. "pattern": "^evt_"
  35639. },
  35640. "type": {
  35641. "type": "string",
  35642. "enum": ["pty.exited"]
  35643. },
  35644. "properties": {
  35645. "type": "object",
  35646. "properties": {
  35647. "id": {
  35648. "type": "string",
  35649. "pattern": "^pty"
  35650. },
  35651. "exitCode": {
  35652. "type": "integer",
  35653. "minimum": 0
  35654. }
  35655. },
  35656. "required": ["id", "exitCode"],
  35657. "additionalProperties": false
  35658. }
  35659. },
  35660. "required": ["id", "type", "properties"],
  35661. "additionalProperties": false
  35662. },
  35663. "EventPtyDeleted": {
  35664. "type": "object",
  35665. "properties": {
  35666. "id": {
  35667. "type": "string",
  35668. "pattern": "^evt_"
  35669. },
  35670. "type": {
  35671. "type": "string",
  35672. "enum": ["pty.deleted"]
  35673. },
  35674. "properties": {
  35675. "type": "object",
  35676. "properties": {
  35677. "id": {
  35678. "type": "string",
  35679. "pattern": "^pty"
  35680. }
  35681. },
  35682. "required": ["id"],
  35683. "additionalProperties": false
  35684. }
  35685. },
  35686. "required": ["id", "type", "properties"],
  35687. "additionalProperties": false
  35688. },
  35689. "EventQuestionV2Asked": {
  35690. "type": "object",
  35691. "properties": {
  35692. "id": {
  35693. "type": "string",
  35694. "pattern": "^evt_"
  35695. },
  35696. "type": {
  35697. "type": "string",
  35698. "enum": ["question.v2.asked"]
  35699. },
  35700. "properties": {
  35701. "type": "object",
  35702. "properties": {
  35703. "id": {
  35704. "type": "string",
  35705. "pattern": "^que"
  35706. },
  35707. "sessionID": {
  35708. "type": "string",
  35709. "pattern": "^ses"
  35710. },
  35711. "questions": {
  35712. "type": "array",
  35713. "items": {
  35714. "$ref": "#/components/schemas/QuestionV2Info"
  35715. },
  35716. "description": "Questions to ask"
  35717. },
  35718. "tool": {
  35719. "$ref": "#/components/schemas/QuestionV2Tool"
  35720. }
  35721. },
  35722. "required": ["id", "sessionID", "questions"],
  35723. "additionalProperties": false
  35724. }
  35725. },
  35726. "required": ["id", "type", "properties"],
  35727. "additionalProperties": false
  35728. },
  35729. "EventQuestionV2Replied": {
  35730. "type": "object",
  35731. "properties": {
  35732. "id": {
  35733. "type": "string",
  35734. "pattern": "^evt_"
  35735. },
  35736. "type": {
  35737. "type": "string",
  35738. "enum": ["question.v2.replied"]
  35739. },
  35740. "properties": {
  35741. "type": "object",
  35742. "properties": {
  35743. "sessionID": {
  35744. "type": "string",
  35745. "pattern": "^ses"
  35746. },
  35747. "requestID": {
  35748. "type": "string",
  35749. "pattern": "^que"
  35750. },
  35751. "answers": {
  35752. "type": "array",
  35753. "items": {
  35754. "$ref": "#/components/schemas/QuestionV2Answer"
  35755. }
  35756. }
  35757. },
  35758. "required": ["sessionID", "requestID", "answers"],
  35759. "additionalProperties": false
  35760. }
  35761. },
  35762. "required": ["id", "type", "properties"],
  35763. "additionalProperties": false
  35764. },
  35765. "EventQuestionV2Rejected": {
  35766. "type": "object",
  35767. "properties": {
  35768. "id": {
  35769. "type": "string",
  35770. "pattern": "^evt_"
  35771. },
  35772. "type": {
  35773. "type": "string",
  35774. "enum": ["question.v2.rejected"]
  35775. },
  35776. "properties": {
  35777. "type": "object",
  35778. "properties": {
  35779. "sessionID": {
  35780. "type": "string",
  35781. "pattern": "^ses"
  35782. },
  35783. "requestID": {
  35784. "type": "string",
  35785. "pattern": "^que"
  35786. }
  35787. },
  35788. "required": ["sessionID", "requestID"],
  35789. "additionalProperties": false
  35790. }
  35791. },
  35792. "required": ["id", "type", "properties"],
  35793. "additionalProperties": false
  35794. },
  35795. "EventTodoUpdated": {
  35796. "type": "object",
  35797. "properties": {
  35798. "id": {
  35799. "type": "string",
  35800. "pattern": "^evt_"
  35801. },
  35802. "type": {
  35803. "type": "string",
  35804. "enum": ["todo.updated"]
  35805. },
  35806. "properties": {
  35807. "type": "object",
  35808. "properties": {
  35809. "sessionID": {
  35810. "type": "string",
  35811. "pattern": "^ses"
  35812. },
  35813. "todos": {
  35814. "type": "array",
  35815. "items": {
  35816. "$ref": "#/components/schemas/Todo"
  35817. }
  35818. }
  35819. },
  35820. "required": ["sessionID", "todos"],
  35821. "additionalProperties": false
  35822. }
  35823. },
  35824. "required": ["id", "type", "properties"],
  35825. "additionalProperties": false
  35826. },
  35827. "EventLspUpdated": {
  35828. "type": "object",
  35829. "properties": {
  35830. "id": {
  35831. "type": "string",
  35832. "pattern": "^evt_"
  35833. },
  35834. "type": {
  35835. "type": "string",
  35836. "enum": ["lsp.updated"]
  35837. },
  35838. "properties": {
  35839. "type": "object",
  35840. "properties": {}
  35841. }
  35842. },
  35843. "required": ["id", "type", "properties"],
  35844. "additionalProperties": false
  35845. },
  35846. "EventPermissionAsked": {
  35847. "type": "object",
  35848. "properties": {
  35849. "id": {
  35850. "type": "string",
  35851. "pattern": "^evt_"
  35852. },
  35853. "type": {
  35854. "type": "string",
  35855. "enum": ["permission.asked"]
  35856. },
  35857. "properties": {
  35858. "type": "object",
  35859. "properties": {
  35860. "id": {
  35861. "type": "string",
  35862. "pattern": "^per"
  35863. },
  35864. "sessionID": {
  35865. "type": "string",
  35866. "pattern": "^ses"
  35867. },
  35868. "permission": {
  35869. "type": "string"
  35870. },
  35871. "patterns": {
  35872. "type": "array",
  35873. "items": {
  35874. "type": "string"
  35875. }
  35876. },
  35877. "metadata": {
  35878. "type": "object"
  35879. },
  35880. "always": {
  35881. "type": "array",
  35882. "items": {
  35883. "type": "string"
  35884. }
  35885. },
  35886. "tool": {
  35887. "type": "object",
  35888. "properties": {
  35889. "messageID": {
  35890. "type": "string"
  35891. },
  35892. "callID": {
  35893. "type": "string"
  35894. }
  35895. },
  35896. "required": ["messageID", "callID"],
  35897. "additionalProperties": false
  35898. }
  35899. },
  35900. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  35901. "additionalProperties": false
  35902. }
  35903. },
  35904. "required": ["id", "type", "properties"],
  35905. "additionalProperties": false
  35906. },
  35907. "EventPermissionReplied": {
  35908. "type": "object",
  35909. "properties": {
  35910. "id": {
  35911. "type": "string",
  35912. "pattern": "^evt_"
  35913. },
  35914. "type": {
  35915. "type": "string",
  35916. "enum": ["permission.replied"]
  35917. },
  35918. "properties": {
  35919. "type": "object",
  35920. "properties": {
  35921. "sessionID": {
  35922. "type": "string",
  35923. "pattern": "^ses"
  35924. },
  35925. "requestID": {
  35926. "type": "string",
  35927. "pattern": "^per"
  35928. },
  35929. "reply": {
  35930. "type": "string",
  35931. "enum": ["once", "always", "reject"]
  35932. }
  35933. },
  35934. "required": ["sessionID", "requestID", "reply"],
  35935. "additionalProperties": false
  35936. }
  35937. },
  35938. "required": ["id", "type", "properties"],
  35939. "additionalProperties": false
  35940. },
  35941. "EventMcpToolsChanged": {
  35942. "type": "object",
  35943. "properties": {
  35944. "id": {
  35945. "type": "string",
  35946. "pattern": "^evt_"
  35947. },
  35948. "type": {
  35949. "type": "string",
  35950. "enum": ["mcp.tools.changed"]
  35951. },
  35952. "properties": {
  35953. "type": "object",
  35954. "properties": {
  35955. "server": {
  35956. "type": "string"
  35957. }
  35958. },
  35959. "required": ["server"],
  35960. "additionalProperties": false
  35961. }
  35962. },
  35963. "required": ["id", "type", "properties"],
  35964. "additionalProperties": false
  35965. },
  35966. "EventMcpBrowserOpenFailed": {
  35967. "type": "object",
  35968. "properties": {
  35969. "id": {
  35970. "type": "string",
  35971. "pattern": "^evt_"
  35972. },
  35973. "type": {
  35974. "type": "string",
  35975. "enum": ["mcp.browser.open.failed"]
  35976. },
  35977. "properties": {
  35978. "type": "object",
  35979. "properties": {
  35980. "mcpName": {
  35981. "type": "string"
  35982. },
  35983. "url": {
  35984. "type": "string"
  35985. }
  35986. },
  35987. "required": ["mcpName", "url"],
  35988. "additionalProperties": false
  35989. }
  35990. },
  35991. "required": ["id", "type", "properties"],
  35992. "additionalProperties": false
  35993. },
  35994. "EventCommandExecuted": {
  35995. "type": "object",
  35996. "properties": {
  35997. "id": {
  35998. "type": "string",
  35999. "pattern": "^evt_"
  36000. },
  36001. "type": {
  36002. "type": "string",
  36003. "enum": ["command.executed"]
  36004. },
  36005. "properties": {
  36006. "type": "object",
  36007. "properties": {
  36008. "name": {
  36009. "type": "string"
  36010. },
  36011. "sessionID": {
  36012. "type": "string",
  36013. "pattern": "^ses"
  36014. },
  36015. "arguments": {
  36016. "type": "string"
  36017. },
  36018. "messageID": {
  36019. "type": "string",
  36020. "pattern": "^msg"
  36021. }
  36022. },
  36023. "required": ["name", "sessionID", "arguments", "messageID"],
  36024. "additionalProperties": false
  36025. }
  36026. },
  36027. "required": ["id", "type", "properties"],
  36028. "additionalProperties": false
  36029. },
  36030. "EventProjectUpdated": {
  36031. "type": "object",
  36032. "properties": {
  36033. "id": {
  36034. "type": "string",
  36035. "pattern": "^evt_"
  36036. },
  36037. "type": {
  36038. "type": "string",
  36039. "enum": ["project.updated"]
  36040. },
  36041. "properties": {
  36042. "type": "object",
  36043. "properties": {
  36044. "id": {
  36045. "type": "string"
  36046. },
  36047. "worktree": {
  36048. "type": "string"
  36049. },
  36050. "vcs": {
  36051. "type": "string",
  36052. "enum": ["git"]
  36053. },
  36054. "name": {
  36055. "type": "string"
  36056. },
  36057. "icon": {
  36058. "type": "object",
  36059. "properties": {
  36060. "url": {
  36061. "type": "string"
  36062. },
  36063. "override": {
  36064. "type": "string"
  36065. },
  36066. "color": {
  36067. "type": "string"
  36068. }
  36069. },
  36070. "additionalProperties": false
  36071. },
  36072. "commands": {
  36073. "type": "object",
  36074. "properties": {
  36075. "start": {
  36076. "type": "string",
  36077. "description": "Startup script to run when creating a new workspace (worktree)"
  36078. }
  36079. },
  36080. "additionalProperties": false
  36081. },
  36082. "time": {
  36083. "type": "object",
  36084. "properties": {
  36085. "created": {
  36086. "type": "integer",
  36087. "minimum": 0
  36088. },
  36089. "updated": {
  36090. "type": "integer",
  36091. "minimum": 0
  36092. },
  36093. "initialized": {
  36094. "type": "integer",
  36095. "minimum": 0
  36096. }
  36097. },
  36098. "required": ["created", "updated"],
  36099. "additionalProperties": false
  36100. },
  36101. "sandboxes": {
  36102. "type": "array",
  36103. "items": {
  36104. "type": "string"
  36105. }
  36106. }
  36107. },
  36108. "required": ["id", "worktree", "time", "sandboxes"],
  36109. "additionalProperties": false
  36110. }
  36111. },
  36112. "required": ["id", "type", "properties"],
  36113. "additionalProperties": false
  36114. },
  36115. "EventSessionStatus": {
  36116. "type": "object",
  36117. "properties": {
  36118. "id": {
  36119. "type": "string",
  36120. "pattern": "^evt_"
  36121. },
  36122. "type": {
  36123. "type": "string",
  36124. "enum": ["session.status"]
  36125. },
  36126. "properties": {
  36127. "type": "object",
  36128. "properties": {
  36129. "sessionID": {
  36130. "type": "string",
  36131. "pattern": "^ses"
  36132. },
  36133. "status": {
  36134. "$ref": "#/components/schemas/SessionStatus"
  36135. }
  36136. },
  36137. "required": ["sessionID", "status"],
  36138. "additionalProperties": false
  36139. }
  36140. },
  36141. "required": ["id", "type", "properties"],
  36142. "additionalProperties": false
  36143. },
  36144. "EventSessionIdle": {
  36145. "type": "object",
  36146. "properties": {
  36147. "id": {
  36148. "type": "string",
  36149. "pattern": "^evt_"
  36150. },
  36151. "type": {
  36152. "type": "string",
  36153. "enum": ["session.idle"]
  36154. },
  36155. "properties": {
  36156. "type": "object",
  36157. "properties": {
  36158. "sessionID": {
  36159. "type": "string",
  36160. "pattern": "^ses"
  36161. }
  36162. },
  36163. "required": ["sessionID"],
  36164. "additionalProperties": false
  36165. }
  36166. },
  36167. "required": ["id", "type", "properties"],
  36168. "additionalProperties": false
  36169. },
  36170. "EventQuestionAsked": {
  36171. "type": "object",
  36172. "properties": {
  36173. "id": {
  36174. "type": "string",
  36175. "pattern": "^evt_"
  36176. },
  36177. "type": {
  36178. "type": "string",
  36179. "enum": ["question.asked"]
  36180. },
  36181. "properties": {
  36182. "type": "object",
  36183. "properties": {
  36184. "id": {
  36185. "type": "string",
  36186. "pattern": "^que"
  36187. },
  36188. "sessionID": {
  36189. "type": "string",
  36190. "pattern": "^ses"
  36191. },
  36192. "questions": {
  36193. "type": "array",
  36194. "items": {
  36195. "$ref": "#/components/schemas/QuestionInfo"
  36196. },
  36197. "description": "Questions to ask"
  36198. },
  36199. "tool": {
  36200. "$ref": "#/components/schemas/QuestionTool"
  36201. }
  36202. },
  36203. "required": ["id", "sessionID", "questions"],
  36204. "additionalProperties": false
  36205. }
  36206. },
  36207. "required": ["id", "type", "properties"],
  36208. "additionalProperties": false
  36209. },
  36210. "EventQuestionReplied": {
  36211. "type": "object",
  36212. "properties": {
  36213. "id": {
  36214. "type": "string",
  36215. "pattern": "^evt_"
  36216. },
  36217. "type": {
  36218. "type": "string",
  36219. "enum": ["question.replied"]
  36220. },
  36221. "properties": {
  36222. "type": "object",
  36223. "properties": {
  36224. "sessionID": {
  36225. "type": "string",
  36226. "pattern": "^ses"
  36227. },
  36228. "requestID": {
  36229. "type": "string",
  36230. "pattern": "^que"
  36231. },
  36232. "answers": {
  36233. "type": "array",
  36234. "items": {
  36235. "$ref": "#/components/schemas/QuestionAnswer"
  36236. }
  36237. }
  36238. },
  36239. "required": ["sessionID", "requestID", "answers"],
  36240. "additionalProperties": false
  36241. }
  36242. },
  36243. "required": ["id", "type", "properties"],
  36244. "additionalProperties": false
  36245. },
  36246. "EventQuestionRejected": {
  36247. "type": "object",
  36248. "properties": {
  36249. "id": {
  36250. "type": "string",
  36251. "pattern": "^evt_"
  36252. },
  36253. "type": {
  36254. "type": "string",
  36255. "enum": ["question.rejected"]
  36256. },
  36257. "properties": {
  36258. "type": "object",
  36259. "properties": {
  36260. "sessionID": {
  36261. "type": "string",
  36262. "pattern": "^ses"
  36263. },
  36264. "requestID": {
  36265. "type": "string",
  36266. "pattern": "^que"
  36267. }
  36268. },
  36269. "required": ["sessionID", "requestID"],
  36270. "additionalProperties": false
  36271. }
  36272. },
  36273. "required": ["id", "type", "properties"],
  36274. "additionalProperties": false
  36275. },
  36276. "EventSessionCompacted": {
  36277. "type": "object",
  36278. "properties": {
  36279. "id": {
  36280. "type": "string",
  36281. "pattern": "^evt_"
  36282. },
  36283. "type": {
  36284. "type": "string",
  36285. "enum": ["session.compacted"]
  36286. },
  36287. "properties": {
  36288. "type": "object",
  36289. "properties": {
  36290. "sessionID": {
  36291. "type": "string",
  36292. "pattern": "^ses"
  36293. }
  36294. },
  36295. "required": ["sessionID"],
  36296. "additionalProperties": false
  36297. }
  36298. },
  36299. "required": ["id", "type", "properties"],
  36300. "additionalProperties": false
  36301. },
  36302. "EventVcsBranchUpdated": {
  36303. "type": "object",
  36304. "properties": {
  36305. "id": {
  36306. "type": "string",
  36307. "pattern": "^evt_"
  36308. },
  36309. "type": {
  36310. "type": "string",
  36311. "enum": ["vcs.branch.updated"]
  36312. },
  36313. "properties": {
  36314. "type": "object",
  36315. "properties": {
  36316. "branch": {
  36317. "type": "string"
  36318. }
  36319. },
  36320. "additionalProperties": false
  36321. }
  36322. },
  36323. "required": ["id", "type", "properties"],
  36324. "additionalProperties": false
  36325. },
  36326. "EventWorkspaceReady": {
  36327. "type": "object",
  36328. "properties": {
  36329. "id": {
  36330. "type": "string",
  36331. "pattern": "^evt_"
  36332. },
  36333. "type": {
  36334. "type": "string",
  36335. "enum": ["workspace.ready"]
  36336. },
  36337. "properties": {
  36338. "type": "object",
  36339. "properties": {
  36340. "name": {
  36341. "type": "string"
  36342. }
  36343. },
  36344. "required": ["name"],
  36345. "additionalProperties": false
  36346. }
  36347. },
  36348. "required": ["id", "type", "properties"],
  36349. "additionalProperties": false
  36350. },
  36351. "EventWorkspaceFailed": {
  36352. "type": "object",
  36353. "properties": {
  36354. "id": {
  36355. "type": "string",
  36356. "pattern": "^evt_"
  36357. },
  36358. "type": {
  36359. "type": "string",
  36360. "enum": ["workspace.failed"]
  36361. },
  36362. "properties": {
  36363. "type": "object",
  36364. "properties": {
  36365. "message": {
  36366. "type": "string"
  36367. }
  36368. },
  36369. "required": ["message"],
  36370. "additionalProperties": false
  36371. }
  36372. },
  36373. "required": ["id", "type", "properties"],
  36374. "additionalProperties": false
  36375. },
  36376. "EventWorkspaceStatus": {
  36377. "type": "object",
  36378. "properties": {
  36379. "id": {
  36380. "type": "string",
  36381. "pattern": "^evt_"
  36382. },
  36383. "type": {
  36384. "type": "string",
  36385. "enum": ["workspace.status"]
  36386. },
  36387. "properties": {
  36388. "type": "object",
  36389. "properties": {
  36390. "workspaceID": {
  36391. "type": "string",
  36392. "pattern": "^wrk"
  36393. },
  36394. "status": {
  36395. "type": "string",
  36396. "enum": ["connected", "connecting", "disconnected", "error"]
  36397. }
  36398. },
  36399. "required": ["workspaceID", "status"],
  36400. "additionalProperties": false
  36401. }
  36402. },
  36403. "required": ["id", "type", "properties"],
  36404. "additionalProperties": false
  36405. },
  36406. "EventWorktreeReady": {
  36407. "type": "object",
  36408. "properties": {
  36409. "id": {
  36410. "type": "string",
  36411. "pattern": "^evt_"
  36412. },
  36413. "type": {
  36414. "type": "string",
  36415. "enum": ["worktree.ready"]
  36416. },
  36417. "properties": {
  36418. "type": "object",
  36419. "properties": {
  36420. "name": {
  36421. "type": "string"
  36422. },
  36423. "branch": {
  36424. "type": "string"
  36425. }
  36426. },
  36427. "required": ["name"],
  36428. "additionalProperties": false
  36429. }
  36430. },
  36431. "required": ["id", "type", "properties"],
  36432. "additionalProperties": false
  36433. },
  36434. "EventWorktreeFailed": {
  36435. "type": "object",
  36436. "properties": {
  36437. "id": {
  36438. "type": "string",
  36439. "pattern": "^evt_"
  36440. },
  36441. "type": {
  36442. "type": "string",
  36443. "enum": ["worktree.failed"]
  36444. },
  36445. "properties": {
  36446. "type": "object",
  36447. "properties": {
  36448. "message": {
  36449. "type": "string"
  36450. }
  36451. },
  36452. "required": ["message"],
  36453. "additionalProperties": false
  36454. }
  36455. },
  36456. "required": ["id", "type", "properties"],
  36457. "additionalProperties": false
  36458. },
  36459. "EventServerConnected": {
  36460. "type": "object",
  36461. "properties": {
  36462. "id": {
  36463. "type": "string",
  36464. "pattern": "^evt_"
  36465. },
  36466. "type": {
  36467. "type": "string",
  36468. "enum": ["server.connected"]
  36469. },
  36470. "properties": {
  36471. "type": "object",
  36472. "properties": {}
  36473. }
  36474. },
  36475. "required": ["id", "type", "properties"],
  36476. "additionalProperties": false
  36477. },
  36478. "EventGlobalDisposed": {
  36479. "type": "object",
  36480. "properties": {
  36481. "id": {
  36482. "type": "string",
  36483. "pattern": "^evt_"
  36484. },
  36485. "type": {
  36486. "type": "string",
  36487. "enum": ["global.disposed"]
  36488. },
  36489. "properties": {
  36490. "type": "object",
  36491. "properties": {}
  36492. }
  36493. },
  36494. "required": ["id", "type", "properties"],
  36495. "additionalProperties": false
  36496. },
  36497. "CredentialOAuth": {
  36498. "type": "object",
  36499. "properties": {
  36500. "type": {
  36501. "type": "string",
  36502. "enum": ["oauth"]
  36503. },
  36504. "methodID": {
  36505. "type": "string"
  36506. },
  36507. "refresh": {
  36508. "type": "string"
  36509. },
  36510. "access": {
  36511. "type": "string"
  36512. },
  36513. "expires": {
  36514. "type": "integer",
  36515. "minimum": 0
  36516. },
  36517. "metadata": {
  36518. "type": "object"
  36519. }
  36520. },
  36521. "required": ["type", "methodID", "refresh", "access", "expires"],
  36522. "additionalProperties": false
  36523. },
  36524. "CredentialKey": {
  36525. "type": "object",
  36526. "properties": {
  36527. "type": {
  36528. "type": "string",
  36529. "enum": ["key"]
  36530. },
  36531. "key": {
  36532. "type": "string"
  36533. },
  36534. "metadata": {
  36535. "type": "object"
  36536. }
  36537. },
  36538. "required": ["type", "key"],
  36539. "additionalProperties": false
  36540. },
  36541. "SkillV2DirectorySource": {
  36542. "type": "object",
  36543. "properties": {
  36544. "type": {
  36545. "type": "string",
  36546. "enum": ["directory"]
  36547. },
  36548. "path": {
  36549. "type": "string"
  36550. }
  36551. },
  36552. "required": ["type", "path"],
  36553. "additionalProperties": false
  36554. },
  36555. "SkillV2UrlSource": {
  36556. "type": "object",
  36557. "properties": {
  36558. "type": {
  36559. "type": "string",
  36560. "enum": ["url"]
  36561. },
  36562. "url": {
  36563. "type": "string"
  36564. }
  36565. },
  36566. "required": ["type", "url"],
  36567. "additionalProperties": false
  36568. },
  36569. "SkillV2EmbeddedSource": {
  36570. "type": "object",
  36571. "properties": {
  36572. "type": {
  36573. "type": "string",
  36574. "enum": ["embedded"]
  36575. },
  36576. "skill": {
  36577. "$ref": "#/components/schemas/SkillV2Info"
  36578. }
  36579. },
  36580. "required": ["type", "skill"],
  36581. "additionalProperties": false
  36582. },
  36583. "BadRequestError": {
  36584. "type": "object",
  36585. "required": ["name", "data"],
  36586. "properties": {
  36587. "name": {
  36588. "type": "string",
  36589. "enum": ["BadRequest"]
  36590. },
  36591. "data": {
  36592. "type": "object",
  36593. "required": ["message"],
  36594. "properties": {
  36595. "message": {
  36596. "type": "string"
  36597. },
  36598. "kind": {
  36599. "type": "string",
  36600. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36601. }
  36602. }
  36603. }
  36604. }
  36605. }
  36606. }
  36607. },
  36608. "security": [],
  36609. "tags": [
  36610. {
  36611. "name": "control",
  36612. "description": "Control plane routes."
  36613. },
  36614. {
  36615. "name": "controlPlane",
  36616. "description": "Control-plane orchestration routes."
  36617. },
  36618. {
  36619. "name": "global",
  36620. "description": "Global server routes."
  36621. },
  36622. {
  36623. "name": "event",
  36624. "description": "Instance event stream route."
  36625. },
  36626. {
  36627. "name": "config",
  36628. "description": "Experimental HttpApi config routes."
  36629. },
  36630. {
  36631. "name": "experimental",
  36632. "description": "Experimental HttpApi read-only routes."
  36633. },
  36634. {
  36635. "name": "file",
  36636. "description": "Experimental HttpApi file routes."
  36637. },
  36638. {
  36639. "name": "instance",
  36640. "description": "Experimental HttpApi instance read routes."
  36641. },
  36642. {
  36643. "name": "mcp",
  36644. "description": "Experimental HttpApi MCP routes."
  36645. },
  36646. {
  36647. "name": "project",
  36648. "description": "Experimental HttpApi project routes."
  36649. },
  36650. {
  36651. "name": "projectCopy",
  36652. "description": "Project copy naming routes."
  36653. },
  36654. {
  36655. "name": "pty",
  36656. "description": "Experimental HttpApi PTY routes."
  36657. },
  36658. {
  36659. "name": "question",
  36660. "description": "Question routes."
  36661. },
  36662. {
  36663. "name": "permission",
  36664. "description": "Experimental HttpApi permission routes."
  36665. },
  36666. {
  36667. "name": "provider",
  36668. "description": "Experimental HttpApi provider routes."
  36669. },
  36670. {
  36671. "name": "session",
  36672. "description": "Experimental HttpApi session routes."
  36673. },
  36674. {
  36675. "name": "sync",
  36676. "description": "Experimental HttpApi sync routes."
  36677. },
  36678. {
  36679. "name": "tui",
  36680. "description": "Experimental HttpApi TUI routes."
  36681. },
  36682. {
  36683. "name": "workspace",
  36684. "description": "Experimental HttpApi workspace routes."
  36685. },
  36686. {
  36687. "name": "opencode HttpApi",
  36688. "description": "Experimental HttpApi surface for selected instance routes."
  36689. },
  36690. {
  36691. "name": "opencode HttpApi",
  36692. "description": "Experimental HttpApi surface for selected instance routes."
  36693. },
  36694. {
  36695. "name": "opencode HttpApi",
  36696. "description": "Experimental HttpApi surface for selected instance routes."
  36697. },
  36698. {
  36699. "name": "sessions",
  36700. "description": "Experimental session routes."
  36701. },
  36702. {
  36703. "name": "messages",
  36704. "description": "Experimental message routes."
  36705. },
  36706. {
  36707. "name": "models",
  36708. "description": "Experimental model routes."
  36709. },
  36710. {
  36711. "name": "providers",
  36712. "description": "Experimental provider routes."
  36713. },
  36714. {
  36715. "name": "integrations",
  36716. "description": "Integration discovery and authentication routes."
  36717. },
  36718. {
  36719. "name": "opencode HttpApi",
  36720. "description": "Experimental HttpApi surface for selected instance routes."
  36721. },
  36722. {
  36723. "name": "permissions",
  36724. "description": "Experimental permission routes."
  36725. },
  36726. {
  36727. "name": "filesystem",
  36728. "description": "Experimental location-scoped filesystem routes."
  36729. },
  36730. {
  36731. "name": "commands",
  36732. "description": "Experimental command routes."
  36733. },
  36734. {
  36735. "name": "skills",
  36736. "description": "Experimental skill routes."
  36737. },
  36738. {
  36739. "name": "events",
  36740. "description": "Experimental event stream route."
  36741. },
  36742. {
  36743. "name": "pty",
  36744. "description": "Experimental location-scoped PTY routes."
  36745. },
  36746. {
  36747. "name": "session questions",
  36748. "description": "Experimental session question routes."
  36749. },
  36750. {
  36751. "name": "reference",
  36752. "description": "Location-scoped project references."
  36753. },
  36754. {
  36755. "name": "projectCopy",
  36756. "description": "Project copy management routes."
  36757. },
  36758. {
  36759. "name": "pty",
  36760. "description": "PTY websocket route."
  36761. }
  36762. ]
  36763. }