openapi.json 1.0 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. }
  856. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "$ref": "#/components/schemas/ProjectIcon"
  3850. },
  3851. "commands": {
  3852. "$ref": "#/components/schemas/ProjectCommands"
  3853. }
  3854. },
  3855. "additionalProperties": false
  3856. }
  3857. }
  3858. }
  3859. },
  3860. "x-codeSamples": [
  3861. {
  3862. "lang": "js",
  3863. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3864. }
  3865. ]
  3866. }
  3867. },
  3868. "/project/{projectID}/directories": {
  3869. "get": {
  3870. "tags": ["project"],
  3871. "operationId": "project.directories",
  3872. "parameters": [
  3873. {
  3874. "name": "projectID",
  3875. "in": "path",
  3876. "schema": {
  3877. "type": "string"
  3878. },
  3879. "required": true
  3880. },
  3881. {
  3882. "name": "directory",
  3883. "in": "query",
  3884. "schema": {
  3885. "type": "string"
  3886. },
  3887. "required": false
  3888. },
  3889. {
  3890. "name": "workspace",
  3891. "in": "query",
  3892. "schema": {
  3893. "type": "string"
  3894. },
  3895. "required": false
  3896. }
  3897. ],
  3898. "responses": {
  3899. "200": {
  3900. "description": "Project directories",
  3901. "content": {
  3902. "application/json": {
  3903. "schema": {
  3904. "$ref": "#/components/schemas/ProjectDirectories"
  3905. }
  3906. }
  3907. }
  3908. },
  3909. "400": {
  3910. "description": "Bad request",
  3911. "content": {
  3912. "application/json": {
  3913. "schema": {
  3914. "$ref": "#/components/schemas/BadRequestError"
  3915. }
  3916. }
  3917. }
  3918. }
  3919. },
  3920. "description": "List known local absolute directories for a project.",
  3921. "summary": "List project directories",
  3922. "x-codeSamples": [
  3923. {
  3924. "lang": "js",
  3925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3926. }
  3927. ]
  3928. }
  3929. },
  3930. "/experimental/project/{projectID}/copy/generate-name": {
  3931. "post": {
  3932. "tags": ["projectCopy"],
  3933. "operationId": "experimental.projectCopy.generateName",
  3934. "parameters": [
  3935. {
  3936. "name": "projectID",
  3937. "in": "path",
  3938. "schema": {
  3939. "type": "string"
  3940. },
  3941. "required": true
  3942. },
  3943. {
  3944. "name": "directory",
  3945. "in": "query",
  3946. "schema": {
  3947. "type": "string"
  3948. },
  3949. "required": false
  3950. },
  3951. {
  3952. "name": "workspace",
  3953. "in": "query",
  3954. "schema": {
  3955. "type": "string"
  3956. },
  3957. "required": false
  3958. }
  3959. ],
  3960. "responses": {
  3961. "200": {
  3962. "description": "Success",
  3963. "content": {
  3964. "application/json": {
  3965. "schema": {
  3966. "type": "object",
  3967. "properties": {
  3968. "name": {
  3969. "type": "string"
  3970. }
  3971. },
  3972. "required": ["name"],
  3973. "additionalProperties": false
  3974. }
  3975. }
  3976. }
  3977. },
  3978. "400": {
  3979. "description": "Bad request",
  3980. "content": {
  3981. "application/json": {
  3982. "schema": {
  3983. "$ref": "#/components/schemas/BadRequestError"
  3984. }
  3985. }
  3986. }
  3987. }
  3988. },
  3989. "description": "Generate a short name for a project copy from task context.",
  3990. "summary": "Generate project copy name",
  3991. "requestBody": {
  3992. "content": {
  3993. "application/json": {
  3994. "schema": {
  3995. "type": "object",
  3996. "properties": {
  3997. "context": {
  3998. "type": "string"
  3999. }
  4000. },
  4001. "additionalProperties": false
  4002. }
  4003. }
  4004. }
  4005. },
  4006. "x-codeSamples": [
  4007. {
  4008. "lang": "js",
  4009. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4010. }
  4011. ]
  4012. }
  4013. },
  4014. "/pty/shells": {
  4015. "get": {
  4016. "tags": ["pty"],
  4017. "operationId": "pty.shells",
  4018. "parameters": [
  4019. {
  4020. "name": "directory",
  4021. "in": "query",
  4022. "schema": {
  4023. "type": "string"
  4024. },
  4025. "required": false
  4026. },
  4027. {
  4028. "name": "workspace",
  4029. "in": "query",
  4030. "schema": {
  4031. "type": "string"
  4032. },
  4033. "required": false
  4034. }
  4035. ],
  4036. "responses": {
  4037. "200": {
  4038. "description": "List of shells",
  4039. "content": {
  4040. "application/json": {
  4041. "schema": {
  4042. "type": "array",
  4043. "items": {
  4044. "type": "object",
  4045. "properties": {
  4046. "path": {
  4047. "type": "string"
  4048. },
  4049. "name": {
  4050. "type": "string"
  4051. },
  4052. "acceptable": {
  4053. "type": "boolean"
  4054. }
  4055. },
  4056. "required": ["path", "name", "acceptable"],
  4057. "additionalProperties": false
  4058. },
  4059. "description": "List of shells"
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "400": {
  4065. "description": "Bad request",
  4066. "content": {
  4067. "application/json": {
  4068. "schema": {
  4069. "$ref": "#/components/schemas/BadRequestError"
  4070. }
  4071. }
  4072. }
  4073. }
  4074. },
  4075. "description": "Get a list of available shells on the system.",
  4076. "summary": "List available shells",
  4077. "x-codeSamples": [
  4078. {
  4079. "lang": "js",
  4080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4081. }
  4082. ]
  4083. }
  4084. },
  4085. "/pty": {
  4086. "get": {
  4087. "tags": ["pty"],
  4088. "operationId": "pty.list",
  4089. "parameters": [
  4090. {
  4091. "name": "directory",
  4092. "in": "query",
  4093. "schema": {
  4094. "type": "string"
  4095. },
  4096. "required": false
  4097. },
  4098. {
  4099. "name": "workspace",
  4100. "in": "query",
  4101. "schema": {
  4102. "type": "string"
  4103. },
  4104. "required": false
  4105. }
  4106. ],
  4107. "responses": {
  4108. "200": {
  4109. "description": "List of sessions",
  4110. "content": {
  4111. "application/json": {
  4112. "schema": {
  4113. "type": "array",
  4114. "items": {
  4115. "$ref": "#/components/schemas/Pty"
  4116. },
  4117. "description": "List of sessions"
  4118. }
  4119. }
  4120. }
  4121. },
  4122. "400": {
  4123. "description": "Bad request",
  4124. "content": {
  4125. "application/json": {
  4126. "schema": {
  4127. "$ref": "#/components/schemas/BadRequestError"
  4128. }
  4129. }
  4130. }
  4131. }
  4132. },
  4133. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4134. "summary": "List PTY sessions",
  4135. "x-codeSamples": [
  4136. {
  4137. "lang": "js",
  4138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4139. }
  4140. ]
  4141. },
  4142. "post": {
  4143. "tags": ["pty"],
  4144. "operationId": "pty.create",
  4145. "parameters": [
  4146. {
  4147. "name": "directory",
  4148. "in": "query",
  4149. "schema": {
  4150. "type": "string"
  4151. },
  4152. "required": false
  4153. },
  4154. {
  4155. "name": "workspace",
  4156. "in": "query",
  4157. "schema": {
  4158. "type": "string"
  4159. },
  4160. "required": false
  4161. }
  4162. ],
  4163. "responses": {
  4164. "200": {
  4165. "description": "Created session",
  4166. "content": {
  4167. "application/json": {
  4168. "schema": {
  4169. "$ref": "#/components/schemas/Pty"
  4170. }
  4171. }
  4172. }
  4173. },
  4174. "400": {
  4175. "description": "BadRequest | InvalidRequestError",
  4176. "content": {
  4177. "application/json": {
  4178. "schema": {
  4179. "anyOf": [
  4180. {
  4181. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4182. },
  4183. {
  4184. "$ref": "#/components/schemas/InvalidRequestError"
  4185. }
  4186. ]
  4187. }
  4188. }
  4189. }
  4190. }
  4191. },
  4192. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4193. "summary": "Create PTY session",
  4194. "requestBody": {
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "type": "object",
  4199. "properties": {
  4200. "command": {
  4201. "type": "string"
  4202. },
  4203. "args": {
  4204. "type": "array",
  4205. "items": {
  4206. "type": "string"
  4207. }
  4208. },
  4209. "cwd": {
  4210. "type": "string"
  4211. },
  4212. "title": {
  4213. "type": "string"
  4214. },
  4215. "env": {
  4216. "type": "object",
  4217. "additionalProperties": {
  4218. "type": "string"
  4219. }
  4220. }
  4221. },
  4222. "additionalProperties": false
  4223. }
  4224. }
  4225. }
  4226. },
  4227. "x-codeSamples": [
  4228. {
  4229. "lang": "js",
  4230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4231. }
  4232. ]
  4233. }
  4234. },
  4235. "/pty/{ptyID}": {
  4236. "get": {
  4237. "tags": ["pty"],
  4238. "operationId": "pty.get",
  4239. "parameters": [
  4240. {
  4241. "name": "ptyID",
  4242. "in": "path",
  4243. "schema": {
  4244. "type": "string",
  4245. "pattern": "^pty"
  4246. },
  4247. "required": true
  4248. },
  4249. {
  4250. "name": "directory",
  4251. "in": "query",
  4252. "schema": {
  4253. "type": "string"
  4254. },
  4255. "required": false
  4256. },
  4257. {
  4258. "name": "workspace",
  4259. "in": "query",
  4260. "schema": {
  4261. "type": "string"
  4262. },
  4263. "required": false
  4264. }
  4265. ],
  4266. "responses": {
  4267. "200": {
  4268. "description": "Session info",
  4269. "content": {
  4270. "application/json": {
  4271. "schema": {
  4272. "$ref": "#/components/schemas/Pty"
  4273. }
  4274. }
  4275. }
  4276. },
  4277. "400": {
  4278. "description": "Bad request",
  4279. "content": {
  4280. "application/json": {
  4281. "schema": {
  4282. "$ref": "#/components/schemas/BadRequestError"
  4283. }
  4284. }
  4285. }
  4286. },
  4287. "404": {
  4288. "description": "PtyNotFoundError",
  4289. "content": {
  4290. "application/json": {
  4291. "schema": {
  4292. "$ref": "#/components/schemas/PtyNotFoundError"
  4293. }
  4294. }
  4295. }
  4296. }
  4297. },
  4298. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4299. "summary": "Get PTY session",
  4300. "x-codeSamples": [
  4301. {
  4302. "lang": "js",
  4303. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4304. }
  4305. ]
  4306. },
  4307. "put": {
  4308. "tags": ["pty"],
  4309. "operationId": "pty.update",
  4310. "parameters": [
  4311. {
  4312. "name": "ptyID",
  4313. "in": "path",
  4314. "schema": {
  4315. "type": "string",
  4316. "pattern": "^pty"
  4317. },
  4318. "required": true
  4319. },
  4320. {
  4321. "name": "directory",
  4322. "in": "query",
  4323. "schema": {
  4324. "type": "string"
  4325. },
  4326. "required": false
  4327. },
  4328. {
  4329. "name": "workspace",
  4330. "in": "query",
  4331. "schema": {
  4332. "type": "string"
  4333. },
  4334. "required": false
  4335. }
  4336. ],
  4337. "responses": {
  4338. "200": {
  4339. "description": "Updated session",
  4340. "content": {
  4341. "application/json": {
  4342. "schema": {
  4343. "$ref": "#/components/schemas/Pty"
  4344. }
  4345. }
  4346. }
  4347. },
  4348. "400": {
  4349. "description": "BadRequest | InvalidRequestError",
  4350. "content": {
  4351. "application/json": {
  4352. "schema": {
  4353. "anyOf": [
  4354. {
  4355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4356. },
  4357. {
  4358. "$ref": "#/components/schemas/InvalidRequestError"
  4359. }
  4360. ]
  4361. }
  4362. }
  4363. }
  4364. },
  4365. "404": {
  4366. "description": "PtyNotFoundError",
  4367. "content": {
  4368. "application/json": {
  4369. "schema": {
  4370. "$ref": "#/components/schemas/PtyNotFoundError"
  4371. }
  4372. }
  4373. }
  4374. }
  4375. },
  4376. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4377. "summary": "Update PTY session",
  4378. "requestBody": {
  4379. "content": {
  4380. "application/json": {
  4381. "schema": {
  4382. "type": "object",
  4383. "properties": {
  4384. "title": {
  4385. "type": "string"
  4386. },
  4387. "size": {
  4388. "type": "object",
  4389. "properties": {
  4390. "rows": {
  4391. "type": "integer",
  4392. "exclusiveMinimum": 0
  4393. },
  4394. "cols": {
  4395. "type": "integer",
  4396. "exclusiveMinimum": 0
  4397. }
  4398. },
  4399. "required": ["rows", "cols"],
  4400. "additionalProperties": false
  4401. }
  4402. },
  4403. "additionalProperties": false
  4404. }
  4405. }
  4406. }
  4407. },
  4408. "x-codeSamples": [
  4409. {
  4410. "lang": "js",
  4411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4412. }
  4413. ]
  4414. },
  4415. "delete": {
  4416. "tags": ["pty"],
  4417. "operationId": "pty.remove",
  4418. "parameters": [
  4419. {
  4420. "name": "ptyID",
  4421. "in": "path",
  4422. "schema": {
  4423. "type": "string",
  4424. "pattern": "^pty"
  4425. },
  4426. "required": true
  4427. },
  4428. {
  4429. "name": "directory",
  4430. "in": "query",
  4431. "schema": {
  4432. "type": "string"
  4433. },
  4434. "required": false
  4435. },
  4436. {
  4437. "name": "workspace",
  4438. "in": "query",
  4439. "schema": {
  4440. "type": "string"
  4441. },
  4442. "required": false
  4443. }
  4444. ],
  4445. "responses": {
  4446. "200": {
  4447. "description": "Session removed",
  4448. "content": {
  4449. "application/json": {
  4450. "schema": {
  4451. "type": "boolean",
  4452. "description": "Session removed"
  4453. }
  4454. }
  4455. }
  4456. },
  4457. "400": {
  4458. "description": "Bad request",
  4459. "content": {
  4460. "application/json": {
  4461. "schema": {
  4462. "$ref": "#/components/schemas/BadRequestError"
  4463. }
  4464. }
  4465. }
  4466. },
  4467. "404": {
  4468. "description": "PtyNotFoundError",
  4469. "content": {
  4470. "application/json": {
  4471. "schema": {
  4472. "$ref": "#/components/schemas/PtyNotFoundError"
  4473. }
  4474. }
  4475. }
  4476. }
  4477. },
  4478. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4479. "summary": "Remove PTY session",
  4480. "x-codeSamples": [
  4481. {
  4482. "lang": "js",
  4483. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4484. }
  4485. ]
  4486. }
  4487. },
  4488. "/pty/{ptyID}/connect-token": {
  4489. "post": {
  4490. "tags": ["pty"],
  4491. "operationId": "pty.connectToken",
  4492. "parameters": [
  4493. {
  4494. "name": "ptyID",
  4495. "in": "path",
  4496. "schema": {
  4497. "type": "string",
  4498. "pattern": "^pty"
  4499. },
  4500. "required": true
  4501. },
  4502. {
  4503. "name": "directory",
  4504. "in": "query",
  4505. "schema": {
  4506. "type": "string"
  4507. },
  4508. "required": false
  4509. },
  4510. {
  4511. "name": "workspace",
  4512. "in": "query",
  4513. "schema": {
  4514. "type": "string"
  4515. },
  4516. "required": false
  4517. }
  4518. ],
  4519. "responses": {
  4520. "200": {
  4521. "description": "WebSocket connect token",
  4522. "content": {
  4523. "application/json": {
  4524. "schema": {
  4525. "$ref": "#/components/schemas/PtyTicketConnectToken"
  4526. }
  4527. }
  4528. }
  4529. },
  4530. "400": {
  4531. "description": "Bad request",
  4532. "content": {
  4533. "application/json": {
  4534. "schema": {
  4535. "$ref": "#/components/schemas/BadRequestError"
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "403": {
  4541. "description": "PtyForbiddenError",
  4542. "content": {
  4543. "application/json": {
  4544. "schema": {
  4545. "$ref": "#/components/schemas/PtyForbiddenError"
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "404": {
  4551. "description": "PtyNotFoundError",
  4552. "content": {
  4553. "application/json": {
  4554. "schema": {
  4555. "$ref": "#/components/schemas/PtyNotFoundError"
  4556. }
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4562. "summary": "Create PTY WebSocket token",
  4563. "x-codeSamples": [
  4564. {
  4565. "lang": "js",
  4566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4567. }
  4568. ]
  4569. }
  4570. },
  4571. "/question": {
  4572. "get": {
  4573. "tags": ["question"],
  4574. "operationId": "question.list",
  4575. "parameters": [
  4576. {
  4577. "name": "directory",
  4578. "in": "query",
  4579. "schema": {
  4580. "type": "string"
  4581. },
  4582. "required": false
  4583. },
  4584. {
  4585. "name": "workspace",
  4586. "in": "query",
  4587. "schema": {
  4588. "type": "string"
  4589. },
  4590. "required": false
  4591. }
  4592. ],
  4593. "responses": {
  4594. "200": {
  4595. "description": "List of pending questions",
  4596. "content": {
  4597. "application/json": {
  4598. "schema": {
  4599. "type": "array",
  4600. "items": {
  4601. "$ref": "#/components/schemas/QuestionRequest"
  4602. },
  4603. "description": "List of pending questions"
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "400": {
  4609. "description": "Bad request",
  4610. "content": {
  4611. "application/json": {
  4612. "schema": {
  4613. "$ref": "#/components/schemas/BadRequestError"
  4614. }
  4615. }
  4616. }
  4617. }
  4618. },
  4619. "description": "Get all pending question requests across all sessions.",
  4620. "summary": "List pending questions",
  4621. "x-codeSamples": [
  4622. {
  4623. "lang": "js",
  4624. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4625. }
  4626. ]
  4627. }
  4628. },
  4629. "/question/{requestID}/reply": {
  4630. "post": {
  4631. "tags": ["question"],
  4632. "operationId": "question.reply",
  4633. "parameters": [
  4634. {
  4635. "name": "requestID",
  4636. "in": "path",
  4637. "schema": {
  4638. "type": "string",
  4639. "pattern": "^que"
  4640. },
  4641. "required": true
  4642. },
  4643. {
  4644. "name": "directory",
  4645. "in": "query",
  4646. "schema": {
  4647. "type": "string"
  4648. },
  4649. "required": false
  4650. },
  4651. {
  4652. "name": "workspace",
  4653. "in": "query",
  4654. "schema": {
  4655. "type": "string"
  4656. },
  4657. "required": false
  4658. }
  4659. ],
  4660. "responses": {
  4661. "200": {
  4662. "description": "Question answered successfully",
  4663. "content": {
  4664. "application/json": {
  4665. "schema": {
  4666. "type": "boolean",
  4667. "description": "Question answered successfully"
  4668. }
  4669. }
  4670. }
  4671. },
  4672. "400": {
  4673. "description": "BadRequest | InvalidRequestError",
  4674. "content": {
  4675. "application/json": {
  4676. "schema": {
  4677. "anyOf": [
  4678. {
  4679. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4680. },
  4681. {
  4682. "$ref": "#/components/schemas/InvalidRequestError"
  4683. }
  4684. ]
  4685. }
  4686. }
  4687. }
  4688. },
  4689. "404": {
  4690. "description": "QuestionNotFoundError",
  4691. "content": {
  4692. "application/json": {
  4693. "schema": {
  4694. "$ref": "#/components/schemas/QuestionNotFoundError"
  4695. }
  4696. }
  4697. }
  4698. }
  4699. },
  4700. "description": "Provide answers to a question request from the AI assistant.",
  4701. "summary": "Reply to question request",
  4702. "requestBody": {
  4703. "content": {
  4704. "application/json": {
  4705. "schema": {
  4706. "type": "object",
  4707. "properties": {
  4708. "answers": {
  4709. "type": "array",
  4710. "items": {
  4711. "$ref": "#/components/schemas/QuestionAnswer"
  4712. },
  4713. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4714. }
  4715. },
  4716. "required": ["answers"],
  4717. "additionalProperties": false
  4718. }
  4719. }
  4720. }
  4721. },
  4722. "x-codeSamples": [
  4723. {
  4724. "lang": "js",
  4725. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4726. }
  4727. ]
  4728. }
  4729. },
  4730. "/question/{requestID}/reject": {
  4731. "post": {
  4732. "tags": ["question"],
  4733. "operationId": "question.reject",
  4734. "parameters": [
  4735. {
  4736. "name": "requestID",
  4737. "in": "path",
  4738. "schema": {
  4739. "type": "string",
  4740. "pattern": "^que"
  4741. },
  4742. "required": true
  4743. },
  4744. {
  4745. "name": "directory",
  4746. "in": "query",
  4747. "schema": {
  4748. "type": "string"
  4749. },
  4750. "required": false
  4751. },
  4752. {
  4753. "name": "workspace",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. }
  4760. ],
  4761. "responses": {
  4762. "200": {
  4763. "description": "Question rejected successfully",
  4764. "content": {
  4765. "application/json": {
  4766. "schema": {
  4767. "type": "boolean",
  4768. "description": "Question rejected successfully"
  4769. }
  4770. }
  4771. }
  4772. },
  4773. "400": {
  4774. "description": "BadRequest | InvalidRequestError",
  4775. "content": {
  4776. "application/json": {
  4777. "schema": {
  4778. "anyOf": [
  4779. {
  4780. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4781. },
  4782. {
  4783. "$ref": "#/components/schemas/InvalidRequestError"
  4784. }
  4785. ]
  4786. }
  4787. }
  4788. }
  4789. },
  4790. "404": {
  4791. "description": "QuestionNotFoundError",
  4792. "content": {
  4793. "application/json": {
  4794. "schema": {
  4795. "$ref": "#/components/schemas/QuestionNotFoundError"
  4796. }
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "description": "Reject a question request from the AI assistant.",
  4802. "summary": "Reject question request",
  4803. "x-codeSamples": [
  4804. {
  4805. "lang": "js",
  4806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4807. }
  4808. ]
  4809. }
  4810. },
  4811. "/permission": {
  4812. "get": {
  4813. "tags": ["permission"],
  4814. "operationId": "permission.list",
  4815. "parameters": [
  4816. {
  4817. "name": "directory",
  4818. "in": "query",
  4819. "schema": {
  4820. "type": "string"
  4821. },
  4822. "required": false
  4823. },
  4824. {
  4825. "name": "workspace",
  4826. "in": "query",
  4827. "schema": {
  4828. "type": "string"
  4829. },
  4830. "required": false
  4831. }
  4832. ],
  4833. "responses": {
  4834. "200": {
  4835. "description": "List of pending permissions",
  4836. "content": {
  4837. "application/json": {
  4838. "schema": {
  4839. "type": "array",
  4840. "items": {
  4841. "$ref": "#/components/schemas/PermissionRequest"
  4842. },
  4843. "description": "List of pending permissions"
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "400": {
  4849. "description": "Bad request",
  4850. "content": {
  4851. "application/json": {
  4852. "schema": {
  4853. "$ref": "#/components/schemas/BadRequestError"
  4854. }
  4855. }
  4856. }
  4857. }
  4858. },
  4859. "description": "Get all pending permission requests across all sessions.",
  4860. "summary": "List pending permissions",
  4861. "x-codeSamples": [
  4862. {
  4863. "lang": "js",
  4864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4865. }
  4866. ]
  4867. }
  4868. },
  4869. "/permission/{requestID}/reply": {
  4870. "post": {
  4871. "tags": ["permission"],
  4872. "operationId": "permission.reply",
  4873. "parameters": [
  4874. {
  4875. "name": "requestID",
  4876. "in": "path",
  4877. "schema": {
  4878. "type": "string",
  4879. "pattern": "^per"
  4880. },
  4881. "required": true
  4882. },
  4883. {
  4884. "name": "directory",
  4885. "in": "query",
  4886. "schema": {
  4887. "type": "string"
  4888. },
  4889. "required": false
  4890. },
  4891. {
  4892. "name": "workspace",
  4893. "in": "query",
  4894. "schema": {
  4895. "type": "string"
  4896. },
  4897. "required": false
  4898. }
  4899. ],
  4900. "responses": {
  4901. "200": {
  4902. "description": "Permission processed successfully",
  4903. "content": {
  4904. "application/json": {
  4905. "schema": {
  4906. "type": "boolean",
  4907. "description": "Permission processed successfully"
  4908. }
  4909. }
  4910. }
  4911. },
  4912. "400": {
  4913. "description": "BadRequest | InvalidRequestError",
  4914. "content": {
  4915. "application/json": {
  4916. "schema": {
  4917. "anyOf": [
  4918. {
  4919. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4920. },
  4921. {
  4922. "$ref": "#/components/schemas/InvalidRequestError"
  4923. }
  4924. ]
  4925. }
  4926. }
  4927. }
  4928. },
  4929. "404": {
  4930. "description": "PermissionNotFoundError",
  4931. "content": {
  4932. "application/json": {
  4933. "schema": {
  4934. "$ref": "#/components/schemas/PermissionNotFoundError"
  4935. }
  4936. }
  4937. }
  4938. }
  4939. },
  4940. "description": "Approve or deny a permission request from the AI assistant.",
  4941. "summary": "Respond to permission request",
  4942. "requestBody": {
  4943. "content": {
  4944. "application/json": {
  4945. "schema": {
  4946. "type": "object",
  4947. "properties": {
  4948. "reply": {
  4949. "type": "string",
  4950. "enum": ["once", "always", "reject"]
  4951. },
  4952. "message": {
  4953. "type": "string"
  4954. }
  4955. },
  4956. "required": ["reply"],
  4957. "additionalProperties": false
  4958. }
  4959. }
  4960. }
  4961. },
  4962. "x-codeSamples": [
  4963. {
  4964. "lang": "js",
  4965. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4966. }
  4967. ]
  4968. }
  4969. },
  4970. "/provider": {
  4971. "get": {
  4972. "tags": ["provider"],
  4973. "operationId": "provider.list",
  4974. "parameters": [
  4975. {
  4976. "name": "directory",
  4977. "in": "query",
  4978. "schema": {
  4979. "type": "string"
  4980. },
  4981. "required": false
  4982. },
  4983. {
  4984. "name": "workspace",
  4985. "in": "query",
  4986. "schema": {
  4987. "type": "string"
  4988. },
  4989. "required": false
  4990. }
  4991. ],
  4992. "responses": {
  4993. "200": {
  4994. "description": "List of providers",
  4995. "content": {
  4996. "application/json": {
  4997. "schema": {
  4998. "type": "object",
  4999. "properties": {
  5000. "all": {
  5001. "type": "array",
  5002. "items": {
  5003. "$ref": "#/components/schemas/Provider"
  5004. }
  5005. },
  5006. "default": {
  5007. "type": "object",
  5008. "additionalProperties": {
  5009. "type": "string"
  5010. }
  5011. },
  5012. "connected": {
  5013. "type": "array",
  5014. "items": {
  5015. "type": "string"
  5016. }
  5017. }
  5018. },
  5019. "required": ["all", "default", "connected"],
  5020. "additionalProperties": false,
  5021. "description": "List of providers"
  5022. }
  5023. }
  5024. }
  5025. },
  5026. "400": {
  5027. "description": "Bad request",
  5028. "content": {
  5029. "application/json": {
  5030. "schema": {
  5031. "$ref": "#/components/schemas/BadRequestError"
  5032. }
  5033. }
  5034. }
  5035. }
  5036. },
  5037. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5038. "summary": "List providers",
  5039. "x-codeSamples": [
  5040. {
  5041. "lang": "js",
  5042. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5043. }
  5044. ]
  5045. }
  5046. },
  5047. "/provider/auth": {
  5048. "get": {
  5049. "tags": ["provider"],
  5050. "operationId": "provider.auth",
  5051. "parameters": [
  5052. {
  5053. "name": "directory",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "workspace",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "string"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "Provider auth methods",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "object",
  5076. "additionalProperties": {
  5077. "type": "array",
  5078. "items": {
  5079. "$ref": "#/components/schemas/ProviderAuthMethod"
  5080. }
  5081. },
  5082. "description": "Provider auth methods"
  5083. }
  5084. }
  5085. }
  5086. },
  5087. "400": {
  5088. "description": "Bad request",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/BadRequestError"
  5093. }
  5094. }
  5095. }
  5096. }
  5097. },
  5098. "description": "Retrieve available authentication methods for all AI providers.",
  5099. "summary": "Get provider auth methods",
  5100. "x-codeSamples": [
  5101. {
  5102. "lang": "js",
  5103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5104. }
  5105. ]
  5106. }
  5107. },
  5108. "/provider/{providerID}/oauth/authorize": {
  5109. "post": {
  5110. "tags": ["provider"],
  5111. "operationId": "provider.oauth.authorize",
  5112. "parameters": [
  5113. {
  5114. "name": "providerID",
  5115. "in": "path",
  5116. "schema": {
  5117. "type": "string"
  5118. },
  5119. "required": true
  5120. },
  5121. {
  5122. "name": "directory",
  5123. "in": "query",
  5124. "schema": {
  5125. "type": "string"
  5126. },
  5127. "required": false
  5128. },
  5129. {
  5130. "name": "workspace",
  5131. "in": "query",
  5132. "schema": {
  5133. "type": "string"
  5134. },
  5135. "required": false
  5136. }
  5137. ],
  5138. "responses": {
  5139. "200": {
  5140. "description": "Authorization URL and method",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5145. }
  5146. }
  5147. }
  5148. },
  5149. "400": {
  5150. "description": "ProviderAuthError | InvalidRequestError",
  5151. "content": {
  5152. "application/json": {
  5153. "schema": {
  5154. "anyOf": [
  5155. {
  5156. "$ref": "#/components/schemas/ProviderAuthError1"
  5157. },
  5158. {
  5159. "$ref": "#/components/schemas/InvalidRequestError"
  5160. }
  5161. ]
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Start the OAuth authorization flow for a provider.",
  5168. "summary": "Start OAuth authorization",
  5169. "requestBody": {
  5170. "content": {
  5171. "application/json": {
  5172. "schema": {
  5173. "type": "object",
  5174. "properties": {
  5175. "method": {
  5176. "type": "number",
  5177. "description": "Auth method index"
  5178. },
  5179. "inputs": {
  5180. "type": "object",
  5181. "additionalProperties": {
  5182. "type": "string"
  5183. }
  5184. }
  5185. },
  5186. "required": ["method"],
  5187. "additionalProperties": false
  5188. }
  5189. }
  5190. }
  5191. },
  5192. "x-codeSamples": [
  5193. {
  5194. "lang": "js",
  5195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5196. }
  5197. ]
  5198. }
  5199. },
  5200. "/provider/{providerID}/oauth/callback": {
  5201. "post": {
  5202. "tags": ["provider"],
  5203. "operationId": "provider.oauth.callback",
  5204. "parameters": [
  5205. {
  5206. "name": "providerID",
  5207. "in": "path",
  5208. "schema": {
  5209. "type": "string"
  5210. },
  5211. "required": true
  5212. },
  5213. {
  5214. "name": "directory",
  5215. "in": "query",
  5216. "schema": {
  5217. "type": "string"
  5218. },
  5219. "required": false
  5220. },
  5221. {
  5222. "name": "workspace",
  5223. "in": "query",
  5224. "schema": {
  5225. "type": "string"
  5226. },
  5227. "required": false
  5228. }
  5229. ],
  5230. "responses": {
  5231. "200": {
  5232. "description": "OAuth callback processed successfully",
  5233. "content": {
  5234. "application/json": {
  5235. "schema": {
  5236. "type": "boolean",
  5237. "description": "OAuth callback processed successfully"
  5238. }
  5239. }
  5240. }
  5241. },
  5242. "400": {
  5243. "description": "ProviderAuthError | InvalidRequestError",
  5244. "content": {
  5245. "application/json": {
  5246. "schema": {
  5247. "anyOf": [
  5248. {
  5249. "$ref": "#/components/schemas/ProviderAuthError1"
  5250. },
  5251. {
  5252. "$ref": "#/components/schemas/InvalidRequestError"
  5253. }
  5254. ]
  5255. }
  5256. }
  5257. }
  5258. }
  5259. },
  5260. "description": "Handle the OAuth callback from a provider after user authorization.",
  5261. "summary": "Handle OAuth callback",
  5262. "requestBody": {
  5263. "content": {
  5264. "application/json": {
  5265. "schema": {
  5266. "type": "object",
  5267. "properties": {
  5268. "method": {
  5269. "type": "number",
  5270. "description": "Auth method index"
  5271. },
  5272. "code": {
  5273. "type": "string"
  5274. }
  5275. },
  5276. "required": ["method"],
  5277. "additionalProperties": false
  5278. }
  5279. }
  5280. }
  5281. },
  5282. "x-codeSamples": [
  5283. {
  5284. "lang": "js",
  5285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5286. }
  5287. ]
  5288. }
  5289. },
  5290. "/session": {
  5291. "get": {
  5292. "tags": ["session"],
  5293. "operationId": "session.list",
  5294. "parameters": [
  5295. {
  5296. "name": "directory",
  5297. "in": "query",
  5298. "schema": {
  5299. "type": "string"
  5300. },
  5301. "required": false
  5302. },
  5303. {
  5304. "name": "workspace",
  5305. "in": "query",
  5306. "schema": {
  5307. "type": "string"
  5308. },
  5309. "required": false
  5310. },
  5311. {
  5312. "name": "scope",
  5313. "in": "query",
  5314. "schema": {
  5315. "type": "string",
  5316. "enum": ["project"]
  5317. },
  5318. "required": false
  5319. },
  5320. {
  5321. "name": "path",
  5322. "in": "query",
  5323. "schema": {
  5324. "type": "string"
  5325. },
  5326. "required": false
  5327. },
  5328. {
  5329. "name": "roots",
  5330. "in": "query",
  5331. "schema": {
  5332. "anyOf": [
  5333. {
  5334. "type": "boolean"
  5335. },
  5336. {
  5337. "type": "string",
  5338. "enum": ["true", "false"]
  5339. }
  5340. ]
  5341. },
  5342. "required": false
  5343. },
  5344. {
  5345. "name": "start",
  5346. "in": "query",
  5347. "schema": {
  5348. "type": "number"
  5349. },
  5350. "required": false
  5351. },
  5352. {
  5353. "name": "search",
  5354. "in": "query",
  5355. "schema": {
  5356. "type": "string"
  5357. },
  5358. "required": false
  5359. },
  5360. {
  5361. "name": "limit",
  5362. "in": "query",
  5363. "schema": {
  5364. "type": "number"
  5365. },
  5366. "required": false
  5367. }
  5368. ],
  5369. "responses": {
  5370. "200": {
  5371. "description": "List of sessions",
  5372. "content": {
  5373. "application/json": {
  5374. "schema": {
  5375. "type": "array",
  5376. "items": {
  5377. "$ref": "#/components/schemas/Session"
  5378. },
  5379. "description": "List of sessions"
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "400": {
  5385. "description": "Bad request",
  5386. "content": {
  5387. "application/json": {
  5388. "schema": {
  5389. "$ref": "#/components/schemas/BadRequestError"
  5390. }
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5396. "summary": "List sessions",
  5397. "x-codeSamples": [
  5398. {
  5399. "lang": "js",
  5400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5401. }
  5402. ]
  5403. },
  5404. "post": {
  5405. "tags": ["session"],
  5406. "operationId": "session.create",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. }
  5424. ],
  5425. "responses": {
  5426. "200": {
  5427. "description": "Successfully created session",
  5428. "content": {
  5429. "application/json": {
  5430. "schema": {
  5431. "$ref": "#/components/schemas/Session"
  5432. }
  5433. }
  5434. }
  5435. },
  5436. "400": {
  5437. "description": "BadRequest | InvalidRequestError",
  5438. "content": {
  5439. "application/json": {
  5440. "schema": {
  5441. "anyOf": [
  5442. {
  5443. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5444. },
  5445. {
  5446. "$ref": "#/components/schemas/InvalidRequestError"
  5447. }
  5448. ]
  5449. }
  5450. }
  5451. }
  5452. }
  5453. },
  5454. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5455. "summary": "Create session",
  5456. "requestBody": {
  5457. "content": {
  5458. "application/json": {
  5459. "schema": {
  5460. "type": "object",
  5461. "properties": {
  5462. "parentID": {
  5463. "type": "string",
  5464. "pattern": "^ses"
  5465. },
  5466. "title": {
  5467. "type": "string"
  5468. },
  5469. "agent": {
  5470. "type": "string"
  5471. },
  5472. "model": {
  5473. "type": "object",
  5474. "properties": {
  5475. "id": {
  5476. "type": "string"
  5477. },
  5478. "providerID": {
  5479. "type": "string"
  5480. },
  5481. "variant": {
  5482. "type": "string"
  5483. }
  5484. },
  5485. "required": ["id", "providerID"],
  5486. "additionalProperties": false
  5487. },
  5488. "metadata": {
  5489. "type": "object"
  5490. },
  5491. "permission": {
  5492. "$ref": "#/components/schemas/PermissionRuleset"
  5493. },
  5494. "workspaceID": {
  5495. "type": "string",
  5496. "pattern": "^wrk"
  5497. }
  5498. },
  5499. "additionalProperties": false
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "x-codeSamples": [
  5505. {
  5506. "lang": "js",
  5507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5508. }
  5509. ]
  5510. }
  5511. },
  5512. "/session/status": {
  5513. "get": {
  5514. "tags": ["session"],
  5515. "operationId": "session.status",
  5516. "parameters": [
  5517. {
  5518. "name": "directory",
  5519. "in": "query",
  5520. "schema": {
  5521. "type": "string"
  5522. },
  5523. "required": false
  5524. },
  5525. {
  5526. "name": "workspace",
  5527. "in": "query",
  5528. "schema": {
  5529. "type": "string"
  5530. },
  5531. "required": false
  5532. }
  5533. ],
  5534. "responses": {
  5535. "200": {
  5536. "description": "Get session status",
  5537. "content": {
  5538. "application/json": {
  5539. "schema": {
  5540. "type": "object",
  5541. "additionalProperties": {
  5542. "$ref": "#/components/schemas/SessionStatus"
  5543. },
  5544. "description": "Get session status"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5568. "summary": "Get session status",
  5569. "x-codeSamples": [
  5570. {
  5571. "lang": "js",
  5572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5573. }
  5574. ]
  5575. }
  5576. },
  5577. "/session/{sessionID}": {
  5578. "get": {
  5579. "tags": ["session"],
  5580. "operationId": "session.get",
  5581. "parameters": [
  5582. {
  5583. "name": "sessionID",
  5584. "in": "path",
  5585. "schema": {
  5586. "type": "string",
  5587. "pattern": "^ses"
  5588. },
  5589. "required": true
  5590. },
  5591. {
  5592. "name": "directory",
  5593. "in": "query",
  5594. "schema": {
  5595. "type": "string"
  5596. },
  5597. "required": false
  5598. },
  5599. {
  5600. "name": "workspace",
  5601. "in": "query",
  5602. "schema": {
  5603. "type": "string"
  5604. },
  5605. "required": false
  5606. }
  5607. ],
  5608. "responses": {
  5609. "200": {
  5610. "description": "Get session",
  5611. "content": {
  5612. "application/json": {
  5613. "schema": {
  5614. "$ref": "#/components/schemas/Session"
  5615. }
  5616. }
  5617. }
  5618. },
  5619. "400": {
  5620. "description": "BadRequest | InvalidRequestError",
  5621. "content": {
  5622. "application/json": {
  5623. "schema": {
  5624. "anyOf": [
  5625. {
  5626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5627. },
  5628. {
  5629. "$ref": "#/components/schemas/InvalidRequestError"
  5630. }
  5631. ]
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "404": {
  5637. "description": "NotFoundError",
  5638. "content": {
  5639. "application/json": {
  5640. "schema": {
  5641. "$ref": "#/components/schemas/NotFoundError"
  5642. }
  5643. }
  5644. }
  5645. }
  5646. },
  5647. "description": "Retrieve detailed information about a specific OpenCode session.",
  5648. "summary": "Get session",
  5649. "x-codeSamples": [
  5650. {
  5651. "lang": "js",
  5652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5653. }
  5654. ]
  5655. },
  5656. "delete": {
  5657. "tags": ["session"],
  5658. "operationId": "session.delete",
  5659. "parameters": [
  5660. {
  5661. "name": "sessionID",
  5662. "in": "path",
  5663. "schema": {
  5664. "type": "string",
  5665. "pattern": "^ses"
  5666. },
  5667. "required": true
  5668. },
  5669. {
  5670. "name": "directory",
  5671. "in": "query",
  5672. "schema": {
  5673. "type": "string"
  5674. },
  5675. "required": false
  5676. },
  5677. {
  5678. "name": "workspace",
  5679. "in": "query",
  5680. "schema": {
  5681. "type": "string"
  5682. },
  5683. "required": false
  5684. }
  5685. ],
  5686. "responses": {
  5687. "200": {
  5688. "description": "Successfully deleted session",
  5689. "content": {
  5690. "application/json": {
  5691. "schema": {
  5692. "type": "boolean",
  5693. "description": "Successfully deleted session"
  5694. }
  5695. }
  5696. }
  5697. },
  5698. "400": {
  5699. "description": "BadRequest | InvalidRequestError",
  5700. "content": {
  5701. "application/json": {
  5702. "schema": {
  5703. "anyOf": [
  5704. {
  5705. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5706. },
  5707. {
  5708. "$ref": "#/components/schemas/InvalidRequestError"
  5709. }
  5710. ]
  5711. }
  5712. }
  5713. }
  5714. },
  5715. "404": {
  5716. "description": "NotFoundError",
  5717. "content": {
  5718. "application/json": {
  5719. "schema": {
  5720. "$ref": "#/components/schemas/NotFoundError"
  5721. }
  5722. }
  5723. }
  5724. }
  5725. },
  5726. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5727. "summary": "Delete session",
  5728. "x-codeSamples": [
  5729. {
  5730. "lang": "js",
  5731. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5732. }
  5733. ]
  5734. },
  5735. "patch": {
  5736. "tags": ["session"],
  5737. "operationId": "session.update",
  5738. "parameters": [
  5739. {
  5740. "name": "sessionID",
  5741. "in": "path",
  5742. "schema": {
  5743. "type": "string",
  5744. "pattern": "^ses"
  5745. },
  5746. "required": true
  5747. },
  5748. {
  5749. "name": "directory",
  5750. "in": "query",
  5751. "schema": {
  5752. "type": "string"
  5753. },
  5754. "required": false
  5755. },
  5756. {
  5757. "name": "workspace",
  5758. "in": "query",
  5759. "schema": {
  5760. "type": "string"
  5761. },
  5762. "required": false
  5763. }
  5764. ],
  5765. "responses": {
  5766. "200": {
  5767. "description": "Successfully updated session",
  5768. "content": {
  5769. "application/json": {
  5770. "schema": {
  5771. "$ref": "#/components/schemas/Session"
  5772. }
  5773. }
  5774. }
  5775. },
  5776. "400": {
  5777. "description": "BadRequest | InvalidRequestError",
  5778. "content": {
  5779. "application/json": {
  5780. "schema": {
  5781. "anyOf": [
  5782. {
  5783. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5784. },
  5785. {
  5786. "$ref": "#/components/schemas/InvalidRequestError"
  5787. }
  5788. ]
  5789. }
  5790. }
  5791. }
  5792. },
  5793. "404": {
  5794. "description": "NotFoundError",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "$ref": "#/components/schemas/NotFoundError"
  5799. }
  5800. }
  5801. }
  5802. }
  5803. },
  5804. "description": "Update properties of an existing session, such as title or other metadata.",
  5805. "summary": "Update session",
  5806. "requestBody": {
  5807. "content": {
  5808. "application/json": {
  5809. "schema": {
  5810. "type": "object",
  5811. "properties": {
  5812. "title": {
  5813. "type": "string"
  5814. },
  5815. "metadata": {
  5816. "type": "object"
  5817. },
  5818. "permission": {
  5819. "$ref": "#/components/schemas/PermissionRuleset"
  5820. },
  5821. "time": {
  5822. "type": "object",
  5823. "properties": {
  5824. "archived": {
  5825. "type": "number"
  5826. }
  5827. },
  5828. "additionalProperties": false
  5829. }
  5830. },
  5831. "additionalProperties": false
  5832. }
  5833. }
  5834. }
  5835. },
  5836. "x-codeSamples": [
  5837. {
  5838. "lang": "js",
  5839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5840. }
  5841. ]
  5842. }
  5843. },
  5844. "/session/{sessionID}/children": {
  5845. "get": {
  5846. "tags": ["session"],
  5847. "operationId": "session.children",
  5848. "parameters": [
  5849. {
  5850. "name": "sessionID",
  5851. "in": "path",
  5852. "schema": {
  5853. "type": "string",
  5854. "pattern": "^ses"
  5855. },
  5856. "required": true
  5857. },
  5858. {
  5859. "name": "directory",
  5860. "in": "query",
  5861. "schema": {
  5862. "type": "string"
  5863. },
  5864. "required": false
  5865. },
  5866. {
  5867. "name": "workspace",
  5868. "in": "query",
  5869. "schema": {
  5870. "type": "string"
  5871. },
  5872. "required": false
  5873. }
  5874. ],
  5875. "responses": {
  5876. "200": {
  5877. "description": "List of children",
  5878. "content": {
  5879. "application/json": {
  5880. "schema": {
  5881. "type": "array",
  5882. "items": {
  5883. "$ref": "#/components/schemas/Session"
  5884. },
  5885. "description": "List of children"
  5886. }
  5887. }
  5888. }
  5889. },
  5890. "400": {
  5891. "description": "BadRequest | InvalidRequestError",
  5892. "content": {
  5893. "application/json": {
  5894. "schema": {
  5895. "anyOf": [
  5896. {
  5897. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5898. },
  5899. {
  5900. "$ref": "#/components/schemas/InvalidRequestError"
  5901. }
  5902. ]
  5903. }
  5904. }
  5905. }
  5906. },
  5907. "404": {
  5908. "description": "NotFoundError",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "$ref": "#/components/schemas/NotFoundError"
  5913. }
  5914. }
  5915. }
  5916. }
  5917. },
  5918. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5919. "summary": "Get session children",
  5920. "x-codeSamples": [
  5921. {
  5922. "lang": "js",
  5923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5924. }
  5925. ]
  5926. }
  5927. },
  5928. "/session/{sessionID}/diff": {
  5929. "get": {
  5930. "tags": ["session"],
  5931. "operationId": "session.diff",
  5932. "parameters": [
  5933. {
  5934. "name": "sessionID",
  5935. "in": "path",
  5936. "schema": {
  5937. "type": "string",
  5938. "pattern": "^ses"
  5939. },
  5940. "required": true
  5941. },
  5942. {
  5943. "name": "directory",
  5944. "in": "query",
  5945. "schema": {
  5946. "type": "string"
  5947. },
  5948. "required": false
  5949. },
  5950. {
  5951. "name": "workspace",
  5952. "in": "query",
  5953. "schema": {
  5954. "type": "string"
  5955. },
  5956. "required": false
  5957. },
  5958. {
  5959. "name": "messageID",
  5960. "in": "query",
  5961. "schema": {
  5962. "type": "string",
  5963. "pattern": "^msg"
  5964. },
  5965. "required": false
  5966. }
  5967. ],
  5968. "responses": {
  5969. "200": {
  5970. "description": "Successfully retrieved diff",
  5971. "content": {
  5972. "application/json": {
  5973. "schema": {
  5974. "type": "array",
  5975. "items": {
  5976. "$ref": "#/components/schemas/SnapshotFileDiff"
  5977. },
  5978. "description": "Successfully retrieved diff"
  5979. }
  5980. }
  5981. }
  5982. },
  5983. "400": {
  5984. "description": "Bad request",
  5985. "content": {
  5986. "application/json": {
  5987. "schema": {
  5988. "$ref": "#/components/schemas/BadRequestError"
  5989. }
  5990. }
  5991. }
  5992. }
  5993. },
  5994. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5995. "summary": "Get message diff",
  5996. "x-codeSamples": [
  5997. {
  5998. "lang": "js",
  5999. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6000. }
  6001. ]
  6002. }
  6003. },
  6004. "/session/{sessionID}/message": {
  6005. "get": {
  6006. "tags": ["session"],
  6007. "operationId": "session.messages",
  6008. "parameters": [
  6009. {
  6010. "name": "sessionID",
  6011. "in": "path",
  6012. "schema": {
  6013. "type": "string",
  6014. "pattern": "^ses"
  6015. },
  6016. "required": true
  6017. },
  6018. {
  6019. "name": "directory",
  6020. "in": "query",
  6021. "schema": {
  6022. "type": "string"
  6023. },
  6024. "required": false
  6025. },
  6026. {
  6027. "name": "workspace",
  6028. "in": "query",
  6029. "schema": {
  6030. "type": "string"
  6031. },
  6032. "required": false
  6033. },
  6034. {
  6035. "name": "limit",
  6036. "in": "query",
  6037. "schema": {
  6038. "type": "integer",
  6039. "minimum": 0,
  6040. "maximum": 9007199254740991
  6041. },
  6042. "required": false
  6043. },
  6044. {
  6045. "name": "before",
  6046. "in": "query",
  6047. "schema": {
  6048. "type": "string"
  6049. },
  6050. "required": false
  6051. }
  6052. ],
  6053. "responses": {
  6054. "200": {
  6055. "description": "List of messages",
  6056. "content": {
  6057. "application/json": {
  6058. "schema": {
  6059. "type": "array",
  6060. "items": {
  6061. "type": "object",
  6062. "properties": {
  6063. "info": {
  6064. "$ref": "#/components/schemas/Message"
  6065. },
  6066. "parts": {
  6067. "type": "array",
  6068. "items": {
  6069. "$ref": "#/components/schemas/Part"
  6070. }
  6071. }
  6072. },
  6073. "required": ["info", "parts"],
  6074. "additionalProperties": false
  6075. },
  6076. "description": "List of messages"
  6077. }
  6078. }
  6079. }
  6080. },
  6081. "400": {
  6082. "description": "BadRequest | InvalidRequestError",
  6083. "content": {
  6084. "application/json": {
  6085. "schema": {
  6086. "anyOf": [
  6087. {
  6088. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6089. },
  6090. {
  6091. "$ref": "#/components/schemas/InvalidRequestError"
  6092. }
  6093. ]
  6094. }
  6095. }
  6096. }
  6097. },
  6098. "404": {
  6099. "description": "NotFoundError",
  6100. "content": {
  6101. "application/json": {
  6102. "schema": {
  6103. "$ref": "#/components/schemas/NotFoundError"
  6104. }
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6110. "summary": "Get session messages",
  6111. "x-codeSamples": [
  6112. {
  6113. "lang": "js",
  6114. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6115. }
  6116. ]
  6117. },
  6118. "post": {
  6119. "tags": ["session"],
  6120. "operationId": "session.prompt",
  6121. "parameters": [
  6122. {
  6123. "name": "sessionID",
  6124. "in": "path",
  6125. "schema": {
  6126. "type": "string",
  6127. "pattern": "^ses"
  6128. },
  6129. "required": true
  6130. },
  6131. {
  6132. "name": "directory",
  6133. "in": "query",
  6134. "schema": {
  6135. "type": "string"
  6136. },
  6137. "required": false
  6138. },
  6139. {
  6140. "name": "workspace",
  6141. "in": "query",
  6142. "schema": {
  6143. "type": "string"
  6144. },
  6145. "required": false
  6146. }
  6147. ],
  6148. "responses": {
  6149. "200": {
  6150. "description": "Created message",
  6151. "content": {
  6152. "application/json": {
  6153. "schema": {
  6154. "type": "object",
  6155. "required": ["info", "parts"],
  6156. "properties": {
  6157. "info": {
  6158. "$ref": "#/components/schemas/AssistantMessage"
  6159. },
  6160. "parts": {
  6161. "type": "array",
  6162. "items": {
  6163. "$ref": "#/components/schemas/Part"
  6164. }
  6165. }
  6166. }
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "400": {
  6172. "description": "BadRequest | InvalidRequestError",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "anyOf": [
  6177. {
  6178. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6179. },
  6180. {
  6181. "$ref": "#/components/schemas/InvalidRequestError"
  6182. }
  6183. ]
  6184. }
  6185. }
  6186. }
  6187. },
  6188. "404": {
  6189. "description": "NotFoundError",
  6190. "content": {
  6191. "application/json": {
  6192. "schema": {
  6193. "$ref": "#/components/schemas/NotFoundError"
  6194. }
  6195. }
  6196. }
  6197. }
  6198. },
  6199. "description": "Create and send a new message to a session, streaming the AI response.",
  6200. "summary": "Send message",
  6201. "requestBody": {
  6202. "content": {
  6203. "application/json": {
  6204. "schema": {
  6205. "type": "object",
  6206. "properties": {
  6207. "messageID": {
  6208. "type": "string",
  6209. "pattern": "^msg"
  6210. },
  6211. "model": {
  6212. "type": "object",
  6213. "properties": {
  6214. "providerID": {
  6215. "type": "string"
  6216. },
  6217. "modelID": {
  6218. "type": "string"
  6219. }
  6220. },
  6221. "required": ["providerID", "modelID"],
  6222. "additionalProperties": false
  6223. },
  6224. "agent": {
  6225. "type": "string"
  6226. },
  6227. "noReply": {
  6228. "type": "boolean"
  6229. },
  6230. "tools": {
  6231. "type": "object",
  6232. "additionalProperties": {
  6233. "type": "boolean"
  6234. }
  6235. },
  6236. "format": {
  6237. "$ref": "#/components/schemas/OutputFormat"
  6238. },
  6239. "system": {
  6240. "type": "string"
  6241. },
  6242. "variant": {
  6243. "type": "string"
  6244. },
  6245. "parts": {
  6246. "type": "array",
  6247. "items": {
  6248. "anyOf": [
  6249. {
  6250. "$ref": "#/components/schemas/TextPartInput"
  6251. },
  6252. {
  6253. "$ref": "#/components/schemas/FilePartInput"
  6254. },
  6255. {
  6256. "$ref": "#/components/schemas/AgentPartInput"
  6257. },
  6258. {
  6259. "$ref": "#/components/schemas/SubtaskPartInput"
  6260. }
  6261. ]
  6262. }
  6263. }
  6264. },
  6265. "required": ["parts"],
  6266. "additionalProperties": false
  6267. }
  6268. }
  6269. }
  6270. },
  6271. "x-codeSamples": [
  6272. {
  6273. "lang": "js",
  6274. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6275. }
  6276. ]
  6277. }
  6278. },
  6279. "/session/{sessionID}/message/{messageID}": {
  6280. "get": {
  6281. "tags": ["session"],
  6282. "operationId": "session.message",
  6283. "parameters": [
  6284. {
  6285. "name": "sessionID",
  6286. "in": "path",
  6287. "schema": {
  6288. "type": "string",
  6289. "pattern": "^ses"
  6290. },
  6291. "required": true
  6292. },
  6293. {
  6294. "name": "messageID",
  6295. "in": "path",
  6296. "schema": {
  6297. "type": "string",
  6298. "pattern": "^msg"
  6299. },
  6300. "required": true
  6301. },
  6302. {
  6303. "name": "directory",
  6304. "in": "query",
  6305. "schema": {
  6306. "type": "string"
  6307. },
  6308. "required": false
  6309. },
  6310. {
  6311. "name": "workspace",
  6312. "in": "query",
  6313. "schema": {
  6314. "type": "string"
  6315. },
  6316. "required": false
  6317. }
  6318. ],
  6319. "responses": {
  6320. "200": {
  6321. "description": "Message",
  6322. "content": {
  6323. "application/json": {
  6324. "schema": {
  6325. "type": "object",
  6326. "properties": {
  6327. "info": {
  6328. "$ref": "#/components/schemas/Message"
  6329. },
  6330. "parts": {
  6331. "type": "array",
  6332. "items": {
  6333. "$ref": "#/components/schemas/Part"
  6334. }
  6335. }
  6336. },
  6337. "required": ["info", "parts"],
  6338. "additionalProperties": false,
  6339. "description": "Message"
  6340. }
  6341. }
  6342. }
  6343. },
  6344. "400": {
  6345. "description": "BadRequest | InvalidRequestError",
  6346. "content": {
  6347. "application/json": {
  6348. "schema": {
  6349. "anyOf": [
  6350. {
  6351. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6352. },
  6353. {
  6354. "$ref": "#/components/schemas/InvalidRequestError"
  6355. }
  6356. ]
  6357. }
  6358. }
  6359. }
  6360. },
  6361. "404": {
  6362. "description": "NotFoundError",
  6363. "content": {
  6364. "application/json": {
  6365. "schema": {
  6366. "$ref": "#/components/schemas/NotFoundError"
  6367. }
  6368. }
  6369. }
  6370. }
  6371. },
  6372. "description": "Retrieve a specific message from a session by its message ID.",
  6373. "summary": "Get message",
  6374. "x-codeSamples": [
  6375. {
  6376. "lang": "js",
  6377. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6378. }
  6379. ]
  6380. },
  6381. "delete": {
  6382. "tags": ["session"],
  6383. "operationId": "session.deleteMessage",
  6384. "parameters": [
  6385. {
  6386. "name": "sessionID",
  6387. "in": "path",
  6388. "schema": {
  6389. "type": "string",
  6390. "pattern": "^ses"
  6391. },
  6392. "required": true
  6393. },
  6394. {
  6395. "name": "messageID",
  6396. "in": "path",
  6397. "schema": {
  6398. "type": "string",
  6399. "pattern": "^msg"
  6400. },
  6401. "required": true
  6402. },
  6403. {
  6404. "name": "directory",
  6405. "in": "query",
  6406. "schema": {
  6407. "type": "string"
  6408. },
  6409. "required": false
  6410. },
  6411. {
  6412. "name": "workspace",
  6413. "in": "query",
  6414. "schema": {
  6415. "type": "string"
  6416. },
  6417. "required": false
  6418. }
  6419. ],
  6420. "responses": {
  6421. "200": {
  6422. "description": "Successfully deleted message",
  6423. "content": {
  6424. "application/json": {
  6425. "schema": {
  6426. "type": "boolean",
  6427. "description": "Successfully deleted message"
  6428. }
  6429. }
  6430. }
  6431. },
  6432. "400": {
  6433. "description": "BadRequest | InvalidRequestError",
  6434. "content": {
  6435. "application/json": {
  6436. "schema": {
  6437. "anyOf": [
  6438. {
  6439. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6440. },
  6441. {
  6442. "$ref": "#/components/schemas/InvalidRequestError"
  6443. }
  6444. ]
  6445. }
  6446. }
  6447. }
  6448. },
  6449. "404": {
  6450. "description": "NotFoundError",
  6451. "content": {
  6452. "application/json": {
  6453. "schema": {
  6454. "$ref": "#/components/schemas/NotFoundError"
  6455. }
  6456. }
  6457. }
  6458. },
  6459. "409": {
  6460. "description": "SessionBusyError",
  6461. "content": {
  6462. "application/json": {
  6463. "schema": {
  6464. "$ref": "#/components/schemas/SessionBusyError"
  6465. }
  6466. }
  6467. }
  6468. }
  6469. },
  6470. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6471. "summary": "Delete message",
  6472. "x-codeSamples": [
  6473. {
  6474. "lang": "js",
  6475. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6476. }
  6477. ]
  6478. }
  6479. },
  6480. "/session/{sessionID}/fork": {
  6481. "post": {
  6482. "tags": ["session"],
  6483. "operationId": "session.fork",
  6484. "parameters": [
  6485. {
  6486. "name": "sessionID",
  6487. "in": "path",
  6488. "schema": {
  6489. "type": "string",
  6490. "pattern": "^ses"
  6491. },
  6492. "required": true
  6493. },
  6494. {
  6495. "name": "directory",
  6496. "in": "query",
  6497. "schema": {
  6498. "type": "string"
  6499. },
  6500. "required": false
  6501. },
  6502. {
  6503. "name": "workspace",
  6504. "in": "query",
  6505. "schema": {
  6506. "type": "string"
  6507. },
  6508. "required": false
  6509. }
  6510. ],
  6511. "responses": {
  6512. "200": {
  6513. "description": "200",
  6514. "content": {
  6515. "application/json": {
  6516. "schema": {
  6517. "$ref": "#/components/schemas/Session"
  6518. }
  6519. }
  6520. }
  6521. },
  6522. "400": {
  6523. "description": "BadRequest | InvalidRequestError",
  6524. "content": {
  6525. "application/json": {
  6526. "schema": {
  6527. "anyOf": [
  6528. {
  6529. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6530. },
  6531. {
  6532. "$ref": "#/components/schemas/InvalidRequestError"
  6533. }
  6534. ]
  6535. }
  6536. }
  6537. }
  6538. },
  6539. "404": {
  6540. "description": "NotFoundError",
  6541. "content": {
  6542. "application/json": {
  6543. "schema": {
  6544. "$ref": "#/components/schemas/NotFoundError"
  6545. }
  6546. }
  6547. }
  6548. }
  6549. },
  6550. "description": "Create a new session by forking an existing session at a specific message point.",
  6551. "summary": "Fork session",
  6552. "requestBody": {
  6553. "content": {
  6554. "application/json": {
  6555. "schema": {
  6556. "type": "object",
  6557. "properties": {
  6558. "messageID": {
  6559. "type": "string",
  6560. "pattern": "^msg"
  6561. }
  6562. },
  6563. "additionalProperties": false
  6564. }
  6565. }
  6566. }
  6567. },
  6568. "x-codeSamples": [
  6569. {
  6570. "lang": "js",
  6571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6572. }
  6573. ]
  6574. }
  6575. },
  6576. "/session/{sessionID}/abort": {
  6577. "post": {
  6578. "tags": ["session"],
  6579. "operationId": "session.abort",
  6580. "parameters": [
  6581. {
  6582. "name": "sessionID",
  6583. "in": "path",
  6584. "schema": {
  6585. "type": "string",
  6586. "pattern": "^ses"
  6587. },
  6588. "required": true
  6589. },
  6590. {
  6591. "name": "directory",
  6592. "in": "query",
  6593. "schema": {
  6594. "type": "string"
  6595. },
  6596. "required": false
  6597. },
  6598. {
  6599. "name": "workspace",
  6600. "in": "query",
  6601. "schema": {
  6602. "type": "string"
  6603. },
  6604. "required": false
  6605. }
  6606. ],
  6607. "responses": {
  6608. "200": {
  6609. "description": "Aborted session",
  6610. "content": {
  6611. "application/json": {
  6612. "schema": {
  6613. "type": "boolean",
  6614. "description": "Aborted session"
  6615. }
  6616. }
  6617. }
  6618. },
  6619. "400": {
  6620. "description": "BadRequest | InvalidRequestError",
  6621. "content": {
  6622. "application/json": {
  6623. "schema": {
  6624. "anyOf": [
  6625. {
  6626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6627. },
  6628. {
  6629. "$ref": "#/components/schemas/InvalidRequestError"
  6630. }
  6631. ]
  6632. }
  6633. }
  6634. }
  6635. }
  6636. },
  6637. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6638. "summary": "Abort session",
  6639. "x-codeSamples": [
  6640. {
  6641. "lang": "js",
  6642. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6643. }
  6644. ]
  6645. }
  6646. },
  6647. "/session/{sessionID}/init": {
  6648. "post": {
  6649. "tags": ["session"],
  6650. "operationId": "session.init",
  6651. "parameters": [
  6652. {
  6653. "name": "sessionID",
  6654. "in": "path",
  6655. "schema": {
  6656. "type": "string",
  6657. "pattern": "^ses"
  6658. },
  6659. "required": true
  6660. },
  6661. {
  6662. "name": "directory",
  6663. "in": "query",
  6664. "schema": {
  6665. "type": "string"
  6666. },
  6667. "required": false
  6668. },
  6669. {
  6670. "name": "workspace",
  6671. "in": "query",
  6672. "schema": {
  6673. "type": "string"
  6674. },
  6675. "required": false
  6676. }
  6677. ],
  6678. "responses": {
  6679. "200": {
  6680. "description": "200",
  6681. "content": {
  6682. "application/json": {
  6683. "schema": {
  6684. "type": "boolean",
  6685. "description": "200"
  6686. }
  6687. }
  6688. }
  6689. },
  6690. "400": {
  6691. "description": "BadRequest | InvalidRequestError",
  6692. "content": {
  6693. "application/json": {
  6694. "schema": {
  6695. "anyOf": [
  6696. {
  6697. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6698. },
  6699. {
  6700. "$ref": "#/components/schemas/InvalidRequestError"
  6701. }
  6702. ]
  6703. }
  6704. }
  6705. }
  6706. },
  6707. "404": {
  6708. "description": "NotFoundError",
  6709. "content": {
  6710. "application/json": {
  6711. "schema": {
  6712. "$ref": "#/components/schemas/NotFoundError"
  6713. }
  6714. }
  6715. }
  6716. }
  6717. },
  6718. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6719. "summary": "Initialize session",
  6720. "requestBody": {
  6721. "content": {
  6722. "application/json": {
  6723. "schema": {
  6724. "type": "object",
  6725. "properties": {
  6726. "modelID": {
  6727. "type": "string"
  6728. },
  6729. "providerID": {
  6730. "type": "string"
  6731. },
  6732. "messageID": {
  6733. "type": "string",
  6734. "pattern": "^msg"
  6735. }
  6736. },
  6737. "required": ["modelID", "providerID", "messageID"],
  6738. "additionalProperties": false
  6739. }
  6740. }
  6741. }
  6742. },
  6743. "x-codeSamples": [
  6744. {
  6745. "lang": "js",
  6746. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6747. }
  6748. ]
  6749. }
  6750. },
  6751. "/session/{sessionID}/share": {
  6752. "post": {
  6753. "tags": ["session"],
  6754. "operationId": "session.share",
  6755. "parameters": [
  6756. {
  6757. "name": "sessionID",
  6758. "in": "path",
  6759. "schema": {
  6760. "type": "string",
  6761. "pattern": "^ses"
  6762. },
  6763. "required": true
  6764. },
  6765. {
  6766. "name": "directory",
  6767. "in": "query",
  6768. "schema": {
  6769. "type": "string"
  6770. },
  6771. "required": false
  6772. },
  6773. {
  6774. "name": "workspace",
  6775. "in": "query",
  6776. "schema": {
  6777. "type": "string"
  6778. },
  6779. "required": false
  6780. }
  6781. ],
  6782. "responses": {
  6783. "200": {
  6784. "description": "Successfully shared session",
  6785. "content": {
  6786. "application/json": {
  6787. "schema": {
  6788. "$ref": "#/components/schemas/Session"
  6789. }
  6790. }
  6791. }
  6792. },
  6793. "400": {
  6794. "description": "Bad request",
  6795. "content": {
  6796. "application/json": {
  6797. "schema": {
  6798. "$ref": "#/components/schemas/BadRequestError"
  6799. }
  6800. }
  6801. }
  6802. },
  6803. "404": {
  6804. "description": "NotFoundError",
  6805. "content": {
  6806. "application/json": {
  6807. "schema": {
  6808. "$ref": "#/components/schemas/NotFoundError"
  6809. }
  6810. }
  6811. }
  6812. },
  6813. "500": {
  6814. "description": "InternalServerError",
  6815. "content": {
  6816. "application/json": {
  6817. "schema": {
  6818. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6819. }
  6820. }
  6821. }
  6822. }
  6823. },
  6824. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6825. "summary": "Share session",
  6826. "x-codeSamples": [
  6827. {
  6828. "lang": "js",
  6829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6830. }
  6831. ]
  6832. },
  6833. "delete": {
  6834. "tags": ["session"],
  6835. "operationId": "session.unshare",
  6836. "parameters": [
  6837. {
  6838. "name": "sessionID",
  6839. "in": "path",
  6840. "schema": {
  6841. "type": "string",
  6842. "pattern": "^ses"
  6843. },
  6844. "required": true
  6845. },
  6846. {
  6847. "name": "directory",
  6848. "in": "query",
  6849. "schema": {
  6850. "type": "string"
  6851. },
  6852. "required": false
  6853. },
  6854. {
  6855. "name": "workspace",
  6856. "in": "query",
  6857. "schema": {
  6858. "type": "string"
  6859. },
  6860. "required": false
  6861. }
  6862. ],
  6863. "responses": {
  6864. "200": {
  6865. "description": "Successfully unshared session",
  6866. "content": {
  6867. "application/json": {
  6868. "schema": {
  6869. "$ref": "#/components/schemas/Session"
  6870. }
  6871. }
  6872. }
  6873. },
  6874. "400": {
  6875. "description": "Bad request",
  6876. "content": {
  6877. "application/json": {
  6878. "schema": {
  6879. "$ref": "#/components/schemas/BadRequestError"
  6880. }
  6881. }
  6882. }
  6883. },
  6884. "404": {
  6885. "description": "NotFoundError",
  6886. "content": {
  6887. "application/json": {
  6888. "schema": {
  6889. "$ref": "#/components/schemas/NotFoundError"
  6890. }
  6891. }
  6892. }
  6893. },
  6894. "500": {
  6895. "description": "InternalServerError",
  6896. "content": {
  6897. "application/json": {
  6898. "schema": {
  6899. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6900. }
  6901. }
  6902. }
  6903. }
  6904. },
  6905. "description": "Remove the shareable link for a session, making it private again.",
  6906. "summary": "Unshare session",
  6907. "x-codeSamples": [
  6908. {
  6909. "lang": "js",
  6910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6911. }
  6912. ]
  6913. }
  6914. },
  6915. "/session/{sessionID}/summarize": {
  6916. "post": {
  6917. "tags": ["session"],
  6918. "operationId": "session.summarize",
  6919. "parameters": [
  6920. {
  6921. "name": "sessionID",
  6922. "in": "path",
  6923. "schema": {
  6924. "type": "string",
  6925. "pattern": "^ses"
  6926. },
  6927. "required": true
  6928. },
  6929. {
  6930. "name": "directory",
  6931. "in": "query",
  6932. "schema": {
  6933. "type": "string"
  6934. },
  6935. "required": false
  6936. },
  6937. {
  6938. "name": "workspace",
  6939. "in": "query",
  6940. "schema": {
  6941. "type": "string"
  6942. },
  6943. "required": false
  6944. }
  6945. ],
  6946. "responses": {
  6947. "200": {
  6948. "description": "Summarized session",
  6949. "content": {
  6950. "application/json": {
  6951. "schema": {
  6952. "type": "boolean",
  6953. "description": "Summarized session"
  6954. }
  6955. }
  6956. }
  6957. },
  6958. "400": {
  6959. "description": "BadRequest | InvalidRequestError",
  6960. "content": {
  6961. "application/json": {
  6962. "schema": {
  6963. "anyOf": [
  6964. {
  6965. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6966. },
  6967. {
  6968. "$ref": "#/components/schemas/InvalidRequestError"
  6969. }
  6970. ]
  6971. }
  6972. }
  6973. }
  6974. },
  6975. "404": {
  6976. "description": "NotFoundError",
  6977. "content": {
  6978. "application/json": {
  6979. "schema": {
  6980. "$ref": "#/components/schemas/NotFoundError"
  6981. }
  6982. }
  6983. }
  6984. }
  6985. },
  6986. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6987. "summary": "Summarize session",
  6988. "requestBody": {
  6989. "content": {
  6990. "application/json": {
  6991. "schema": {
  6992. "type": "object",
  6993. "properties": {
  6994. "providerID": {
  6995. "type": "string"
  6996. },
  6997. "modelID": {
  6998. "type": "string"
  6999. },
  7000. "auto": {
  7001. "type": "boolean"
  7002. }
  7003. },
  7004. "required": ["providerID", "modelID"],
  7005. "additionalProperties": false
  7006. }
  7007. }
  7008. }
  7009. },
  7010. "x-codeSamples": [
  7011. {
  7012. "lang": "js",
  7013. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7014. }
  7015. ]
  7016. }
  7017. },
  7018. "/session/{sessionID}/prompt_async": {
  7019. "post": {
  7020. "tags": ["session"],
  7021. "operationId": "session.prompt_async",
  7022. "parameters": [
  7023. {
  7024. "name": "sessionID",
  7025. "in": "path",
  7026. "schema": {
  7027. "type": "string",
  7028. "pattern": "^ses"
  7029. },
  7030. "required": true
  7031. },
  7032. {
  7033. "name": "directory",
  7034. "in": "query",
  7035. "schema": {
  7036. "type": "string"
  7037. },
  7038. "required": false
  7039. },
  7040. {
  7041. "name": "workspace",
  7042. "in": "query",
  7043. "schema": {
  7044. "type": "string"
  7045. },
  7046. "required": false
  7047. }
  7048. ],
  7049. "responses": {
  7050. "204": {
  7051. "description": "Prompt accepted"
  7052. },
  7053. "400": {
  7054. "description": "BadRequest | InvalidRequestError",
  7055. "content": {
  7056. "application/json": {
  7057. "schema": {
  7058. "anyOf": [
  7059. {
  7060. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7061. },
  7062. {
  7063. "$ref": "#/components/schemas/InvalidRequestError"
  7064. }
  7065. ]
  7066. }
  7067. }
  7068. }
  7069. },
  7070. "404": {
  7071. "description": "NotFoundError",
  7072. "content": {
  7073. "application/json": {
  7074. "schema": {
  7075. "$ref": "#/components/schemas/NotFoundError"
  7076. }
  7077. }
  7078. }
  7079. }
  7080. },
  7081. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7082. "summary": "Send async message",
  7083. "requestBody": {
  7084. "content": {
  7085. "application/json": {
  7086. "schema": {
  7087. "type": "object",
  7088. "properties": {
  7089. "messageID": {
  7090. "type": "string",
  7091. "pattern": "^msg"
  7092. },
  7093. "model": {
  7094. "type": "object",
  7095. "properties": {
  7096. "providerID": {
  7097. "type": "string"
  7098. },
  7099. "modelID": {
  7100. "type": "string"
  7101. }
  7102. },
  7103. "required": ["providerID", "modelID"],
  7104. "additionalProperties": false
  7105. },
  7106. "agent": {
  7107. "type": "string"
  7108. },
  7109. "noReply": {
  7110. "type": "boolean"
  7111. },
  7112. "tools": {
  7113. "type": "object",
  7114. "additionalProperties": {
  7115. "type": "boolean"
  7116. }
  7117. },
  7118. "format": {
  7119. "$ref": "#/components/schemas/OutputFormat"
  7120. },
  7121. "system": {
  7122. "type": "string"
  7123. },
  7124. "variant": {
  7125. "type": "string"
  7126. },
  7127. "parts": {
  7128. "type": "array",
  7129. "items": {
  7130. "anyOf": [
  7131. {
  7132. "$ref": "#/components/schemas/TextPartInput"
  7133. },
  7134. {
  7135. "$ref": "#/components/schemas/FilePartInput"
  7136. },
  7137. {
  7138. "$ref": "#/components/schemas/AgentPartInput"
  7139. },
  7140. {
  7141. "$ref": "#/components/schemas/SubtaskPartInput"
  7142. }
  7143. ]
  7144. }
  7145. }
  7146. },
  7147. "required": ["parts"],
  7148. "additionalProperties": false
  7149. }
  7150. }
  7151. }
  7152. },
  7153. "x-codeSamples": [
  7154. {
  7155. "lang": "js",
  7156. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7157. }
  7158. ]
  7159. }
  7160. },
  7161. "/session/{sessionID}/command": {
  7162. "post": {
  7163. "tags": ["session"],
  7164. "operationId": "session.command",
  7165. "parameters": [
  7166. {
  7167. "name": "sessionID",
  7168. "in": "path",
  7169. "schema": {
  7170. "type": "string",
  7171. "pattern": "^ses"
  7172. },
  7173. "required": true
  7174. },
  7175. {
  7176. "name": "directory",
  7177. "in": "query",
  7178. "schema": {
  7179. "type": "string"
  7180. },
  7181. "required": false
  7182. },
  7183. {
  7184. "name": "workspace",
  7185. "in": "query",
  7186. "schema": {
  7187. "type": "string"
  7188. },
  7189. "required": false
  7190. }
  7191. ],
  7192. "responses": {
  7193. "200": {
  7194. "description": "Created message",
  7195. "content": {
  7196. "application/json": {
  7197. "schema": {
  7198. "type": "object",
  7199. "required": ["info", "parts"],
  7200. "properties": {
  7201. "info": {
  7202. "$ref": "#/components/schemas/AssistantMessage"
  7203. },
  7204. "parts": {
  7205. "type": "array",
  7206. "items": {
  7207. "$ref": "#/components/schemas/Part"
  7208. }
  7209. }
  7210. }
  7211. }
  7212. }
  7213. }
  7214. },
  7215. "400": {
  7216. "description": "BadRequest | InvalidRequestError",
  7217. "content": {
  7218. "application/json": {
  7219. "schema": {
  7220. "anyOf": [
  7221. {
  7222. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7223. },
  7224. {
  7225. "$ref": "#/components/schemas/InvalidRequestError"
  7226. }
  7227. ]
  7228. }
  7229. }
  7230. }
  7231. },
  7232. "404": {
  7233. "description": "NotFoundError",
  7234. "content": {
  7235. "application/json": {
  7236. "schema": {
  7237. "$ref": "#/components/schemas/NotFoundError"
  7238. }
  7239. }
  7240. }
  7241. }
  7242. },
  7243. "description": "Send a new command to a session for execution by the AI assistant.",
  7244. "summary": "Send command",
  7245. "requestBody": {
  7246. "content": {
  7247. "application/json": {
  7248. "schema": {
  7249. "type": "object",
  7250. "properties": {
  7251. "messageID": {
  7252. "type": "string",
  7253. "pattern": "^msg"
  7254. },
  7255. "agent": {
  7256. "type": "string"
  7257. },
  7258. "model": {
  7259. "type": "string"
  7260. },
  7261. "arguments": {
  7262. "type": "string"
  7263. },
  7264. "command": {
  7265. "type": "string"
  7266. },
  7267. "variant": {
  7268. "type": "string"
  7269. },
  7270. "parts": {
  7271. "type": "array",
  7272. "items": {
  7273. "type": "object",
  7274. "properties": {
  7275. "id": {
  7276. "type": "string",
  7277. "pattern": "^prt"
  7278. },
  7279. "type": {
  7280. "type": "string",
  7281. "enum": ["file"]
  7282. },
  7283. "mime": {
  7284. "type": "string"
  7285. },
  7286. "filename": {
  7287. "type": "string"
  7288. },
  7289. "url": {
  7290. "type": "string"
  7291. },
  7292. "source": {
  7293. "$ref": "#/components/schemas/FilePartSource"
  7294. }
  7295. },
  7296. "required": ["type", "mime", "url"],
  7297. "additionalProperties": false
  7298. }
  7299. }
  7300. },
  7301. "required": ["arguments", "command"],
  7302. "additionalProperties": false
  7303. }
  7304. }
  7305. }
  7306. },
  7307. "x-codeSamples": [
  7308. {
  7309. "lang": "js",
  7310. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7311. }
  7312. ]
  7313. }
  7314. },
  7315. "/session/{sessionID}/shell": {
  7316. "post": {
  7317. "tags": ["session"],
  7318. "operationId": "session.shell",
  7319. "parameters": [
  7320. {
  7321. "name": "sessionID",
  7322. "in": "path",
  7323. "schema": {
  7324. "type": "string",
  7325. "pattern": "^ses"
  7326. },
  7327. "required": true
  7328. },
  7329. {
  7330. "name": "directory",
  7331. "in": "query",
  7332. "schema": {
  7333. "type": "string"
  7334. },
  7335. "required": false
  7336. },
  7337. {
  7338. "name": "workspace",
  7339. "in": "query",
  7340. "schema": {
  7341. "type": "string"
  7342. },
  7343. "required": false
  7344. }
  7345. ],
  7346. "responses": {
  7347. "200": {
  7348. "description": "Created message",
  7349. "content": {
  7350. "application/json": {
  7351. "schema": {
  7352. "type": "object",
  7353. "properties": {
  7354. "info": {
  7355. "$ref": "#/components/schemas/Message"
  7356. },
  7357. "parts": {
  7358. "type": "array",
  7359. "items": {
  7360. "$ref": "#/components/schemas/Part"
  7361. }
  7362. }
  7363. },
  7364. "required": ["info", "parts"],
  7365. "additionalProperties": false,
  7366. "description": "Created message"
  7367. }
  7368. }
  7369. }
  7370. },
  7371. "400": {
  7372. "description": "BadRequest | InvalidRequestError",
  7373. "content": {
  7374. "application/json": {
  7375. "schema": {
  7376. "anyOf": [
  7377. {
  7378. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7379. },
  7380. {
  7381. "$ref": "#/components/schemas/InvalidRequestError"
  7382. }
  7383. ]
  7384. }
  7385. }
  7386. }
  7387. },
  7388. "404": {
  7389. "description": "NotFoundError",
  7390. "content": {
  7391. "application/json": {
  7392. "schema": {
  7393. "$ref": "#/components/schemas/NotFoundError"
  7394. }
  7395. }
  7396. }
  7397. },
  7398. "409": {
  7399. "description": "SessionBusyError",
  7400. "content": {
  7401. "application/json": {
  7402. "schema": {
  7403. "$ref": "#/components/schemas/SessionBusyError"
  7404. }
  7405. }
  7406. }
  7407. }
  7408. },
  7409. "description": "Execute a shell command within the session context and return the AI's response.",
  7410. "summary": "Run shell command",
  7411. "requestBody": {
  7412. "content": {
  7413. "application/json": {
  7414. "schema": {
  7415. "type": "object",
  7416. "properties": {
  7417. "messageID": {
  7418. "type": "string",
  7419. "pattern": "^msg"
  7420. },
  7421. "agent": {
  7422. "type": "string"
  7423. },
  7424. "model": {
  7425. "type": "object",
  7426. "properties": {
  7427. "providerID": {
  7428. "type": "string"
  7429. },
  7430. "modelID": {
  7431. "type": "string"
  7432. }
  7433. },
  7434. "required": ["providerID", "modelID"],
  7435. "additionalProperties": false
  7436. },
  7437. "command": {
  7438. "type": "string"
  7439. }
  7440. },
  7441. "required": ["agent", "command"],
  7442. "additionalProperties": false
  7443. }
  7444. }
  7445. }
  7446. },
  7447. "x-codeSamples": [
  7448. {
  7449. "lang": "js",
  7450. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7451. }
  7452. ]
  7453. }
  7454. },
  7455. "/session/{sessionID}/revert": {
  7456. "post": {
  7457. "tags": ["session"],
  7458. "operationId": "session.revert",
  7459. "parameters": [
  7460. {
  7461. "name": "sessionID",
  7462. "in": "path",
  7463. "schema": {
  7464. "type": "string",
  7465. "pattern": "^ses"
  7466. },
  7467. "required": true
  7468. },
  7469. {
  7470. "name": "directory",
  7471. "in": "query",
  7472. "schema": {
  7473. "type": "string"
  7474. },
  7475. "required": false
  7476. },
  7477. {
  7478. "name": "workspace",
  7479. "in": "query",
  7480. "schema": {
  7481. "type": "string"
  7482. },
  7483. "required": false
  7484. }
  7485. ],
  7486. "responses": {
  7487. "200": {
  7488. "description": "Updated session",
  7489. "content": {
  7490. "application/json": {
  7491. "schema": {
  7492. "$ref": "#/components/schemas/Session"
  7493. }
  7494. }
  7495. }
  7496. },
  7497. "400": {
  7498. "description": "BadRequest | InvalidRequestError",
  7499. "content": {
  7500. "application/json": {
  7501. "schema": {
  7502. "anyOf": [
  7503. {
  7504. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7505. },
  7506. {
  7507. "$ref": "#/components/schemas/InvalidRequestError"
  7508. }
  7509. ]
  7510. }
  7511. }
  7512. }
  7513. },
  7514. "404": {
  7515. "description": "NotFoundError",
  7516. "content": {
  7517. "application/json": {
  7518. "schema": {
  7519. "$ref": "#/components/schemas/NotFoundError"
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "409": {
  7525. "description": "SessionBusyError",
  7526. "content": {
  7527. "application/json": {
  7528. "schema": {
  7529. "$ref": "#/components/schemas/SessionBusyError"
  7530. }
  7531. }
  7532. }
  7533. }
  7534. },
  7535. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7536. "summary": "Revert message",
  7537. "requestBody": {
  7538. "content": {
  7539. "application/json": {
  7540. "schema": {
  7541. "type": "object",
  7542. "properties": {
  7543. "messageID": {
  7544. "type": "string",
  7545. "pattern": "^msg"
  7546. },
  7547. "partID": {
  7548. "type": "string",
  7549. "pattern": "^prt"
  7550. }
  7551. },
  7552. "required": ["messageID"],
  7553. "additionalProperties": false
  7554. }
  7555. }
  7556. }
  7557. },
  7558. "x-codeSamples": [
  7559. {
  7560. "lang": "js",
  7561. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7562. }
  7563. ]
  7564. }
  7565. },
  7566. "/session/{sessionID}/unrevert": {
  7567. "post": {
  7568. "tags": ["session"],
  7569. "operationId": "session.unrevert",
  7570. "parameters": [
  7571. {
  7572. "name": "sessionID",
  7573. "in": "path",
  7574. "schema": {
  7575. "type": "string",
  7576. "pattern": "^ses"
  7577. },
  7578. "required": true
  7579. },
  7580. {
  7581. "name": "directory",
  7582. "in": "query",
  7583. "schema": {
  7584. "type": "string"
  7585. },
  7586. "required": false
  7587. },
  7588. {
  7589. "name": "workspace",
  7590. "in": "query",
  7591. "schema": {
  7592. "type": "string"
  7593. },
  7594. "required": false
  7595. }
  7596. ],
  7597. "responses": {
  7598. "200": {
  7599. "description": "Updated session",
  7600. "content": {
  7601. "application/json": {
  7602. "schema": {
  7603. "$ref": "#/components/schemas/Session"
  7604. }
  7605. }
  7606. }
  7607. },
  7608. "400": {
  7609. "description": "BadRequest | InvalidRequestError",
  7610. "content": {
  7611. "application/json": {
  7612. "schema": {
  7613. "anyOf": [
  7614. {
  7615. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7616. },
  7617. {
  7618. "$ref": "#/components/schemas/InvalidRequestError"
  7619. }
  7620. ]
  7621. }
  7622. }
  7623. }
  7624. },
  7625. "404": {
  7626. "description": "NotFoundError",
  7627. "content": {
  7628. "application/json": {
  7629. "schema": {
  7630. "$ref": "#/components/schemas/NotFoundError"
  7631. }
  7632. }
  7633. }
  7634. },
  7635. "409": {
  7636. "description": "SessionBusyError",
  7637. "content": {
  7638. "application/json": {
  7639. "schema": {
  7640. "$ref": "#/components/schemas/SessionBusyError"
  7641. }
  7642. }
  7643. }
  7644. }
  7645. },
  7646. "description": "Restore all previously reverted messages in a session.",
  7647. "summary": "Restore reverted messages",
  7648. "x-codeSamples": [
  7649. {
  7650. "lang": "js",
  7651. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7652. }
  7653. ]
  7654. }
  7655. },
  7656. "/session/{sessionID}/permissions/{permissionID}": {
  7657. "post": {
  7658. "tags": ["session"],
  7659. "operationId": "permission.respond",
  7660. "parameters": [
  7661. {
  7662. "name": "sessionID",
  7663. "in": "path",
  7664. "schema": {
  7665. "type": "string",
  7666. "pattern": "^ses"
  7667. },
  7668. "required": true
  7669. },
  7670. {
  7671. "name": "permissionID",
  7672. "in": "path",
  7673. "schema": {
  7674. "type": "string",
  7675. "pattern": "^per"
  7676. },
  7677. "required": true
  7678. },
  7679. {
  7680. "name": "directory",
  7681. "in": "query",
  7682. "schema": {
  7683. "type": "string"
  7684. },
  7685. "required": false
  7686. },
  7687. {
  7688. "name": "workspace",
  7689. "in": "query",
  7690. "schema": {
  7691. "type": "string"
  7692. },
  7693. "required": false
  7694. }
  7695. ],
  7696. "responses": {
  7697. "200": {
  7698. "description": "Permission processed successfully",
  7699. "content": {
  7700. "application/json": {
  7701. "schema": {
  7702. "type": "boolean",
  7703. "description": "Permission processed successfully"
  7704. }
  7705. }
  7706. }
  7707. },
  7708. "400": {
  7709. "description": "BadRequest | InvalidRequestError",
  7710. "content": {
  7711. "application/json": {
  7712. "schema": {
  7713. "anyOf": [
  7714. {
  7715. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7716. },
  7717. {
  7718. "$ref": "#/components/schemas/InvalidRequestError"
  7719. }
  7720. ]
  7721. }
  7722. }
  7723. }
  7724. },
  7725. "404": {
  7726. "description": "NotFoundError | PermissionNotFoundError",
  7727. "content": {
  7728. "application/json": {
  7729. "schema": {
  7730. "anyOf": [
  7731. {
  7732. "$ref": "#/components/schemas/NotFoundError"
  7733. },
  7734. {
  7735. "$ref": "#/components/schemas/PermissionNotFoundError"
  7736. }
  7737. ]
  7738. }
  7739. }
  7740. }
  7741. }
  7742. },
  7743. "description": "Approve or deny a permission request from the AI assistant.",
  7744. "summary": "Respond to permission",
  7745. "deprecated": true,
  7746. "requestBody": {
  7747. "content": {
  7748. "application/json": {
  7749. "schema": {
  7750. "type": "object",
  7751. "properties": {
  7752. "response": {
  7753. "type": "string",
  7754. "enum": ["once", "always", "reject"]
  7755. }
  7756. },
  7757. "required": ["response"],
  7758. "additionalProperties": false
  7759. }
  7760. }
  7761. }
  7762. },
  7763. "x-codeSamples": [
  7764. {
  7765. "lang": "js",
  7766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7767. }
  7768. ]
  7769. }
  7770. },
  7771. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7772. "delete": {
  7773. "tags": ["session"],
  7774. "operationId": "part.delete",
  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": "messageID",
  7787. "in": "path",
  7788. "schema": {
  7789. "type": "string",
  7790. "pattern": "^msg"
  7791. },
  7792. "required": true
  7793. },
  7794. {
  7795. "name": "partID",
  7796. "in": "path",
  7797. "schema": {
  7798. "type": "string",
  7799. "pattern": "^prt"
  7800. },
  7801. "required": true
  7802. },
  7803. {
  7804. "name": "directory",
  7805. "in": "query",
  7806. "schema": {
  7807. "type": "string"
  7808. },
  7809. "required": false
  7810. },
  7811. {
  7812. "name": "workspace",
  7813. "in": "query",
  7814. "schema": {
  7815. "type": "string"
  7816. },
  7817. "required": false
  7818. }
  7819. ],
  7820. "responses": {
  7821. "200": {
  7822. "description": "Successfully deleted part",
  7823. "content": {
  7824. "application/json": {
  7825. "schema": {
  7826. "type": "boolean",
  7827. "description": "Successfully deleted part"
  7828. }
  7829. }
  7830. }
  7831. },
  7832. "400": {
  7833. "description": "BadRequest | InvalidRequestError",
  7834. "content": {
  7835. "application/json": {
  7836. "schema": {
  7837. "anyOf": [
  7838. {
  7839. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7840. },
  7841. {
  7842. "$ref": "#/components/schemas/InvalidRequestError"
  7843. }
  7844. ]
  7845. }
  7846. }
  7847. }
  7848. },
  7849. "404": {
  7850. "description": "NotFoundError",
  7851. "content": {
  7852. "application/json": {
  7853. "schema": {
  7854. "$ref": "#/components/schemas/NotFoundError"
  7855. }
  7856. }
  7857. }
  7858. }
  7859. },
  7860. "description": "Delete a part from a message.",
  7861. "x-codeSamples": [
  7862. {
  7863. "lang": "js",
  7864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7865. }
  7866. ]
  7867. },
  7868. "patch": {
  7869. "tags": ["session"],
  7870. "operationId": "part.update",
  7871. "parameters": [
  7872. {
  7873. "name": "sessionID",
  7874. "in": "path",
  7875. "schema": {
  7876. "type": "string",
  7877. "pattern": "^ses"
  7878. },
  7879. "required": true
  7880. },
  7881. {
  7882. "name": "messageID",
  7883. "in": "path",
  7884. "schema": {
  7885. "type": "string",
  7886. "pattern": "^msg"
  7887. },
  7888. "required": true
  7889. },
  7890. {
  7891. "name": "partID",
  7892. "in": "path",
  7893. "schema": {
  7894. "type": "string",
  7895. "pattern": "^prt"
  7896. },
  7897. "required": true
  7898. },
  7899. {
  7900. "name": "directory",
  7901. "in": "query",
  7902. "schema": {
  7903. "type": "string"
  7904. },
  7905. "required": false
  7906. },
  7907. {
  7908. "name": "workspace",
  7909. "in": "query",
  7910. "schema": {
  7911. "type": "string"
  7912. },
  7913. "required": false
  7914. }
  7915. ],
  7916. "responses": {
  7917. "200": {
  7918. "description": "Successfully updated part",
  7919. "content": {
  7920. "application/json": {
  7921. "schema": {
  7922. "$ref": "#/components/schemas/Part"
  7923. }
  7924. }
  7925. }
  7926. },
  7927. "400": {
  7928. "description": "BadRequest | InvalidRequestError",
  7929. "content": {
  7930. "application/json": {
  7931. "schema": {
  7932. "anyOf": [
  7933. {
  7934. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7935. },
  7936. {
  7937. "$ref": "#/components/schemas/InvalidRequestError"
  7938. }
  7939. ]
  7940. }
  7941. }
  7942. }
  7943. },
  7944. "404": {
  7945. "description": "NotFoundError",
  7946. "content": {
  7947. "application/json": {
  7948. "schema": {
  7949. "$ref": "#/components/schemas/NotFoundError"
  7950. }
  7951. }
  7952. }
  7953. }
  7954. },
  7955. "description": "Update a part in a message.",
  7956. "requestBody": {
  7957. "content": {
  7958. "application/json": {
  7959. "schema": {
  7960. "$ref": "#/components/schemas/Part"
  7961. }
  7962. }
  7963. }
  7964. },
  7965. "x-codeSamples": [
  7966. {
  7967. "lang": "js",
  7968. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7969. }
  7970. ]
  7971. }
  7972. },
  7973. "/sync/start": {
  7974. "post": {
  7975. "tags": ["sync"],
  7976. "operationId": "sync.start",
  7977. "parameters": [
  7978. {
  7979. "name": "directory",
  7980. "in": "query",
  7981. "schema": {
  7982. "type": "string"
  7983. },
  7984. "required": false
  7985. },
  7986. {
  7987. "name": "workspace",
  7988. "in": "query",
  7989. "schema": {
  7990. "type": "string"
  7991. },
  7992. "required": false
  7993. }
  7994. ],
  7995. "responses": {
  7996. "200": {
  7997. "description": "Workspace sync started",
  7998. "content": {
  7999. "application/json": {
  8000. "schema": {
  8001. "type": "boolean",
  8002. "description": "Workspace sync started"
  8003. }
  8004. }
  8005. }
  8006. },
  8007. "400": {
  8008. "description": "Bad request",
  8009. "content": {
  8010. "application/json": {
  8011. "schema": {
  8012. "$ref": "#/components/schemas/BadRequestError"
  8013. }
  8014. }
  8015. }
  8016. }
  8017. },
  8018. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8019. "summary": "Start workspace sync",
  8020. "x-codeSamples": [
  8021. {
  8022. "lang": "js",
  8023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8024. }
  8025. ]
  8026. }
  8027. },
  8028. "/sync/replay": {
  8029. "post": {
  8030. "tags": ["sync"],
  8031. "operationId": "sync.replay",
  8032. "parameters": [
  8033. {
  8034. "name": "directory",
  8035. "in": "query",
  8036. "schema": {
  8037. "type": "string"
  8038. },
  8039. "required": false
  8040. },
  8041. {
  8042. "name": "workspace",
  8043. "in": "query",
  8044. "schema": {
  8045. "type": "string"
  8046. },
  8047. "required": false
  8048. }
  8049. ],
  8050. "responses": {
  8051. "200": {
  8052. "description": "Replayed sync events",
  8053. "content": {
  8054. "application/json": {
  8055. "schema": {
  8056. "type": "object",
  8057. "properties": {
  8058. "sessionID": {
  8059. "type": "string"
  8060. }
  8061. },
  8062. "required": ["sessionID"],
  8063. "additionalProperties": false,
  8064. "description": "Replayed sync events"
  8065. }
  8066. }
  8067. }
  8068. },
  8069. "400": {
  8070. "description": "BadRequest | InvalidRequestError",
  8071. "content": {
  8072. "application/json": {
  8073. "schema": {
  8074. "anyOf": [
  8075. {
  8076. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8077. },
  8078. {
  8079. "$ref": "#/components/schemas/InvalidRequestError"
  8080. }
  8081. ]
  8082. }
  8083. }
  8084. }
  8085. }
  8086. },
  8087. "description": "Validate and replay a complete sync event history.",
  8088. "summary": "Replay sync events",
  8089. "requestBody": {
  8090. "content": {
  8091. "application/json": {
  8092. "schema": {
  8093. "type": "object",
  8094. "properties": {
  8095. "directory": {
  8096. "type": "string"
  8097. },
  8098. "events": {
  8099. "type": "array",
  8100. "minItems": 1,
  8101. "items": {
  8102. "type": "object",
  8103. "properties": {
  8104. "id": {
  8105. "type": "string",
  8106. "pattern": "^evt_"
  8107. },
  8108. "aggregateID": {
  8109. "type": "string"
  8110. },
  8111. "seq": {
  8112. "type": "integer",
  8113. "minimum": 0
  8114. },
  8115. "type": {
  8116. "type": "string"
  8117. },
  8118. "data": {
  8119. "type": "object"
  8120. }
  8121. },
  8122. "required": ["id", "aggregateID", "seq", "type", "data"],
  8123. "additionalProperties": false
  8124. }
  8125. }
  8126. },
  8127. "required": ["directory", "events"],
  8128. "additionalProperties": false
  8129. }
  8130. }
  8131. }
  8132. },
  8133. "x-codeSamples": [
  8134. {
  8135. "lang": "js",
  8136. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8137. }
  8138. ]
  8139. }
  8140. },
  8141. "/sync/steal": {
  8142. "post": {
  8143. "tags": ["sync"],
  8144. "operationId": "sync.steal",
  8145. "parameters": [
  8146. {
  8147. "name": "directory",
  8148. "in": "query",
  8149. "schema": {
  8150. "type": "string"
  8151. },
  8152. "required": false
  8153. },
  8154. {
  8155. "name": "workspace",
  8156. "in": "query",
  8157. "schema": {
  8158. "type": "string"
  8159. },
  8160. "required": false
  8161. }
  8162. ],
  8163. "responses": {
  8164. "200": {
  8165. "description": "Session stolen into workspace",
  8166. "content": {
  8167. "application/json": {
  8168. "schema": {
  8169. "type": "object",
  8170. "properties": {
  8171. "sessionID": {
  8172. "type": "string",
  8173. "pattern": "^ses"
  8174. }
  8175. },
  8176. "required": ["sessionID"],
  8177. "additionalProperties": false,
  8178. "description": "Session stolen into workspace"
  8179. }
  8180. }
  8181. }
  8182. },
  8183. "400": {
  8184. "description": "BadRequest | InvalidRequestError",
  8185. "content": {
  8186. "application/json": {
  8187. "schema": {
  8188. "anyOf": [
  8189. {
  8190. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8191. },
  8192. {
  8193. "$ref": "#/components/schemas/InvalidRequestError"
  8194. }
  8195. ]
  8196. }
  8197. }
  8198. }
  8199. }
  8200. },
  8201. "description": "Update a session to belong to the current workspace through the sync event system.",
  8202. "summary": "Steal session into workspace",
  8203. "requestBody": {
  8204. "content": {
  8205. "application/json": {
  8206. "schema": {
  8207. "type": "object",
  8208. "properties": {
  8209. "sessionID": {
  8210. "type": "string",
  8211. "pattern": "^ses"
  8212. }
  8213. },
  8214. "required": ["sessionID"],
  8215. "additionalProperties": false
  8216. }
  8217. }
  8218. }
  8219. },
  8220. "x-codeSamples": [
  8221. {
  8222. "lang": "js",
  8223. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8224. }
  8225. ]
  8226. }
  8227. },
  8228. "/sync/history": {
  8229. "post": {
  8230. "tags": ["sync"],
  8231. "operationId": "sync.history.list",
  8232. "parameters": [
  8233. {
  8234. "name": "directory",
  8235. "in": "query",
  8236. "schema": {
  8237. "type": "string"
  8238. },
  8239. "required": false
  8240. },
  8241. {
  8242. "name": "workspace",
  8243. "in": "query",
  8244. "schema": {
  8245. "type": "string"
  8246. },
  8247. "required": false
  8248. }
  8249. ],
  8250. "responses": {
  8251. "200": {
  8252. "description": "Sync events",
  8253. "content": {
  8254. "application/json": {
  8255. "schema": {
  8256. "type": "array",
  8257. "items": {
  8258. "type": "object",
  8259. "properties": {
  8260. "id": {
  8261. "type": "string",
  8262. "pattern": "^evt_"
  8263. },
  8264. "aggregate_id": {
  8265. "type": "string"
  8266. },
  8267. "seq": {
  8268. "type": "integer",
  8269. "minimum": 0
  8270. },
  8271. "type": {
  8272. "type": "string"
  8273. },
  8274. "data": {
  8275. "type": "object"
  8276. }
  8277. },
  8278. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8279. "additionalProperties": false
  8280. },
  8281. "description": "Sync events"
  8282. }
  8283. }
  8284. }
  8285. },
  8286. "400": {
  8287. "description": "BadRequest | InvalidRequestError",
  8288. "content": {
  8289. "application/json": {
  8290. "schema": {
  8291. "anyOf": [
  8292. {
  8293. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8294. },
  8295. {
  8296. "$ref": "#/components/schemas/InvalidRequestError"
  8297. }
  8298. ]
  8299. }
  8300. }
  8301. }
  8302. }
  8303. },
  8304. "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.",
  8305. "summary": "List sync events",
  8306. "requestBody": {
  8307. "content": {
  8308. "application/json": {
  8309. "schema": {
  8310. "type": "object",
  8311. "additionalProperties": {
  8312. "type": "integer",
  8313. "minimum": 0
  8314. }
  8315. }
  8316. }
  8317. }
  8318. },
  8319. "x-codeSamples": [
  8320. {
  8321. "lang": "js",
  8322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8323. }
  8324. ]
  8325. }
  8326. },
  8327. "/tui/append-prompt": {
  8328. "post": {
  8329. "tags": ["tui"],
  8330. "operationId": "tui.appendPrompt",
  8331. "parameters": [
  8332. {
  8333. "name": "directory",
  8334. "in": "query",
  8335. "schema": {
  8336. "type": "string"
  8337. },
  8338. "required": false
  8339. },
  8340. {
  8341. "name": "workspace",
  8342. "in": "query",
  8343. "schema": {
  8344. "type": "string"
  8345. },
  8346. "required": false
  8347. }
  8348. ],
  8349. "responses": {
  8350. "200": {
  8351. "description": "Prompt processed successfully",
  8352. "content": {
  8353. "application/json": {
  8354. "schema": {
  8355. "type": "boolean",
  8356. "description": "Prompt processed successfully"
  8357. }
  8358. }
  8359. }
  8360. },
  8361. "400": {
  8362. "description": "BadRequest | InvalidRequestError",
  8363. "content": {
  8364. "application/json": {
  8365. "schema": {
  8366. "anyOf": [
  8367. {
  8368. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8369. },
  8370. {
  8371. "$ref": "#/components/schemas/InvalidRequestError"
  8372. }
  8373. ]
  8374. }
  8375. }
  8376. }
  8377. }
  8378. },
  8379. "description": "Append prompt to the TUI.",
  8380. "summary": "Append TUI prompt",
  8381. "requestBody": {
  8382. "content": {
  8383. "application/json": {
  8384. "schema": {
  8385. "type": "object",
  8386. "properties": {
  8387. "text": {
  8388. "type": "string"
  8389. }
  8390. },
  8391. "required": ["text"],
  8392. "additionalProperties": false
  8393. }
  8394. }
  8395. }
  8396. },
  8397. "x-codeSamples": [
  8398. {
  8399. "lang": "js",
  8400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8401. }
  8402. ]
  8403. }
  8404. },
  8405. "/tui/open-help": {
  8406. "post": {
  8407. "tags": ["tui"],
  8408. "operationId": "tui.openHelp",
  8409. "parameters": [
  8410. {
  8411. "name": "directory",
  8412. "in": "query",
  8413. "schema": {
  8414. "type": "string"
  8415. },
  8416. "required": false
  8417. },
  8418. {
  8419. "name": "workspace",
  8420. "in": "query",
  8421. "schema": {
  8422. "type": "string"
  8423. },
  8424. "required": false
  8425. }
  8426. ],
  8427. "responses": {
  8428. "200": {
  8429. "description": "Help dialog opened successfully",
  8430. "content": {
  8431. "application/json": {
  8432. "schema": {
  8433. "type": "boolean",
  8434. "description": "Help dialog opened successfully"
  8435. }
  8436. }
  8437. }
  8438. },
  8439. "400": {
  8440. "description": "Bad request",
  8441. "content": {
  8442. "application/json": {
  8443. "schema": {
  8444. "$ref": "#/components/schemas/BadRequestError"
  8445. }
  8446. }
  8447. }
  8448. }
  8449. },
  8450. "description": "Open the help dialog in the TUI to display user assistance information.",
  8451. "summary": "Open help dialog",
  8452. "x-codeSamples": [
  8453. {
  8454. "lang": "js",
  8455. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8456. }
  8457. ]
  8458. }
  8459. },
  8460. "/tui/open-sessions": {
  8461. "post": {
  8462. "tags": ["tui"],
  8463. "operationId": "tui.openSessions",
  8464. "parameters": [
  8465. {
  8466. "name": "directory",
  8467. "in": "query",
  8468. "schema": {
  8469. "type": "string"
  8470. },
  8471. "required": false
  8472. },
  8473. {
  8474. "name": "workspace",
  8475. "in": "query",
  8476. "schema": {
  8477. "type": "string"
  8478. },
  8479. "required": false
  8480. }
  8481. ],
  8482. "responses": {
  8483. "200": {
  8484. "description": "Session dialog opened successfully",
  8485. "content": {
  8486. "application/json": {
  8487. "schema": {
  8488. "type": "boolean",
  8489. "description": "Session dialog opened successfully"
  8490. }
  8491. }
  8492. }
  8493. },
  8494. "400": {
  8495. "description": "Bad request",
  8496. "content": {
  8497. "application/json": {
  8498. "schema": {
  8499. "$ref": "#/components/schemas/BadRequestError"
  8500. }
  8501. }
  8502. }
  8503. }
  8504. },
  8505. "description": "Open the session dialog.",
  8506. "summary": "Open sessions dialog",
  8507. "x-codeSamples": [
  8508. {
  8509. "lang": "js",
  8510. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8511. }
  8512. ]
  8513. }
  8514. },
  8515. "/tui/open-themes": {
  8516. "post": {
  8517. "tags": ["tui"],
  8518. "operationId": "tui.openThemes",
  8519. "parameters": [
  8520. {
  8521. "name": "directory",
  8522. "in": "query",
  8523. "schema": {
  8524. "type": "string"
  8525. },
  8526. "required": false
  8527. },
  8528. {
  8529. "name": "workspace",
  8530. "in": "query",
  8531. "schema": {
  8532. "type": "string"
  8533. },
  8534. "required": false
  8535. }
  8536. ],
  8537. "responses": {
  8538. "200": {
  8539. "description": "Theme dialog opened successfully",
  8540. "content": {
  8541. "application/json": {
  8542. "schema": {
  8543. "type": "boolean",
  8544. "description": "Theme dialog opened successfully"
  8545. }
  8546. }
  8547. }
  8548. },
  8549. "400": {
  8550. "description": "Bad request",
  8551. "content": {
  8552. "application/json": {
  8553. "schema": {
  8554. "$ref": "#/components/schemas/BadRequestError"
  8555. }
  8556. }
  8557. }
  8558. }
  8559. },
  8560. "description": "Open the theme dialog.",
  8561. "summary": "Open themes dialog",
  8562. "x-codeSamples": [
  8563. {
  8564. "lang": "js",
  8565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8566. }
  8567. ]
  8568. }
  8569. },
  8570. "/tui/open-models": {
  8571. "post": {
  8572. "tags": ["tui"],
  8573. "operationId": "tui.openModels",
  8574. "parameters": [
  8575. {
  8576. "name": "directory",
  8577. "in": "query",
  8578. "schema": {
  8579. "type": "string"
  8580. },
  8581. "required": false
  8582. },
  8583. {
  8584. "name": "workspace",
  8585. "in": "query",
  8586. "schema": {
  8587. "type": "string"
  8588. },
  8589. "required": false
  8590. }
  8591. ],
  8592. "responses": {
  8593. "200": {
  8594. "description": "Model dialog opened successfully",
  8595. "content": {
  8596. "application/json": {
  8597. "schema": {
  8598. "type": "boolean",
  8599. "description": "Model dialog opened successfully"
  8600. }
  8601. }
  8602. }
  8603. },
  8604. "400": {
  8605. "description": "Bad request",
  8606. "content": {
  8607. "application/json": {
  8608. "schema": {
  8609. "$ref": "#/components/schemas/BadRequestError"
  8610. }
  8611. }
  8612. }
  8613. }
  8614. },
  8615. "description": "Open the model dialog.",
  8616. "summary": "Open models dialog",
  8617. "x-codeSamples": [
  8618. {
  8619. "lang": "js",
  8620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8621. }
  8622. ]
  8623. }
  8624. },
  8625. "/tui/submit-prompt": {
  8626. "post": {
  8627. "tags": ["tui"],
  8628. "operationId": "tui.submitPrompt",
  8629. "parameters": [
  8630. {
  8631. "name": "directory",
  8632. "in": "query",
  8633. "schema": {
  8634. "type": "string"
  8635. },
  8636. "required": false
  8637. },
  8638. {
  8639. "name": "workspace",
  8640. "in": "query",
  8641. "schema": {
  8642. "type": "string"
  8643. },
  8644. "required": false
  8645. }
  8646. ],
  8647. "responses": {
  8648. "200": {
  8649. "description": "Prompt submitted successfully",
  8650. "content": {
  8651. "application/json": {
  8652. "schema": {
  8653. "type": "boolean",
  8654. "description": "Prompt submitted successfully"
  8655. }
  8656. }
  8657. }
  8658. },
  8659. "400": {
  8660. "description": "Bad request",
  8661. "content": {
  8662. "application/json": {
  8663. "schema": {
  8664. "$ref": "#/components/schemas/BadRequestError"
  8665. }
  8666. }
  8667. }
  8668. }
  8669. },
  8670. "description": "Submit the prompt.",
  8671. "summary": "Submit TUI prompt",
  8672. "x-codeSamples": [
  8673. {
  8674. "lang": "js",
  8675. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8676. }
  8677. ]
  8678. }
  8679. },
  8680. "/tui/clear-prompt": {
  8681. "post": {
  8682. "tags": ["tui"],
  8683. "operationId": "tui.clearPrompt",
  8684. "parameters": [
  8685. {
  8686. "name": "directory",
  8687. "in": "query",
  8688. "schema": {
  8689. "type": "string"
  8690. },
  8691. "required": false
  8692. },
  8693. {
  8694. "name": "workspace",
  8695. "in": "query",
  8696. "schema": {
  8697. "type": "string"
  8698. },
  8699. "required": false
  8700. }
  8701. ],
  8702. "responses": {
  8703. "200": {
  8704. "description": "Prompt cleared successfully",
  8705. "content": {
  8706. "application/json": {
  8707. "schema": {
  8708. "type": "boolean",
  8709. "description": "Prompt cleared successfully"
  8710. }
  8711. }
  8712. }
  8713. },
  8714. "400": {
  8715. "description": "Bad request",
  8716. "content": {
  8717. "application/json": {
  8718. "schema": {
  8719. "$ref": "#/components/schemas/BadRequestError"
  8720. }
  8721. }
  8722. }
  8723. }
  8724. },
  8725. "description": "Clear the prompt.",
  8726. "summary": "Clear TUI prompt",
  8727. "x-codeSamples": [
  8728. {
  8729. "lang": "js",
  8730. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8731. }
  8732. ]
  8733. }
  8734. },
  8735. "/tui/execute-command": {
  8736. "post": {
  8737. "tags": ["tui"],
  8738. "operationId": "tui.executeCommand",
  8739. "parameters": [
  8740. {
  8741. "name": "directory",
  8742. "in": "query",
  8743. "schema": {
  8744. "type": "string"
  8745. },
  8746. "required": false
  8747. },
  8748. {
  8749. "name": "workspace",
  8750. "in": "query",
  8751. "schema": {
  8752. "type": "string"
  8753. },
  8754. "required": false
  8755. }
  8756. ],
  8757. "responses": {
  8758. "200": {
  8759. "description": "Command executed successfully",
  8760. "content": {
  8761. "application/json": {
  8762. "schema": {
  8763. "type": "boolean",
  8764. "description": "Command executed successfully"
  8765. }
  8766. }
  8767. }
  8768. },
  8769. "400": {
  8770. "description": "BadRequest | InvalidRequestError",
  8771. "content": {
  8772. "application/json": {
  8773. "schema": {
  8774. "anyOf": [
  8775. {
  8776. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8777. },
  8778. {
  8779. "$ref": "#/components/schemas/InvalidRequestError"
  8780. }
  8781. ]
  8782. }
  8783. }
  8784. }
  8785. }
  8786. },
  8787. "description": "Execute a TUI command.",
  8788. "summary": "Execute TUI command",
  8789. "requestBody": {
  8790. "content": {
  8791. "application/json": {
  8792. "schema": {
  8793. "type": "object",
  8794. "properties": {
  8795. "command": {
  8796. "type": "string"
  8797. }
  8798. },
  8799. "required": ["command"],
  8800. "additionalProperties": false
  8801. }
  8802. }
  8803. }
  8804. },
  8805. "x-codeSamples": [
  8806. {
  8807. "lang": "js",
  8808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8809. }
  8810. ]
  8811. }
  8812. },
  8813. "/tui/show-toast": {
  8814. "post": {
  8815. "tags": ["tui"],
  8816. "operationId": "tui.showToast",
  8817. "parameters": [
  8818. {
  8819. "name": "directory",
  8820. "in": "query",
  8821. "schema": {
  8822. "type": "string"
  8823. },
  8824. "required": false
  8825. },
  8826. {
  8827. "name": "workspace",
  8828. "in": "query",
  8829. "schema": {
  8830. "type": "string"
  8831. },
  8832. "required": false
  8833. }
  8834. ],
  8835. "responses": {
  8836. "200": {
  8837. "description": "Toast notification shown successfully",
  8838. "content": {
  8839. "application/json": {
  8840. "schema": {
  8841. "type": "boolean",
  8842. "description": "Toast notification shown successfully"
  8843. }
  8844. }
  8845. }
  8846. },
  8847. "400": {
  8848. "description": "Bad request",
  8849. "content": {
  8850. "application/json": {
  8851. "schema": {
  8852. "$ref": "#/components/schemas/BadRequestError"
  8853. }
  8854. }
  8855. }
  8856. }
  8857. },
  8858. "description": "Show a toast notification in the TUI.",
  8859. "summary": "Show TUI toast",
  8860. "requestBody": {
  8861. "content": {
  8862. "application/json": {
  8863. "schema": {
  8864. "type": "object",
  8865. "properties": {
  8866. "title": {
  8867. "type": "string"
  8868. },
  8869. "message": {
  8870. "type": "string"
  8871. },
  8872. "variant": {
  8873. "type": "string",
  8874. "enum": ["info", "success", "warning", "error"]
  8875. },
  8876. "duration": {
  8877. "type": "integer",
  8878. "exclusiveMinimum": 0
  8879. }
  8880. },
  8881. "required": ["message", "variant"],
  8882. "additionalProperties": false
  8883. }
  8884. }
  8885. }
  8886. },
  8887. "x-codeSamples": [
  8888. {
  8889. "lang": "js",
  8890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8891. }
  8892. ]
  8893. }
  8894. },
  8895. "/tui/publish": {
  8896. "post": {
  8897. "tags": ["tui"],
  8898. "operationId": "tui.publish",
  8899. "parameters": [
  8900. {
  8901. "name": "directory",
  8902. "in": "query",
  8903. "schema": {
  8904. "type": "string"
  8905. },
  8906. "required": false
  8907. },
  8908. {
  8909. "name": "workspace",
  8910. "in": "query",
  8911. "schema": {
  8912. "type": "string"
  8913. },
  8914. "required": false
  8915. }
  8916. ],
  8917. "responses": {
  8918. "200": {
  8919. "description": "Event published successfully",
  8920. "content": {
  8921. "application/json": {
  8922. "schema": {
  8923. "type": "boolean",
  8924. "description": "Event published successfully"
  8925. }
  8926. }
  8927. }
  8928. },
  8929. "400": {
  8930. "description": "BadRequest | InvalidRequestError",
  8931. "content": {
  8932. "application/json": {
  8933. "schema": {
  8934. "anyOf": [
  8935. {
  8936. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8937. },
  8938. {
  8939. "$ref": "#/components/schemas/InvalidRequestError"
  8940. }
  8941. ]
  8942. }
  8943. }
  8944. }
  8945. }
  8946. },
  8947. "description": "Publish a TUI event.",
  8948. "summary": "Publish TUI event",
  8949. "requestBody": {
  8950. "content": {
  8951. "application/json": {
  8952. "schema": {
  8953. "anyOf": [
  8954. {
  8955. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8956. },
  8957. {
  8958. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8959. },
  8960. {
  8961. "$ref": "#/components/schemas/EventTuiToastShow"
  8962. },
  8963. {
  8964. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8965. }
  8966. ]
  8967. }
  8968. }
  8969. }
  8970. },
  8971. "x-codeSamples": [
  8972. {
  8973. "lang": "js",
  8974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8975. }
  8976. ]
  8977. }
  8978. },
  8979. "/tui/select-session": {
  8980. "post": {
  8981. "tags": ["tui"],
  8982. "operationId": "tui.selectSession",
  8983. "parameters": [
  8984. {
  8985. "name": "directory",
  8986. "in": "query",
  8987. "schema": {
  8988. "type": "string"
  8989. },
  8990. "required": false
  8991. },
  8992. {
  8993. "name": "workspace",
  8994. "in": "query",
  8995. "schema": {
  8996. "type": "string"
  8997. },
  8998. "required": false
  8999. }
  9000. ],
  9001. "responses": {
  9002. "200": {
  9003. "description": "Session selected successfully",
  9004. "content": {
  9005. "application/json": {
  9006. "schema": {
  9007. "type": "boolean",
  9008. "description": "Session selected successfully"
  9009. }
  9010. }
  9011. }
  9012. },
  9013. "400": {
  9014. "description": "BadRequest | InvalidRequestError",
  9015. "content": {
  9016. "application/json": {
  9017. "schema": {
  9018. "anyOf": [
  9019. {
  9020. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9021. },
  9022. {
  9023. "$ref": "#/components/schemas/InvalidRequestError"
  9024. }
  9025. ]
  9026. }
  9027. }
  9028. }
  9029. },
  9030. "404": {
  9031. "description": "NotFoundError",
  9032. "content": {
  9033. "application/json": {
  9034. "schema": {
  9035. "$ref": "#/components/schemas/NotFoundError"
  9036. }
  9037. }
  9038. }
  9039. }
  9040. },
  9041. "description": "Navigate the TUI to display the specified session.",
  9042. "summary": "Select session",
  9043. "requestBody": {
  9044. "content": {
  9045. "application/json": {
  9046. "schema": {
  9047. "type": "object",
  9048. "properties": {
  9049. "sessionID": {
  9050. "type": "string",
  9051. "pattern": "^ses",
  9052. "description": "Session ID to navigate to"
  9053. }
  9054. },
  9055. "required": ["sessionID"],
  9056. "additionalProperties": false
  9057. }
  9058. }
  9059. }
  9060. },
  9061. "x-codeSamples": [
  9062. {
  9063. "lang": "js",
  9064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9065. }
  9066. ]
  9067. }
  9068. },
  9069. "/tui/control/next": {
  9070. "get": {
  9071. "tags": ["tui"],
  9072. "operationId": "tui.control.next",
  9073. "parameters": [
  9074. {
  9075. "name": "directory",
  9076. "in": "query",
  9077. "schema": {
  9078. "type": "string"
  9079. },
  9080. "required": false
  9081. },
  9082. {
  9083. "name": "workspace",
  9084. "in": "query",
  9085. "schema": {
  9086. "type": "string"
  9087. },
  9088. "required": false
  9089. }
  9090. ],
  9091. "responses": {
  9092. "200": {
  9093. "description": "Next TUI request",
  9094. "content": {
  9095. "application/json": {
  9096. "schema": {
  9097. "type": "object",
  9098. "properties": {
  9099. "path": {
  9100. "type": "string"
  9101. },
  9102. "body": {}
  9103. },
  9104. "required": ["path", "body"],
  9105. "additionalProperties": false,
  9106. "description": "Next TUI request"
  9107. }
  9108. }
  9109. }
  9110. },
  9111. "400": {
  9112. "description": "Bad request",
  9113. "content": {
  9114. "application/json": {
  9115. "schema": {
  9116. "$ref": "#/components/schemas/BadRequestError"
  9117. }
  9118. }
  9119. }
  9120. }
  9121. },
  9122. "description": "Retrieve the next TUI request from the queue for processing.",
  9123. "summary": "Get next TUI request",
  9124. "x-codeSamples": [
  9125. {
  9126. "lang": "js",
  9127. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9128. }
  9129. ]
  9130. }
  9131. },
  9132. "/tui/control/response": {
  9133. "post": {
  9134. "tags": ["tui"],
  9135. "operationId": "tui.control.response",
  9136. "parameters": [
  9137. {
  9138. "name": "directory",
  9139. "in": "query",
  9140. "schema": {
  9141. "type": "string"
  9142. },
  9143. "required": false
  9144. },
  9145. {
  9146. "name": "workspace",
  9147. "in": "query",
  9148. "schema": {
  9149. "type": "string"
  9150. },
  9151. "required": false
  9152. }
  9153. ],
  9154. "responses": {
  9155. "200": {
  9156. "description": "Response submitted successfully",
  9157. "content": {
  9158. "application/json": {
  9159. "schema": {
  9160. "type": "boolean",
  9161. "description": "Response submitted successfully"
  9162. }
  9163. }
  9164. }
  9165. },
  9166. "400": {
  9167. "description": "Bad request",
  9168. "content": {
  9169. "application/json": {
  9170. "schema": {
  9171. "$ref": "#/components/schemas/BadRequestError"
  9172. }
  9173. }
  9174. }
  9175. }
  9176. },
  9177. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9178. "summary": "Submit TUI response",
  9179. "requestBody": {
  9180. "content": {
  9181. "application/json": {
  9182. "schema": {}
  9183. }
  9184. }
  9185. },
  9186. "x-codeSamples": [
  9187. {
  9188. "lang": "js",
  9189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9190. }
  9191. ]
  9192. }
  9193. },
  9194. "/experimental/workspace/adapter": {
  9195. "get": {
  9196. "tags": ["workspace"],
  9197. "operationId": "experimental.workspace.adapter.list",
  9198. "parameters": [
  9199. {
  9200. "name": "directory",
  9201. "in": "query",
  9202. "schema": {
  9203. "type": "string"
  9204. },
  9205. "required": false
  9206. },
  9207. {
  9208. "name": "workspace",
  9209. "in": "query",
  9210. "schema": {
  9211. "type": "string"
  9212. },
  9213. "required": false
  9214. }
  9215. ],
  9216. "responses": {
  9217. "200": {
  9218. "description": "Workspace adapters",
  9219. "content": {
  9220. "application/json": {
  9221. "schema": {
  9222. "type": "array",
  9223. "items": {
  9224. "type": "object",
  9225. "properties": {
  9226. "type": {
  9227. "type": "string"
  9228. },
  9229. "name": {
  9230. "type": "string"
  9231. },
  9232. "description": {
  9233. "type": "string"
  9234. }
  9235. },
  9236. "required": ["type", "name", "description"],
  9237. "additionalProperties": false
  9238. },
  9239. "description": "Workspace adapters"
  9240. }
  9241. }
  9242. }
  9243. },
  9244. "400": {
  9245. "description": "Bad request",
  9246. "content": {
  9247. "application/json": {
  9248. "schema": {
  9249. "$ref": "#/components/schemas/BadRequestError"
  9250. }
  9251. }
  9252. }
  9253. }
  9254. },
  9255. "description": "List all available workspace adapters for the current project.",
  9256. "summary": "List workspace adapters",
  9257. "x-codeSamples": [
  9258. {
  9259. "lang": "js",
  9260. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9261. }
  9262. ]
  9263. }
  9264. },
  9265. "/experimental/workspace": {
  9266. "get": {
  9267. "tags": ["workspace"],
  9268. "operationId": "experimental.workspace.list",
  9269. "parameters": [
  9270. {
  9271. "name": "directory",
  9272. "in": "query",
  9273. "schema": {
  9274. "type": "string"
  9275. },
  9276. "required": false
  9277. },
  9278. {
  9279. "name": "workspace",
  9280. "in": "query",
  9281. "schema": {
  9282. "type": "string"
  9283. },
  9284. "required": false
  9285. }
  9286. ],
  9287. "responses": {
  9288. "200": {
  9289. "description": "Workspaces",
  9290. "content": {
  9291. "application/json": {
  9292. "schema": {
  9293. "type": "array",
  9294. "items": {
  9295. "$ref": "#/components/schemas/Workspace"
  9296. },
  9297. "description": "Workspaces"
  9298. }
  9299. }
  9300. }
  9301. },
  9302. "400": {
  9303. "description": "Bad request",
  9304. "content": {
  9305. "application/json": {
  9306. "schema": {
  9307. "$ref": "#/components/schemas/BadRequestError"
  9308. }
  9309. }
  9310. }
  9311. }
  9312. },
  9313. "description": "List all workspaces.",
  9314. "summary": "List workspaces",
  9315. "x-codeSamples": [
  9316. {
  9317. "lang": "js",
  9318. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9319. }
  9320. ]
  9321. },
  9322. "post": {
  9323. "tags": ["workspace"],
  9324. "operationId": "experimental.workspace.create",
  9325. "parameters": [
  9326. {
  9327. "name": "directory",
  9328. "in": "query",
  9329. "schema": {
  9330. "type": "string"
  9331. },
  9332. "required": false
  9333. },
  9334. {
  9335. "name": "workspace",
  9336. "in": "query",
  9337. "schema": {
  9338. "type": "string"
  9339. },
  9340. "required": false
  9341. }
  9342. ],
  9343. "responses": {
  9344. "200": {
  9345. "description": "Workspace created",
  9346. "content": {
  9347. "application/json": {
  9348. "schema": {
  9349. "$ref": "#/components/schemas/Workspace"
  9350. }
  9351. }
  9352. }
  9353. },
  9354. "400": {
  9355. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9356. "content": {
  9357. "application/json": {
  9358. "schema": {
  9359. "anyOf": [
  9360. {
  9361. "$ref": "#/components/schemas/WorkspaceCreateError"
  9362. },
  9363. {
  9364. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9365. },
  9366. {
  9367. "$ref": "#/components/schemas/InvalidRequestError"
  9368. }
  9369. ]
  9370. }
  9371. }
  9372. }
  9373. }
  9374. },
  9375. "description": "Create a workspace for the current project.",
  9376. "summary": "Create workspace",
  9377. "requestBody": {
  9378. "content": {
  9379. "application/json": {
  9380. "schema": {
  9381. "type": "object",
  9382. "properties": {
  9383. "id": {
  9384. "type": "string",
  9385. "pattern": "^wrk"
  9386. },
  9387. "type": {
  9388. "type": "string"
  9389. },
  9390. "branch": {
  9391. "anyOf": [
  9392. {
  9393. "type": "string"
  9394. },
  9395. {
  9396. "type": "null"
  9397. }
  9398. ]
  9399. },
  9400. "extra": {
  9401. "anyOf": [
  9402. {},
  9403. {
  9404. "type": "null"
  9405. }
  9406. ]
  9407. }
  9408. },
  9409. "required": ["type"],
  9410. "additionalProperties": false
  9411. }
  9412. }
  9413. }
  9414. },
  9415. "x-codeSamples": [
  9416. {
  9417. "lang": "js",
  9418. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9419. }
  9420. ]
  9421. }
  9422. },
  9423. "/experimental/workspace/sync-list": {
  9424. "post": {
  9425. "tags": ["workspace"],
  9426. "operationId": "experimental.workspace.syncList",
  9427. "parameters": [
  9428. {
  9429. "name": "directory",
  9430. "in": "query",
  9431. "schema": {
  9432. "type": "string"
  9433. },
  9434. "required": false
  9435. },
  9436. {
  9437. "name": "workspace",
  9438. "in": "query",
  9439. "schema": {
  9440. "type": "string"
  9441. },
  9442. "required": false
  9443. }
  9444. ],
  9445. "responses": {
  9446. "204": {
  9447. "description": "Workspace list synced"
  9448. },
  9449. "400": {
  9450. "description": "Bad request",
  9451. "content": {
  9452. "application/json": {
  9453. "schema": {
  9454. "$ref": "#/components/schemas/BadRequestError"
  9455. }
  9456. }
  9457. }
  9458. }
  9459. },
  9460. "description": "Register missing workspaces returned by workspace adapters.",
  9461. "summary": "Sync workspace list",
  9462. "x-codeSamples": [
  9463. {
  9464. "lang": "js",
  9465. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9466. }
  9467. ]
  9468. }
  9469. },
  9470. "/experimental/workspace/status": {
  9471. "get": {
  9472. "tags": ["workspace"],
  9473. "operationId": "experimental.workspace.status",
  9474. "parameters": [
  9475. {
  9476. "name": "directory",
  9477. "in": "query",
  9478. "schema": {
  9479. "type": "string"
  9480. },
  9481. "required": false
  9482. },
  9483. {
  9484. "name": "workspace",
  9485. "in": "query",
  9486. "schema": {
  9487. "type": "string"
  9488. },
  9489. "required": false
  9490. }
  9491. ],
  9492. "responses": {
  9493. "200": {
  9494. "description": "Workspace status",
  9495. "content": {
  9496. "application/json": {
  9497. "schema": {
  9498. "type": "array",
  9499. "items": {
  9500. "$ref": "#/components/schemas/WorkspaceEventConnectionStatus"
  9501. },
  9502. "description": "Workspace status"
  9503. }
  9504. }
  9505. }
  9506. },
  9507. "400": {
  9508. "description": "Bad request",
  9509. "content": {
  9510. "application/json": {
  9511. "schema": {
  9512. "$ref": "#/components/schemas/BadRequestError"
  9513. }
  9514. }
  9515. }
  9516. }
  9517. },
  9518. "description": "Get connection status for workspaces in the current project.",
  9519. "summary": "Workspace status",
  9520. "x-codeSamples": [
  9521. {
  9522. "lang": "js",
  9523. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9524. }
  9525. ]
  9526. }
  9527. },
  9528. "/experimental/workspace/{id}": {
  9529. "delete": {
  9530. "tags": ["workspace"],
  9531. "operationId": "experimental.workspace.remove",
  9532. "parameters": [
  9533. {
  9534. "name": "id",
  9535. "in": "path",
  9536. "schema": {
  9537. "type": "string",
  9538. "pattern": "^wrk"
  9539. },
  9540. "required": true
  9541. },
  9542. {
  9543. "name": "directory",
  9544. "in": "query",
  9545. "schema": {
  9546. "type": "string"
  9547. },
  9548. "required": false
  9549. },
  9550. {
  9551. "name": "workspace",
  9552. "in": "query",
  9553. "schema": {
  9554. "type": "string"
  9555. },
  9556. "required": false
  9557. }
  9558. ],
  9559. "responses": {
  9560. "200": {
  9561. "description": "Workspace removed",
  9562. "content": {
  9563. "application/json": {
  9564. "schema": {
  9565. "$ref": "#/components/schemas/Workspace"
  9566. }
  9567. }
  9568. }
  9569. },
  9570. "400": {
  9571. "description": "BadRequest | InvalidRequestError",
  9572. "content": {
  9573. "application/json": {
  9574. "schema": {
  9575. "anyOf": [
  9576. {
  9577. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9578. },
  9579. {
  9580. "$ref": "#/components/schemas/InvalidRequestError"
  9581. }
  9582. ]
  9583. }
  9584. }
  9585. }
  9586. }
  9587. },
  9588. "description": "Remove an existing workspace.",
  9589. "summary": "Remove workspace",
  9590. "x-codeSamples": [
  9591. {
  9592. "lang": "js",
  9593. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9594. }
  9595. ]
  9596. }
  9597. },
  9598. "/experimental/workspace/warp": {
  9599. "post": {
  9600. "tags": ["workspace"],
  9601. "operationId": "experimental.workspace.warp",
  9602. "parameters": [
  9603. {
  9604. "name": "directory",
  9605. "in": "query",
  9606. "schema": {
  9607. "type": "string"
  9608. },
  9609. "required": false
  9610. },
  9611. {
  9612. "name": "workspace",
  9613. "in": "query",
  9614. "schema": {
  9615. "type": "string"
  9616. },
  9617. "required": false
  9618. }
  9619. ],
  9620. "responses": {
  9621. "204": {
  9622. "description": "Session warped"
  9623. },
  9624. "400": {
  9625. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9626. "content": {
  9627. "application/json": {
  9628. "schema": {
  9629. "anyOf": [
  9630. {
  9631. "$ref": "#/components/schemas/WorkspaceWarpError"
  9632. },
  9633. {
  9634. "$ref": "#/components/schemas/VcsApplyError"
  9635. },
  9636. {
  9637. "$ref": "#/components/schemas/InvalidRequestError"
  9638. }
  9639. ]
  9640. }
  9641. }
  9642. }
  9643. },
  9644. "404": {
  9645. "description": "NotFoundError",
  9646. "content": {
  9647. "application/json": {
  9648. "schema": {
  9649. "$ref": "#/components/schemas/NotFoundError"
  9650. }
  9651. }
  9652. }
  9653. }
  9654. },
  9655. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9656. "summary": "Warp session into workspace",
  9657. "requestBody": {
  9658. "content": {
  9659. "application/json": {
  9660. "schema": {
  9661. "type": "object",
  9662. "properties": {
  9663. "id": {
  9664. "anyOf": [
  9665. {
  9666. "type": "string",
  9667. "pattern": "^wrk"
  9668. },
  9669. {
  9670. "type": "null"
  9671. }
  9672. ]
  9673. },
  9674. "sessionID": {
  9675. "type": "string",
  9676. "pattern": "^ses"
  9677. },
  9678. "copyChanges": {
  9679. "type": "boolean"
  9680. }
  9681. },
  9682. "required": ["id", "sessionID"],
  9683. "additionalProperties": false
  9684. }
  9685. }
  9686. }
  9687. },
  9688. "x-codeSamples": [
  9689. {
  9690. "lang": "js",
  9691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9692. }
  9693. ]
  9694. }
  9695. },
  9696. "/api/health": {
  9697. "get": {
  9698. "tags": ["opencode HttpApi"],
  9699. "operationId": "v2.health.get",
  9700. "parameters": [],
  9701. "security": [],
  9702. "responses": {
  9703. "200": {
  9704. "description": "Success",
  9705. "content": {
  9706. "application/json": {
  9707. "schema": {
  9708. "type": "object",
  9709. "properties": {
  9710. "healthy": {
  9711. "type": "boolean",
  9712. "enum": [true]
  9713. }
  9714. },
  9715. "required": ["healthy"],
  9716. "additionalProperties": false
  9717. }
  9718. }
  9719. }
  9720. },
  9721. "400": {
  9722. "description": "InvalidRequestError",
  9723. "content": {
  9724. "application/json": {
  9725. "schema": {
  9726. "$ref": "#/components/schemas/InvalidRequestError"
  9727. }
  9728. }
  9729. }
  9730. },
  9731. "401": {
  9732. "description": "UnauthorizedError",
  9733. "content": {
  9734. "application/json": {
  9735. "schema": {
  9736. "$ref": "#/components/schemas/UnauthorizedError"
  9737. }
  9738. }
  9739. }
  9740. }
  9741. },
  9742. "description": "Check whether the API server is ready to accept requests.",
  9743. "summary": "Check server health",
  9744. "x-codeSamples": [
  9745. {
  9746. "lang": "js",
  9747. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9748. }
  9749. ]
  9750. }
  9751. },
  9752. "/api/location": {
  9753. "get": {
  9754. "tags": ["opencode HttpApi"],
  9755. "operationId": "v2.location.get",
  9756. "parameters": [
  9757. {
  9758. "name": "location",
  9759. "in": "query",
  9760. "schema": {
  9761. "type": "object",
  9762. "properties": {
  9763. "directory": {
  9764. "type": "string"
  9765. },
  9766. "workspace": {
  9767. "type": "string"
  9768. }
  9769. },
  9770. "additionalProperties": false
  9771. },
  9772. "required": false,
  9773. "style": "deepObject",
  9774. "explode": true
  9775. }
  9776. ],
  9777. "security": [],
  9778. "responses": {
  9779. "200": {
  9780. "description": "Location.Info",
  9781. "content": {
  9782. "application/json": {
  9783. "schema": {
  9784. "$ref": "#/components/schemas/LocationInfo"
  9785. }
  9786. }
  9787. }
  9788. },
  9789. "400": {
  9790. "description": "InvalidRequestError",
  9791. "content": {
  9792. "application/json": {
  9793. "schema": {
  9794. "$ref": "#/components/schemas/InvalidRequestError"
  9795. }
  9796. }
  9797. }
  9798. },
  9799. "401": {
  9800. "description": "UnauthorizedError",
  9801. "content": {
  9802. "application/json": {
  9803. "schema": {
  9804. "$ref": "#/components/schemas/UnauthorizedError"
  9805. }
  9806. }
  9807. }
  9808. }
  9809. },
  9810. "description": "Resolve the requested location or the server default location.",
  9811. "summary": "Get location",
  9812. "x-codeSamples": [
  9813. {
  9814. "lang": "js",
  9815. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9816. }
  9817. ]
  9818. }
  9819. },
  9820. "/api/agent": {
  9821. "get": {
  9822. "tags": ["opencode HttpApi"],
  9823. "operationId": "v2.agent.list",
  9824. "parameters": [
  9825. {
  9826. "name": "location",
  9827. "in": "query",
  9828. "schema": {
  9829. "type": "object",
  9830. "properties": {
  9831. "directory": {
  9832. "type": "string"
  9833. },
  9834. "workspace": {
  9835. "type": "string"
  9836. }
  9837. },
  9838. "additionalProperties": false
  9839. },
  9840. "required": false,
  9841. "style": "deepObject",
  9842. "explode": true
  9843. }
  9844. ],
  9845. "security": [],
  9846. "responses": {
  9847. "200": {
  9848. "description": "Success",
  9849. "content": {
  9850. "application/json": {
  9851. "schema": {
  9852. "type": "object",
  9853. "properties": {
  9854. "location": {
  9855. "$ref": "#/components/schemas/LocationInfo"
  9856. },
  9857. "data": {
  9858. "type": "array",
  9859. "items": {
  9860. "$ref": "#/components/schemas/AgentV2Info"
  9861. }
  9862. }
  9863. },
  9864. "required": ["location", "data"],
  9865. "additionalProperties": false
  9866. }
  9867. }
  9868. }
  9869. },
  9870. "400": {
  9871. "description": "InvalidRequestError",
  9872. "content": {
  9873. "application/json": {
  9874. "schema": {
  9875. "$ref": "#/components/schemas/InvalidRequestError"
  9876. }
  9877. }
  9878. }
  9879. },
  9880. "401": {
  9881. "description": "UnauthorizedError",
  9882. "content": {
  9883. "application/json": {
  9884. "schema": {
  9885. "$ref": "#/components/schemas/UnauthorizedError"
  9886. }
  9887. }
  9888. }
  9889. }
  9890. },
  9891. "description": "Retrieve currently registered agents.",
  9892. "summary": "List agents",
  9893. "x-codeSamples": [
  9894. {
  9895. "lang": "js",
  9896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9897. }
  9898. ]
  9899. }
  9900. },
  9901. "/api/session": {
  9902. "get": {
  9903. "tags": ["sessions"],
  9904. "operationId": "v2.session.list",
  9905. "parameters": [
  9906. {
  9907. "name": "workspace",
  9908. "in": "query",
  9909. "schema": {
  9910. "type": "string",
  9911. "pattern": "^wrk"
  9912. },
  9913. "required": false
  9914. },
  9915. {
  9916. "name": "limit",
  9917. "in": "query",
  9918. "schema": {
  9919. "type": "number"
  9920. },
  9921. "required": false
  9922. },
  9923. {
  9924. "name": "order",
  9925. "in": "query",
  9926. "schema": {
  9927. "type": "string",
  9928. "enum": ["asc", "desc"]
  9929. },
  9930. "required": false
  9931. },
  9932. {
  9933. "name": "search",
  9934. "in": "query",
  9935. "schema": {
  9936. "type": "string"
  9937. },
  9938. "required": false
  9939. },
  9940. {
  9941. "name": "directory",
  9942. "in": "query",
  9943. "schema": {
  9944. "type": "string"
  9945. },
  9946. "required": false
  9947. },
  9948. {
  9949. "name": "project",
  9950. "in": "query",
  9951. "schema": {
  9952. "type": "string"
  9953. },
  9954. "required": false
  9955. },
  9956. {
  9957. "name": "subpath",
  9958. "in": "query",
  9959. "schema": {
  9960. "type": "string"
  9961. },
  9962. "required": false
  9963. },
  9964. {
  9965. "name": "cursor",
  9966. "in": "query",
  9967. "schema": {
  9968. "type": "string",
  9969. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  9970. },
  9971. "required": false
  9972. }
  9973. ],
  9974. "security": [],
  9975. "responses": {
  9976. "200": {
  9977. "description": "SessionsResponse",
  9978. "content": {
  9979. "application/json": {
  9980. "schema": {
  9981. "$ref": "#/components/schemas/SessionsResponse"
  9982. }
  9983. }
  9984. }
  9985. },
  9986. "400": {
  9987. "description": "InvalidCursorError | InvalidRequestError",
  9988. "content": {
  9989. "application/json": {
  9990. "schema": {
  9991. "anyOf": [
  9992. {
  9993. "$ref": "#/components/schemas/InvalidCursorError"
  9994. },
  9995. {
  9996. "$ref": "#/components/schemas/InvalidRequestError"
  9997. },
  9998. {
  9999. "$ref": "#/components/schemas/InvalidRequestError"
  10000. }
  10001. ]
  10002. }
  10003. }
  10004. }
  10005. },
  10006. "401": {
  10007. "description": "UnauthorizedError",
  10008. "content": {
  10009. "application/json": {
  10010. "schema": {
  10011. "$ref": "#/components/schemas/UnauthorizedError"
  10012. }
  10013. }
  10014. }
  10015. }
  10016. },
  10017. "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.",
  10018. "summary": "List sessions",
  10019. "x-codeSamples": [
  10020. {
  10021. "lang": "js",
  10022. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10023. }
  10024. ]
  10025. },
  10026. "post": {
  10027. "tags": ["sessions"],
  10028. "operationId": "v2.session.create",
  10029. "parameters": [],
  10030. "security": [],
  10031. "responses": {
  10032. "200": {
  10033. "description": "Success",
  10034. "content": {
  10035. "application/json": {
  10036. "schema": {
  10037. "type": "object",
  10038. "properties": {
  10039. "data": {
  10040. "$ref": "#/components/schemas/SessionV2Info"
  10041. }
  10042. },
  10043. "required": ["data"],
  10044. "additionalProperties": false
  10045. }
  10046. }
  10047. }
  10048. },
  10049. "400": {
  10050. "description": "InvalidRequestError",
  10051. "content": {
  10052. "application/json": {
  10053. "schema": {
  10054. "$ref": "#/components/schemas/InvalidRequestError"
  10055. }
  10056. }
  10057. }
  10058. },
  10059. "401": {
  10060. "description": "UnauthorizedError",
  10061. "content": {
  10062. "application/json": {
  10063. "schema": {
  10064. "$ref": "#/components/schemas/UnauthorizedError"
  10065. }
  10066. }
  10067. }
  10068. }
  10069. },
  10070. "description": "Create a session at the requested location.",
  10071. "summary": "Create session",
  10072. "requestBody": {
  10073. "content": {
  10074. "application/json": {
  10075. "schema": {
  10076. "type": "object",
  10077. "properties": {
  10078. "id": {
  10079. "type": "string",
  10080. "pattern": "^ses"
  10081. },
  10082. "agent": {
  10083. "type": "string"
  10084. },
  10085. "model": {
  10086. "$ref": "#/components/schemas/ModelRef"
  10087. },
  10088. "location": {
  10089. "$ref": "#/components/schemas/LocationRef"
  10090. }
  10091. },
  10092. "additionalProperties": false
  10093. }
  10094. }
  10095. },
  10096. "required": true
  10097. },
  10098. "x-codeSamples": [
  10099. {
  10100. "lang": "js",
  10101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10102. }
  10103. ]
  10104. }
  10105. },
  10106. "/api/session/active": {
  10107. "get": {
  10108. "tags": ["sessions"],
  10109. "operationId": "v2.session.active",
  10110. "parameters": [],
  10111. "security": [],
  10112. "responses": {
  10113. "200": {
  10114. "description": "Success",
  10115. "content": {
  10116. "application/json": {
  10117. "schema": {
  10118. "type": "object",
  10119. "properties": {
  10120. "data": {
  10121. "type": "object",
  10122. "patternProperties": {
  10123. "^ses": {
  10124. "$ref": "#/components/schemas/SessionActive"
  10125. }
  10126. }
  10127. }
  10128. },
  10129. "required": ["data"],
  10130. "additionalProperties": false
  10131. }
  10132. }
  10133. }
  10134. },
  10135. "400": {
  10136. "description": "InvalidRequestError",
  10137. "content": {
  10138. "application/json": {
  10139. "schema": {
  10140. "$ref": "#/components/schemas/InvalidRequestError"
  10141. }
  10142. }
  10143. }
  10144. },
  10145. "401": {
  10146. "description": "UnauthorizedError",
  10147. "content": {
  10148. "application/json": {
  10149. "schema": {
  10150. "$ref": "#/components/schemas/UnauthorizedError"
  10151. }
  10152. }
  10153. }
  10154. }
  10155. },
  10156. "description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
  10157. "summary": "List active sessions",
  10158. "x-codeSamples": [
  10159. {
  10160. "lang": "js",
  10161. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.active({\n ...\n})"
  10162. }
  10163. ]
  10164. }
  10165. },
  10166. "/api/session/{sessionID}": {
  10167. "get": {
  10168. "tags": ["sessions"],
  10169. "operationId": "v2.session.get",
  10170. "parameters": [
  10171. {
  10172. "name": "sessionID",
  10173. "in": "path",
  10174. "schema": {
  10175. "type": "string",
  10176. "pattern": "^ses"
  10177. },
  10178. "required": true
  10179. }
  10180. ],
  10181. "security": [],
  10182. "responses": {
  10183. "200": {
  10184. "description": "Success",
  10185. "content": {
  10186. "application/json": {
  10187. "schema": {
  10188. "type": "object",
  10189. "properties": {
  10190. "data": {
  10191. "$ref": "#/components/schemas/SessionV2Info"
  10192. }
  10193. },
  10194. "required": ["data"],
  10195. "additionalProperties": false
  10196. }
  10197. }
  10198. }
  10199. },
  10200. "400": {
  10201. "description": "InvalidRequestError",
  10202. "content": {
  10203. "application/json": {
  10204. "schema": {
  10205. "$ref": "#/components/schemas/InvalidRequestError"
  10206. }
  10207. }
  10208. }
  10209. },
  10210. "401": {
  10211. "description": "UnauthorizedError",
  10212. "content": {
  10213. "application/json": {
  10214. "schema": {
  10215. "$ref": "#/components/schemas/UnauthorizedError"
  10216. }
  10217. }
  10218. }
  10219. },
  10220. "404": {
  10221. "description": "SessionNotFoundError",
  10222. "content": {
  10223. "application/json": {
  10224. "schema": {
  10225. "anyOf": [
  10226. {
  10227. "$ref": "#/components/schemas/SessionNotFoundError"
  10228. },
  10229. {
  10230. "$ref": "#/components/schemas/SessionNotFoundError"
  10231. }
  10232. ]
  10233. }
  10234. }
  10235. }
  10236. }
  10237. },
  10238. "description": "Retrieve a session by ID.",
  10239. "summary": "Get session",
  10240. "x-codeSamples": [
  10241. {
  10242. "lang": "js",
  10243. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10244. }
  10245. ]
  10246. }
  10247. },
  10248. "/api/session/{sessionID}/agent": {
  10249. "post": {
  10250. "tags": ["sessions"],
  10251. "operationId": "v2.session.switchAgent",
  10252. "parameters": [
  10253. {
  10254. "name": "sessionID",
  10255. "in": "path",
  10256. "schema": {
  10257. "type": "string",
  10258. "pattern": "^ses"
  10259. },
  10260. "required": true
  10261. }
  10262. ],
  10263. "security": [],
  10264. "responses": {
  10265. "204": {
  10266. "description": "<No Content>"
  10267. },
  10268. "400": {
  10269. "description": "InvalidRequestError",
  10270. "content": {
  10271. "application/json": {
  10272. "schema": {
  10273. "$ref": "#/components/schemas/InvalidRequestError"
  10274. }
  10275. }
  10276. }
  10277. },
  10278. "401": {
  10279. "description": "UnauthorizedError",
  10280. "content": {
  10281. "application/json": {
  10282. "schema": {
  10283. "$ref": "#/components/schemas/UnauthorizedError"
  10284. }
  10285. }
  10286. }
  10287. },
  10288. "404": {
  10289. "description": "SessionNotFoundError",
  10290. "content": {
  10291. "application/json": {
  10292. "schema": {
  10293. "anyOf": [
  10294. {
  10295. "$ref": "#/components/schemas/SessionNotFoundError"
  10296. },
  10297. {
  10298. "$ref": "#/components/schemas/SessionNotFoundError"
  10299. }
  10300. ]
  10301. }
  10302. }
  10303. }
  10304. }
  10305. },
  10306. "description": "Switch the agent used by subsequent provider turns.",
  10307. "summary": "Switch session agent",
  10308. "requestBody": {
  10309. "content": {
  10310. "application/json": {
  10311. "schema": {
  10312. "type": "object",
  10313. "properties": {
  10314. "agent": {
  10315. "type": "string"
  10316. }
  10317. },
  10318. "required": ["agent"],
  10319. "additionalProperties": false
  10320. }
  10321. }
  10322. },
  10323. "required": true
  10324. },
  10325. "x-codeSamples": [
  10326. {
  10327. "lang": "js",
  10328. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10329. }
  10330. ]
  10331. }
  10332. },
  10333. "/api/session/{sessionID}/model": {
  10334. "post": {
  10335. "tags": ["sessions"],
  10336. "operationId": "v2.session.switchModel",
  10337. "parameters": [
  10338. {
  10339. "name": "sessionID",
  10340. "in": "path",
  10341. "schema": {
  10342. "type": "string",
  10343. "pattern": "^ses"
  10344. },
  10345. "required": true
  10346. }
  10347. ],
  10348. "security": [],
  10349. "responses": {
  10350. "204": {
  10351. "description": "<No Content>"
  10352. },
  10353. "400": {
  10354. "description": "InvalidRequestError",
  10355. "content": {
  10356. "application/json": {
  10357. "schema": {
  10358. "$ref": "#/components/schemas/InvalidRequestError"
  10359. }
  10360. }
  10361. }
  10362. },
  10363. "401": {
  10364. "description": "UnauthorizedError",
  10365. "content": {
  10366. "application/json": {
  10367. "schema": {
  10368. "$ref": "#/components/schemas/UnauthorizedError"
  10369. }
  10370. }
  10371. }
  10372. },
  10373. "404": {
  10374. "description": "SessionNotFoundError",
  10375. "content": {
  10376. "application/json": {
  10377. "schema": {
  10378. "anyOf": [
  10379. {
  10380. "$ref": "#/components/schemas/SessionNotFoundError"
  10381. },
  10382. {
  10383. "$ref": "#/components/schemas/SessionNotFoundError"
  10384. }
  10385. ]
  10386. }
  10387. }
  10388. }
  10389. }
  10390. },
  10391. "description": "Switch the model used by subsequent provider turns.",
  10392. "summary": "Switch session model",
  10393. "requestBody": {
  10394. "content": {
  10395. "application/json": {
  10396. "schema": {
  10397. "type": "object",
  10398. "properties": {
  10399. "model": {
  10400. "$ref": "#/components/schemas/ModelRef"
  10401. }
  10402. },
  10403. "required": ["model"],
  10404. "additionalProperties": false
  10405. }
  10406. }
  10407. },
  10408. "required": true
  10409. },
  10410. "x-codeSamples": [
  10411. {
  10412. "lang": "js",
  10413. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10414. }
  10415. ]
  10416. }
  10417. },
  10418. "/api/session/{sessionID}/prompt": {
  10419. "post": {
  10420. "tags": ["sessions"],
  10421. "operationId": "v2.session.prompt",
  10422. "parameters": [
  10423. {
  10424. "name": "sessionID",
  10425. "in": "path",
  10426. "schema": {
  10427. "type": "string",
  10428. "pattern": "^ses"
  10429. },
  10430. "required": true
  10431. }
  10432. ],
  10433. "security": [],
  10434. "responses": {
  10435. "200": {
  10436. "description": "Success",
  10437. "content": {
  10438. "application/json": {
  10439. "schema": {
  10440. "type": "object",
  10441. "properties": {
  10442. "data": {
  10443. "$ref": "#/components/schemas/SessionInputAdmitted"
  10444. }
  10445. },
  10446. "required": ["data"],
  10447. "additionalProperties": false
  10448. }
  10449. }
  10450. }
  10451. },
  10452. "400": {
  10453. "description": "InvalidRequestError",
  10454. "content": {
  10455. "application/json": {
  10456. "schema": {
  10457. "$ref": "#/components/schemas/InvalidRequestError"
  10458. }
  10459. }
  10460. }
  10461. },
  10462. "401": {
  10463. "description": "UnauthorizedError",
  10464. "content": {
  10465. "application/json": {
  10466. "schema": {
  10467. "$ref": "#/components/schemas/UnauthorizedError"
  10468. }
  10469. }
  10470. }
  10471. },
  10472. "404": {
  10473. "description": "SessionNotFoundError",
  10474. "content": {
  10475. "application/json": {
  10476. "schema": {
  10477. "anyOf": [
  10478. {
  10479. "$ref": "#/components/schemas/SessionNotFoundError"
  10480. },
  10481. {
  10482. "$ref": "#/components/schemas/SessionNotFoundError"
  10483. }
  10484. ]
  10485. }
  10486. }
  10487. }
  10488. },
  10489. "409": {
  10490. "description": "ConflictError",
  10491. "content": {
  10492. "application/json": {
  10493. "schema": {
  10494. "$ref": "#/components/schemas/ConflictError"
  10495. }
  10496. }
  10497. }
  10498. }
  10499. },
  10500. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10501. "summary": "Send message",
  10502. "requestBody": {
  10503. "content": {
  10504. "application/json": {
  10505. "schema": {
  10506. "type": "object",
  10507. "properties": {
  10508. "id": {
  10509. "type": "string",
  10510. "pattern": "^msg_"
  10511. },
  10512. "prompt": {
  10513. "$ref": "#/components/schemas/PromptInput"
  10514. },
  10515. "delivery": {
  10516. "type": "string",
  10517. "enum": ["steer", "queue"]
  10518. },
  10519. "resume": {
  10520. "type": "boolean"
  10521. }
  10522. },
  10523. "required": ["prompt"],
  10524. "additionalProperties": false
  10525. }
  10526. }
  10527. },
  10528. "required": true
  10529. },
  10530. "x-codeSamples": [
  10531. {
  10532. "lang": "js",
  10533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10534. }
  10535. ]
  10536. }
  10537. },
  10538. "/api/session/{sessionID}/compact": {
  10539. "post": {
  10540. "tags": ["sessions"],
  10541. "operationId": "v2.session.compact",
  10542. "parameters": [
  10543. {
  10544. "name": "sessionID",
  10545. "in": "path",
  10546. "schema": {
  10547. "type": "string",
  10548. "pattern": "^ses"
  10549. },
  10550. "required": true
  10551. }
  10552. ],
  10553. "security": [],
  10554. "responses": {
  10555. "204": {
  10556. "description": "<No Content>"
  10557. },
  10558. "400": {
  10559. "description": "InvalidRequestError",
  10560. "content": {
  10561. "application/json": {
  10562. "schema": {
  10563. "$ref": "#/components/schemas/InvalidRequestError"
  10564. }
  10565. }
  10566. }
  10567. },
  10568. "401": {
  10569. "description": "UnauthorizedError",
  10570. "content": {
  10571. "application/json": {
  10572. "schema": {
  10573. "$ref": "#/components/schemas/UnauthorizedError"
  10574. }
  10575. }
  10576. }
  10577. },
  10578. "404": {
  10579. "description": "SessionNotFoundError",
  10580. "content": {
  10581. "application/json": {
  10582. "schema": {
  10583. "anyOf": [
  10584. {
  10585. "$ref": "#/components/schemas/SessionNotFoundError"
  10586. },
  10587. {
  10588. "$ref": "#/components/schemas/SessionNotFoundError"
  10589. }
  10590. ]
  10591. }
  10592. }
  10593. }
  10594. },
  10595. "503": {
  10596. "description": "ServiceUnavailableError",
  10597. "content": {
  10598. "application/json": {
  10599. "schema": {
  10600. "$ref": "#/components/schemas/ServiceUnavailableError"
  10601. }
  10602. }
  10603. }
  10604. }
  10605. },
  10606. "description": "Compact a session conversation.",
  10607. "summary": "Compact session",
  10608. "x-codeSamples": [
  10609. {
  10610. "lang": "js",
  10611. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10612. }
  10613. ]
  10614. }
  10615. },
  10616. "/api/session/{sessionID}/wait": {
  10617. "post": {
  10618. "tags": ["sessions"],
  10619. "operationId": "v2.session.wait",
  10620. "parameters": [
  10621. {
  10622. "name": "sessionID",
  10623. "in": "path",
  10624. "schema": {
  10625. "type": "string",
  10626. "pattern": "^ses"
  10627. },
  10628. "required": true
  10629. }
  10630. ],
  10631. "security": [],
  10632. "responses": {
  10633. "204": {
  10634. "description": "<No Content>"
  10635. },
  10636. "400": {
  10637. "description": "InvalidRequestError",
  10638. "content": {
  10639. "application/json": {
  10640. "schema": {
  10641. "$ref": "#/components/schemas/InvalidRequestError"
  10642. }
  10643. }
  10644. }
  10645. },
  10646. "401": {
  10647. "description": "UnauthorizedError",
  10648. "content": {
  10649. "application/json": {
  10650. "schema": {
  10651. "$ref": "#/components/schemas/UnauthorizedError"
  10652. }
  10653. }
  10654. }
  10655. },
  10656. "404": {
  10657. "description": "SessionNotFoundError",
  10658. "content": {
  10659. "application/json": {
  10660. "schema": {
  10661. "anyOf": [
  10662. {
  10663. "$ref": "#/components/schemas/SessionNotFoundError"
  10664. },
  10665. {
  10666. "$ref": "#/components/schemas/SessionNotFoundError"
  10667. }
  10668. ]
  10669. }
  10670. }
  10671. }
  10672. },
  10673. "503": {
  10674. "description": "ServiceUnavailableError",
  10675. "content": {
  10676. "application/json": {
  10677. "schema": {
  10678. "$ref": "#/components/schemas/ServiceUnavailableError"
  10679. }
  10680. }
  10681. }
  10682. }
  10683. },
  10684. "description": "Wait for a session agent loop to become idle.",
  10685. "summary": "Wait for session",
  10686. "x-codeSamples": [
  10687. {
  10688. "lang": "js",
  10689. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10690. }
  10691. ]
  10692. }
  10693. },
  10694. "/api/session/{sessionID}/revert/stage": {
  10695. "post": {
  10696. "tags": ["sessions"],
  10697. "operationId": "v2.session.revert.stage",
  10698. "parameters": [
  10699. {
  10700. "name": "sessionID",
  10701. "in": "path",
  10702. "schema": {
  10703. "type": "string",
  10704. "pattern": "^ses"
  10705. },
  10706. "required": true
  10707. }
  10708. ],
  10709. "security": [],
  10710. "responses": {
  10711. "200": {
  10712. "description": "Success",
  10713. "content": {
  10714. "application/json": {
  10715. "schema": {
  10716. "type": "object",
  10717. "properties": {
  10718. "data": {
  10719. "$ref": "#/components/schemas/RevertState"
  10720. }
  10721. },
  10722. "required": ["data"],
  10723. "additionalProperties": false
  10724. }
  10725. }
  10726. }
  10727. },
  10728. "400": {
  10729. "description": "InvalidRequestError",
  10730. "content": {
  10731. "application/json": {
  10732. "schema": {
  10733. "$ref": "#/components/schemas/InvalidRequestError"
  10734. }
  10735. }
  10736. }
  10737. },
  10738. "401": {
  10739. "description": "UnauthorizedError",
  10740. "content": {
  10741. "application/json": {
  10742. "schema": {
  10743. "$ref": "#/components/schemas/UnauthorizedError"
  10744. }
  10745. }
  10746. }
  10747. },
  10748. "404": {
  10749. "description": "MessageNotFoundError | SessionNotFoundError",
  10750. "content": {
  10751. "application/json": {
  10752. "schema": {
  10753. "anyOf": [
  10754. {
  10755. "$ref": "#/components/schemas/MessageNotFoundError"
  10756. },
  10757. {
  10758. "$ref": "#/components/schemas/SessionNotFoundError"
  10759. },
  10760. {
  10761. "$ref": "#/components/schemas/SessionNotFoundError"
  10762. }
  10763. ]
  10764. }
  10765. }
  10766. }
  10767. },
  10768. "500": {
  10769. "description": "UnknownError",
  10770. "content": {
  10771. "application/json": {
  10772. "schema": {
  10773. "$ref": "#/components/schemas/UnknownError1"
  10774. }
  10775. }
  10776. }
  10777. }
  10778. },
  10779. "description": "Stage or move a reversible session boundary and optionally apply its file changes.",
  10780. "summary": "Stage session revert",
  10781. "requestBody": {
  10782. "content": {
  10783. "application/json": {
  10784. "schema": {
  10785. "type": "object",
  10786. "properties": {
  10787. "messageID": {
  10788. "type": "string",
  10789. "pattern": "^msg_"
  10790. },
  10791. "files": {
  10792. "type": "boolean"
  10793. }
  10794. },
  10795. "required": ["messageID"],
  10796. "additionalProperties": false
  10797. }
  10798. }
  10799. },
  10800. "required": true
  10801. },
  10802. "x-codeSamples": [
  10803. {
  10804. "lang": "js",
  10805. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.stage({\n ...\n})"
  10806. }
  10807. ]
  10808. }
  10809. },
  10810. "/api/session/{sessionID}/revert/clear": {
  10811. "post": {
  10812. "tags": ["sessions"],
  10813. "operationId": "v2.session.revert.clear",
  10814. "parameters": [
  10815. {
  10816. "name": "sessionID",
  10817. "in": "path",
  10818. "schema": {
  10819. "type": "string",
  10820. "pattern": "^ses"
  10821. },
  10822. "required": true
  10823. }
  10824. ],
  10825. "security": [],
  10826. "responses": {
  10827. "204": {
  10828. "description": "<No Content>"
  10829. },
  10830. "400": {
  10831. "description": "InvalidRequestError",
  10832. "content": {
  10833. "application/json": {
  10834. "schema": {
  10835. "$ref": "#/components/schemas/InvalidRequestError"
  10836. }
  10837. }
  10838. }
  10839. },
  10840. "401": {
  10841. "description": "UnauthorizedError",
  10842. "content": {
  10843. "application/json": {
  10844. "schema": {
  10845. "$ref": "#/components/schemas/UnauthorizedError"
  10846. }
  10847. }
  10848. }
  10849. },
  10850. "404": {
  10851. "description": "SessionNotFoundError",
  10852. "content": {
  10853. "application/json": {
  10854. "schema": {
  10855. "anyOf": [
  10856. {
  10857. "$ref": "#/components/schemas/SessionNotFoundError"
  10858. },
  10859. {
  10860. "$ref": "#/components/schemas/SessionNotFoundError"
  10861. }
  10862. ]
  10863. }
  10864. }
  10865. }
  10866. },
  10867. "500": {
  10868. "description": "UnknownError",
  10869. "content": {
  10870. "application/json": {
  10871. "schema": {
  10872. "$ref": "#/components/schemas/UnknownError1"
  10873. }
  10874. }
  10875. }
  10876. }
  10877. },
  10878. "summary": "Clear staged revert",
  10879. "x-codeSamples": [
  10880. {
  10881. "lang": "js",
  10882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.clear({\n ...\n})"
  10883. }
  10884. ]
  10885. }
  10886. },
  10887. "/api/session/{sessionID}/revert/commit": {
  10888. "post": {
  10889. "tags": ["sessions"],
  10890. "operationId": "v2.session.revert.commit",
  10891. "parameters": [
  10892. {
  10893. "name": "sessionID",
  10894. "in": "path",
  10895. "schema": {
  10896. "type": "string",
  10897. "pattern": "^ses"
  10898. },
  10899. "required": true
  10900. }
  10901. ],
  10902. "security": [],
  10903. "responses": {
  10904. "204": {
  10905. "description": "<No Content>"
  10906. },
  10907. "400": {
  10908. "description": "InvalidRequestError",
  10909. "content": {
  10910. "application/json": {
  10911. "schema": {
  10912. "$ref": "#/components/schemas/InvalidRequestError"
  10913. }
  10914. }
  10915. }
  10916. },
  10917. "401": {
  10918. "description": "UnauthorizedError",
  10919. "content": {
  10920. "application/json": {
  10921. "schema": {
  10922. "$ref": "#/components/schemas/UnauthorizedError"
  10923. }
  10924. }
  10925. }
  10926. },
  10927. "404": {
  10928. "description": "SessionNotFoundError",
  10929. "content": {
  10930. "application/json": {
  10931. "schema": {
  10932. "anyOf": [
  10933. {
  10934. "$ref": "#/components/schemas/SessionNotFoundError"
  10935. },
  10936. {
  10937. "$ref": "#/components/schemas/SessionNotFoundError"
  10938. }
  10939. ]
  10940. }
  10941. }
  10942. }
  10943. }
  10944. },
  10945. "summary": "Commit staged revert",
  10946. "x-codeSamples": [
  10947. {
  10948. "lang": "js",
  10949. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.commit({\n ...\n})"
  10950. }
  10951. ]
  10952. }
  10953. },
  10954. "/api/session/{sessionID}/context": {
  10955. "get": {
  10956. "tags": ["sessions"],
  10957. "operationId": "v2.session.context",
  10958. "parameters": [
  10959. {
  10960. "name": "sessionID",
  10961. "in": "path",
  10962. "schema": {
  10963. "type": "string",
  10964. "pattern": "^ses"
  10965. },
  10966. "required": true
  10967. }
  10968. ],
  10969. "security": [],
  10970. "responses": {
  10971. "200": {
  10972. "description": "Success",
  10973. "content": {
  10974. "application/json": {
  10975. "schema": {
  10976. "type": "object",
  10977. "properties": {
  10978. "data": {
  10979. "type": "array",
  10980. "items": {
  10981. "$ref": "#/components/schemas/SessionMessage"
  10982. }
  10983. }
  10984. },
  10985. "required": ["data"],
  10986. "additionalProperties": false
  10987. }
  10988. }
  10989. }
  10990. },
  10991. "400": {
  10992. "description": "InvalidRequestError",
  10993. "content": {
  10994. "application/json": {
  10995. "schema": {
  10996. "$ref": "#/components/schemas/InvalidRequestError"
  10997. }
  10998. }
  10999. }
  11000. },
  11001. "401": {
  11002. "description": "UnauthorizedError",
  11003. "content": {
  11004. "application/json": {
  11005. "schema": {
  11006. "$ref": "#/components/schemas/UnauthorizedError"
  11007. }
  11008. }
  11009. }
  11010. },
  11011. "404": {
  11012. "description": "SessionNotFoundError",
  11013. "content": {
  11014. "application/json": {
  11015. "schema": {
  11016. "anyOf": [
  11017. {
  11018. "$ref": "#/components/schemas/SessionNotFoundError"
  11019. },
  11020. {
  11021. "$ref": "#/components/schemas/SessionNotFoundError"
  11022. }
  11023. ]
  11024. }
  11025. }
  11026. }
  11027. },
  11028. "500": {
  11029. "description": "UnknownError",
  11030. "content": {
  11031. "application/json": {
  11032. "schema": {
  11033. "$ref": "#/components/schemas/UnknownError1"
  11034. }
  11035. }
  11036. }
  11037. }
  11038. },
  11039. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  11040. "summary": "Get session context",
  11041. "x-codeSamples": [
  11042. {
  11043. "lang": "js",
  11044. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  11045. }
  11046. ]
  11047. }
  11048. },
  11049. "/api/session/{sessionID}/history": {
  11050. "get": {
  11051. "tags": ["sessions"],
  11052. "operationId": "v2.session.history",
  11053. "parameters": [
  11054. {
  11055. "name": "sessionID",
  11056. "in": "path",
  11057. "schema": {
  11058. "type": "string",
  11059. "pattern": "^ses"
  11060. },
  11061. "required": true
  11062. },
  11063. {
  11064. "name": "limit",
  11065. "in": "query",
  11066. "schema": {
  11067. "type": "string"
  11068. },
  11069. "required": false
  11070. },
  11071. {
  11072. "name": "after",
  11073. "in": "query",
  11074. "schema": {
  11075. "type": "string"
  11076. },
  11077. "required": false
  11078. }
  11079. ],
  11080. "security": [],
  11081. "responses": {
  11082. "200": {
  11083. "description": "SessionHistory",
  11084. "content": {
  11085. "application/json": {
  11086. "schema": {
  11087. "$ref": "#/components/schemas/SessionHistory"
  11088. }
  11089. }
  11090. }
  11091. },
  11092. "400": {
  11093. "description": "InvalidRequestError",
  11094. "content": {
  11095. "application/json": {
  11096. "schema": {
  11097. "$ref": "#/components/schemas/InvalidRequestError"
  11098. }
  11099. }
  11100. }
  11101. },
  11102. "401": {
  11103. "description": "UnauthorizedError",
  11104. "content": {
  11105. "application/json": {
  11106. "schema": {
  11107. "$ref": "#/components/schemas/UnauthorizedError"
  11108. }
  11109. }
  11110. }
  11111. },
  11112. "404": {
  11113. "description": "SessionNotFoundError",
  11114. "content": {
  11115. "application/json": {
  11116. "schema": {
  11117. "anyOf": [
  11118. {
  11119. "$ref": "#/components/schemas/SessionNotFoundError"
  11120. },
  11121. {
  11122. "$ref": "#/components/schemas/SessionNotFoundError"
  11123. }
  11124. ]
  11125. }
  11126. }
  11127. }
  11128. }
  11129. },
  11130. "description": "Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.",
  11131. "summary": "Get session history",
  11132. "x-codeSamples": [
  11133. {
  11134. "lang": "js",
  11135. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.history({\n ...\n})"
  11136. }
  11137. ]
  11138. }
  11139. },
  11140. "/api/session/{sessionID}/event": {
  11141. "get": {
  11142. "tags": ["sessions"],
  11143. "operationId": "v2.session.events",
  11144. "parameters": [
  11145. {
  11146. "name": "sessionID",
  11147. "in": "path",
  11148. "schema": {
  11149. "type": "string",
  11150. "pattern": "^ses"
  11151. },
  11152. "required": true
  11153. },
  11154. {
  11155. "name": "after",
  11156. "in": "query",
  11157. "schema": {
  11158. "type": "string"
  11159. },
  11160. "required": false
  11161. }
  11162. ],
  11163. "security": [],
  11164. "responses": {
  11165. "200": {
  11166. "description": "Success",
  11167. "content": {
  11168. "text/event-stream": {
  11169. "schema": {
  11170. "type": "object",
  11171. "properties": {
  11172. "id": {
  11173. "type": "string"
  11174. },
  11175. "event": {
  11176. "type": "string"
  11177. },
  11178. "data": {
  11179. "$ref": "#/components/schemas/SessionDurableEventStream"
  11180. }
  11181. },
  11182. "required": ["id", "event", "data"],
  11183. "additionalProperties": false
  11184. },
  11185. "x-effect-stream": {
  11186. "encoding": "sse",
  11187. "causeSchema": {
  11188. "type": "array",
  11189. "items": {
  11190. "anyOf": [
  11191. {
  11192. "type": "object",
  11193. "properties": {
  11194. "_tag": {
  11195. "type": "string",
  11196. "enum": ["Fail"]
  11197. },
  11198. "error": {
  11199. "not": {}
  11200. }
  11201. },
  11202. "required": ["_tag", "error"],
  11203. "additionalProperties": false
  11204. },
  11205. {
  11206. "type": "object",
  11207. "properties": {
  11208. "_tag": {
  11209. "type": "string",
  11210. "enum": ["Die"]
  11211. },
  11212. "defect": {}
  11213. },
  11214. "required": ["_tag", "defect"],
  11215. "additionalProperties": false
  11216. },
  11217. {
  11218. "type": "object",
  11219. "properties": {
  11220. "_tag": {
  11221. "type": "string",
  11222. "enum": ["Interrupt"]
  11223. },
  11224. "fiberId": {
  11225. "anyOf": [
  11226. {
  11227. "type": "number"
  11228. },
  11229. {
  11230. "type": "null"
  11231. }
  11232. ]
  11233. }
  11234. },
  11235. "required": ["_tag", "fiberId"],
  11236. "additionalProperties": false
  11237. }
  11238. ]
  11239. }
  11240. },
  11241. "errorSchema": {
  11242. "not": {}
  11243. },
  11244. "failureEvent": "effect/httpapi/stream/failure"
  11245. }
  11246. }
  11247. }
  11248. },
  11249. "400": {
  11250. "description": "InvalidRequestError",
  11251. "content": {
  11252. "application/json": {
  11253. "schema": {
  11254. "$ref": "#/components/schemas/InvalidRequestError"
  11255. }
  11256. }
  11257. }
  11258. },
  11259. "401": {
  11260. "description": "UnauthorizedError",
  11261. "content": {
  11262. "application/json": {
  11263. "schema": {
  11264. "$ref": "#/components/schemas/UnauthorizedError"
  11265. }
  11266. }
  11267. }
  11268. },
  11269. "404": {
  11270. "description": "SessionNotFoundError",
  11271. "content": {
  11272. "application/json": {
  11273. "schema": {
  11274. "anyOf": [
  11275. {
  11276. "$ref": "#/components/schemas/SessionNotFoundError"
  11277. },
  11278. {
  11279. "$ref": "#/components/schemas/SessionNotFoundError"
  11280. }
  11281. ]
  11282. }
  11283. }
  11284. }
  11285. }
  11286. },
  11287. "description": "Replay durable events after an aggregate sequence, then continue with new durable events.",
  11288. "summary": "Subscribe to session events",
  11289. "x-codeSamples": [
  11290. {
  11291. "lang": "js",
  11292. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.events({\n ...\n})"
  11293. }
  11294. ]
  11295. }
  11296. },
  11297. "/api/session/{sessionID}/interrupt": {
  11298. "post": {
  11299. "tags": ["sessions"],
  11300. "operationId": "v2.session.interrupt",
  11301. "parameters": [
  11302. {
  11303. "name": "sessionID",
  11304. "in": "path",
  11305. "schema": {
  11306. "type": "string",
  11307. "pattern": "^ses"
  11308. },
  11309. "required": true
  11310. }
  11311. ],
  11312. "security": [],
  11313. "responses": {
  11314. "204": {
  11315. "description": "<No Content>"
  11316. },
  11317. "400": {
  11318. "description": "InvalidRequestError",
  11319. "content": {
  11320. "application/json": {
  11321. "schema": {
  11322. "$ref": "#/components/schemas/InvalidRequestError"
  11323. }
  11324. }
  11325. }
  11326. },
  11327. "401": {
  11328. "description": "UnauthorizedError",
  11329. "content": {
  11330. "application/json": {
  11331. "schema": {
  11332. "$ref": "#/components/schemas/UnauthorizedError"
  11333. }
  11334. }
  11335. }
  11336. },
  11337. "404": {
  11338. "description": "SessionNotFoundError",
  11339. "content": {
  11340. "application/json": {
  11341. "schema": {
  11342. "anyOf": [
  11343. {
  11344. "$ref": "#/components/schemas/SessionNotFoundError"
  11345. },
  11346. {
  11347. "$ref": "#/components/schemas/SessionNotFoundError"
  11348. }
  11349. ]
  11350. }
  11351. }
  11352. }
  11353. }
  11354. },
  11355. "description": "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.",
  11356. "summary": "Interrupt session execution",
  11357. "x-codeSamples": [
  11358. {
  11359. "lang": "js",
  11360. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.interrupt({\n ...\n})"
  11361. }
  11362. ]
  11363. }
  11364. },
  11365. "/api/session/{sessionID}/message/{messageID}": {
  11366. "get": {
  11367. "tags": ["sessions"],
  11368. "operationId": "v2.session.message",
  11369. "parameters": [
  11370. {
  11371. "name": "sessionID",
  11372. "in": "path",
  11373. "schema": {
  11374. "type": "string",
  11375. "pattern": "^ses"
  11376. },
  11377. "required": true
  11378. },
  11379. {
  11380. "name": "messageID",
  11381. "in": "path",
  11382. "schema": {
  11383. "type": "string",
  11384. "pattern": "^msg_"
  11385. },
  11386. "required": true
  11387. }
  11388. ],
  11389. "security": [],
  11390. "responses": {
  11391. "200": {
  11392. "description": "Success",
  11393. "content": {
  11394. "application/json": {
  11395. "schema": {
  11396. "type": "object",
  11397. "properties": {
  11398. "data": {
  11399. "$ref": "#/components/schemas/SessionMessage"
  11400. }
  11401. },
  11402. "required": ["data"],
  11403. "additionalProperties": false
  11404. }
  11405. }
  11406. }
  11407. },
  11408. "400": {
  11409. "description": "InvalidRequestError",
  11410. "content": {
  11411. "application/json": {
  11412. "schema": {
  11413. "$ref": "#/components/schemas/InvalidRequestError"
  11414. }
  11415. }
  11416. }
  11417. },
  11418. "401": {
  11419. "description": "UnauthorizedError",
  11420. "content": {
  11421. "application/json": {
  11422. "schema": {
  11423. "$ref": "#/components/schemas/UnauthorizedError"
  11424. }
  11425. }
  11426. }
  11427. },
  11428. "404": {
  11429. "description": "SessionNotFoundError | MessageNotFoundError",
  11430. "content": {
  11431. "application/json": {
  11432. "schema": {
  11433. "anyOf": [
  11434. {
  11435. "$ref": "#/components/schemas/MessageNotFoundError"
  11436. },
  11437. {
  11438. "$ref": "#/components/schemas/SessionNotFoundError"
  11439. },
  11440. {
  11441. "$ref": "#/components/schemas/SessionNotFoundError"
  11442. }
  11443. ]
  11444. }
  11445. }
  11446. }
  11447. }
  11448. },
  11449. "description": "Retrieve one projected message owned by the Session.",
  11450. "summary": "Get session message",
  11451. "x-codeSamples": [
  11452. {
  11453. "lang": "js",
  11454. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.message({\n ...\n})"
  11455. }
  11456. ]
  11457. }
  11458. },
  11459. "/api/session/{sessionID}/message": {
  11460. "get": {
  11461. "tags": ["messages"],
  11462. "operationId": "v2.session.messages",
  11463. "parameters": [
  11464. {
  11465. "name": "sessionID",
  11466. "in": "path",
  11467. "schema": {
  11468. "type": "string",
  11469. "pattern": "^ses"
  11470. },
  11471. "required": true
  11472. },
  11473. {
  11474. "name": "limit",
  11475. "in": "query",
  11476. "schema": {
  11477. "type": "number"
  11478. },
  11479. "required": false
  11480. },
  11481. {
  11482. "name": "order",
  11483. "in": "query",
  11484. "schema": {
  11485. "type": "string",
  11486. "enum": ["asc", "desc"]
  11487. },
  11488. "required": false
  11489. },
  11490. {
  11491. "name": "cursor",
  11492. "in": "query",
  11493. "schema": {
  11494. "type": "string",
  11495. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  11496. },
  11497. "required": false
  11498. }
  11499. ],
  11500. "security": [],
  11501. "responses": {
  11502. "200": {
  11503. "description": "SessionMessagesResponse",
  11504. "content": {
  11505. "application/json": {
  11506. "schema": {
  11507. "$ref": "#/components/schemas/SessionMessagesResponse"
  11508. }
  11509. }
  11510. }
  11511. },
  11512. "400": {
  11513. "description": "InvalidCursorError | InvalidRequestError",
  11514. "content": {
  11515. "application/json": {
  11516. "schema": {
  11517. "anyOf": [
  11518. {
  11519. "$ref": "#/components/schemas/InvalidCursorError"
  11520. },
  11521. {
  11522. "$ref": "#/components/schemas/InvalidRequestError"
  11523. }
  11524. ]
  11525. }
  11526. }
  11527. }
  11528. },
  11529. "401": {
  11530. "description": "UnauthorizedError",
  11531. "content": {
  11532. "application/json": {
  11533. "schema": {
  11534. "$ref": "#/components/schemas/UnauthorizedError"
  11535. }
  11536. }
  11537. }
  11538. },
  11539. "404": {
  11540. "description": "SessionNotFoundError",
  11541. "content": {
  11542. "application/json": {
  11543. "schema": {
  11544. "anyOf": [
  11545. {
  11546. "$ref": "#/components/schemas/SessionNotFoundError"
  11547. },
  11548. {
  11549. "$ref": "#/components/schemas/SessionNotFoundError"
  11550. }
  11551. ]
  11552. }
  11553. }
  11554. }
  11555. },
  11556. "500": {
  11557. "description": "UnknownError",
  11558. "content": {
  11559. "application/json": {
  11560. "schema": {
  11561. "$ref": "#/components/schemas/UnknownError1"
  11562. }
  11563. }
  11564. }
  11565. }
  11566. },
  11567. "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.",
  11568. "summary": "Get session messages",
  11569. "x-codeSamples": [
  11570. {
  11571. "lang": "js",
  11572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  11573. }
  11574. ]
  11575. }
  11576. },
  11577. "/api/model": {
  11578. "get": {
  11579. "tags": ["models"],
  11580. "operationId": "v2.model.list",
  11581. "parameters": [
  11582. {
  11583. "name": "location",
  11584. "in": "query",
  11585. "schema": {
  11586. "type": "object",
  11587. "properties": {
  11588. "directory": {
  11589. "type": "string"
  11590. },
  11591. "workspace": {
  11592. "type": "string"
  11593. }
  11594. },
  11595. "additionalProperties": false
  11596. },
  11597. "required": false,
  11598. "style": "deepObject",
  11599. "explode": true
  11600. }
  11601. ],
  11602. "security": [],
  11603. "responses": {
  11604. "200": {
  11605. "description": "Success",
  11606. "content": {
  11607. "application/json": {
  11608. "schema": {
  11609. "type": "object",
  11610. "properties": {
  11611. "location": {
  11612. "$ref": "#/components/schemas/LocationInfo"
  11613. },
  11614. "data": {
  11615. "type": "array",
  11616. "items": {
  11617. "$ref": "#/components/schemas/ModelV2Info"
  11618. }
  11619. }
  11620. },
  11621. "required": ["location", "data"],
  11622. "additionalProperties": false
  11623. }
  11624. }
  11625. }
  11626. },
  11627. "400": {
  11628. "description": "InvalidRequestError",
  11629. "content": {
  11630. "application/json": {
  11631. "schema": {
  11632. "$ref": "#/components/schemas/InvalidRequestError"
  11633. }
  11634. }
  11635. }
  11636. },
  11637. "401": {
  11638. "description": "UnauthorizedError",
  11639. "content": {
  11640. "application/json": {
  11641. "schema": {
  11642. "$ref": "#/components/schemas/UnauthorizedError"
  11643. }
  11644. }
  11645. }
  11646. },
  11647. "503": {
  11648. "description": "ServiceUnavailableError",
  11649. "content": {
  11650. "application/json": {
  11651. "schema": {
  11652. "$ref": "#/components/schemas/ServiceUnavailableError"
  11653. }
  11654. }
  11655. }
  11656. }
  11657. },
  11658. "description": "Retrieve available models ordered by release date.",
  11659. "summary": "List models",
  11660. "x-codeSamples": [
  11661. {
  11662. "lang": "js",
  11663. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11664. }
  11665. ]
  11666. }
  11667. },
  11668. "/api/provider": {
  11669. "get": {
  11670. "tags": ["providers"],
  11671. "operationId": "v2.provider.list",
  11672. "parameters": [
  11673. {
  11674. "name": "location",
  11675. "in": "query",
  11676. "schema": {
  11677. "type": "object",
  11678. "properties": {
  11679. "directory": {
  11680. "type": "string"
  11681. },
  11682. "workspace": {
  11683. "type": "string"
  11684. }
  11685. },
  11686. "additionalProperties": false
  11687. },
  11688. "required": false,
  11689. "style": "deepObject",
  11690. "explode": true
  11691. }
  11692. ],
  11693. "security": [],
  11694. "responses": {
  11695. "200": {
  11696. "description": "Success",
  11697. "content": {
  11698. "application/json": {
  11699. "schema": {
  11700. "type": "object",
  11701. "properties": {
  11702. "location": {
  11703. "$ref": "#/components/schemas/LocationInfo"
  11704. },
  11705. "data": {
  11706. "type": "array",
  11707. "items": {
  11708. "$ref": "#/components/schemas/ProviderV2Info"
  11709. }
  11710. }
  11711. },
  11712. "required": ["location", "data"],
  11713. "additionalProperties": false
  11714. }
  11715. }
  11716. }
  11717. },
  11718. "400": {
  11719. "description": "InvalidRequestError",
  11720. "content": {
  11721. "application/json": {
  11722. "schema": {
  11723. "$ref": "#/components/schemas/InvalidRequestError"
  11724. }
  11725. }
  11726. }
  11727. },
  11728. "401": {
  11729. "description": "UnauthorizedError",
  11730. "content": {
  11731. "application/json": {
  11732. "schema": {
  11733. "$ref": "#/components/schemas/UnauthorizedError"
  11734. }
  11735. }
  11736. }
  11737. },
  11738. "503": {
  11739. "description": "ServiceUnavailableError",
  11740. "content": {
  11741. "application/json": {
  11742. "schema": {
  11743. "$ref": "#/components/schemas/ServiceUnavailableError"
  11744. }
  11745. }
  11746. }
  11747. }
  11748. },
  11749. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11750. "summary": "List providers",
  11751. "x-codeSamples": [
  11752. {
  11753. "lang": "js",
  11754. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11755. }
  11756. ]
  11757. }
  11758. },
  11759. "/api/provider/{providerID}": {
  11760. "get": {
  11761. "tags": ["providers"],
  11762. "operationId": "v2.provider.get",
  11763. "parameters": [
  11764. {
  11765. "name": "providerID",
  11766. "in": "path",
  11767. "schema": {
  11768. "type": "string"
  11769. },
  11770. "required": true
  11771. },
  11772. {
  11773. "name": "location",
  11774. "in": "query",
  11775. "schema": {
  11776. "type": "object",
  11777. "properties": {
  11778. "directory": {
  11779. "type": "string"
  11780. },
  11781. "workspace": {
  11782. "type": "string"
  11783. }
  11784. },
  11785. "additionalProperties": false
  11786. },
  11787. "required": false,
  11788. "style": "deepObject",
  11789. "explode": true
  11790. }
  11791. ],
  11792. "security": [],
  11793. "responses": {
  11794. "200": {
  11795. "description": "Success",
  11796. "content": {
  11797. "application/json": {
  11798. "schema": {
  11799. "type": "object",
  11800. "properties": {
  11801. "location": {
  11802. "$ref": "#/components/schemas/LocationInfo"
  11803. },
  11804. "data": {
  11805. "$ref": "#/components/schemas/ProviderV2Info"
  11806. }
  11807. },
  11808. "required": ["location", "data"],
  11809. "additionalProperties": false
  11810. }
  11811. }
  11812. }
  11813. },
  11814. "400": {
  11815. "description": "InvalidRequestError",
  11816. "content": {
  11817. "application/json": {
  11818. "schema": {
  11819. "$ref": "#/components/schemas/InvalidRequestError"
  11820. }
  11821. }
  11822. }
  11823. },
  11824. "401": {
  11825. "description": "UnauthorizedError",
  11826. "content": {
  11827. "application/json": {
  11828. "schema": {
  11829. "$ref": "#/components/schemas/UnauthorizedError"
  11830. }
  11831. }
  11832. }
  11833. },
  11834. "404": {
  11835. "description": "ProviderNotFoundError",
  11836. "content": {
  11837. "application/json": {
  11838. "schema": {
  11839. "$ref": "#/components/schemas/ProviderNotFoundError"
  11840. }
  11841. }
  11842. }
  11843. },
  11844. "503": {
  11845. "description": "ServiceUnavailableError",
  11846. "content": {
  11847. "application/json": {
  11848. "schema": {
  11849. "$ref": "#/components/schemas/ServiceUnavailableError"
  11850. }
  11851. }
  11852. }
  11853. }
  11854. },
  11855. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11856. "summary": "Get provider",
  11857. "x-codeSamples": [
  11858. {
  11859. "lang": "js",
  11860. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11861. }
  11862. ]
  11863. }
  11864. },
  11865. "/api/integration": {
  11866. "get": {
  11867. "tags": ["integrations"],
  11868. "operationId": "v2.integration.list",
  11869. "parameters": [
  11870. {
  11871. "name": "location",
  11872. "in": "query",
  11873. "schema": {
  11874. "type": "object",
  11875. "properties": {
  11876. "directory": {
  11877. "type": "string"
  11878. },
  11879. "workspace": {
  11880. "type": "string"
  11881. }
  11882. },
  11883. "additionalProperties": false
  11884. },
  11885. "required": false,
  11886. "style": "deepObject",
  11887. "explode": true
  11888. }
  11889. ],
  11890. "security": [],
  11891. "responses": {
  11892. "200": {
  11893. "description": "Success",
  11894. "content": {
  11895. "application/json": {
  11896. "schema": {
  11897. "type": "object",
  11898. "properties": {
  11899. "location": {
  11900. "$ref": "#/components/schemas/LocationInfo"
  11901. },
  11902. "data": {
  11903. "type": "array",
  11904. "items": {
  11905. "$ref": "#/components/schemas/IntegrationInfo"
  11906. }
  11907. }
  11908. },
  11909. "required": ["location", "data"],
  11910. "additionalProperties": false
  11911. }
  11912. }
  11913. }
  11914. },
  11915. "400": {
  11916. "description": "InvalidRequestError",
  11917. "content": {
  11918. "application/json": {
  11919. "schema": {
  11920. "$ref": "#/components/schemas/InvalidRequestError"
  11921. }
  11922. }
  11923. }
  11924. },
  11925. "401": {
  11926. "description": "UnauthorizedError",
  11927. "content": {
  11928. "application/json": {
  11929. "schema": {
  11930. "$ref": "#/components/schemas/UnauthorizedError"
  11931. }
  11932. }
  11933. }
  11934. }
  11935. },
  11936. "description": "Retrieve available integrations and their authentication methods.",
  11937. "summary": "List integrations",
  11938. "x-codeSamples": [
  11939. {
  11940. "lang": "js",
  11941. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11942. }
  11943. ]
  11944. }
  11945. },
  11946. "/api/integration/{integrationID}": {
  11947. "get": {
  11948. "tags": ["integrations"],
  11949. "operationId": "v2.integration.get",
  11950. "parameters": [
  11951. {
  11952. "name": "integrationID",
  11953. "in": "path",
  11954. "schema": {
  11955. "type": "string"
  11956. },
  11957. "required": true
  11958. },
  11959. {
  11960. "name": "location",
  11961. "in": "query",
  11962. "schema": {
  11963. "type": "object",
  11964. "properties": {
  11965. "directory": {
  11966. "type": "string"
  11967. },
  11968. "workspace": {
  11969. "type": "string"
  11970. }
  11971. },
  11972. "additionalProperties": false
  11973. },
  11974. "required": false,
  11975. "style": "deepObject",
  11976. "explode": true
  11977. }
  11978. ],
  11979. "security": [],
  11980. "responses": {
  11981. "200": {
  11982. "description": "Success",
  11983. "content": {
  11984. "application/json": {
  11985. "schema": {
  11986. "type": "object",
  11987. "properties": {
  11988. "location": {
  11989. "$ref": "#/components/schemas/LocationInfo"
  11990. },
  11991. "data": {
  11992. "$ref": "#/components/schemas/IntegrationInfo"
  11993. }
  11994. },
  11995. "required": ["location", "data"],
  11996. "additionalProperties": false
  11997. }
  11998. }
  11999. }
  12000. },
  12001. "400": {
  12002. "description": "InvalidRequestError",
  12003. "content": {
  12004. "application/json": {
  12005. "schema": {
  12006. "$ref": "#/components/schemas/InvalidRequestError"
  12007. }
  12008. }
  12009. }
  12010. },
  12011. "401": {
  12012. "description": "UnauthorizedError",
  12013. "content": {
  12014. "application/json": {
  12015. "schema": {
  12016. "$ref": "#/components/schemas/UnauthorizedError"
  12017. }
  12018. }
  12019. }
  12020. }
  12021. },
  12022. "description": "Retrieve one integration and its authentication methods.",
  12023. "summary": "Get integration",
  12024. "x-codeSamples": [
  12025. {
  12026. "lang": "js",
  12027. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  12028. }
  12029. ]
  12030. }
  12031. },
  12032. "/api/integration/{integrationID}/connect/key": {
  12033. "post": {
  12034. "tags": ["integrations"],
  12035. "operationId": "v2.integration.connect.key",
  12036. "parameters": [
  12037. {
  12038. "name": "integrationID",
  12039. "in": "path",
  12040. "schema": {
  12041. "type": "string"
  12042. },
  12043. "required": true
  12044. },
  12045. {
  12046. "name": "location",
  12047. "in": "query",
  12048. "schema": {
  12049. "type": "object",
  12050. "properties": {
  12051. "directory": {
  12052. "type": "string"
  12053. },
  12054. "workspace": {
  12055. "type": "string"
  12056. }
  12057. },
  12058. "additionalProperties": false
  12059. },
  12060. "required": false,
  12061. "style": "deepObject",
  12062. "explode": true
  12063. }
  12064. ],
  12065. "security": [],
  12066. "responses": {
  12067. "204": {
  12068. "description": "<No Content>"
  12069. },
  12070. "400": {
  12071. "description": "InvalidRequestError",
  12072. "content": {
  12073. "application/json": {
  12074. "schema": {
  12075. "anyOf": [
  12076. {
  12077. "$ref": "#/components/schemas/InvalidRequestError"
  12078. },
  12079. {
  12080. "$ref": "#/components/schemas/InvalidRequestError"
  12081. }
  12082. ]
  12083. }
  12084. }
  12085. }
  12086. },
  12087. "401": {
  12088. "description": "UnauthorizedError",
  12089. "content": {
  12090. "application/json": {
  12091. "schema": {
  12092. "$ref": "#/components/schemas/UnauthorizedError"
  12093. }
  12094. }
  12095. }
  12096. }
  12097. },
  12098. "description": "Run a key authentication method and store the resulting credential.",
  12099. "summary": "Connect with key",
  12100. "requestBody": {
  12101. "content": {
  12102. "application/json": {
  12103. "schema": {
  12104. "type": "object",
  12105. "properties": {
  12106. "key": {
  12107. "type": "string"
  12108. },
  12109. "label": {
  12110. "type": "string"
  12111. }
  12112. },
  12113. "required": ["key"],
  12114. "additionalProperties": false
  12115. }
  12116. }
  12117. },
  12118. "required": true
  12119. },
  12120. "x-codeSamples": [
  12121. {
  12122. "lang": "js",
  12123. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  12124. }
  12125. ]
  12126. }
  12127. },
  12128. "/api/integration/{integrationID}/connect/oauth": {
  12129. "post": {
  12130. "tags": ["integrations"],
  12131. "operationId": "v2.integration.connect.oauth",
  12132. "parameters": [
  12133. {
  12134. "name": "integrationID",
  12135. "in": "path",
  12136. "schema": {
  12137. "type": "string"
  12138. },
  12139. "required": true
  12140. },
  12141. {
  12142. "name": "location",
  12143. "in": "query",
  12144. "schema": {
  12145. "type": "object",
  12146. "properties": {
  12147. "directory": {
  12148. "type": "string"
  12149. },
  12150. "workspace": {
  12151. "type": "string"
  12152. }
  12153. },
  12154. "additionalProperties": false
  12155. },
  12156. "required": false,
  12157. "style": "deepObject",
  12158. "explode": true
  12159. }
  12160. ],
  12161. "security": [],
  12162. "responses": {
  12163. "200": {
  12164. "description": "Success",
  12165. "content": {
  12166. "application/json": {
  12167. "schema": {
  12168. "type": "object",
  12169. "properties": {
  12170. "location": {
  12171. "$ref": "#/components/schemas/LocationInfo"
  12172. },
  12173. "data": {
  12174. "$ref": "#/components/schemas/IntegrationAttempt"
  12175. }
  12176. },
  12177. "required": ["location", "data"],
  12178. "additionalProperties": false
  12179. }
  12180. }
  12181. }
  12182. },
  12183. "400": {
  12184. "description": "InvalidRequestError",
  12185. "content": {
  12186. "application/json": {
  12187. "schema": {
  12188. "anyOf": [
  12189. {
  12190. "$ref": "#/components/schemas/InvalidRequestError"
  12191. },
  12192. {
  12193. "$ref": "#/components/schemas/InvalidRequestError"
  12194. }
  12195. ]
  12196. }
  12197. }
  12198. }
  12199. },
  12200. "401": {
  12201. "description": "UnauthorizedError",
  12202. "content": {
  12203. "application/json": {
  12204. "schema": {
  12205. "$ref": "#/components/schemas/UnauthorizedError"
  12206. }
  12207. }
  12208. }
  12209. }
  12210. },
  12211. "description": "Start an OAuth attempt and return the authorization details.",
  12212. "summary": "Begin OAuth connection",
  12213. "requestBody": {
  12214. "content": {
  12215. "application/json": {
  12216. "schema": {
  12217. "type": "object",
  12218. "properties": {
  12219. "methodID": {
  12220. "type": "string"
  12221. },
  12222. "inputs": {
  12223. "type": "object",
  12224. "additionalProperties": {
  12225. "type": "string"
  12226. }
  12227. },
  12228. "label": {
  12229. "type": "string"
  12230. }
  12231. },
  12232. "required": ["methodID", "inputs"],
  12233. "additionalProperties": false
  12234. }
  12235. }
  12236. },
  12237. "required": true
  12238. },
  12239. "x-codeSamples": [
  12240. {
  12241. "lang": "js",
  12242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  12243. }
  12244. ]
  12245. }
  12246. },
  12247. "/api/integration/attempt/{attemptID}": {
  12248. "get": {
  12249. "tags": ["integrations"],
  12250. "operationId": "v2.integration.attempt.status",
  12251. "parameters": [
  12252. {
  12253. "name": "attemptID",
  12254. "in": "path",
  12255. "schema": {
  12256. "type": "string"
  12257. },
  12258. "required": true
  12259. },
  12260. {
  12261. "name": "location",
  12262. "in": "query",
  12263. "schema": {
  12264. "type": "object",
  12265. "properties": {
  12266. "directory": {
  12267. "type": "string"
  12268. },
  12269. "workspace": {
  12270. "type": "string"
  12271. }
  12272. },
  12273. "additionalProperties": false
  12274. },
  12275. "required": false,
  12276. "style": "deepObject",
  12277. "explode": true
  12278. }
  12279. ],
  12280. "security": [],
  12281. "responses": {
  12282. "200": {
  12283. "description": "Success",
  12284. "content": {
  12285. "application/json": {
  12286. "schema": {
  12287. "type": "object",
  12288. "properties": {
  12289. "location": {
  12290. "$ref": "#/components/schemas/LocationInfo"
  12291. },
  12292. "data": {
  12293. "$ref": "#/components/schemas/IntegrationAttemptStatus"
  12294. }
  12295. },
  12296. "required": ["location", "data"],
  12297. "additionalProperties": false
  12298. }
  12299. }
  12300. }
  12301. },
  12302. "400": {
  12303. "description": "InvalidRequestError",
  12304. "content": {
  12305. "application/json": {
  12306. "schema": {
  12307. "$ref": "#/components/schemas/InvalidRequestError"
  12308. }
  12309. }
  12310. }
  12311. },
  12312. "401": {
  12313. "description": "UnauthorizedError",
  12314. "content": {
  12315. "application/json": {
  12316. "schema": {
  12317. "$ref": "#/components/schemas/UnauthorizedError"
  12318. }
  12319. }
  12320. }
  12321. }
  12322. },
  12323. "description": "Poll the current status of an OAuth attempt.",
  12324. "summary": "Get OAuth attempt status",
  12325. "x-codeSamples": [
  12326. {
  12327. "lang": "js",
  12328. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12329. }
  12330. ]
  12331. },
  12332. "delete": {
  12333. "tags": ["integrations"],
  12334. "operationId": "v2.integration.attempt.cancel",
  12335. "parameters": [
  12336. {
  12337. "name": "attemptID",
  12338. "in": "path",
  12339. "schema": {
  12340. "type": "string"
  12341. },
  12342. "required": true
  12343. },
  12344. {
  12345. "name": "location",
  12346. "in": "query",
  12347. "schema": {
  12348. "type": "object",
  12349. "properties": {
  12350. "directory": {
  12351. "type": "string"
  12352. },
  12353. "workspace": {
  12354. "type": "string"
  12355. }
  12356. },
  12357. "additionalProperties": false
  12358. },
  12359. "required": false,
  12360. "style": "deepObject",
  12361. "explode": true
  12362. }
  12363. ],
  12364. "security": [],
  12365. "responses": {
  12366. "204": {
  12367. "description": "<No Content>"
  12368. },
  12369. "400": {
  12370. "description": "InvalidRequestError",
  12371. "content": {
  12372. "application/json": {
  12373. "schema": {
  12374. "$ref": "#/components/schemas/InvalidRequestError"
  12375. }
  12376. }
  12377. }
  12378. },
  12379. "401": {
  12380. "description": "UnauthorizedError",
  12381. "content": {
  12382. "application/json": {
  12383. "schema": {
  12384. "$ref": "#/components/schemas/UnauthorizedError"
  12385. }
  12386. }
  12387. }
  12388. }
  12389. },
  12390. "description": "Cancel an OAuth attempt and release its resources.",
  12391. "summary": "Cancel OAuth connection",
  12392. "x-codeSamples": [
  12393. {
  12394. "lang": "js",
  12395. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12396. }
  12397. ]
  12398. }
  12399. },
  12400. "/api/integration/attempt/{attemptID}/complete": {
  12401. "post": {
  12402. "tags": ["integrations"],
  12403. "operationId": "v2.integration.attempt.complete",
  12404. "parameters": [
  12405. {
  12406. "name": "attemptID",
  12407. "in": "path",
  12408. "schema": {
  12409. "type": "string"
  12410. },
  12411. "required": true
  12412. },
  12413. {
  12414. "name": "location",
  12415. "in": "query",
  12416. "schema": {
  12417. "type": "object",
  12418. "properties": {
  12419. "directory": {
  12420. "type": "string"
  12421. },
  12422. "workspace": {
  12423. "type": "string"
  12424. }
  12425. },
  12426. "additionalProperties": false
  12427. },
  12428. "required": false,
  12429. "style": "deepObject",
  12430. "explode": true
  12431. }
  12432. ],
  12433. "security": [],
  12434. "responses": {
  12435. "204": {
  12436. "description": "<No Content>"
  12437. },
  12438. "400": {
  12439. "description": "InvalidRequestError",
  12440. "content": {
  12441. "application/json": {
  12442. "schema": {
  12443. "anyOf": [
  12444. {
  12445. "$ref": "#/components/schemas/InvalidRequestError"
  12446. },
  12447. {
  12448. "$ref": "#/components/schemas/InvalidRequestError"
  12449. }
  12450. ]
  12451. }
  12452. }
  12453. }
  12454. },
  12455. "401": {
  12456. "description": "UnauthorizedError",
  12457. "content": {
  12458. "application/json": {
  12459. "schema": {
  12460. "$ref": "#/components/schemas/UnauthorizedError"
  12461. }
  12462. }
  12463. }
  12464. }
  12465. },
  12466. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12467. "summary": "Complete OAuth connection",
  12468. "requestBody": {
  12469. "content": {
  12470. "application/json": {
  12471. "schema": {
  12472. "type": "object",
  12473. "properties": {
  12474. "code": {
  12475. "type": "string"
  12476. }
  12477. },
  12478. "additionalProperties": false
  12479. }
  12480. }
  12481. },
  12482. "required": true
  12483. },
  12484. "x-codeSamples": [
  12485. {
  12486. "lang": "js",
  12487. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12488. }
  12489. ]
  12490. }
  12491. },
  12492. "/api/credential/{credentialID}": {
  12493. "patch": {
  12494. "tags": ["opencode HttpApi"],
  12495. "operationId": "v2.credential.update",
  12496. "parameters": [
  12497. {
  12498. "name": "credentialID",
  12499. "in": "path",
  12500. "schema": {
  12501. "type": "string"
  12502. },
  12503. "required": true
  12504. },
  12505. {
  12506. "name": "location",
  12507. "in": "query",
  12508. "schema": {
  12509. "type": "object",
  12510. "properties": {
  12511. "directory": {
  12512. "type": "string"
  12513. },
  12514. "workspace": {
  12515. "type": "string"
  12516. }
  12517. },
  12518. "additionalProperties": false
  12519. },
  12520. "required": false,
  12521. "style": "deepObject",
  12522. "explode": true
  12523. }
  12524. ],
  12525. "security": [],
  12526. "responses": {
  12527. "204": {
  12528. "description": "<No Content>"
  12529. },
  12530. "400": {
  12531. "description": "InvalidRequestError",
  12532. "content": {
  12533. "application/json": {
  12534. "schema": {
  12535. "$ref": "#/components/schemas/InvalidRequestError"
  12536. }
  12537. }
  12538. }
  12539. },
  12540. "401": {
  12541. "description": "UnauthorizedError",
  12542. "content": {
  12543. "application/json": {
  12544. "schema": {
  12545. "$ref": "#/components/schemas/UnauthorizedError"
  12546. }
  12547. }
  12548. }
  12549. }
  12550. },
  12551. "description": "Update a stored credential label.",
  12552. "summary": "Update credential",
  12553. "requestBody": {
  12554. "content": {
  12555. "application/json": {
  12556. "schema": {
  12557. "type": "object",
  12558. "properties": {
  12559. "label": {
  12560. "type": "string"
  12561. }
  12562. },
  12563. "required": ["label"],
  12564. "additionalProperties": false
  12565. }
  12566. }
  12567. },
  12568. "required": true
  12569. },
  12570. "x-codeSamples": [
  12571. {
  12572. "lang": "js",
  12573. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12574. }
  12575. ]
  12576. },
  12577. "delete": {
  12578. "tags": ["opencode HttpApi"],
  12579. "operationId": "v2.credential.remove",
  12580. "parameters": [
  12581. {
  12582. "name": "credentialID",
  12583. "in": "path",
  12584. "schema": {
  12585. "type": "string"
  12586. },
  12587. "required": true
  12588. },
  12589. {
  12590. "name": "location",
  12591. "in": "query",
  12592. "schema": {
  12593. "type": "object",
  12594. "properties": {
  12595. "directory": {
  12596. "type": "string"
  12597. },
  12598. "workspace": {
  12599. "type": "string"
  12600. }
  12601. },
  12602. "additionalProperties": false
  12603. },
  12604. "required": false,
  12605. "style": "deepObject",
  12606. "explode": true
  12607. }
  12608. ],
  12609. "security": [],
  12610. "responses": {
  12611. "204": {
  12612. "description": "<No Content>"
  12613. },
  12614. "400": {
  12615. "description": "InvalidRequestError",
  12616. "content": {
  12617. "application/json": {
  12618. "schema": {
  12619. "$ref": "#/components/schemas/InvalidRequestError"
  12620. }
  12621. }
  12622. }
  12623. },
  12624. "401": {
  12625. "description": "UnauthorizedError",
  12626. "content": {
  12627. "application/json": {
  12628. "schema": {
  12629. "$ref": "#/components/schemas/UnauthorizedError"
  12630. }
  12631. }
  12632. }
  12633. }
  12634. },
  12635. "description": "Remove a stored integration credential.",
  12636. "summary": "Remove credential",
  12637. "x-codeSamples": [
  12638. {
  12639. "lang": "js",
  12640. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12641. }
  12642. ]
  12643. }
  12644. },
  12645. "/api/permission/request": {
  12646. "get": {
  12647. "tags": ["permissions"],
  12648. "operationId": "v2.permission.request.list",
  12649. "parameters": [
  12650. {
  12651. "name": "location",
  12652. "in": "query",
  12653. "schema": {
  12654. "type": "object",
  12655. "properties": {
  12656. "directory": {
  12657. "type": "string"
  12658. },
  12659. "workspace": {
  12660. "type": "string"
  12661. }
  12662. },
  12663. "additionalProperties": false
  12664. },
  12665. "required": false,
  12666. "style": "deepObject",
  12667. "explode": true
  12668. }
  12669. ],
  12670. "security": [],
  12671. "responses": {
  12672. "200": {
  12673. "description": "Success",
  12674. "content": {
  12675. "application/json": {
  12676. "schema": {
  12677. "type": "object",
  12678. "properties": {
  12679. "location": {
  12680. "$ref": "#/components/schemas/LocationInfo"
  12681. },
  12682. "data": {
  12683. "type": "array",
  12684. "items": {
  12685. "$ref": "#/components/schemas/PermissionV2Request"
  12686. }
  12687. }
  12688. },
  12689. "required": ["location", "data"],
  12690. "additionalProperties": false
  12691. }
  12692. }
  12693. }
  12694. },
  12695. "400": {
  12696. "description": "InvalidRequestError",
  12697. "content": {
  12698. "application/json": {
  12699. "schema": {
  12700. "$ref": "#/components/schemas/InvalidRequestError"
  12701. }
  12702. }
  12703. }
  12704. },
  12705. "401": {
  12706. "description": "UnauthorizedError",
  12707. "content": {
  12708. "application/json": {
  12709. "schema": {
  12710. "$ref": "#/components/schemas/UnauthorizedError"
  12711. }
  12712. }
  12713. }
  12714. }
  12715. },
  12716. "description": "Retrieve pending permission requests for a location.",
  12717. "summary": "List pending permission requests",
  12718. "x-codeSamples": [
  12719. {
  12720. "lang": "js",
  12721. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12722. }
  12723. ]
  12724. }
  12725. },
  12726. "/api/permission/saved": {
  12727. "get": {
  12728. "tags": ["permissions"],
  12729. "operationId": "v2.permission.saved.list",
  12730. "parameters": [
  12731. {
  12732. "name": "projectID",
  12733. "in": "query",
  12734. "schema": {
  12735. "type": "string"
  12736. },
  12737. "required": false
  12738. }
  12739. ],
  12740. "security": [],
  12741. "responses": {
  12742. "200": {
  12743. "description": "Success",
  12744. "content": {
  12745. "application/json": {
  12746. "schema": {
  12747. "type": "object",
  12748. "properties": {
  12749. "data": {
  12750. "type": "array",
  12751. "items": {
  12752. "$ref": "#/components/schemas/PermissionSavedInfo"
  12753. }
  12754. }
  12755. },
  12756. "required": ["data"],
  12757. "additionalProperties": false
  12758. }
  12759. }
  12760. }
  12761. },
  12762. "400": {
  12763. "description": "InvalidRequestError",
  12764. "content": {
  12765. "application/json": {
  12766. "schema": {
  12767. "$ref": "#/components/schemas/InvalidRequestError"
  12768. }
  12769. }
  12770. }
  12771. },
  12772. "401": {
  12773. "description": "UnauthorizedError",
  12774. "content": {
  12775. "application/json": {
  12776. "schema": {
  12777. "$ref": "#/components/schemas/UnauthorizedError"
  12778. }
  12779. }
  12780. }
  12781. }
  12782. },
  12783. "description": "Retrieve saved permissions, optionally filtered by project.",
  12784. "summary": "List saved permissions",
  12785. "x-codeSamples": [
  12786. {
  12787. "lang": "js",
  12788. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12789. }
  12790. ]
  12791. }
  12792. },
  12793. "/api/permission/saved/{id}": {
  12794. "delete": {
  12795. "tags": ["permissions"],
  12796. "operationId": "v2.permission.saved.remove",
  12797. "parameters": [
  12798. {
  12799. "name": "id",
  12800. "in": "path",
  12801. "schema": {
  12802. "type": "string"
  12803. },
  12804. "required": true
  12805. }
  12806. ],
  12807. "security": [],
  12808. "responses": {
  12809. "204": {
  12810. "description": "<No Content>"
  12811. },
  12812. "400": {
  12813. "description": "InvalidRequestError",
  12814. "content": {
  12815. "application/json": {
  12816. "schema": {
  12817. "$ref": "#/components/schemas/InvalidRequestError"
  12818. }
  12819. }
  12820. }
  12821. },
  12822. "401": {
  12823. "description": "UnauthorizedError",
  12824. "content": {
  12825. "application/json": {
  12826. "schema": {
  12827. "$ref": "#/components/schemas/UnauthorizedError"
  12828. }
  12829. }
  12830. }
  12831. }
  12832. },
  12833. "description": "Remove a saved permission by ID.",
  12834. "summary": "Remove saved permission",
  12835. "x-codeSamples": [
  12836. {
  12837. "lang": "js",
  12838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12839. }
  12840. ]
  12841. }
  12842. },
  12843. "/api/session/{sessionID}/permission": {
  12844. "post": {
  12845. "tags": ["permissions"],
  12846. "operationId": "v2.session.permission.create",
  12847. "parameters": [
  12848. {
  12849. "name": "sessionID",
  12850. "in": "path",
  12851. "schema": {
  12852. "type": "string",
  12853. "pattern": "^ses"
  12854. },
  12855. "required": true
  12856. }
  12857. ],
  12858. "security": [],
  12859. "responses": {
  12860. "200": {
  12861. "description": "Success",
  12862. "content": {
  12863. "application/json": {
  12864. "schema": {
  12865. "type": "object",
  12866. "properties": {
  12867. "data": {
  12868. "type": "object",
  12869. "properties": {
  12870. "id": {
  12871. "type": "string",
  12872. "pattern": "^per"
  12873. },
  12874. "effect": {
  12875. "$ref": "#/components/schemas/PermissionV2Effect"
  12876. }
  12877. },
  12878. "required": ["id", "effect"],
  12879. "additionalProperties": false
  12880. }
  12881. },
  12882. "required": ["data"],
  12883. "additionalProperties": false
  12884. }
  12885. }
  12886. }
  12887. },
  12888. "400": {
  12889. "description": "InvalidRequestError",
  12890. "content": {
  12891. "application/json": {
  12892. "schema": {
  12893. "$ref": "#/components/schemas/InvalidRequestError"
  12894. }
  12895. }
  12896. }
  12897. },
  12898. "401": {
  12899. "description": "UnauthorizedError",
  12900. "content": {
  12901. "application/json": {
  12902. "schema": {
  12903. "$ref": "#/components/schemas/UnauthorizedError"
  12904. }
  12905. }
  12906. }
  12907. },
  12908. "404": {
  12909. "description": "SessionNotFoundError",
  12910. "content": {
  12911. "application/json": {
  12912. "schema": {
  12913. "anyOf": [
  12914. {
  12915. "$ref": "#/components/schemas/SessionNotFoundError"
  12916. },
  12917. {
  12918. "$ref": "#/components/schemas/SessionNotFoundError"
  12919. }
  12920. ]
  12921. }
  12922. }
  12923. }
  12924. }
  12925. },
  12926. "description": "Evaluate and, when approval is required, create a permission request for a session.",
  12927. "summary": "Create permission request",
  12928. "requestBody": {
  12929. "content": {
  12930. "application/json": {
  12931. "schema": {
  12932. "type": "object",
  12933. "properties": {
  12934. "id": {
  12935. "type": "string",
  12936. "pattern": "^per"
  12937. },
  12938. "action": {
  12939. "type": "string"
  12940. },
  12941. "resources": {
  12942. "type": "array",
  12943. "items": {
  12944. "type": "string"
  12945. }
  12946. },
  12947. "save": {
  12948. "type": "array",
  12949. "items": {
  12950. "type": "string"
  12951. }
  12952. },
  12953. "metadata": {
  12954. "type": "object"
  12955. },
  12956. "source": {
  12957. "$ref": "#/components/schemas/PermissionV2Source"
  12958. },
  12959. "agent": {
  12960. "type": "string"
  12961. }
  12962. },
  12963. "required": ["action", "resources"],
  12964. "additionalProperties": false
  12965. }
  12966. }
  12967. },
  12968. "required": true
  12969. },
  12970. "x-codeSamples": [
  12971. {
  12972. "lang": "js",
  12973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.create({\n ...\n})"
  12974. }
  12975. ]
  12976. },
  12977. "get": {
  12978. "tags": ["permissions"],
  12979. "operationId": "v2.session.permission.list",
  12980. "parameters": [
  12981. {
  12982. "name": "sessionID",
  12983. "in": "path",
  12984. "schema": {
  12985. "type": "string",
  12986. "pattern": "^ses"
  12987. },
  12988. "required": true
  12989. }
  12990. ],
  12991. "security": [],
  12992. "responses": {
  12993. "200": {
  12994. "description": "Success",
  12995. "content": {
  12996. "application/json": {
  12997. "schema": {
  12998. "type": "object",
  12999. "properties": {
  13000. "data": {
  13001. "type": "array",
  13002. "items": {
  13003. "$ref": "#/components/schemas/PermissionV2Request"
  13004. }
  13005. }
  13006. },
  13007. "required": ["data"],
  13008. "additionalProperties": false
  13009. }
  13010. }
  13011. }
  13012. },
  13013. "400": {
  13014. "description": "InvalidRequestError",
  13015. "content": {
  13016. "application/json": {
  13017. "schema": {
  13018. "$ref": "#/components/schemas/InvalidRequestError"
  13019. }
  13020. }
  13021. }
  13022. },
  13023. "401": {
  13024. "description": "UnauthorizedError",
  13025. "content": {
  13026. "application/json": {
  13027. "schema": {
  13028. "$ref": "#/components/schemas/UnauthorizedError"
  13029. }
  13030. }
  13031. }
  13032. },
  13033. "404": {
  13034. "description": "SessionNotFoundError",
  13035. "content": {
  13036. "application/json": {
  13037. "schema": {
  13038. "anyOf": [
  13039. {
  13040. "$ref": "#/components/schemas/SessionNotFoundError"
  13041. },
  13042. {
  13043. "$ref": "#/components/schemas/SessionNotFoundError"
  13044. }
  13045. ]
  13046. }
  13047. }
  13048. }
  13049. }
  13050. },
  13051. "description": "Retrieve pending permission requests owned by a session.",
  13052. "summary": "List session permission requests",
  13053. "x-codeSamples": [
  13054. {
  13055. "lang": "js",
  13056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  13057. }
  13058. ]
  13059. }
  13060. },
  13061. "/api/session/{sessionID}/permission/{requestID}": {
  13062. "get": {
  13063. "tags": ["permissions"],
  13064. "operationId": "v2.session.permission.get",
  13065. "parameters": [
  13066. {
  13067. "name": "sessionID",
  13068. "in": "path",
  13069. "schema": {
  13070. "type": "string",
  13071. "pattern": "^ses"
  13072. },
  13073. "required": true
  13074. },
  13075. {
  13076. "name": "requestID",
  13077. "in": "path",
  13078. "schema": {
  13079. "type": "string",
  13080. "pattern": "^per"
  13081. },
  13082. "required": true
  13083. }
  13084. ],
  13085. "security": [],
  13086. "responses": {
  13087. "200": {
  13088. "description": "Success",
  13089. "content": {
  13090. "application/json": {
  13091. "schema": {
  13092. "type": "object",
  13093. "properties": {
  13094. "data": {
  13095. "$ref": "#/components/schemas/PermissionV2Request"
  13096. }
  13097. },
  13098. "required": ["data"],
  13099. "additionalProperties": false
  13100. }
  13101. }
  13102. }
  13103. },
  13104. "400": {
  13105. "description": "InvalidRequestError",
  13106. "content": {
  13107. "application/json": {
  13108. "schema": {
  13109. "$ref": "#/components/schemas/InvalidRequestError"
  13110. }
  13111. }
  13112. }
  13113. },
  13114. "401": {
  13115. "description": "UnauthorizedError",
  13116. "content": {
  13117. "application/json": {
  13118. "schema": {
  13119. "$ref": "#/components/schemas/UnauthorizedError"
  13120. }
  13121. }
  13122. }
  13123. },
  13124. "404": {
  13125. "description": "SessionNotFoundError | PermissionNotFoundError",
  13126. "content": {
  13127. "application/json": {
  13128. "schema": {
  13129. "anyOf": [
  13130. {
  13131. "$ref": "#/components/schemas/PermissionNotFoundError"
  13132. },
  13133. {
  13134. "$ref": "#/components/schemas/SessionNotFoundError"
  13135. },
  13136. {
  13137. "$ref": "#/components/schemas/SessionNotFoundError"
  13138. }
  13139. ]
  13140. }
  13141. }
  13142. }
  13143. }
  13144. },
  13145. "description": "Retrieve a pending permission request owned by a session.",
  13146. "summary": "Get permission request",
  13147. "x-codeSamples": [
  13148. {
  13149. "lang": "js",
  13150. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.get({\n ...\n})"
  13151. }
  13152. ]
  13153. }
  13154. },
  13155. "/api/session/{sessionID}/permission/{requestID}/reply": {
  13156. "post": {
  13157. "tags": ["permissions"],
  13158. "operationId": "v2.session.permission.reply",
  13159. "parameters": [
  13160. {
  13161. "name": "sessionID",
  13162. "in": "path",
  13163. "schema": {
  13164. "type": "string",
  13165. "pattern": "^ses"
  13166. },
  13167. "required": true
  13168. },
  13169. {
  13170. "name": "requestID",
  13171. "in": "path",
  13172. "schema": {
  13173. "type": "string",
  13174. "pattern": "^per"
  13175. },
  13176. "required": true
  13177. }
  13178. ],
  13179. "security": [],
  13180. "responses": {
  13181. "204": {
  13182. "description": "<No Content>"
  13183. },
  13184. "400": {
  13185. "description": "InvalidRequestError",
  13186. "content": {
  13187. "application/json": {
  13188. "schema": {
  13189. "$ref": "#/components/schemas/InvalidRequestError"
  13190. }
  13191. }
  13192. }
  13193. },
  13194. "401": {
  13195. "description": "UnauthorizedError",
  13196. "content": {
  13197. "application/json": {
  13198. "schema": {
  13199. "$ref": "#/components/schemas/UnauthorizedError"
  13200. }
  13201. }
  13202. }
  13203. },
  13204. "404": {
  13205. "description": "SessionNotFoundError | PermissionNotFoundError",
  13206. "content": {
  13207. "application/json": {
  13208. "schema": {
  13209. "anyOf": [
  13210. {
  13211. "$ref": "#/components/schemas/PermissionNotFoundError"
  13212. },
  13213. {
  13214. "$ref": "#/components/schemas/SessionNotFoundError"
  13215. },
  13216. {
  13217. "$ref": "#/components/schemas/SessionNotFoundError"
  13218. }
  13219. ]
  13220. }
  13221. }
  13222. }
  13223. }
  13224. },
  13225. "description": "Respond to a pending permission request owned by a session.",
  13226. "summary": "Reply to pending permission request",
  13227. "requestBody": {
  13228. "content": {
  13229. "application/json": {
  13230. "schema": {
  13231. "type": "object",
  13232. "properties": {
  13233. "reply": {
  13234. "$ref": "#/components/schemas/PermissionV2Reply"
  13235. },
  13236. "message": {
  13237. "type": "string"
  13238. }
  13239. },
  13240. "required": ["reply"],
  13241. "additionalProperties": false
  13242. }
  13243. }
  13244. },
  13245. "required": true
  13246. },
  13247. "x-codeSamples": [
  13248. {
  13249. "lang": "js",
  13250. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  13251. }
  13252. ]
  13253. }
  13254. },
  13255. "/api/fs/read/*": {
  13256. "get": {
  13257. "tags": ["filesystem"],
  13258. "operationId": "v2.fs.read",
  13259. "parameters": [
  13260. {
  13261. "name": "location",
  13262. "in": "query",
  13263. "schema": {
  13264. "type": "object",
  13265. "properties": {
  13266. "directory": {
  13267. "type": "string"
  13268. },
  13269. "workspace": {
  13270. "type": "string"
  13271. }
  13272. },
  13273. "additionalProperties": false
  13274. },
  13275. "required": false,
  13276. "style": "deepObject",
  13277. "explode": true
  13278. }
  13279. ],
  13280. "security": [],
  13281. "responses": {
  13282. "200": {
  13283. "description": "Success",
  13284. "content": {
  13285. "application/octet-stream": {
  13286. "schema": {
  13287. "type": "string",
  13288. "format": "binary"
  13289. }
  13290. }
  13291. }
  13292. },
  13293. "400": {
  13294. "description": "InvalidRequestError",
  13295. "content": {
  13296. "application/json": {
  13297. "schema": {
  13298. "$ref": "#/components/schemas/InvalidRequestError"
  13299. }
  13300. }
  13301. }
  13302. },
  13303. "401": {
  13304. "description": "UnauthorizedError",
  13305. "content": {
  13306. "application/json": {
  13307. "schema": {
  13308. "$ref": "#/components/schemas/UnauthorizedError"
  13309. }
  13310. }
  13311. }
  13312. }
  13313. },
  13314. "description": "Serve one file relative to the requested location.",
  13315. "summary": "Read file",
  13316. "x-codeSamples": [
  13317. {
  13318. "lang": "js",
  13319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  13320. }
  13321. ]
  13322. }
  13323. },
  13324. "/api/fs/list": {
  13325. "get": {
  13326. "tags": ["filesystem"],
  13327. "operationId": "v2.fs.list",
  13328. "parameters": [
  13329. {
  13330. "name": "location",
  13331. "in": "query",
  13332. "schema": {
  13333. "type": "object",
  13334. "properties": {
  13335. "directory": {
  13336. "type": "string"
  13337. },
  13338. "workspace": {
  13339. "type": "string"
  13340. }
  13341. },
  13342. "additionalProperties": false
  13343. },
  13344. "required": false,
  13345. "style": "deepObject",
  13346. "explode": true
  13347. },
  13348. {
  13349. "name": "path",
  13350. "in": "query",
  13351. "schema": {
  13352. "type": "string"
  13353. },
  13354. "required": false
  13355. }
  13356. ],
  13357. "security": [],
  13358. "responses": {
  13359. "200": {
  13360. "description": "Success",
  13361. "content": {
  13362. "application/json": {
  13363. "schema": {
  13364. "type": "object",
  13365. "properties": {
  13366. "location": {
  13367. "$ref": "#/components/schemas/LocationInfo"
  13368. },
  13369. "data": {
  13370. "type": "array",
  13371. "items": {
  13372. "$ref": "#/components/schemas/FileSystemEntry"
  13373. }
  13374. }
  13375. },
  13376. "required": ["location", "data"],
  13377. "additionalProperties": false
  13378. }
  13379. }
  13380. }
  13381. },
  13382. "400": {
  13383. "description": "InvalidRequestError",
  13384. "content": {
  13385. "application/json": {
  13386. "schema": {
  13387. "$ref": "#/components/schemas/InvalidRequestError"
  13388. }
  13389. }
  13390. }
  13391. },
  13392. "401": {
  13393. "description": "UnauthorizedError",
  13394. "content": {
  13395. "application/json": {
  13396. "schema": {
  13397. "$ref": "#/components/schemas/UnauthorizedError"
  13398. }
  13399. }
  13400. }
  13401. }
  13402. },
  13403. "description": "List direct children of one directory relative to the requested location.",
  13404. "summary": "List directory",
  13405. "x-codeSamples": [
  13406. {
  13407. "lang": "js",
  13408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13409. }
  13410. ]
  13411. }
  13412. },
  13413. "/api/fs/find": {
  13414. "get": {
  13415. "tags": ["filesystem"],
  13416. "operationId": "v2.fs.find",
  13417. "parameters": [
  13418. {
  13419. "name": "location",
  13420. "in": "query",
  13421. "schema": {
  13422. "type": "object",
  13423. "properties": {
  13424. "directory": {
  13425. "type": "string"
  13426. },
  13427. "workspace": {
  13428. "type": "string"
  13429. }
  13430. },
  13431. "additionalProperties": false
  13432. },
  13433. "required": false,
  13434. "style": "deepObject",
  13435. "explode": true
  13436. },
  13437. {
  13438. "name": "query",
  13439. "in": "query",
  13440. "schema": {
  13441. "type": "string"
  13442. },
  13443. "required": true
  13444. },
  13445. {
  13446. "name": "type",
  13447. "in": "query",
  13448. "schema": {
  13449. "type": "string",
  13450. "enum": ["file", "directory"]
  13451. },
  13452. "required": false
  13453. },
  13454. {
  13455. "name": "limit",
  13456. "in": "query",
  13457. "schema": {
  13458. "type": "string"
  13459. },
  13460. "required": false
  13461. }
  13462. ],
  13463. "security": [],
  13464. "responses": {
  13465. "200": {
  13466. "description": "Success",
  13467. "content": {
  13468. "application/json": {
  13469. "schema": {
  13470. "type": "object",
  13471. "properties": {
  13472. "location": {
  13473. "$ref": "#/components/schemas/LocationInfo"
  13474. },
  13475. "data": {
  13476. "type": "array",
  13477. "items": {
  13478. "$ref": "#/components/schemas/FileSystemEntry"
  13479. }
  13480. }
  13481. },
  13482. "required": ["location", "data"],
  13483. "additionalProperties": false
  13484. }
  13485. }
  13486. }
  13487. },
  13488. "400": {
  13489. "description": "InvalidRequestError",
  13490. "content": {
  13491. "application/json": {
  13492. "schema": {
  13493. "$ref": "#/components/schemas/InvalidRequestError"
  13494. }
  13495. }
  13496. }
  13497. },
  13498. "401": {
  13499. "description": "UnauthorizedError",
  13500. "content": {
  13501. "application/json": {
  13502. "schema": {
  13503. "$ref": "#/components/schemas/UnauthorizedError"
  13504. }
  13505. }
  13506. }
  13507. }
  13508. },
  13509. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13510. "summary": "Find files",
  13511. "x-codeSamples": [
  13512. {
  13513. "lang": "js",
  13514. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13515. }
  13516. ]
  13517. }
  13518. },
  13519. "/api/command": {
  13520. "get": {
  13521. "tags": ["commands"],
  13522. "operationId": "v2.command.list",
  13523. "parameters": [
  13524. {
  13525. "name": "location",
  13526. "in": "query",
  13527. "schema": {
  13528. "type": "object",
  13529. "properties": {
  13530. "directory": {
  13531. "type": "string"
  13532. },
  13533. "workspace": {
  13534. "type": "string"
  13535. }
  13536. },
  13537. "additionalProperties": false
  13538. },
  13539. "required": false,
  13540. "style": "deepObject",
  13541. "explode": true
  13542. }
  13543. ],
  13544. "security": [],
  13545. "responses": {
  13546. "200": {
  13547. "description": "Success",
  13548. "content": {
  13549. "application/json": {
  13550. "schema": {
  13551. "type": "object",
  13552. "properties": {
  13553. "location": {
  13554. "$ref": "#/components/schemas/LocationInfo"
  13555. },
  13556. "data": {
  13557. "type": "array",
  13558. "items": {
  13559. "$ref": "#/components/schemas/CommandV2Info"
  13560. }
  13561. }
  13562. },
  13563. "required": ["location", "data"],
  13564. "additionalProperties": false
  13565. }
  13566. }
  13567. }
  13568. },
  13569. "400": {
  13570. "description": "InvalidRequestError",
  13571. "content": {
  13572. "application/json": {
  13573. "schema": {
  13574. "$ref": "#/components/schemas/InvalidRequestError"
  13575. }
  13576. }
  13577. }
  13578. },
  13579. "401": {
  13580. "description": "UnauthorizedError",
  13581. "content": {
  13582. "application/json": {
  13583. "schema": {
  13584. "$ref": "#/components/schemas/UnauthorizedError"
  13585. }
  13586. }
  13587. }
  13588. }
  13589. },
  13590. "description": "Retrieve currently registered commands.",
  13591. "summary": "List commands",
  13592. "x-codeSamples": [
  13593. {
  13594. "lang": "js",
  13595. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13596. }
  13597. ]
  13598. }
  13599. },
  13600. "/api/skill": {
  13601. "get": {
  13602. "tags": ["skills"],
  13603. "operationId": "v2.skill.list",
  13604. "parameters": [
  13605. {
  13606. "name": "location",
  13607. "in": "query",
  13608. "schema": {
  13609. "type": "object",
  13610. "properties": {
  13611. "directory": {
  13612. "type": "string"
  13613. },
  13614. "workspace": {
  13615. "type": "string"
  13616. }
  13617. },
  13618. "additionalProperties": false
  13619. },
  13620. "required": false,
  13621. "style": "deepObject",
  13622. "explode": true
  13623. }
  13624. ],
  13625. "security": [],
  13626. "responses": {
  13627. "200": {
  13628. "description": "Success",
  13629. "content": {
  13630. "application/json": {
  13631. "schema": {
  13632. "type": "object",
  13633. "properties": {
  13634. "location": {
  13635. "$ref": "#/components/schemas/LocationInfo"
  13636. },
  13637. "data": {
  13638. "type": "array",
  13639. "items": {
  13640. "$ref": "#/components/schemas/SkillV2Info"
  13641. }
  13642. }
  13643. },
  13644. "required": ["location", "data"],
  13645. "additionalProperties": false
  13646. }
  13647. }
  13648. }
  13649. },
  13650. "400": {
  13651. "description": "InvalidRequestError",
  13652. "content": {
  13653. "application/json": {
  13654. "schema": {
  13655. "$ref": "#/components/schemas/InvalidRequestError"
  13656. }
  13657. }
  13658. }
  13659. },
  13660. "401": {
  13661. "description": "UnauthorizedError",
  13662. "content": {
  13663. "application/json": {
  13664. "schema": {
  13665. "$ref": "#/components/schemas/UnauthorizedError"
  13666. }
  13667. }
  13668. }
  13669. }
  13670. },
  13671. "description": "Retrieve currently registered skills.",
  13672. "summary": "List skills",
  13673. "x-codeSamples": [
  13674. {
  13675. "lang": "js",
  13676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13677. }
  13678. ]
  13679. }
  13680. },
  13681. "/api/event": {
  13682. "get": {
  13683. "tags": ["events"],
  13684. "operationId": "v2.event.subscribe",
  13685. "parameters": [],
  13686. "security": [],
  13687. "responses": {
  13688. "200": {
  13689. "description": "Event stream",
  13690. "content": {
  13691. "text/event-stream": {
  13692. "schema": {
  13693. "$ref": "#/components/schemas/V2Event"
  13694. }
  13695. }
  13696. }
  13697. },
  13698. "400": {
  13699. "description": "InvalidRequestError",
  13700. "content": {
  13701. "application/json": {
  13702. "schema": {
  13703. "$ref": "#/components/schemas/InvalidRequestError"
  13704. }
  13705. }
  13706. }
  13707. },
  13708. "401": {
  13709. "description": "UnauthorizedError",
  13710. "content": {
  13711. "application/json": {
  13712. "schema": {
  13713. "$ref": "#/components/schemas/UnauthorizedError"
  13714. }
  13715. }
  13716. }
  13717. }
  13718. },
  13719. "description": "Subscribe to native event payloads for the server.",
  13720. "summary": "Subscribe to events",
  13721. "x-codeSamples": [
  13722. {
  13723. "lang": "js",
  13724. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13725. }
  13726. ]
  13727. }
  13728. },
  13729. "/api/pty": {
  13730. "get": {
  13731. "tags": ["pty"],
  13732. "operationId": "v2.pty.list",
  13733. "parameters": [
  13734. {
  13735. "name": "location",
  13736. "in": "query",
  13737. "schema": {
  13738. "type": "object",
  13739. "properties": {
  13740. "directory": {
  13741. "type": "string"
  13742. },
  13743. "workspace": {
  13744. "type": "string"
  13745. }
  13746. },
  13747. "additionalProperties": false
  13748. },
  13749. "required": false,
  13750. "style": "deepObject",
  13751. "explode": true
  13752. }
  13753. ],
  13754. "security": [],
  13755. "responses": {
  13756. "200": {
  13757. "description": "Success",
  13758. "content": {
  13759. "application/json": {
  13760. "schema": {
  13761. "type": "object",
  13762. "properties": {
  13763. "location": {
  13764. "$ref": "#/components/schemas/LocationInfo"
  13765. },
  13766. "data": {
  13767. "type": "array",
  13768. "items": {
  13769. "$ref": "#/components/schemas/Pty"
  13770. }
  13771. }
  13772. },
  13773. "required": ["location", "data"],
  13774. "additionalProperties": false
  13775. }
  13776. }
  13777. }
  13778. },
  13779. "400": {
  13780. "description": "InvalidRequestError",
  13781. "content": {
  13782. "application/json": {
  13783. "schema": {
  13784. "$ref": "#/components/schemas/InvalidRequestError"
  13785. }
  13786. }
  13787. }
  13788. },
  13789. "401": {
  13790. "description": "UnauthorizedError",
  13791. "content": {
  13792. "application/json": {
  13793. "schema": {
  13794. "$ref": "#/components/schemas/UnauthorizedError"
  13795. }
  13796. }
  13797. }
  13798. }
  13799. },
  13800. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13801. "summary": "List PTY sessions",
  13802. "x-codeSamples": [
  13803. {
  13804. "lang": "js",
  13805. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13806. }
  13807. ]
  13808. },
  13809. "post": {
  13810. "tags": ["pty"],
  13811. "operationId": "v2.pty.create",
  13812. "parameters": [
  13813. {
  13814. "name": "location",
  13815. "in": "query",
  13816. "schema": {
  13817. "type": "object",
  13818. "properties": {
  13819. "directory": {
  13820. "type": "string"
  13821. },
  13822. "workspace": {
  13823. "type": "string"
  13824. }
  13825. },
  13826. "additionalProperties": false
  13827. },
  13828. "required": false,
  13829. "style": "deepObject",
  13830. "explode": true
  13831. }
  13832. ],
  13833. "security": [],
  13834. "responses": {
  13835. "200": {
  13836. "description": "Success",
  13837. "content": {
  13838. "application/json": {
  13839. "schema": {
  13840. "type": "object",
  13841. "properties": {
  13842. "location": {
  13843. "$ref": "#/components/schemas/LocationInfo"
  13844. },
  13845. "data": {
  13846. "$ref": "#/components/schemas/Pty"
  13847. }
  13848. },
  13849. "required": ["location", "data"],
  13850. "additionalProperties": false
  13851. }
  13852. }
  13853. }
  13854. },
  13855. "400": {
  13856. "description": "InvalidRequestError",
  13857. "content": {
  13858. "application/json": {
  13859. "schema": {
  13860. "$ref": "#/components/schemas/InvalidRequestError"
  13861. }
  13862. }
  13863. }
  13864. },
  13865. "401": {
  13866. "description": "UnauthorizedError",
  13867. "content": {
  13868. "application/json": {
  13869. "schema": {
  13870. "$ref": "#/components/schemas/UnauthorizedError"
  13871. }
  13872. }
  13873. }
  13874. }
  13875. },
  13876. "description": "Create a pseudo-terminal session for a location.",
  13877. "summary": "Create PTY session",
  13878. "requestBody": {
  13879. "content": {
  13880. "application/json": {
  13881. "schema": {
  13882. "type": "object",
  13883. "properties": {
  13884. "command": {
  13885. "type": "string"
  13886. },
  13887. "args": {
  13888. "type": "array",
  13889. "items": {
  13890. "type": "string"
  13891. }
  13892. },
  13893. "cwd": {
  13894. "type": "string"
  13895. },
  13896. "title": {
  13897. "type": "string"
  13898. },
  13899. "env": {
  13900. "type": "object",
  13901. "additionalProperties": {
  13902. "type": "string"
  13903. }
  13904. }
  13905. },
  13906. "additionalProperties": false
  13907. }
  13908. }
  13909. },
  13910. "required": true
  13911. },
  13912. "x-codeSamples": [
  13913. {
  13914. "lang": "js",
  13915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13916. }
  13917. ]
  13918. }
  13919. },
  13920. "/api/pty/{ptyID}": {
  13921. "get": {
  13922. "tags": ["pty"],
  13923. "operationId": "v2.pty.get",
  13924. "parameters": [
  13925. {
  13926. "name": "ptyID",
  13927. "in": "path",
  13928. "schema": {
  13929. "type": "string",
  13930. "pattern": "^pty"
  13931. },
  13932. "required": true
  13933. },
  13934. {
  13935. "name": "location",
  13936. "in": "query",
  13937. "schema": {
  13938. "type": "object",
  13939. "properties": {
  13940. "directory": {
  13941. "type": "string"
  13942. },
  13943. "workspace": {
  13944. "type": "string"
  13945. }
  13946. },
  13947. "additionalProperties": false
  13948. },
  13949. "required": false,
  13950. "style": "deepObject",
  13951. "explode": true
  13952. }
  13953. ],
  13954. "security": [],
  13955. "responses": {
  13956. "200": {
  13957. "description": "Success",
  13958. "content": {
  13959. "application/json": {
  13960. "schema": {
  13961. "type": "object",
  13962. "properties": {
  13963. "location": {
  13964. "$ref": "#/components/schemas/LocationInfo"
  13965. },
  13966. "data": {
  13967. "$ref": "#/components/schemas/Pty"
  13968. }
  13969. },
  13970. "required": ["location", "data"],
  13971. "additionalProperties": false
  13972. }
  13973. }
  13974. }
  13975. },
  13976. "400": {
  13977. "description": "InvalidRequestError",
  13978. "content": {
  13979. "application/json": {
  13980. "schema": {
  13981. "$ref": "#/components/schemas/InvalidRequestError"
  13982. }
  13983. }
  13984. }
  13985. },
  13986. "401": {
  13987. "description": "UnauthorizedError",
  13988. "content": {
  13989. "application/json": {
  13990. "schema": {
  13991. "$ref": "#/components/schemas/UnauthorizedError"
  13992. }
  13993. }
  13994. }
  13995. },
  13996. "404": {
  13997. "description": "PtyNotFoundError",
  13998. "content": {
  13999. "application/json": {
  14000. "schema": {
  14001. "$ref": "#/components/schemas/PtyNotFoundError"
  14002. }
  14003. }
  14004. }
  14005. }
  14006. },
  14007. "description": "Get one PTY session, including its exit code once exited.",
  14008. "summary": "Get PTY session",
  14009. "x-codeSamples": [
  14010. {
  14011. "lang": "js",
  14012. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  14013. }
  14014. ]
  14015. },
  14016. "put": {
  14017. "tags": ["pty"],
  14018. "operationId": "v2.pty.update",
  14019. "parameters": [
  14020. {
  14021. "name": "ptyID",
  14022. "in": "path",
  14023. "schema": {
  14024. "type": "string",
  14025. "pattern": "^pty"
  14026. },
  14027. "required": true
  14028. },
  14029. {
  14030. "name": "location",
  14031. "in": "query",
  14032. "schema": {
  14033. "type": "object",
  14034. "properties": {
  14035. "directory": {
  14036. "type": "string"
  14037. },
  14038. "workspace": {
  14039. "type": "string"
  14040. }
  14041. },
  14042. "additionalProperties": false
  14043. },
  14044. "required": false,
  14045. "style": "deepObject",
  14046. "explode": true
  14047. }
  14048. ],
  14049. "security": [],
  14050. "responses": {
  14051. "200": {
  14052. "description": "Success",
  14053. "content": {
  14054. "application/json": {
  14055. "schema": {
  14056. "type": "object",
  14057. "properties": {
  14058. "location": {
  14059. "$ref": "#/components/schemas/LocationInfo"
  14060. },
  14061. "data": {
  14062. "$ref": "#/components/schemas/Pty"
  14063. }
  14064. },
  14065. "required": ["location", "data"],
  14066. "additionalProperties": false
  14067. }
  14068. }
  14069. }
  14070. },
  14071. "400": {
  14072. "description": "InvalidRequestError",
  14073. "content": {
  14074. "application/json": {
  14075. "schema": {
  14076. "$ref": "#/components/schemas/InvalidRequestError"
  14077. }
  14078. }
  14079. }
  14080. },
  14081. "401": {
  14082. "description": "UnauthorizedError",
  14083. "content": {
  14084. "application/json": {
  14085. "schema": {
  14086. "$ref": "#/components/schemas/UnauthorizedError"
  14087. }
  14088. }
  14089. }
  14090. },
  14091. "404": {
  14092. "description": "PtyNotFoundError",
  14093. "content": {
  14094. "application/json": {
  14095. "schema": {
  14096. "$ref": "#/components/schemas/PtyNotFoundError"
  14097. }
  14098. }
  14099. }
  14100. }
  14101. },
  14102. "description": "Update the title or viewport size of one PTY session.",
  14103. "summary": "Update PTY session",
  14104. "requestBody": {
  14105. "content": {
  14106. "application/json": {
  14107. "schema": {
  14108. "type": "object",
  14109. "properties": {
  14110. "title": {
  14111. "type": "string"
  14112. },
  14113. "size": {
  14114. "type": "object",
  14115. "properties": {
  14116. "rows": {
  14117. "type": "integer",
  14118. "exclusiveMinimum": 0
  14119. },
  14120. "cols": {
  14121. "type": "integer",
  14122. "exclusiveMinimum": 0
  14123. }
  14124. },
  14125. "required": ["rows", "cols"],
  14126. "additionalProperties": false
  14127. }
  14128. },
  14129. "additionalProperties": false
  14130. }
  14131. }
  14132. },
  14133. "required": true
  14134. },
  14135. "x-codeSamples": [
  14136. {
  14137. "lang": "js",
  14138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  14139. }
  14140. ]
  14141. },
  14142. "delete": {
  14143. "tags": ["pty"],
  14144. "operationId": "v2.pty.remove",
  14145. "parameters": [
  14146. {
  14147. "name": "ptyID",
  14148. "in": "path",
  14149. "schema": {
  14150. "type": "string",
  14151. "pattern": "^pty"
  14152. },
  14153. "required": true
  14154. },
  14155. {
  14156. "name": "location",
  14157. "in": "query",
  14158. "schema": {
  14159. "type": "object",
  14160. "properties": {
  14161. "directory": {
  14162. "type": "string"
  14163. },
  14164. "workspace": {
  14165. "type": "string"
  14166. }
  14167. },
  14168. "additionalProperties": false
  14169. },
  14170. "required": false,
  14171. "style": "deepObject",
  14172. "explode": true
  14173. }
  14174. ],
  14175. "security": [],
  14176. "responses": {
  14177. "204": {
  14178. "description": "<No Content>"
  14179. },
  14180. "400": {
  14181. "description": "InvalidRequestError",
  14182. "content": {
  14183. "application/json": {
  14184. "schema": {
  14185. "$ref": "#/components/schemas/InvalidRequestError"
  14186. }
  14187. }
  14188. }
  14189. },
  14190. "401": {
  14191. "description": "UnauthorizedError",
  14192. "content": {
  14193. "application/json": {
  14194. "schema": {
  14195. "$ref": "#/components/schemas/UnauthorizedError"
  14196. }
  14197. }
  14198. }
  14199. },
  14200. "404": {
  14201. "description": "PtyNotFoundError",
  14202. "content": {
  14203. "application/json": {
  14204. "schema": {
  14205. "$ref": "#/components/schemas/PtyNotFoundError"
  14206. }
  14207. }
  14208. }
  14209. }
  14210. },
  14211. "description": "Terminate and remove one PTY session.",
  14212. "summary": "Remove PTY session",
  14213. "x-codeSamples": [
  14214. {
  14215. "lang": "js",
  14216. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  14217. }
  14218. ]
  14219. }
  14220. },
  14221. "/api/pty/{ptyID}/connect-token": {
  14222. "post": {
  14223. "tags": ["pty"],
  14224. "operationId": "v2.pty.connectToken",
  14225. "parameters": [
  14226. {
  14227. "name": "ptyID",
  14228. "in": "path",
  14229. "schema": {
  14230. "type": "string",
  14231. "pattern": "^pty"
  14232. },
  14233. "required": true
  14234. },
  14235. {
  14236. "name": "location",
  14237. "in": "query",
  14238. "schema": {
  14239. "type": "object",
  14240. "properties": {
  14241. "directory": {
  14242. "type": "string"
  14243. },
  14244. "workspace": {
  14245. "type": "string"
  14246. }
  14247. },
  14248. "additionalProperties": false
  14249. },
  14250. "required": false,
  14251. "style": "deepObject",
  14252. "explode": true
  14253. }
  14254. ],
  14255. "security": [],
  14256. "responses": {
  14257. "200": {
  14258. "description": "Success",
  14259. "content": {
  14260. "application/json": {
  14261. "schema": {
  14262. "type": "object",
  14263. "properties": {
  14264. "location": {
  14265. "$ref": "#/components/schemas/LocationInfo"
  14266. },
  14267. "data": {
  14268. "$ref": "#/components/schemas/PtyTicketConnectToken"
  14269. }
  14270. },
  14271. "required": ["location", "data"],
  14272. "additionalProperties": false
  14273. }
  14274. }
  14275. }
  14276. },
  14277. "400": {
  14278. "description": "InvalidRequestError",
  14279. "content": {
  14280. "application/json": {
  14281. "schema": {
  14282. "$ref": "#/components/schemas/InvalidRequestError"
  14283. }
  14284. }
  14285. }
  14286. },
  14287. "401": {
  14288. "description": "UnauthorizedError",
  14289. "content": {
  14290. "application/json": {
  14291. "schema": {
  14292. "$ref": "#/components/schemas/UnauthorizedError"
  14293. }
  14294. }
  14295. }
  14296. },
  14297. "403": {
  14298. "description": "ForbiddenError",
  14299. "content": {
  14300. "application/json": {
  14301. "schema": {
  14302. "$ref": "#/components/schemas/ForbiddenError"
  14303. }
  14304. }
  14305. }
  14306. },
  14307. "404": {
  14308. "description": "PtyNotFoundError",
  14309. "content": {
  14310. "application/json": {
  14311. "schema": {
  14312. "$ref": "#/components/schemas/PtyNotFoundError"
  14313. }
  14314. }
  14315. }
  14316. }
  14317. },
  14318. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  14319. "summary": "Create PTY WebSocket token",
  14320. "x-codeSamples": [
  14321. {
  14322. "lang": "js",
  14323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  14324. }
  14325. ]
  14326. }
  14327. },
  14328. "/api/pty/{ptyID}/connect": {
  14329. "get": {
  14330. "tags": ["pty"],
  14331. "operationId": "v2.pty.connect",
  14332. "parameters": [
  14333. {
  14334. "name": "ptyID",
  14335. "in": "path",
  14336. "schema": {
  14337. "type": "string",
  14338. "pattern": "^pty"
  14339. },
  14340. "required": true
  14341. },
  14342. {
  14343. "in": "query",
  14344. "name": "location[directory]",
  14345. "schema": {
  14346. "type": "string"
  14347. }
  14348. },
  14349. {
  14350. "in": "query",
  14351. "name": "location[workspace]",
  14352. "schema": {
  14353. "type": "string"
  14354. }
  14355. },
  14356. {
  14357. "in": "query",
  14358. "name": "cursor",
  14359. "schema": {
  14360. "type": "string"
  14361. }
  14362. },
  14363. {
  14364. "in": "query",
  14365. "name": "ticket",
  14366. "schema": {
  14367. "type": "string"
  14368. }
  14369. }
  14370. ],
  14371. "security": [],
  14372. "responses": {
  14373. "200": {
  14374. "description": "Success",
  14375. "content": {
  14376. "application/json": {
  14377. "schema": {
  14378. "type": "boolean"
  14379. }
  14380. }
  14381. }
  14382. },
  14383. "400": {
  14384. "description": "InvalidRequestError",
  14385. "content": {
  14386. "application/json": {
  14387. "schema": {
  14388. "$ref": "#/components/schemas/InvalidRequestError"
  14389. }
  14390. }
  14391. }
  14392. },
  14393. "401": {
  14394. "description": "UnauthorizedError",
  14395. "content": {
  14396. "application/json": {
  14397. "schema": {
  14398. "$ref": "#/components/schemas/UnauthorizedError"
  14399. }
  14400. }
  14401. }
  14402. },
  14403. "403": {
  14404. "description": "ForbiddenError",
  14405. "content": {
  14406. "application/json": {
  14407. "schema": {
  14408. "$ref": "#/components/schemas/ForbiddenError"
  14409. }
  14410. }
  14411. }
  14412. },
  14413. "404": {
  14414. "description": "PtyNotFoundError",
  14415. "content": {
  14416. "application/json": {
  14417. "schema": {
  14418. "$ref": "#/components/schemas/PtyNotFoundError"
  14419. }
  14420. }
  14421. }
  14422. }
  14423. },
  14424. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14425. "summary": "Connect to PTY session",
  14426. "x-websocket": true,
  14427. "x-codeSamples": [
  14428. {
  14429. "lang": "js",
  14430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14431. }
  14432. ]
  14433. }
  14434. },
  14435. "/api/question/request": {
  14436. "get": {
  14437. "tags": ["session questions"],
  14438. "operationId": "v2.question.request.list",
  14439. "parameters": [
  14440. {
  14441. "name": "location",
  14442. "in": "query",
  14443. "schema": {
  14444. "type": "object",
  14445. "properties": {
  14446. "directory": {
  14447. "type": "string"
  14448. },
  14449. "workspace": {
  14450. "type": "string"
  14451. }
  14452. },
  14453. "additionalProperties": false
  14454. },
  14455. "required": false,
  14456. "style": "deepObject",
  14457. "explode": true
  14458. }
  14459. ],
  14460. "security": [],
  14461. "responses": {
  14462. "200": {
  14463. "description": "Success",
  14464. "content": {
  14465. "application/json": {
  14466. "schema": {
  14467. "type": "object",
  14468. "properties": {
  14469. "location": {
  14470. "$ref": "#/components/schemas/LocationInfo"
  14471. },
  14472. "data": {
  14473. "type": "array",
  14474. "items": {
  14475. "$ref": "#/components/schemas/QuestionV2Request"
  14476. }
  14477. }
  14478. },
  14479. "required": ["location", "data"],
  14480. "additionalProperties": false
  14481. }
  14482. }
  14483. }
  14484. },
  14485. "400": {
  14486. "description": "InvalidRequestError",
  14487. "content": {
  14488. "application/json": {
  14489. "schema": {
  14490. "$ref": "#/components/schemas/InvalidRequestError"
  14491. }
  14492. }
  14493. }
  14494. },
  14495. "401": {
  14496. "description": "UnauthorizedError",
  14497. "content": {
  14498. "application/json": {
  14499. "schema": {
  14500. "$ref": "#/components/schemas/UnauthorizedError"
  14501. }
  14502. }
  14503. }
  14504. }
  14505. },
  14506. "description": "Retrieve pending question requests for a location.",
  14507. "summary": "List pending question requests",
  14508. "x-codeSamples": [
  14509. {
  14510. "lang": "js",
  14511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14512. }
  14513. ]
  14514. }
  14515. },
  14516. "/api/session/{sessionID}/question": {
  14517. "get": {
  14518. "tags": ["session questions"],
  14519. "operationId": "v2.session.question.list",
  14520. "parameters": [
  14521. {
  14522. "name": "sessionID",
  14523. "in": "path",
  14524. "schema": {
  14525. "type": "string",
  14526. "pattern": "^ses"
  14527. },
  14528. "required": true
  14529. }
  14530. ],
  14531. "security": [],
  14532. "responses": {
  14533. "200": {
  14534. "description": "Success",
  14535. "content": {
  14536. "application/json": {
  14537. "schema": {
  14538. "type": "object",
  14539. "properties": {
  14540. "data": {
  14541. "type": "array",
  14542. "items": {
  14543. "$ref": "#/components/schemas/QuestionV2Request"
  14544. }
  14545. }
  14546. },
  14547. "required": ["data"],
  14548. "additionalProperties": false
  14549. }
  14550. }
  14551. }
  14552. },
  14553. "400": {
  14554. "description": "InvalidRequestError",
  14555. "content": {
  14556. "application/json": {
  14557. "schema": {
  14558. "$ref": "#/components/schemas/InvalidRequestError"
  14559. }
  14560. }
  14561. }
  14562. },
  14563. "401": {
  14564. "description": "UnauthorizedError",
  14565. "content": {
  14566. "application/json": {
  14567. "schema": {
  14568. "$ref": "#/components/schemas/UnauthorizedError"
  14569. }
  14570. }
  14571. }
  14572. },
  14573. "404": {
  14574. "description": "SessionNotFoundError",
  14575. "content": {
  14576. "application/json": {
  14577. "schema": {
  14578. "anyOf": [
  14579. {
  14580. "$ref": "#/components/schemas/SessionNotFoundError"
  14581. },
  14582. {
  14583. "$ref": "#/components/schemas/SessionNotFoundError"
  14584. }
  14585. ]
  14586. }
  14587. }
  14588. }
  14589. }
  14590. },
  14591. "description": "Retrieve pending question requests owned by a session.",
  14592. "summary": "List session question requests",
  14593. "x-codeSamples": [
  14594. {
  14595. "lang": "js",
  14596. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14597. }
  14598. ]
  14599. }
  14600. },
  14601. "/api/session/{sessionID}/question/{requestID}/reply": {
  14602. "post": {
  14603. "tags": ["session questions"],
  14604. "operationId": "v2.session.question.reply",
  14605. "parameters": [
  14606. {
  14607. "name": "sessionID",
  14608. "in": "path",
  14609. "schema": {
  14610. "type": "string",
  14611. "pattern": "^ses"
  14612. },
  14613. "required": true
  14614. },
  14615. {
  14616. "name": "requestID",
  14617. "in": "path",
  14618. "schema": {
  14619. "type": "string",
  14620. "pattern": "^que"
  14621. },
  14622. "required": true
  14623. }
  14624. ],
  14625. "security": [],
  14626. "responses": {
  14627. "204": {
  14628. "description": "<No Content>"
  14629. },
  14630. "400": {
  14631. "description": "InvalidRequestError",
  14632. "content": {
  14633. "application/json": {
  14634. "schema": {
  14635. "$ref": "#/components/schemas/InvalidRequestError"
  14636. }
  14637. }
  14638. }
  14639. },
  14640. "401": {
  14641. "description": "UnauthorizedError",
  14642. "content": {
  14643. "application/json": {
  14644. "schema": {
  14645. "$ref": "#/components/schemas/UnauthorizedError"
  14646. }
  14647. }
  14648. }
  14649. },
  14650. "404": {
  14651. "description": "SessionNotFoundError | QuestionNotFoundError",
  14652. "content": {
  14653. "application/json": {
  14654. "schema": {
  14655. "anyOf": [
  14656. {
  14657. "$ref": "#/components/schemas/QuestionNotFoundError"
  14658. },
  14659. {
  14660. "$ref": "#/components/schemas/SessionNotFoundError"
  14661. },
  14662. {
  14663. "$ref": "#/components/schemas/SessionNotFoundError"
  14664. }
  14665. ]
  14666. }
  14667. }
  14668. }
  14669. }
  14670. },
  14671. "description": "Answer a pending question request owned by a session.",
  14672. "summary": "Reply to pending question request",
  14673. "requestBody": {
  14674. "content": {
  14675. "application/json": {
  14676. "schema": {
  14677. "$ref": "#/components/schemas/QuestionV2Reply"
  14678. }
  14679. }
  14680. },
  14681. "required": true
  14682. },
  14683. "x-codeSamples": [
  14684. {
  14685. "lang": "js",
  14686. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14687. }
  14688. ]
  14689. }
  14690. },
  14691. "/api/session/{sessionID}/question/{requestID}/reject": {
  14692. "post": {
  14693. "tags": ["session questions"],
  14694. "operationId": "v2.session.question.reject",
  14695. "parameters": [
  14696. {
  14697. "name": "sessionID",
  14698. "in": "path",
  14699. "schema": {
  14700. "type": "string",
  14701. "pattern": "^ses"
  14702. },
  14703. "required": true
  14704. },
  14705. {
  14706. "name": "requestID",
  14707. "in": "path",
  14708. "schema": {
  14709. "type": "string",
  14710. "pattern": "^que"
  14711. },
  14712. "required": true
  14713. }
  14714. ],
  14715. "security": [],
  14716. "responses": {
  14717. "204": {
  14718. "description": "<No Content>"
  14719. },
  14720. "400": {
  14721. "description": "InvalidRequestError",
  14722. "content": {
  14723. "application/json": {
  14724. "schema": {
  14725. "$ref": "#/components/schemas/InvalidRequestError"
  14726. }
  14727. }
  14728. }
  14729. },
  14730. "401": {
  14731. "description": "UnauthorizedError",
  14732. "content": {
  14733. "application/json": {
  14734. "schema": {
  14735. "$ref": "#/components/schemas/UnauthorizedError"
  14736. }
  14737. }
  14738. }
  14739. },
  14740. "404": {
  14741. "description": "SessionNotFoundError | QuestionNotFoundError",
  14742. "content": {
  14743. "application/json": {
  14744. "schema": {
  14745. "anyOf": [
  14746. {
  14747. "$ref": "#/components/schemas/QuestionNotFoundError"
  14748. },
  14749. {
  14750. "$ref": "#/components/schemas/SessionNotFoundError"
  14751. },
  14752. {
  14753. "$ref": "#/components/schemas/SessionNotFoundError"
  14754. }
  14755. ]
  14756. }
  14757. }
  14758. }
  14759. }
  14760. },
  14761. "description": "Reject a pending question request owned by a session.",
  14762. "summary": "Reject pending question request",
  14763. "x-codeSamples": [
  14764. {
  14765. "lang": "js",
  14766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14767. }
  14768. ]
  14769. }
  14770. },
  14771. "/api/reference": {
  14772. "get": {
  14773. "tags": ["reference"],
  14774. "operationId": "v2.reference.list",
  14775. "parameters": [
  14776. {
  14777. "name": "location",
  14778. "in": "query",
  14779. "schema": {
  14780. "type": "object",
  14781. "properties": {
  14782. "directory": {
  14783. "type": "string"
  14784. },
  14785. "workspace": {
  14786. "type": "string"
  14787. }
  14788. },
  14789. "additionalProperties": false
  14790. },
  14791. "required": false,
  14792. "style": "deepObject",
  14793. "explode": true
  14794. }
  14795. ],
  14796. "security": [],
  14797. "responses": {
  14798. "200": {
  14799. "description": "Success",
  14800. "content": {
  14801. "application/json": {
  14802. "schema": {
  14803. "type": "object",
  14804. "properties": {
  14805. "location": {
  14806. "$ref": "#/components/schemas/LocationInfo"
  14807. },
  14808. "data": {
  14809. "type": "array",
  14810. "items": {
  14811. "$ref": "#/components/schemas/ReferenceInfo"
  14812. }
  14813. }
  14814. },
  14815. "required": ["location", "data"],
  14816. "additionalProperties": false
  14817. }
  14818. }
  14819. }
  14820. },
  14821. "400": {
  14822. "description": "InvalidRequestError",
  14823. "content": {
  14824. "application/json": {
  14825. "schema": {
  14826. "$ref": "#/components/schemas/InvalidRequestError"
  14827. }
  14828. }
  14829. }
  14830. },
  14831. "401": {
  14832. "description": "UnauthorizedError",
  14833. "content": {
  14834. "application/json": {
  14835. "schema": {
  14836. "$ref": "#/components/schemas/UnauthorizedError"
  14837. }
  14838. }
  14839. }
  14840. }
  14841. },
  14842. "description": "List references available in the requested location.",
  14843. "summary": "List references",
  14844. "x-codeSamples": [
  14845. {
  14846. "lang": "js",
  14847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14848. }
  14849. ]
  14850. }
  14851. },
  14852. "/experimental/project/{projectID}/copy": {
  14853. "post": {
  14854. "tags": ["projectCopy"],
  14855. "operationId": "v2.projectCopy.create",
  14856. "parameters": [
  14857. {
  14858. "name": "projectID",
  14859. "in": "path",
  14860. "schema": {
  14861. "type": "string"
  14862. },
  14863. "required": true
  14864. },
  14865. {
  14866. "name": "location",
  14867. "in": "query",
  14868. "schema": {
  14869. "type": "object",
  14870. "properties": {
  14871. "directory": {
  14872. "type": "string"
  14873. },
  14874. "workspace": {
  14875. "type": "string"
  14876. }
  14877. },
  14878. "additionalProperties": false
  14879. },
  14880. "required": false,
  14881. "style": "deepObject",
  14882. "explode": true
  14883. }
  14884. ],
  14885. "responses": {
  14886. "200": {
  14887. "description": "ProjectCopy.Copy",
  14888. "content": {
  14889. "application/json": {
  14890. "schema": {
  14891. "$ref": "#/components/schemas/ProjectCopyCopy"
  14892. }
  14893. }
  14894. }
  14895. },
  14896. "400": {
  14897. "description": "ProjectCopyError | InvalidRequestError",
  14898. "content": {
  14899. "application/json": {
  14900. "schema": {
  14901. "anyOf": [
  14902. {
  14903. "$ref": "#/components/schemas/ProjectCopyError"
  14904. },
  14905. {
  14906. "$ref": "#/components/schemas/InvalidRequestError"
  14907. }
  14908. ]
  14909. }
  14910. }
  14911. }
  14912. }
  14913. },
  14914. "requestBody": {
  14915. "content": {
  14916. "application/json": {
  14917. "schema": {
  14918. "type": "object",
  14919. "properties": {
  14920. "strategy": {
  14921. "type": "string"
  14922. },
  14923. "directory": {
  14924. "type": "string"
  14925. },
  14926. "name": {
  14927. "type": "string"
  14928. }
  14929. },
  14930. "required": ["strategy", "directory"],
  14931. "additionalProperties": false
  14932. }
  14933. }
  14934. }
  14935. },
  14936. "x-codeSamples": [
  14937. {
  14938. "lang": "js",
  14939. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14940. }
  14941. ]
  14942. },
  14943. "delete": {
  14944. "tags": ["projectCopy"],
  14945. "operationId": "v2.projectCopy.remove",
  14946. "parameters": [
  14947. {
  14948. "name": "projectID",
  14949. "in": "path",
  14950. "schema": {
  14951. "type": "string"
  14952. },
  14953. "required": true
  14954. },
  14955. {
  14956. "name": "location",
  14957. "in": "query",
  14958. "schema": {
  14959. "type": "object",
  14960. "properties": {
  14961. "directory": {
  14962. "type": "string"
  14963. },
  14964. "workspace": {
  14965. "type": "string"
  14966. }
  14967. },
  14968. "additionalProperties": false
  14969. },
  14970. "required": false,
  14971. "style": "deepObject",
  14972. "explode": true
  14973. }
  14974. ],
  14975. "responses": {
  14976. "204": {
  14977. "description": "<No Content>"
  14978. },
  14979. "400": {
  14980. "description": "ProjectCopyError | InvalidRequestError",
  14981. "content": {
  14982. "application/json": {
  14983. "schema": {
  14984. "anyOf": [
  14985. {
  14986. "$ref": "#/components/schemas/ProjectCopyError"
  14987. },
  14988. {
  14989. "$ref": "#/components/schemas/InvalidRequestError"
  14990. }
  14991. ]
  14992. }
  14993. }
  14994. }
  14995. }
  14996. },
  14997. "requestBody": {
  14998. "content": {
  14999. "application/json": {
  15000. "schema": {
  15001. "type": "object",
  15002. "properties": {
  15003. "directory": {
  15004. "type": "string"
  15005. },
  15006. "force": {
  15007. "type": "boolean"
  15008. }
  15009. },
  15010. "required": ["directory", "force"],
  15011. "additionalProperties": false
  15012. }
  15013. }
  15014. }
  15015. },
  15016. "x-codeSamples": [
  15017. {
  15018. "lang": "js",
  15019. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  15020. }
  15021. ]
  15022. }
  15023. },
  15024. "/experimental/project/{projectID}/copy/refresh": {
  15025. "post": {
  15026. "tags": ["projectCopy"],
  15027. "operationId": "v2.projectCopy.refresh",
  15028. "parameters": [
  15029. {
  15030. "name": "projectID",
  15031. "in": "path",
  15032. "schema": {
  15033. "type": "string"
  15034. },
  15035. "required": true
  15036. },
  15037. {
  15038. "name": "location",
  15039. "in": "query",
  15040. "schema": {
  15041. "type": "object",
  15042. "properties": {
  15043. "directory": {
  15044. "type": "string"
  15045. },
  15046. "workspace": {
  15047. "type": "string"
  15048. }
  15049. },
  15050. "additionalProperties": false
  15051. },
  15052. "required": false,
  15053. "style": "deepObject",
  15054. "explode": true
  15055. }
  15056. ],
  15057. "responses": {
  15058. "204": {
  15059. "description": "<No Content>"
  15060. },
  15061. "400": {
  15062. "description": "ProjectCopyError | InvalidRequestError",
  15063. "content": {
  15064. "application/json": {
  15065. "schema": {
  15066. "anyOf": [
  15067. {
  15068. "$ref": "#/components/schemas/ProjectCopyError"
  15069. },
  15070. {
  15071. "$ref": "#/components/schemas/InvalidRequestError"
  15072. }
  15073. ]
  15074. }
  15075. }
  15076. }
  15077. }
  15078. },
  15079. "x-codeSamples": [
  15080. {
  15081. "lang": "js",
  15082. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  15083. }
  15084. ]
  15085. }
  15086. },
  15087. "/pty/{ptyID}/connect": {
  15088. "get": {
  15089. "tags": ["pty"],
  15090. "operationId": "pty.connect",
  15091. "parameters": [
  15092. {
  15093. "name": "ptyID",
  15094. "in": "path",
  15095. "schema": {
  15096. "type": "string",
  15097. "pattern": "^pty"
  15098. },
  15099. "required": true
  15100. },
  15101. {
  15102. "in": "query",
  15103. "name": "directory",
  15104. "schema": {
  15105. "type": "string"
  15106. }
  15107. },
  15108. {
  15109. "in": "query",
  15110. "name": "workspace",
  15111. "schema": {
  15112. "type": "string"
  15113. }
  15114. },
  15115. {
  15116. "in": "query",
  15117. "name": "cursor",
  15118. "schema": {
  15119. "type": "string"
  15120. }
  15121. },
  15122. {
  15123. "in": "query",
  15124. "name": "ticket",
  15125. "schema": {
  15126. "type": "string"
  15127. }
  15128. }
  15129. ],
  15130. "responses": {
  15131. "200": {
  15132. "description": "Connected session",
  15133. "content": {
  15134. "application/json": {
  15135. "schema": {
  15136. "type": "boolean",
  15137. "description": "Connected session"
  15138. }
  15139. }
  15140. }
  15141. },
  15142. "403": {
  15143. "description": "Forbidden",
  15144. "content": {
  15145. "application/json": {
  15146. "schema": {
  15147. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  15148. }
  15149. }
  15150. }
  15151. },
  15152. "404": {
  15153. "description": "Not found",
  15154. "content": {
  15155. "application/json": {
  15156. "schema": {
  15157. "$ref": "#/components/schemas/NotFoundError"
  15158. }
  15159. }
  15160. }
  15161. }
  15162. },
  15163. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  15164. "summary": "Connect to PTY session",
  15165. "x-codeSamples": [
  15166. {
  15167. "lang": "js",
  15168. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  15169. }
  15170. ]
  15171. }
  15172. }
  15173. },
  15174. "components": {
  15175. "schemas": {
  15176. "Event": {
  15177. "anyOf": [
  15178. {
  15179. "$ref": "#/components/schemas/EventModels-devRefreshed"
  15180. },
  15181. {
  15182. "$ref": "#/components/schemas/EventIntegrationUpdated"
  15183. },
  15184. {
  15185. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  15186. },
  15187. {
  15188. "$ref": "#/components/schemas/EventCatalogUpdated"
  15189. },
  15190. {
  15191. "$ref": "#/components/schemas/EventSessionCreated"
  15192. },
  15193. {
  15194. "$ref": "#/components/schemas/EventSessionUpdated"
  15195. },
  15196. {
  15197. "$ref": "#/components/schemas/EventSessionDeleted"
  15198. },
  15199. {
  15200. "$ref": "#/components/schemas/EventMessageUpdated"
  15201. },
  15202. {
  15203. "$ref": "#/components/schemas/EventMessageRemoved"
  15204. },
  15205. {
  15206. "$ref": "#/components/schemas/EventMessagePartUpdated"
  15207. },
  15208. {
  15209. "$ref": "#/components/schemas/EventMessagePartRemoved"
  15210. },
  15211. {
  15212. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  15213. },
  15214. {
  15215. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  15216. },
  15217. {
  15218. "$ref": "#/components/schemas/EventSessionNextMoved"
  15219. },
  15220. {
  15221. "$ref": "#/components/schemas/EventSessionNextPrompted"
  15222. },
  15223. {
  15224. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  15225. },
  15226. {
  15227. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  15228. },
  15229. {
  15230. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  15231. },
  15232. {
  15233. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  15234. },
  15235. {
  15236. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  15237. },
  15238. {
  15239. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  15240. },
  15241. {
  15242. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  15243. },
  15244. {
  15245. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  15246. },
  15247. {
  15248. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  15249. },
  15250. {
  15251. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15252. },
  15253. {
  15254. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15255. },
  15256. {
  15257. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15258. },
  15259. {
  15260. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15261. },
  15262. {
  15263. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15264. },
  15265. {
  15266. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15267. },
  15268. {
  15269. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15270. },
  15271. {
  15272. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15273. },
  15274. {
  15275. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15276. },
  15277. {
  15278. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15279. },
  15280. {
  15281. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15282. },
  15283. {
  15284. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15285. },
  15286. {
  15287. "$ref": "#/components/schemas/EventSessionNextRetried"
  15288. },
  15289. {
  15290. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15291. },
  15292. {
  15293. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15294. },
  15295. {
  15296. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15297. },
  15298. {
  15299. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15300. },
  15301. {
  15302. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15303. },
  15304. {
  15305. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15306. },
  15307. {
  15308. "$ref": "#/components/schemas/EventMessagePartDelta"
  15309. },
  15310. {
  15311. "$ref": "#/components/schemas/EventSessionDiff"
  15312. },
  15313. {
  15314. "$ref": "#/components/schemas/EventSessionError"
  15315. },
  15316. {
  15317. "$ref": "#/components/schemas/EventInstallationUpdated"
  15318. },
  15319. {
  15320. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15321. },
  15322. {
  15323. "$ref": "#/components/schemas/EventFileEdited"
  15324. },
  15325. {
  15326. "$ref": "#/components/schemas/EventReferenceUpdated"
  15327. },
  15328. {
  15329. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15330. },
  15331. {
  15332. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15333. },
  15334. {
  15335. "$ref": "#/components/schemas/EventPluginAdded"
  15336. },
  15337. {
  15338. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15339. },
  15340. {
  15341. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15342. },
  15343. {
  15344. "$ref": "#/components/schemas/EventPtyCreated"
  15345. },
  15346. {
  15347. "$ref": "#/components/schemas/EventPtyUpdated"
  15348. },
  15349. {
  15350. "$ref": "#/components/schemas/EventPtyExited"
  15351. },
  15352. {
  15353. "$ref": "#/components/schemas/EventPtyDeleted"
  15354. },
  15355. {
  15356. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15357. },
  15358. {
  15359. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15360. },
  15361. {
  15362. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15363. },
  15364. {
  15365. "$ref": "#/components/schemas/EventLspUpdated"
  15366. },
  15367. {
  15368. "$ref": "#/components/schemas/EventPermissionAsked"
  15369. },
  15370. {
  15371. "$ref": "#/components/schemas/EventPermissionReplied"
  15372. },
  15373. {
  15374. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15375. },
  15376. {
  15377. "$ref": "#/components/schemas/Event.tui.command.execute"
  15378. },
  15379. {
  15380. "$ref": "#/components/schemas/Event.tui.toast.show"
  15381. },
  15382. {
  15383. "$ref": "#/components/schemas/Event.tui.session.select"
  15384. },
  15385. {
  15386. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15387. },
  15388. {
  15389. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15390. },
  15391. {
  15392. "$ref": "#/components/schemas/EventCommandExecuted"
  15393. },
  15394. {
  15395. "$ref": "#/components/schemas/EventProjectUpdated"
  15396. },
  15397. {
  15398. "$ref": "#/components/schemas/EventSessionStatus"
  15399. },
  15400. {
  15401. "$ref": "#/components/schemas/EventSessionIdle"
  15402. },
  15403. {
  15404. "$ref": "#/components/schemas/EventQuestionAsked"
  15405. },
  15406. {
  15407. "$ref": "#/components/schemas/EventQuestionReplied"
  15408. },
  15409. {
  15410. "$ref": "#/components/schemas/EventQuestionRejected"
  15411. },
  15412. {
  15413. "$ref": "#/components/schemas/EventSessionCompacted"
  15414. },
  15415. {
  15416. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15417. },
  15418. {
  15419. "$ref": "#/components/schemas/EventWorkspaceReady"
  15420. },
  15421. {
  15422. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15423. },
  15424. {
  15425. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15426. },
  15427. {
  15428. "$ref": "#/components/schemas/EventWorktreeReady"
  15429. },
  15430. {
  15431. "$ref": "#/components/schemas/EventWorktreeFailed"
  15432. },
  15433. {
  15434. "$ref": "#/components/schemas/EventServerConnected"
  15435. },
  15436. {
  15437. "$ref": "#/components/schemas/EventGlobalDisposed"
  15438. },
  15439. {
  15440. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15441. }
  15442. ]
  15443. },
  15444. "QuestionReplied": {
  15445. "type": "object",
  15446. "properties": {
  15447. "sessionID": {
  15448. "type": "string",
  15449. "pattern": "^ses"
  15450. },
  15451. "requestID": {
  15452. "type": "string",
  15453. "pattern": "^que"
  15454. },
  15455. "answers": {
  15456. "type": "array",
  15457. "items": {
  15458. "$ref": "#/components/schemas/QuestionAnswer"
  15459. }
  15460. }
  15461. },
  15462. "required": ["sessionID", "requestID", "answers"],
  15463. "additionalProperties": false
  15464. },
  15465. "QuestionRejected": {
  15466. "type": "object",
  15467. "properties": {
  15468. "sessionID": {
  15469. "type": "string",
  15470. "pattern": "^ses"
  15471. },
  15472. "requestID": {
  15473. "type": "string",
  15474. "pattern": "^que"
  15475. }
  15476. },
  15477. "required": ["sessionID", "requestID"],
  15478. "additionalProperties": false
  15479. },
  15480. "OAuth": {
  15481. "type": "object",
  15482. "properties": {
  15483. "type": {
  15484. "type": "string",
  15485. "enum": ["oauth"]
  15486. },
  15487. "refresh": {
  15488. "type": "string"
  15489. },
  15490. "access": {
  15491. "type": "string"
  15492. },
  15493. "expires": {
  15494. "type": "integer",
  15495. "minimum": 0
  15496. },
  15497. "accountId": {
  15498. "type": "string"
  15499. },
  15500. "enterpriseUrl": {
  15501. "type": "string"
  15502. }
  15503. },
  15504. "required": ["type", "refresh", "access", "expires"],
  15505. "additionalProperties": false
  15506. },
  15507. "ApiAuth": {
  15508. "type": "object",
  15509. "properties": {
  15510. "type": {
  15511. "type": "string",
  15512. "enum": ["api"]
  15513. },
  15514. "key": {
  15515. "type": "string"
  15516. },
  15517. "metadata": {
  15518. "type": "object",
  15519. "additionalProperties": {
  15520. "type": "string"
  15521. }
  15522. }
  15523. },
  15524. "required": ["type", "key"],
  15525. "additionalProperties": false
  15526. },
  15527. "WellKnownAuth": {
  15528. "type": "object",
  15529. "properties": {
  15530. "type": {
  15531. "type": "string",
  15532. "enum": ["wellknown"]
  15533. },
  15534. "key": {
  15535. "type": "string"
  15536. },
  15537. "token": {
  15538. "type": "string"
  15539. }
  15540. },
  15541. "required": ["type", "key", "token"],
  15542. "additionalProperties": false
  15543. },
  15544. "Auth": {
  15545. "anyOf": [
  15546. {
  15547. "$ref": "#/components/schemas/OAuth"
  15548. },
  15549. {
  15550. "$ref": "#/components/schemas/ApiAuth"
  15551. },
  15552. {
  15553. "$ref": "#/components/schemas/WellKnownAuth"
  15554. }
  15555. ]
  15556. },
  15557. "effect_HttpApiError_BadRequest": {
  15558. "type": "object",
  15559. "properties": {
  15560. "_tag": {
  15561. "type": "string",
  15562. "enum": ["BadRequest"]
  15563. }
  15564. },
  15565. "required": ["_tag"],
  15566. "additionalProperties": false
  15567. },
  15568. "InvalidRequestError": {
  15569. "type": "object",
  15570. "properties": {
  15571. "_tag": {
  15572. "type": "string",
  15573. "enum": ["InvalidRequestError"]
  15574. },
  15575. "message": {
  15576. "type": "string"
  15577. },
  15578. "kind": {
  15579. "type": "string"
  15580. },
  15581. "field": {
  15582. "type": "string"
  15583. }
  15584. },
  15585. "required": ["_tag", "message"],
  15586. "additionalProperties": false
  15587. },
  15588. "MoveSessionError": {
  15589. "type": "object",
  15590. "properties": {
  15591. "name": {
  15592. "type": "string",
  15593. "enum": ["MoveSessionError"]
  15594. },
  15595. "data": {
  15596. "type": "object",
  15597. "properties": {
  15598. "message": {
  15599. "type": "string"
  15600. }
  15601. },
  15602. "required": ["message"],
  15603. "additionalProperties": false
  15604. }
  15605. },
  15606. "required": ["name", "data"],
  15607. "additionalProperties": false
  15608. },
  15609. "SnapshotFileDiff": {
  15610. "type": "object",
  15611. "properties": {
  15612. "file": {
  15613. "type": "string"
  15614. },
  15615. "patch": {
  15616. "type": "string"
  15617. },
  15618. "additions": {
  15619. "type": "number"
  15620. },
  15621. "deletions": {
  15622. "type": "number"
  15623. },
  15624. "status": {
  15625. "type": "string",
  15626. "enum": ["added", "deleted", "modified"]
  15627. }
  15628. },
  15629. "required": ["additions", "deletions"],
  15630. "additionalProperties": false
  15631. },
  15632. "PermissionAction": {
  15633. "type": "string",
  15634. "enum": ["allow", "deny", "ask"]
  15635. },
  15636. "PermissionRule": {
  15637. "type": "object",
  15638. "properties": {
  15639. "permission": {
  15640. "type": "string"
  15641. },
  15642. "pattern": {
  15643. "type": "string"
  15644. },
  15645. "action": {
  15646. "$ref": "#/components/schemas/PermissionAction"
  15647. }
  15648. },
  15649. "required": ["permission", "pattern", "action"],
  15650. "additionalProperties": false
  15651. },
  15652. "PermissionRuleset": {
  15653. "type": "array",
  15654. "items": {
  15655. "$ref": "#/components/schemas/PermissionRule"
  15656. }
  15657. },
  15658. "Session": {
  15659. "type": "object",
  15660. "properties": {
  15661. "id": {
  15662. "type": "string",
  15663. "pattern": "^ses"
  15664. },
  15665. "slug": {
  15666. "type": "string"
  15667. },
  15668. "projectID": {
  15669. "type": "string"
  15670. },
  15671. "workspaceID": {
  15672. "type": "string",
  15673. "pattern": "^wrk"
  15674. },
  15675. "directory": {
  15676. "type": "string"
  15677. },
  15678. "path": {
  15679. "type": "string"
  15680. },
  15681. "parentID": {
  15682. "type": "string",
  15683. "pattern": "^ses"
  15684. },
  15685. "summary": {
  15686. "type": "object",
  15687. "properties": {
  15688. "additions": {
  15689. "type": "number"
  15690. },
  15691. "deletions": {
  15692. "type": "number"
  15693. },
  15694. "files": {
  15695. "type": "number"
  15696. },
  15697. "diffs": {
  15698. "type": "array",
  15699. "items": {
  15700. "$ref": "#/components/schemas/SnapshotFileDiff"
  15701. }
  15702. }
  15703. },
  15704. "required": ["additions", "deletions", "files"],
  15705. "additionalProperties": false
  15706. },
  15707. "cost": {
  15708. "type": "number"
  15709. },
  15710. "tokens": {
  15711. "type": "object",
  15712. "properties": {
  15713. "input": {
  15714. "type": "number"
  15715. },
  15716. "output": {
  15717. "type": "number"
  15718. },
  15719. "reasoning": {
  15720. "type": "number"
  15721. },
  15722. "cache": {
  15723. "type": "object",
  15724. "properties": {
  15725. "read": {
  15726. "type": "number"
  15727. },
  15728. "write": {
  15729. "type": "number"
  15730. }
  15731. },
  15732. "required": ["read", "write"],
  15733. "additionalProperties": false
  15734. }
  15735. },
  15736. "required": ["input", "output", "reasoning", "cache"],
  15737. "additionalProperties": false
  15738. },
  15739. "share": {
  15740. "type": "object",
  15741. "properties": {
  15742. "url": {
  15743. "type": "string"
  15744. }
  15745. },
  15746. "required": ["url"],
  15747. "additionalProperties": false
  15748. },
  15749. "title": {
  15750. "type": "string"
  15751. },
  15752. "agent": {
  15753. "type": "string"
  15754. },
  15755. "model": {
  15756. "type": "object",
  15757. "properties": {
  15758. "id": {
  15759. "type": "string"
  15760. },
  15761. "providerID": {
  15762. "type": "string"
  15763. },
  15764. "variant": {
  15765. "type": "string"
  15766. }
  15767. },
  15768. "required": ["id", "providerID"],
  15769. "additionalProperties": false
  15770. },
  15771. "version": {
  15772. "type": "string"
  15773. },
  15774. "metadata": {
  15775. "type": "object"
  15776. },
  15777. "time": {
  15778. "type": "object",
  15779. "properties": {
  15780. "created": {
  15781. "type": "integer",
  15782. "minimum": 0
  15783. },
  15784. "updated": {
  15785. "type": "integer",
  15786. "minimum": 0
  15787. },
  15788. "compacting": {
  15789. "type": "integer",
  15790. "minimum": 0
  15791. },
  15792. "archived": {
  15793. "type": "number"
  15794. }
  15795. },
  15796. "required": ["created", "updated"],
  15797. "additionalProperties": false
  15798. },
  15799. "permission": {
  15800. "$ref": "#/components/schemas/PermissionRuleset"
  15801. },
  15802. "revert": {
  15803. "type": "object",
  15804. "properties": {
  15805. "messageID": {
  15806. "type": "string",
  15807. "pattern": "^msg"
  15808. },
  15809. "partID": {
  15810. "type": "string",
  15811. "pattern": "^prt"
  15812. },
  15813. "snapshot": {
  15814. "type": "string"
  15815. },
  15816. "diff": {
  15817. "type": "string"
  15818. }
  15819. },
  15820. "required": ["messageID"],
  15821. "additionalProperties": false
  15822. }
  15823. },
  15824. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15825. "additionalProperties": false
  15826. },
  15827. "OutputFormatText": {
  15828. "type": "object",
  15829. "properties": {
  15830. "type": {
  15831. "type": "string",
  15832. "enum": ["text"]
  15833. }
  15834. },
  15835. "required": ["type"],
  15836. "additionalProperties": false
  15837. },
  15838. "JSONSchema": {
  15839. "type": "object"
  15840. },
  15841. "OutputFormatJsonSchema": {
  15842. "type": "object",
  15843. "properties": {
  15844. "type": {
  15845. "type": "string",
  15846. "enum": ["json_schema"]
  15847. },
  15848. "schema": {
  15849. "$ref": "#/components/schemas/JSONSchema"
  15850. },
  15851. "retryCount": {
  15852. "type": "integer",
  15853. "minimum": 0
  15854. }
  15855. },
  15856. "required": ["type", "schema"],
  15857. "additionalProperties": false
  15858. },
  15859. "OutputFormat": {
  15860. "anyOf": [
  15861. {
  15862. "$ref": "#/components/schemas/OutputFormatText"
  15863. },
  15864. {
  15865. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15866. }
  15867. ]
  15868. },
  15869. "UserMessage": {
  15870. "type": "object",
  15871. "properties": {
  15872. "id": {
  15873. "type": "string",
  15874. "pattern": "^msg"
  15875. },
  15876. "sessionID": {
  15877. "type": "string",
  15878. "pattern": "^ses"
  15879. },
  15880. "role": {
  15881. "type": "string",
  15882. "enum": ["user"]
  15883. },
  15884. "time": {
  15885. "type": "object",
  15886. "properties": {
  15887. "created": {
  15888. "type": "number",
  15889. "minimum": 0
  15890. }
  15891. },
  15892. "required": ["created"],
  15893. "additionalProperties": false
  15894. },
  15895. "format": {
  15896. "$ref": "#/components/schemas/OutputFormat"
  15897. },
  15898. "summary": {
  15899. "type": "object",
  15900. "properties": {
  15901. "title": {
  15902. "type": "string"
  15903. },
  15904. "body": {
  15905. "type": "string"
  15906. },
  15907. "diffs": {
  15908. "type": "array",
  15909. "items": {
  15910. "$ref": "#/components/schemas/SnapshotFileDiff"
  15911. }
  15912. }
  15913. },
  15914. "required": ["diffs"],
  15915. "additionalProperties": false
  15916. },
  15917. "agent": {
  15918. "type": "string"
  15919. },
  15920. "model": {
  15921. "type": "object",
  15922. "properties": {
  15923. "providerID": {
  15924. "type": "string"
  15925. },
  15926. "modelID": {
  15927. "type": "string"
  15928. },
  15929. "variant": {
  15930. "type": "string"
  15931. }
  15932. },
  15933. "required": ["providerID", "modelID"],
  15934. "additionalProperties": false
  15935. },
  15936. "system": {
  15937. "type": "string"
  15938. },
  15939. "tools": {
  15940. "type": "object",
  15941. "additionalProperties": {
  15942. "type": "boolean"
  15943. }
  15944. }
  15945. },
  15946. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15947. "additionalProperties": false
  15948. },
  15949. "ProviderAuthError": {
  15950. "type": "object",
  15951. "properties": {
  15952. "name": {
  15953. "type": "string",
  15954. "enum": ["ProviderAuthError"]
  15955. },
  15956. "data": {
  15957. "type": "object",
  15958. "properties": {
  15959. "providerID": {
  15960. "type": "string"
  15961. },
  15962. "message": {
  15963. "type": "string"
  15964. }
  15965. },
  15966. "required": ["providerID", "message"],
  15967. "additionalProperties": false
  15968. }
  15969. },
  15970. "required": ["name", "data"],
  15971. "additionalProperties": false
  15972. },
  15973. "UnknownError": {
  15974. "type": "object",
  15975. "properties": {
  15976. "name": {
  15977. "type": "string",
  15978. "enum": ["UnknownError"]
  15979. },
  15980. "data": {
  15981. "type": "object",
  15982. "properties": {
  15983. "message": {
  15984. "type": "string"
  15985. },
  15986. "ref": {
  15987. "type": "string"
  15988. }
  15989. },
  15990. "required": ["message"],
  15991. "additionalProperties": false
  15992. }
  15993. },
  15994. "required": ["name", "data"],
  15995. "additionalProperties": false
  15996. },
  15997. "MessageOutputLengthError": {
  15998. "type": "object",
  15999. "properties": {
  16000. "name": {
  16001. "type": "string",
  16002. "enum": ["MessageOutputLengthError"]
  16003. },
  16004. "data": {
  16005. "type": "object",
  16006. "properties": {}
  16007. }
  16008. },
  16009. "required": ["name", "data"],
  16010. "additionalProperties": false
  16011. },
  16012. "MessageAbortedError": {
  16013. "type": "object",
  16014. "properties": {
  16015. "name": {
  16016. "type": "string",
  16017. "enum": ["MessageAbortedError"]
  16018. },
  16019. "data": {
  16020. "type": "object",
  16021. "properties": {
  16022. "message": {
  16023. "type": "string"
  16024. }
  16025. },
  16026. "required": ["message"],
  16027. "additionalProperties": false
  16028. }
  16029. },
  16030. "required": ["name", "data"],
  16031. "additionalProperties": false
  16032. },
  16033. "StructuredOutputError": {
  16034. "type": "object",
  16035. "properties": {
  16036. "name": {
  16037. "type": "string",
  16038. "enum": ["StructuredOutputError"]
  16039. },
  16040. "data": {
  16041. "type": "object",
  16042. "properties": {
  16043. "message": {
  16044. "type": "string"
  16045. },
  16046. "retries": {
  16047. "type": "integer",
  16048. "minimum": 0
  16049. }
  16050. },
  16051. "required": ["message", "retries"],
  16052. "additionalProperties": false
  16053. }
  16054. },
  16055. "required": ["name", "data"],
  16056. "additionalProperties": false
  16057. },
  16058. "ContextOverflowError": {
  16059. "type": "object",
  16060. "properties": {
  16061. "name": {
  16062. "type": "string",
  16063. "enum": ["ContextOverflowError"]
  16064. },
  16065. "data": {
  16066. "type": "object",
  16067. "properties": {
  16068. "message": {
  16069. "type": "string"
  16070. },
  16071. "responseBody": {
  16072. "type": "string"
  16073. }
  16074. },
  16075. "required": ["message"],
  16076. "additionalProperties": false
  16077. }
  16078. },
  16079. "required": ["name", "data"],
  16080. "additionalProperties": false
  16081. },
  16082. "ContentFilterError": {
  16083. "type": "object",
  16084. "properties": {
  16085. "name": {
  16086. "type": "string",
  16087. "enum": ["ContentFilterError"]
  16088. },
  16089. "data": {
  16090. "type": "object",
  16091. "properties": {
  16092. "message": {
  16093. "type": "string"
  16094. }
  16095. },
  16096. "required": ["message"],
  16097. "additionalProperties": false
  16098. }
  16099. },
  16100. "required": ["name", "data"],
  16101. "additionalProperties": false
  16102. },
  16103. "APIError": {
  16104. "type": "object",
  16105. "properties": {
  16106. "name": {
  16107. "type": "string",
  16108. "enum": ["APIError"]
  16109. },
  16110. "data": {
  16111. "type": "object",
  16112. "properties": {
  16113. "message": {
  16114. "type": "string"
  16115. },
  16116. "statusCode": {
  16117. "type": "integer",
  16118. "minimum": 0
  16119. },
  16120. "isRetryable": {
  16121. "type": "boolean"
  16122. },
  16123. "responseHeaders": {
  16124. "type": "object",
  16125. "additionalProperties": {
  16126. "type": "string"
  16127. }
  16128. },
  16129. "responseBody": {
  16130. "type": "string"
  16131. },
  16132. "metadata": {
  16133. "type": "object",
  16134. "additionalProperties": {
  16135. "type": "string"
  16136. }
  16137. }
  16138. },
  16139. "required": ["message", "isRetryable"],
  16140. "additionalProperties": false
  16141. }
  16142. },
  16143. "required": ["name", "data"],
  16144. "additionalProperties": false
  16145. },
  16146. "AssistantMessage": {
  16147. "type": "object",
  16148. "properties": {
  16149. "id": {
  16150. "type": "string",
  16151. "pattern": "^msg"
  16152. },
  16153. "sessionID": {
  16154. "type": "string",
  16155. "pattern": "^ses"
  16156. },
  16157. "role": {
  16158. "type": "string",
  16159. "enum": ["assistant"]
  16160. },
  16161. "time": {
  16162. "type": "object",
  16163. "properties": {
  16164. "created": {
  16165. "type": "integer",
  16166. "minimum": 0
  16167. },
  16168. "completed": {
  16169. "type": "integer",
  16170. "minimum": 0
  16171. }
  16172. },
  16173. "required": ["created"],
  16174. "additionalProperties": false
  16175. },
  16176. "error": {
  16177. "anyOf": [
  16178. {
  16179. "$ref": "#/components/schemas/ProviderAuthError"
  16180. },
  16181. {
  16182. "$ref": "#/components/schemas/UnknownError"
  16183. },
  16184. {
  16185. "$ref": "#/components/schemas/MessageOutputLengthError"
  16186. },
  16187. {
  16188. "$ref": "#/components/schemas/MessageAbortedError"
  16189. },
  16190. {
  16191. "$ref": "#/components/schemas/StructuredOutputError"
  16192. },
  16193. {
  16194. "$ref": "#/components/schemas/ContextOverflowError"
  16195. },
  16196. {
  16197. "$ref": "#/components/schemas/ContentFilterError"
  16198. },
  16199. {
  16200. "$ref": "#/components/schemas/APIError"
  16201. }
  16202. ]
  16203. },
  16204. "parentID": {
  16205. "type": "string",
  16206. "pattern": "^msg"
  16207. },
  16208. "modelID": {
  16209. "type": "string"
  16210. },
  16211. "providerID": {
  16212. "type": "string"
  16213. },
  16214. "mode": {
  16215. "type": "string"
  16216. },
  16217. "agent": {
  16218. "type": "string"
  16219. },
  16220. "path": {
  16221. "type": "object",
  16222. "properties": {
  16223. "cwd": {
  16224. "type": "string"
  16225. },
  16226. "root": {
  16227. "type": "string"
  16228. }
  16229. },
  16230. "required": ["cwd", "root"],
  16231. "additionalProperties": false
  16232. },
  16233. "summary": {
  16234. "type": "boolean"
  16235. },
  16236. "cost": {
  16237. "type": "number"
  16238. },
  16239. "tokens": {
  16240. "type": "object",
  16241. "properties": {
  16242. "total": {
  16243. "type": "number"
  16244. },
  16245. "input": {
  16246. "type": "number"
  16247. },
  16248. "output": {
  16249. "type": "number"
  16250. },
  16251. "reasoning": {
  16252. "type": "number"
  16253. },
  16254. "cache": {
  16255. "type": "object",
  16256. "properties": {
  16257. "read": {
  16258. "type": "number"
  16259. },
  16260. "write": {
  16261. "type": "number"
  16262. }
  16263. },
  16264. "required": ["read", "write"],
  16265. "additionalProperties": false
  16266. }
  16267. },
  16268. "required": ["input", "output", "reasoning", "cache"],
  16269. "additionalProperties": false
  16270. },
  16271. "structured": {},
  16272. "variant": {
  16273. "type": "string"
  16274. },
  16275. "finish": {
  16276. "type": "string"
  16277. }
  16278. },
  16279. "required": [
  16280. "id",
  16281. "sessionID",
  16282. "role",
  16283. "time",
  16284. "parentID",
  16285. "modelID",
  16286. "providerID",
  16287. "mode",
  16288. "agent",
  16289. "path",
  16290. "cost",
  16291. "tokens"
  16292. ],
  16293. "additionalProperties": false
  16294. },
  16295. "Message": {
  16296. "anyOf": [
  16297. {
  16298. "$ref": "#/components/schemas/UserMessage"
  16299. },
  16300. {
  16301. "$ref": "#/components/schemas/AssistantMessage"
  16302. }
  16303. ]
  16304. },
  16305. "TextPart": {
  16306. "type": "object",
  16307. "properties": {
  16308. "id": {
  16309. "type": "string",
  16310. "pattern": "^prt"
  16311. },
  16312. "sessionID": {
  16313. "type": "string",
  16314. "pattern": "^ses"
  16315. },
  16316. "messageID": {
  16317. "type": "string",
  16318. "pattern": "^msg"
  16319. },
  16320. "type": {
  16321. "type": "string",
  16322. "enum": ["text"]
  16323. },
  16324. "text": {
  16325. "type": "string"
  16326. },
  16327. "session.synthetic": {
  16328. "type": "boolean"
  16329. },
  16330. "ignored": {
  16331. "type": "boolean"
  16332. },
  16333. "time": {
  16334. "type": "object",
  16335. "properties": {
  16336. "start": {
  16337. "type": "integer",
  16338. "minimum": 0
  16339. },
  16340. "end": {
  16341. "type": "integer",
  16342. "minimum": 0
  16343. }
  16344. },
  16345. "required": ["start"],
  16346. "additionalProperties": false
  16347. },
  16348. "metadata": {
  16349. "type": "object"
  16350. }
  16351. },
  16352. "required": ["id", "sessionID", "messageID", "type", "text"],
  16353. "additionalProperties": false
  16354. },
  16355. "SubtaskPart": {
  16356. "type": "object",
  16357. "properties": {
  16358. "id": {
  16359. "type": "string",
  16360. "pattern": "^prt"
  16361. },
  16362. "sessionID": {
  16363. "type": "string",
  16364. "pattern": "^ses"
  16365. },
  16366. "messageID": {
  16367. "type": "string",
  16368. "pattern": "^msg"
  16369. },
  16370. "type": {
  16371. "type": "string",
  16372. "enum": ["subtask"]
  16373. },
  16374. "prompt": {
  16375. "type": "string"
  16376. },
  16377. "description": {
  16378. "type": "string"
  16379. },
  16380. "agent": {
  16381. "type": "string"
  16382. },
  16383. "model": {
  16384. "type": "object",
  16385. "properties": {
  16386. "providerID": {
  16387. "type": "string"
  16388. },
  16389. "modelID": {
  16390. "type": "string"
  16391. }
  16392. },
  16393. "required": ["providerID", "modelID"],
  16394. "additionalProperties": false
  16395. },
  16396. "command": {
  16397. "type": "string"
  16398. }
  16399. },
  16400. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16401. "additionalProperties": false
  16402. },
  16403. "ReasoningPart": {
  16404. "type": "object",
  16405. "properties": {
  16406. "id": {
  16407. "type": "string",
  16408. "pattern": "^prt"
  16409. },
  16410. "sessionID": {
  16411. "type": "string",
  16412. "pattern": "^ses"
  16413. },
  16414. "messageID": {
  16415. "type": "string",
  16416. "pattern": "^msg"
  16417. },
  16418. "type": {
  16419. "type": "string",
  16420. "enum": ["reasoning"]
  16421. },
  16422. "text": {
  16423. "type": "string"
  16424. },
  16425. "metadata": {
  16426. "type": "object"
  16427. },
  16428. "time": {
  16429. "type": "object",
  16430. "properties": {
  16431. "start": {
  16432. "type": "integer",
  16433. "minimum": 0
  16434. },
  16435. "end": {
  16436. "type": "integer",
  16437. "minimum": 0
  16438. }
  16439. },
  16440. "required": ["start"],
  16441. "additionalProperties": false
  16442. }
  16443. },
  16444. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16445. "additionalProperties": false
  16446. },
  16447. "FilePartSourceText": {
  16448. "type": "object",
  16449. "properties": {
  16450. "value": {
  16451. "type": "string"
  16452. },
  16453. "start": {
  16454. "type": "number"
  16455. },
  16456. "end": {
  16457. "type": "number"
  16458. }
  16459. },
  16460. "required": ["value", "start", "end"],
  16461. "additionalProperties": false
  16462. },
  16463. "FileSource": {
  16464. "type": "object",
  16465. "properties": {
  16466. "text": {
  16467. "$ref": "#/components/schemas/FilePartSourceText"
  16468. },
  16469. "type": {
  16470. "type": "string",
  16471. "enum": ["file"]
  16472. },
  16473. "path": {
  16474. "type": "string"
  16475. }
  16476. },
  16477. "required": ["text", "type", "path"],
  16478. "additionalProperties": false
  16479. },
  16480. "Range": {
  16481. "type": "object",
  16482. "properties": {
  16483. "start": {
  16484. "type": "object",
  16485. "properties": {
  16486. "line": {
  16487. "type": "integer",
  16488. "minimum": 0
  16489. },
  16490. "character": {
  16491. "type": "integer",
  16492. "minimum": 0
  16493. }
  16494. },
  16495. "required": ["line", "character"],
  16496. "additionalProperties": false
  16497. },
  16498. "end": {
  16499. "type": "object",
  16500. "properties": {
  16501. "line": {
  16502. "type": "integer",
  16503. "minimum": 0
  16504. },
  16505. "character": {
  16506. "type": "integer",
  16507. "minimum": 0
  16508. }
  16509. },
  16510. "required": ["line", "character"],
  16511. "additionalProperties": false
  16512. }
  16513. },
  16514. "required": ["start", "end"],
  16515. "additionalProperties": false
  16516. },
  16517. "SymbolSource": {
  16518. "type": "object",
  16519. "properties": {
  16520. "text": {
  16521. "$ref": "#/components/schemas/FilePartSourceText"
  16522. },
  16523. "type": {
  16524. "type": "string",
  16525. "enum": ["symbol"]
  16526. },
  16527. "path": {
  16528. "type": "string"
  16529. },
  16530. "range": {
  16531. "$ref": "#/components/schemas/Range"
  16532. },
  16533. "name": {
  16534. "type": "string"
  16535. },
  16536. "kind": {
  16537. "type": "integer",
  16538. "minimum": 0
  16539. }
  16540. },
  16541. "required": ["text", "type", "path", "range", "name", "kind"],
  16542. "additionalProperties": false
  16543. },
  16544. "ResourceSource": {
  16545. "type": "object",
  16546. "properties": {
  16547. "text": {
  16548. "$ref": "#/components/schemas/FilePartSourceText"
  16549. },
  16550. "type": {
  16551. "type": "string",
  16552. "enum": ["resource"]
  16553. },
  16554. "clientName": {
  16555. "type": "string"
  16556. },
  16557. "uri": {
  16558. "type": "string"
  16559. }
  16560. },
  16561. "required": ["text", "type", "clientName", "uri"],
  16562. "additionalProperties": false
  16563. },
  16564. "FilePartSource": {
  16565. "anyOf": [
  16566. {
  16567. "$ref": "#/components/schemas/FileSource"
  16568. },
  16569. {
  16570. "$ref": "#/components/schemas/SymbolSource"
  16571. },
  16572. {
  16573. "$ref": "#/components/schemas/ResourceSource"
  16574. }
  16575. ]
  16576. },
  16577. "FilePart": {
  16578. "type": "object",
  16579. "properties": {
  16580. "id": {
  16581. "type": "string",
  16582. "pattern": "^prt"
  16583. },
  16584. "sessionID": {
  16585. "type": "string",
  16586. "pattern": "^ses"
  16587. },
  16588. "messageID": {
  16589. "type": "string",
  16590. "pattern": "^msg"
  16591. },
  16592. "type": {
  16593. "type": "string",
  16594. "enum": ["file"]
  16595. },
  16596. "mime": {
  16597. "type": "string"
  16598. },
  16599. "filename": {
  16600. "type": "string"
  16601. },
  16602. "url": {
  16603. "type": "string"
  16604. },
  16605. "source": {
  16606. "$ref": "#/components/schemas/FilePartSource"
  16607. }
  16608. },
  16609. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16610. "additionalProperties": false
  16611. },
  16612. "ToolStatePending": {
  16613. "type": "object",
  16614. "properties": {
  16615. "status": {
  16616. "type": "string",
  16617. "enum": ["pending"]
  16618. },
  16619. "input": {
  16620. "type": "object"
  16621. },
  16622. "raw": {
  16623. "type": "string"
  16624. }
  16625. },
  16626. "required": ["status", "input", "raw"],
  16627. "additionalProperties": false
  16628. },
  16629. "ToolStateRunning": {
  16630. "type": "object",
  16631. "properties": {
  16632. "status": {
  16633. "type": "string",
  16634. "enum": ["running"]
  16635. },
  16636. "input": {
  16637. "type": "object"
  16638. },
  16639. "title": {
  16640. "type": "string"
  16641. },
  16642. "metadata": {
  16643. "type": "object"
  16644. },
  16645. "time": {
  16646. "type": "object",
  16647. "properties": {
  16648. "start": {
  16649. "type": "integer",
  16650. "minimum": 0
  16651. }
  16652. },
  16653. "required": ["start"],
  16654. "additionalProperties": false
  16655. }
  16656. },
  16657. "required": ["status", "input", "time"],
  16658. "additionalProperties": false
  16659. },
  16660. "ToolStateCompleted": {
  16661. "type": "object",
  16662. "properties": {
  16663. "status": {
  16664. "type": "string",
  16665. "enum": ["completed"]
  16666. },
  16667. "input": {
  16668. "type": "object"
  16669. },
  16670. "output": {
  16671. "type": "string"
  16672. },
  16673. "title": {
  16674. "type": "string"
  16675. },
  16676. "metadata": {
  16677. "type": "object"
  16678. },
  16679. "time": {
  16680. "type": "object",
  16681. "properties": {
  16682. "start": {
  16683. "type": "integer",
  16684. "minimum": 0
  16685. },
  16686. "end": {
  16687. "type": "integer",
  16688. "minimum": 0
  16689. },
  16690. "compacted": {
  16691. "type": "integer",
  16692. "minimum": 0
  16693. }
  16694. },
  16695. "required": ["start", "end"],
  16696. "additionalProperties": false
  16697. },
  16698. "attachments": {
  16699. "type": "array",
  16700. "items": {
  16701. "$ref": "#/components/schemas/FilePart"
  16702. }
  16703. }
  16704. },
  16705. "required": ["status", "input", "output", "title", "metadata", "time"],
  16706. "additionalProperties": false
  16707. },
  16708. "ToolStateError": {
  16709. "type": "object",
  16710. "properties": {
  16711. "status": {
  16712. "type": "string",
  16713. "enum": ["error"]
  16714. },
  16715. "input": {
  16716. "type": "object"
  16717. },
  16718. "error": {
  16719. "type": "string"
  16720. },
  16721. "metadata": {
  16722. "type": "object"
  16723. },
  16724. "time": {
  16725. "type": "object",
  16726. "properties": {
  16727. "start": {
  16728. "type": "integer",
  16729. "minimum": 0
  16730. },
  16731. "end": {
  16732. "type": "integer",
  16733. "minimum": 0
  16734. }
  16735. },
  16736. "required": ["start", "end"],
  16737. "additionalProperties": false
  16738. }
  16739. },
  16740. "required": ["status", "input", "error", "time"],
  16741. "additionalProperties": false
  16742. },
  16743. "ToolState": {
  16744. "anyOf": [
  16745. {
  16746. "$ref": "#/components/schemas/ToolStatePending"
  16747. },
  16748. {
  16749. "$ref": "#/components/schemas/ToolStateRunning"
  16750. },
  16751. {
  16752. "$ref": "#/components/schemas/ToolStateCompleted"
  16753. },
  16754. {
  16755. "$ref": "#/components/schemas/ToolStateError"
  16756. }
  16757. ]
  16758. },
  16759. "ToolPart": {
  16760. "type": "object",
  16761. "properties": {
  16762. "id": {
  16763. "type": "string",
  16764. "pattern": "^prt"
  16765. },
  16766. "sessionID": {
  16767. "type": "string",
  16768. "pattern": "^ses"
  16769. },
  16770. "messageID": {
  16771. "type": "string",
  16772. "pattern": "^msg"
  16773. },
  16774. "type": {
  16775. "type": "string",
  16776. "enum": ["tool"]
  16777. },
  16778. "callID": {
  16779. "type": "string"
  16780. },
  16781. "tool": {
  16782. "type": "string"
  16783. },
  16784. "state": {
  16785. "$ref": "#/components/schemas/ToolState"
  16786. },
  16787. "metadata": {
  16788. "type": "object"
  16789. }
  16790. },
  16791. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16792. "additionalProperties": false
  16793. },
  16794. "StepStartPart": {
  16795. "type": "object",
  16796. "properties": {
  16797. "id": {
  16798. "type": "string",
  16799. "pattern": "^prt"
  16800. },
  16801. "sessionID": {
  16802. "type": "string",
  16803. "pattern": "^ses"
  16804. },
  16805. "messageID": {
  16806. "type": "string",
  16807. "pattern": "^msg"
  16808. },
  16809. "type": {
  16810. "type": "string",
  16811. "enum": ["step-start"]
  16812. },
  16813. "snapshot": {
  16814. "type": "string"
  16815. }
  16816. },
  16817. "required": ["id", "sessionID", "messageID", "type"],
  16818. "additionalProperties": false
  16819. },
  16820. "StepFinishPart": {
  16821. "type": "object",
  16822. "properties": {
  16823. "id": {
  16824. "type": "string",
  16825. "pattern": "^prt"
  16826. },
  16827. "sessionID": {
  16828. "type": "string",
  16829. "pattern": "^ses"
  16830. },
  16831. "messageID": {
  16832. "type": "string",
  16833. "pattern": "^msg"
  16834. },
  16835. "type": {
  16836. "type": "string",
  16837. "enum": ["step-finish"]
  16838. },
  16839. "reason": {
  16840. "type": "string"
  16841. },
  16842. "snapshot": {
  16843. "type": "string"
  16844. },
  16845. "cost": {
  16846. "type": "number"
  16847. },
  16848. "tokens": {
  16849. "type": "object",
  16850. "properties": {
  16851. "total": {
  16852. "type": "number"
  16853. },
  16854. "input": {
  16855. "type": "number"
  16856. },
  16857. "output": {
  16858. "type": "number"
  16859. },
  16860. "reasoning": {
  16861. "type": "number"
  16862. },
  16863. "cache": {
  16864. "type": "object",
  16865. "properties": {
  16866. "read": {
  16867. "type": "number"
  16868. },
  16869. "write": {
  16870. "type": "number"
  16871. }
  16872. },
  16873. "required": ["read", "write"],
  16874. "additionalProperties": false
  16875. }
  16876. },
  16877. "required": ["input", "output", "reasoning", "cache"],
  16878. "additionalProperties": false
  16879. }
  16880. },
  16881. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16882. "additionalProperties": false
  16883. },
  16884. "SnapshotPart": {
  16885. "type": "object",
  16886. "properties": {
  16887. "id": {
  16888. "type": "string",
  16889. "pattern": "^prt"
  16890. },
  16891. "sessionID": {
  16892. "type": "string",
  16893. "pattern": "^ses"
  16894. },
  16895. "messageID": {
  16896. "type": "string",
  16897. "pattern": "^msg"
  16898. },
  16899. "type": {
  16900. "type": "string",
  16901. "enum": ["snapshot"]
  16902. },
  16903. "snapshot": {
  16904. "type": "string"
  16905. }
  16906. },
  16907. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16908. "additionalProperties": false
  16909. },
  16910. "PatchPart": {
  16911. "type": "object",
  16912. "properties": {
  16913. "id": {
  16914. "type": "string",
  16915. "pattern": "^prt"
  16916. },
  16917. "sessionID": {
  16918. "type": "string",
  16919. "pattern": "^ses"
  16920. },
  16921. "messageID": {
  16922. "type": "string",
  16923. "pattern": "^msg"
  16924. },
  16925. "type": {
  16926. "type": "string",
  16927. "enum": ["patch"]
  16928. },
  16929. "hash": {
  16930. "type": "string"
  16931. },
  16932. "files": {
  16933. "type": "array",
  16934. "items": {
  16935. "type": "string"
  16936. }
  16937. }
  16938. },
  16939. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16940. "additionalProperties": false
  16941. },
  16942. "AgentPart": {
  16943. "type": "object",
  16944. "properties": {
  16945. "id": {
  16946. "type": "string",
  16947. "pattern": "^prt"
  16948. },
  16949. "sessionID": {
  16950. "type": "string",
  16951. "pattern": "^ses"
  16952. },
  16953. "messageID": {
  16954. "type": "string",
  16955. "pattern": "^msg"
  16956. },
  16957. "type": {
  16958. "type": "string",
  16959. "enum": ["agent"]
  16960. },
  16961. "name": {
  16962. "type": "string"
  16963. },
  16964. "source": {
  16965. "type": "object",
  16966. "properties": {
  16967. "value": {
  16968. "type": "string"
  16969. },
  16970. "start": {
  16971. "type": "integer",
  16972. "minimum": 0
  16973. },
  16974. "end": {
  16975. "type": "integer",
  16976. "minimum": 0
  16977. }
  16978. },
  16979. "required": ["value", "start", "end"],
  16980. "additionalProperties": false
  16981. }
  16982. },
  16983. "required": ["id", "sessionID", "messageID", "type", "name"],
  16984. "additionalProperties": false
  16985. },
  16986. "RetryPart": {
  16987. "type": "object",
  16988. "properties": {
  16989. "id": {
  16990. "type": "string",
  16991. "pattern": "^prt"
  16992. },
  16993. "sessionID": {
  16994. "type": "string",
  16995. "pattern": "^ses"
  16996. },
  16997. "messageID": {
  16998. "type": "string",
  16999. "pattern": "^msg"
  17000. },
  17001. "type": {
  17002. "type": "string",
  17003. "enum": ["retry"]
  17004. },
  17005. "attempt": {
  17006. "type": "integer",
  17007. "minimum": 0
  17008. },
  17009. "error": {
  17010. "$ref": "#/components/schemas/APIError"
  17011. },
  17012. "time": {
  17013. "type": "object",
  17014. "properties": {
  17015. "created": {
  17016. "type": "integer",
  17017. "minimum": 0
  17018. }
  17019. },
  17020. "required": ["created"],
  17021. "additionalProperties": false
  17022. }
  17023. },
  17024. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  17025. "additionalProperties": false
  17026. },
  17027. "CompactionPart": {
  17028. "type": "object",
  17029. "properties": {
  17030. "id": {
  17031. "type": "string",
  17032. "pattern": "^prt"
  17033. },
  17034. "sessionID": {
  17035. "type": "string",
  17036. "pattern": "^ses"
  17037. },
  17038. "messageID": {
  17039. "type": "string",
  17040. "pattern": "^msg"
  17041. },
  17042. "type": {
  17043. "type": "string",
  17044. "enum": ["compaction"]
  17045. },
  17046. "auto": {
  17047. "type": "boolean"
  17048. },
  17049. "overflow": {
  17050. "type": "boolean"
  17051. },
  17052. "tail_start_id": {
  17053. "type": "string",
  17054. "pattern": "^msg"
  17055. }
  17056. },
  17057. "required": ["id", "sessionID", "messageID", "type", "auto"],
  17058. "additionalProperties": false
  17059. },
  17060. "Part": {
  17061. "anyOf": [
  17062. {
  17063. "$ref": "#/components/schemas/TextPart"
  17064. },
  17065. {
  17066. "$ref": "#/components/schemas/SubtaskPart"
  17067. },
  17068. {
  17069. "$ref": "#/components/schemas/ReasoningPart"
  17070. },
  17071. {
  17072. "$ref": "#/components/schemas/FilePart"
  17073. },
  17074. {
  17075. "$ref": "#/components/schemas/ToolPart"
  17076. },
  17077. {
  17078. "$ref": "#/components/schemas/StepStartPart"
  17079. },
  17080. {
  17081. "$ref": "#/components/schemas/StepFinishPart"
  17082. },
  17083. {
  17084. "$ref": "#/components/schemas/SnapshotPart"
  17085. },
  17086. {
  17087. "$ref": "#/components/schemas/PatchPart"
  17088. },
  17089. {
  17090. "$ref": "#/components/schemas/AgentPart"
  17091. },
  17092. {
  17093. "$ref": "#/components/schemas/RetryPart"
  17094. },
  17095. {
  17096. "$ref": "#/components/schemas/CompactionPart"
  17097. }
  17098. ]
  17099. },
  17100. "Prompt": {
  17101. "type": "object",
  17102. "properties": {
  17103. "text": {
  17104. "type": "string"
  17105. },
  17106. "files": {
  17107. "type": "array",
  17108. "items": {
  17109. "$ref": "#/components/schemas/PromptFileAttachment"
  17110. }
  17111. },
  17112. "agents": {
  17113. "type": "array",
  17114. "items": {
  17115. "$ref": "#/components/schemas/PromptAgentAttachment"
  17116. }
  17117. }
  17118. },
  17119. "required": ["text"],
  17120. "additionalProperties": false
  17121. },
  17122. "Pty": {
  17123. "type": "object",
  17124. "properties": {
  17125. "id": {
  17126. "type": "string",
  17127. "pattern": "^pty"
  17128. },
  17129. "title": {
  17130. "type": "string"
  17131. },
  17132. "command": {
  17133. "type": "string"
  17134. },
  17135. "args": {
  17136. "type": "array",
  17137. "items": {
  17138. "type": "string"
  17139. }
  17140. },
  17141. "cwd": {
  17142. "type": "string"
  17143. },
  17144. "status": {
  17145. "type": "string",
  17146. "enum": ["running", "exited"]
  17147. },
  17148. "pid": {
  17149. "type": "integer",
  17150. "minimum": 0
  17151. },
  17152. "exitCode": {
  17153. "type": "integer",
  17154. "minimum": 0
  17155. }
  17156. },
  17157. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  17158. "additionalProperties": false
  17159. },
  17160. "SessionStatus": {
  17161. "anyOf": [
  17162. {
  17163. "type": "object",
  17164. "properties": {
  17165. "type": {
  17166. "type": "string",
  17167. "enum": ["idle"]
  17168. }
  17169. },
  17170. "required": ["type"],
  17171. "additionalProperties": false
  17172. },
  17173. {
  17174. "type": "object",
  17175. "properties": {
  17176. "type": {
  17177. "type": "string",
  17178. "enum": ["retry"]
  17179. },
  17180. "attempt": {
  17181. "type": "integer",
  17182. "minimum": 0
  17183. },
  17184. "message": {
  17185. "type": "string"
  17186. },
  17187. "action": {
  17188. "type": "object",
  17189. "properties": {
  17190. "reason": {
  17191. "type": "string"
  17192. },
  17193. "provider": {
  17194. "type": "string"
  17195. },
  17196. "title": {
  17197. "type": "string"
  17198. },
  17199. "message": {
  17200. "type": "string"
  17201. },
  17202. "label": {
  17203. "type": "string"
  17204. },
  17205. "link": {
  17206. "type": "string"
  17207. }
  17208. },
  17209. "required": ["reason", "provider", "title", "message", "label"],
  17210. "additionalProperties": false
  17211. },
  17212. "next": {
  17213. "type": "integer",
  17214. "minimum": 0
  17215. }
  17216. },
  17217. "required": ["type", "attempt", "message", "next"],
  17218. "additionalProperties": false
  17219. },
  17220. {
  17221. "type": "object",
  17222. "properties": {
  17223. "type": {
  17224. "type": "string",
  17225. "enum": ["busy"]
  17226. }
  17227. },
  17228. "required": ["type"],
  17229. "additionalProperties": false
  17230. }
  17231. ]
  17232. },
  17233. "QuestionOption": {
  17234. "type": "object",
  17235. "properties": {
  17236. "label": {
  17237. "type": "string",
  17238. "description": "Display text (1-5 words, concise)"
  17239. },
  17240. "description": {
  17241. "type": "string",
  17242. "description": "Explanation of choice"
  17243. }
  17244. },
  17245. "required": ["label", "description"],
  17246. "additionalProperties": false
  17247. },
  17248. "QuestionInfo": {
  17249. "type": "object",
  17250. "properties": {
  17251. "question": {
  17252. "type": "string",
  17253. "description": "Complete question"
  17254. },
  17255. "header": {
  17256. "type": "string",
  17257. "description": "Very short label (max 30 chars)"
  17258. },
  17259. "options": {
  17260. "type": "array",
  17261. "items": {
  17262. "$ref": "#/components/schemas/QuestionOption"
  17263. },
  17264. "description": "Available choices"
  17265. },
  17266. "multiple": {
  17267. "type": "boolean"
  17268. },
  17269. "custom": {
  17270. "type": "boolean"
  17271. }
  17272. },
  17273. "required": ["question", "header", "options"],
  17274. "additionalProperties": false
  17275. },
  17276. "QuestionTool": {
  17277. "type": "object",
  17278. "properties": {
  17279. "messageID": {
  17280. "type": "string",
  17281. "pattern": "^msg"
  17282. },
  17283. "callID": {
  17284. "type": "string"
  17285. }
  17286. },
  17287. "required": ["messageID", "callID"],
  17288. "additionalProperties": false
  17289. },
  17290. "QuestionAnswer": {
  17291. "type": "array",
  17292. "items": {
  17293. "type": "string"
  17294. }
  17295. },
  17296. "GlobalEvent": {
  17297. "type": "object",
  17298. "properties": {
  17299. "directory": {
  17300. "type": "string"
  17301. },
  17302. "project": {
  17303. "type": "string"
  17304. },
  17305. "workspace": {
  17306. "type": "string"
  17307. },
  17308. "payload": {
  17309. "anyOf": [
  17310. {
  17311. "type": "object",
  17312. "properties": {
  17313. "id": {
  17314. "type": "string",
  17315. "pattern": "^evt_"
  17316. },
  17317. "type": {
  17318. "type": "string",
  17319. "enum": ["models-dev.refreshed"]
  17320. },
  17321. "properties": {
  17322. "type": "object",
  17323. "properties": {}
  17324. }
  17325. },
  17326. "required": ["id", "type", "properties"],
  17327. "additionalProperties": false
  17328. },
  17329. {
  17330. "type": "object",
  17331. "properties": {
  17332. "id": {
  17333. "type": "string",
  17334. "pattern": "^evt_"
  17335. },
  17336. "type": {
  17337. "type": "string",
  17338. "enum": ["integration.updated"]
  17339. },
  17340. "properties": {
  17341. "type": "object",
  17342. "properties": {}
  17343. }
  17344. },
  17345. "required": ["id", "type", "properties"],
  17346. "additionalProperties": false
  17347. },
  17348. {
  17349. "type": "object",
  17350. "properties": {
  17351. "id": {
  17352. "type": "string",
  17353. "pattern": "^evt_"
  17354. },
  17355. "type": {
  17356. "type": "string",
  17357. "enum": ["integration.connection.updated"]
  17358. },
  17359. "properties": {
  17360. "type": "object",
  17361. "properties": {
  17362. "integrationID": {
  17363. "type": "string"
  17364. }
  17365. },
  17366. "required": ["integrationID"],
  17367. "additionalProperties": false
  17368. }
  17369. },
  17370. "required": ["id", "type", "properties"],
  17371. "additionalProperties": false
  17372. },
  17373. {
  17374. "type": "object",
  17375. "properties": {
  17376. "id": {
  17377. "type": "string",
  17378. "pattern": "^evt_"
  17379. },
  17380. "type": {
  17381. "type": "string",
  17382. "enum": ["catalog.updated"]
  17383. },
  17384. "properties": {
  17385. "type": "object",
  17386. "properties": {}
  17387. }
  17388. },
  17389. "required": ["id", "type", "properties"],
  17390. "additionalProperties": false
  17391. },
  17392. {
  17393. "type": "object",
  17394. "properties": {
  17395. "id": {
  17396. "type": "string",
  17397. "pattern": "^evt_"
  17398. },
  17399. "type": {
  17400. "type": "string",
  17401. "enum": ["session.created"]
  17402. },
  17403. "properties": {
  17404. "type": "object",
  17405. "properties": {
  17406. "sessionID": {
  17407. "type": "string",
  17408. "pattern": "^ses"
  17409. },
  17410. "info": {
  17411. "$ref": "#/components/schemas/Session"
  17412. }
  17413. },
  17414. "required": ["sessionID", "info"],
  17415. "additionalProperties": false
  17416. }
  17417. },
  17418. "required": ["id", "type", "properties"],
  17419. "additionalProperties": false
  17420. },
  17421. {
  17422. "type": "object",
  17423. "properties": {
  17424. "id": {
  17425. "type": "string",
  17426. "pattern": "^evt_"
  17427. },
  17428. "type": {
  17429. "type": "string",
  17430. "enum": ["session.updated"]
  17431. },
  17432. "properties": {
  17433. "type": "object",
  17434. "properties": {
  17435. "sessionID": {
  17436. "type": "string",
  17437. "pattern": "^ses"
  17438. },
  17439. "info": {
  17440. "$ref": "#/components/schemas/Session"
  17441. }
  17442. },
  17443. "required": ["sessionID", "info"],
  17444. "additionalProperties": false
  17445. }
  17446. },
  17447. "required": ["id", "type", "properties"],
  17448. "additionalProperties": false
  17449. },
  17450. {
  17451. "type": "object",
  17452. "properties": {
  17453. "id": {
  17454. "type": "string",
  17455. "pattern": "^evt_"
  17456. },
  17457. "type": {
  17458. "type": "string",
  17459. "enum": ["session.deleted"]
  17460. },
  17461. "properties": {
  17462. "type": "object",
  17463. "properties": {
  17464. "sessionID": {
  17465. "type": "string",
  17466. "pattern": "^ses"
  17467. },
  17468. "info": {
  17469. "$ref": "#/components/schemas/Session"
  17470. }
  17471. },
  17472. "required": ["sessionID", "info"],
  17473. "additionalProperties": false
  17474. }
  17475. },
  17476. "required": ["id", "type", "properties"],
  17477. "additionalProperties": false
  17478. },
  17479. {
  17480. "type": "object",
  17481. "properties": {
  17482. "id": {
  17483. "type": "string",
  17484. "pattern": "^evt_"
  17485. },
  17486. "type": {
  17487. "type": "string",
  17488. "enum": ["message.updated"]
  17489. },
  17490. "properties": {
  17491. "type": "object",
  17492. "properties": {
  17493. "sessionID": {
  17494. "type": "string",
  17495. "pattern": "^ses"
  17496. },
  17497. "info": {
  17498. "$ref": "#/components/schemas/Message"
  17499. }
  17500. },
  17501. "required": ["sessionID", "info"],
  17502. "additionalProperties": false
  17503. }
  17504. },
  17505. "required": ["id", "type", "properties"],
  17506. "additionalProperties": false
  17507. },
  17508. {
  17509. "type": "object",
  17510. "properties": {
  17511. "id": {
  17512. "type": "string",
  17513. "pattern": "^evt_"
  17514. },
  17515. "type": {
  17516. "type": "string",
  17517. "enum": ["message.removed"]
  17518. },
  17519. "properties": {
  17520. "type": "object",
  17521. "properties": {
  17522. "sessionID": {
  17523. "type": "string",
  17524. "pattern": "^ses"
  17525. },
  17526. "messageID": {
  17527. "type": "string",
  17528. "pattern": "^msg"
  17529. }
  17530. },
  17531. "required": ["sessionID", "messageID"],
  17532. "additionalProperties": false
  17533. }
  17534. },
  17535. "required": ["id", "type", "properties"],
  17536. "additionalProperties": false
  17537. },
  17538. {
  17539. "type": "object",
  17540. "properties": {
  17541. "id": {
  17542. "type": "string",
  17543. "pattern": "^evt_"
  17544. },
  17545. "type": {
  17546. "type": "string",
  17547. "enum": ["message.part.updated"]
  17548. },
  17549. "properties": {
  17550. "type": "object",
  17551. "properties": {
  17552. "sessionID": {
  17553. "type": "string",
  17554. "pattern": "^ses"
  17555. },
  17556. "part": {
  17557. "$ref": "#/components/schemas/Part"
  17558. },
  17559. "time": {
  17560. "type": "number"
  17561. }
  17562. },
  17563. "required": ["sessionID", "part", "time"],
  17564. "additionalProperties": false
  17565. }
  17566. },
  17567. "required": ["id", "type", "properties"],
  17568. "additionalProperties": false
  17569. },
  17570. {
  17571. "type": "object",
  17572. "properties": {
  17573. "id": {
  17574. "type": "string",
  17575. "pattern": "^evt_"
  17576. },
  17577. "type": {
  17578. "type": "string",
  17579. "enum": ["message.part.removed"]
  17580. },
  17581. "properties": {
  17582. "type": "object",
  17583. "properties": {
  17584. "sessionID": {
  17585. "type": "string",
  17586. "pattern": "^ses"
  17587. },
  17588. "messageID": {
  17589. "type": "string",
  17590. "pattern": "^msg"
  17591. },
  17592. "partID": {
  17593. "type": "string",
  17594. "pattern": "^prt"
  17595. }
  17596. },
  17597. "required": ["sessionID", "messageID", "partID"],
  17598. "additionalProperties": false
  17599. }
  17600. },
  17601. "required": ["id", "type", "properties"],
  17602. "additionalProperties": false
  17603. },
  17604. {
  17605. "type": "object",
  17606. "properties": {
  17607. "id": {
  17608. "type": "string",
  17609. "pattern": "^evt_"
  17610. },
  17611. "type": {
  17612. "type": "string",
  17613. "enum": ["session.next.agent.switched"]
  17614. },
  17615. "properties": {
  17616. "type": "object",
  17617. "properties": {
  17618. "timestamp": {
  17619. "type": "number"
  17620. },
  17621. "sessionID": {
  17622. "type": "string",
  17623. "pattern": "^ses"
  17624. },
  17625. "messageID": {
  17626. "type": "string",
  17627. "pattern": "^msg_"
  17628. },
  17629. "agent": {
  17630. "type": "string"
  17631. }
  17632. },
  17633. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17634. "additionalProperties": false
  17635. }
  17636. },
  17637. "required": ["id", "type", "properties"],
  17638. "additionalProperties": false
  17639. },
  17640. {
  17641. "type": "object",
  17642. "properties": {
  17643. "id": {
  17644. "type": "string",
  17645. "pattern": "^evt_"
  17646. },
  17647. "type": {
  17648. "type": "string",
  17649. "enum": ["session.next.model.switched"]
  17650. },
  17651. "properties": {
  17652. "type": "object",
  17653. "properties": {
  17654. "timestamp": {
  17655. "type": "number"
  17656. },
  17657. "sessionID": {
  17658. "type": "string",
  17659. "pattern": "^ses"
  17660. },
  17661. "messageID": {
  17662. "type": "string",
  17663. "pattern": "^msg_"
  17664. },
  17665. "model": {
  17666. "$ref": "#/components/schemas/ModelRef"
  17667. }
  17668. },
  17669. "required": ["timestamp", "sessionID", "messageID", "model"],
  17670. "additionalProperties": false
  17671. }
  17672. },
  17673. "required": ["id", "type", "properties"],
  17674. "additionalProperties": false
  17675. },
  17676. {
  17677. "type": "object",
  17678. "properties": {
  17679. "id": {
  17680. "type": "string",
  17681. "pattern": "^evt_"
  17682. },
  17683. "type": {
  17684. "type": "string",
  17685. "enum": ["session.next.moved"]
  17686. },
  17687. "properties": {
  17688. "type": "object",
  17689. "properties": {
  17690. "timestamp": {
  17691. "type": "number"
  17692. },
  17693. "sessionID": {
  17694. "type": "string",
  17695. "pattern": "^ses"
  17696. },
  17697. "location": {
  17698. "$ref": "#/components/schemas/LocationRef"
  17699. },
  17700. "subdirectory": {
  17701. "type": "string"
  17702. }
  17703. },
  17704. "required": ["timestamp", "sessionID", "location"],
  17705. "additionalProperties": false
  17706. }
  17707. },
  17708. "required": ["id", "type", "properties"],
  17709. "additionalProperties": false
  17710. },
  17711. {
  17712. "type": "object",
  17713. "properties": {
  17714. "id": {
  17715. "type": "string",
  17716. "pattern": "^evt_"
  17717. },
  17718. "type": {
  17719. "type": "string",
  17720. "enum": ["session.next.prompted"]
  17721. },
  17722. "properties": {
  17723. "type": "object",
  17724. "properties": {
  17725. "timestamp": {
  17726. "type": "number"
  17727. },
  17728. "sessionID": {
  17729. "type": "string",
  17730. "pattern": "^ses"
  17731. },
  17732. "messageID": {
  17733. "type": "string",
  17734. "pattern": "^msg_"
  17735. },
  17736. "prompt": {
  17737. "$ref": "#/components/schemas/Prompt"
  17738. },
  17739. "delivery": {
  17740. "type": "string",
  17741. "enum": ["steer", "queue"]
  17742. }
  17743. },
  17744. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17745. "additionalProperties": false
  17746. }
  17747. },
  17748. "required": ["id", "type", "properties"],
  17749. "additionalProperties": false
  17750. },
  17751. {
  17752. "type": "object",
  17753. "properties": {
  17754. "id": {
  17755. "type": "string",
  17756. "pattern": "^evt_"
  17757. },
  17758. "type": {
  17759. "type": "string",
  17760. "enum": ["session.next.prompt.admitted"]
  17761. },
  17762. "properties": {
  17763. "type": "object",
  17764. "properties": {
  17765. "timestamp": {
  17766. "type": "number"
  17767. },
  17768. "sessionID": {
  17769. "type": "string",
  17770. "pattern": "^ses"
  17771. },
  17772. "messageID": {
  17773. "type": "string",
  17774. "pattern": "^msg_"
  17775. },
  17776. "prompt": {
  17777. "$ref": "#/components/schemas/Prompt"
  17778. },
  17779. "delivery": {
  17780. "type": "string",
  17781. "enum": ["steer", "queue"]
  17782. }
  17783. },
  17784. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17785. "additionalProperties": false
  17786. }
  17787. },
  17788. "required": ["id", "type", "properties"],
  17789. "additionalProperties": false
  17790. },
  17791. {
  17792. "type": "object",
  17793. "properties": {
  17794. "id": {
  17795. "type": "string",
  17796. "pattern": "^evt_"
  17797. },
  17798. "type": {
  17799. "type": "string",
  17800. "enum": ["session.next.context.updated"]
  17801. },
  17802. "properties": {
  17803. "type": "object",
  17804. "properties": {
  17805. "timestamp": {
  17806. "type": "number"
  17807. },
  17808. "sessionID": {
  17809. "type": "string",
  17810. "pattern": "^ses"
  17811. },
  17812. "messageID": {
  17813. "type": "string",
  17814. "pattern": "^msg_"
  17815. },
  17816. "text": {
  17817. "type": "string"
  17818. }
  17819. },
  17820. "required": ["timestamp", "sessionID", "messageID", "text"],
  17821. "additionalProperties": false
  17822. }
  17823. },
  17824. "required": ["id", "type", "properties"],
  17825. "additionalProperties": false
  17826. },
  17827. {
  17828. "type": "object",
  17829. "properties": {
  17830. "id": {
  17831. "type": "string",
  17832. "pattern": "^evt_"
  17833. },
  17834. "type": {
  17835. "type": "string",
  17836. "enum": ["session.next.synthetic"]
  17837. },
  17838. "properties": {
  17839. "type": "object",
  17840. "properties": {
  17841. "timestamp": {
  17842. "type": "number"
  17843. },
  17844. "sessionID": {
  17845. "type": "string",
  17846. "pattern": "^ses"
  17847. },
  17848. "messageID": {
  17849. "type": "string",
  17850. "pattern": "^msg_"
  17851. },
  17852. "text": {
  17853. "type": "string"
  17854. }
  17855. },
  17856. "required": ["timestamp", "sessionID", "messageID", "text"],
  17857. "additionalProperties": false
  17858. }
  17859. },
  17860. "required": ["id", "type", "properties"],
  17861. "additionalProperties": false
  17862. },
  17863. {
  17864. "type": "object",
  17865. "properties": {
  17866. "id": {
  17867. "type": "string",
  17868. "pattern": "^evt_"
  17869. },
  17870. "type": {
  17871. "type": "string",
  17872. "enum": ["session.next.shell.started"]
  17873. },
  17874. "properties": {
  17875. "type": "object",
  17876. "properties": {
  17877. "timestamp": {
  17878. "type": "number"
  17879. },
  17880. "sessionID": {
  17881. "type": "string",
  17882. "pattern": "^ses"
  17883. },
  17884. "messageID": {
  17885. "type": "string",
  17886. "pattern": "^msg_"
  17887. },
  17888. "callID": {
  17889. "type": "string"
  17890. },
  17891. "command": {
  17892. "type": "string"
  17893. }
  17894. },
  17895. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17896. "additionalProperties": false
  17897. }
  17898. },
  17899. "required": ["id", "type", "properties"],
  17900. "additionalProperties": false
  17901. },
  17902. {
  17903. "type": "object",
  17904. "properties": {
  17905. "id": {
  17906. "type": "string",
  17907. "pattern": "^evt_"
  17908. },
  17909. "type": {
  17910. "type": "string",
  17911. "enum": ["session.next.shell.ended"]
  17912. },
  17913. "properties": {
  17914. "type": "object",
  17915. "properties": {
  17916. "timestamp": {
  17917. "type": "number"
  17918. },
  17919. "sessionID": {
  17920. "type": "string",
  17921. "pattern": "^ses"
  17922. },
  17923. "callID": {
  17924. "type": "string"
  17925. },
  17926. "output": {
  17927. "type": "string"
  17928. }
  17929. },
  17930. "required": ["timestamp", "sessionID", "callID", "output"],
  17931. "additionalProperties": false
  17932. }
  17933. },
  17934. "required": ["id", "type", "properties"],
  17935. "additionalProperties": false
  17936. },
  17937. {
  17938. "type": "object",
  17939. "properties": {
  17940. "id": {
  17941. "type": "string",
  17942. "pattern": "^evt_"
  17943. },
  17944. "type": {
  17945. "type": "string",
  17946. "enum": ["session.next.step.started"]
  17947. },
  17948. "properties": {
  17949. "type": "object",
  17950. "properties": {
  17951. "timestamp": {
  17952. "type": "number"
  17953. },
  17954. "sessionID": {
  17955. "type": "string",
  17956. "pattern": "^ses"
  17957. },
  17958. "assistantMessageID": {
  17959. "type": "string",
  17960. "pattern": "^msg_"
  17961. },
  17962. "agent": {
  17963. "type": "string"
  17964. },
  17965. "model": {
  17966. "$ref": "#/components/schemas/ModelRef"
  17967. },
  17968. "snapshot": {
  17969. "type": "string"
  17970. }
  17971. },
  17972. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17973. "additionalProperties": false
  17974. }
  17975. },
  17976. "required": ["id", "type", "properties"],
  17977. "additionalProperties": false
  17978. },
  17979. {
  17980. "type": "object",
  17981. "properties": {
  17982. "id": {
  17983. "type": "string",
  17984. "pattern": "^evt_"
  17985. },
  17986. "type": {
  17987. "type": "string",
  17988. "enum": ["session.next.step.ended"]
  17989. },
  17990. "properties": {
  17991. "type": "object",
  17992. "properties": {
  17993. "timestamp": {
  17994. "type": "number"
  17995. },
  17996. "sessionID": {
  17997. "type": "string",
  17998. "pattern": "^ses"
  17999. },
  18000. "assistantMessageID": {
  18001. "type": "string",
  18002. "pattern": "^msg_"
  18003. },
  18004. "finish": {
  18005. "type": "string"
  18006. },
  18007. "cost": {
  18008. "type": "number"
  18009. },
  18010. "tokens": {
  18011. "type": "object",
  18012. "properties": {
  18013. "input": {
  18014. "type": "number"
  18015. },
  18016. "output": {
  18017. "type": "number"
  18018. },
  18019. "reasoning": {
  18020. "type": "number"
  18021. },
  18022. "cache": {
  18023. "type": "object",
  18024. "properties": {
  18025. "read": {
  18026. "type": "number"
  18027. },
  18028. "write": {
  18029. "type": "number"
  18030. }
  18031. },
  18032. "required": ["read", "write"],
  18033. "additionalProperties": false
  18034. }
  18035. },
  18036. "required": ["input", "output", "reasoning", "cache"],
  18037. "additionalProperties": false
  18038. },
  18039. "snapshot": {
  18040. "type": "string"
  18041. },
  18042. "files": {
  18043. "type": "array",
  18044. "items": {
  18045. "type": "string"
  18046. }
  18047. }
  18048. },
  18049. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  18050. "additionalProperties": false
  18051. }
  18052. },
  18053. "required": ["id", "type", "properties"],
  18054. "additionalProperties": false
  18055. },
  18056. {
  18057. "type": "object",
  18058. "properties": {
  18059. "id": {
  18060. "type": "string",
  18061. "pattern": "^evt_"
  18062. },
  18063. "type": {
  18064. "type": "string",
  18065. "enum": ["session.next.step.failed"]
  18066. },
  18067. "properties": {
  18068. "type": "object",
  18069. "properties": {
  18070. "timestamp": {
  18071. "type": "number"
  18072. },
  18073. "sessionID": {
  18074. "type": "string",
  18075. "pattern": "^ses"
  18076. },
  18077. "assistantMessageID": {
  18078. "type": "string",
  18079. "pattern": "^msg_"
  18080. },
  18081. "error": {
  18082. "$ref": "#/components/schemas/SessionErrorUnknown"
  18083. }
  18084. },
  18085. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  18086. "additionalProperties": false
  18087. }
  18088. },
  18089. "required": ["id", "type", "properties"],
  18090. "additionalProperties": false
  18091. },
  18092. {
  18093. "type": "object",
  18094. "properties": {
  18095. "id": {
  18096. "type": "string",
  18097. "pattern": "^evt_"
  18098. },
  18099. "type": {
  18100. "type": "string",
  18101. "enum": ["session.next.text.started"]
  18102. },
  18103. "properties": {
  18104. "type": "object",
  18105. "properties": {
  18106. "timestamp": {
  18107. "type": "number"
  18108. },
  18109. "sessionID": {
  18110. "type": "string",
  18111. "pattern": "^ses"
  18112. },
  18113. "assistantMessageID": {
  18114. "type": "string",
  18115. "pattern": "^msg_"
  18116. },
  18117. "textID": {
  18118. "type": "string"
  18119. }
  18120. },
  18121. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  18122. "additionalProperties": false
  18123. }
  18124. },
  18125. "required": ["id", "type", "properties"],
  18126. "additionalProperties": false
  18127. },
  18128. {
  18129. "type": "object",
  18130. "properties": {
  18131. "id": {
  18132. "type": "string",
  18133. "pattern": "^evt_"
  18134. },
  18135. "type": {
  18136. "type": "string",
  18137. "enum": ["session.next.text.delta"]
  18138. },
  18139. "properties": {
  18140. "type": "object",
  18141. "properties": {
  18142. "timestamp": {
  18143. "type": "number"
  18144. },
  18145. "sessionID": {
  18146. "type": "string",
  18147. "pattern": "^ses"
  18148. },
  18149. "assistantMessageID": {
  18150. "type": "string",
  18151. "pattern": "^msg_"
  18152. },
  18153. "textID": {
  18154. "type": "string"
  18155. },
  18156. "delta": {
  18157. "type": "string"
  18158. }
  18159. },
  18160. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  18161. "additionalProperties": false
  18162. }
  18163. },
  18164. "required": ["id", "type", "properties"],
  18165. "additionalProperties": false
  18166. },
  18167. {
  18168. "type": "object",
  18169. "properties": {
  18170. "id": {
  18171. "type": "string",
  18172. "pattern": "^evt_"
  18173. },
  18174. "type": {
  18175. "type": "string",
  18176. "enum": ["session.next.text.ended"]
  18177. },
  18178. "properties": {
  18179. "type": "object",
  18180. "properties": {
  18181. "timestamp": {
  18182. "type": "number"
  18183. },
  18184. "sessionID": {
  18185. "type": "string",
  18186. "pattern": "^ses"
  18187. },
  18188. "assistantMessageID": {
  18189. "type": "string",
  18190. "pattern": "^msg_"
  18191. },
  18192. "textID": {
  18193. "type": "string"
  18194. },
  18195. "text": {
  18196. "type": "string"
  18197. }
  18198. },
  18199. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  18200. "additionalProperties": false
  18201. }
  18202. },
  18203. "required": ["id", "type", "properties"],
  18204. "additionalProperties": false
  18205. },
  18206. {
  18207. "type": "object",
  18208. "properties": {
  18209. "id": {
  18210. "type": "string",
  18211. "pattern": "^evt_"
  18212. },
  18213. "type": {
  18214. "type": "string",
  18215. "enum": ["session.next.reasoning.started"]
  18216. },
  18217. "properties": {
  18218. "type": "object",
  18219. "properties": {
  18220. "timestamp": {
  18221. "type": "number"
  18222. },
  18223. "sessionID": {
  18224. "type": "string",
  18225. "pattern": "^ses"
  18226. },
  18227. "assistantMessageID": {
  18228. "type": "string",
  18229. "pattern": "^msg_"
  18230. },
  18231. "reasoningID": {
  18232. "type": "string"
  18233. },
  18234. "providerMetadata": {
  18235. "$ref": "#/components/schemas/LLMProviderMetadata"
  18236. }
  18237. },
  18238. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  18239. "additionalProperties": false
  18240. }
  18241. },
  18242. "required": ["id", "type", "properties"],
  18243. "additionalProperties": false
  18244. },
  18245. {
  18246. "type": "object",
  18247. "properties": {
  18248. "id": {
  18249. "type": "string",
  18250. "pattern": "^evt_"
  18251. },
  18252. "type": {
  18253. "type": "string",
  18254. "enum": ["session.next.reasoning.delta"]
  18255. },
  18256. "properties": {
  18257. "type": "object",
  18258. "properties": {
  18259. "timestamp": {
  18260. "type": "number"
  18261. },
  18262. "sessionID": {
  18263. "type": "string",
  18264. "pattern": "^ses"
  18265. },
  18266. "assistantMessageID": {
  18267. "type": "string",
  18268. "pattern": "^msg_"
  18269. },
  18270. "reasoningID": {
  18271. "type": "string"
  18272. },
  18273. "delta": {
  18274. "type": "string"
  18275. }
  18276. },
  18277. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18278. "additionalProperties": false
  18279. }
  18280. },
  18281. "required": ["id", "type", "properties"],
  18282. "additionalProperties": false
  18283. },
  18284. {
  18285. "type": "object",
  18286. "properties": {
  18287. "id": {
  18288. "type": "string",
  18289. "pattern": "^evt_"
  18290. },
  18291. "type": {
  18292. "type": "string",
  18293. "enum": ["session.next.reasoning.ended"]
  18294. },
  18295. "properties": {
  18296. "type": "object",
  18297. "properties": {
  18298. "timestamp": {
  18299. "type": "number"
  18300. },
  18301. "sessionID": {
  18302. "type": "string",
  18303. "pattern": "^ses"
  18304. },
  18305. "assistantMessageID": {
  18306. "type": "string",
  18307. "pattern": "^msg_"
  18308. },
  18309. "reasoningID": {
  18310. "type": "string"
  18311. },
  18312. "text": {
  18313. "type": "string"
  18314. },
  18315. "providerMetadata": {
  18316. "$ref": "#/components/schemas/LLMProviderMetadata"
  18317. }
  18318. },
  18319. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  18320. "additionalProperties": false
  18321. }
  18322. },
  18323. "required": ["id", "type", "properties"],
  18324. "additionalProperties": false
  18325. },
  18326. {
  18327. "type": "object",
  18328. "properties": {
  18329. "id": {
  18330. "type": "string",
  18331. "pattern": "^evt_"
  18332. },
  18333. "type": {
  18334. "type": "string",
  18335. "enum": ["session.next.tool.input.started"]
  18336. },
  18337. "properties": {
  18338. "type": "object",
  18339. "properties": {
  18340. "timestamp": {
  18341. "type": "number"
  18342. },
  18343. "sessionID": {
  18344. "type": "string",
  18345. "pattern": "^ses"
  18346. },
  18347. "assistantMessageID": {
  18348. "type": "string",
  18349. "pattern": "^msg_"
  18350. },
  18351. "callID": {
  18352. "type": "string"
  18353. },
  18354. "name": {
  18355. "type": "string"
  18356. }
  18357. },
  18358. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18359. "additionalProperties": false
  18360. }
  18361. },
  18362. "required": ["id", "type", "properties"],
  18363. "additionalProperties": false
  18364. },
  18365. {
  18366. "type": "object",
  18367. "properties": {
  18368. "id": {
  18369. "type": "string",
  18370. "pattern": "^evt_"
  18371. },
  18372. "type": {
  18373. "type": "string",
  18374. "enum": ["session.next.tool.input.delta"]
  18375. },
  18376. "properties": {
  18377. "type": "object",
  18378. "properties": {
  18379. "timestamp": {
  18380. "type": "number"
  18381. },
  18382. "sessionID": {
  18383. "type": "string",
  18384. "pattern": "^ses"
  18385. },
  18386. "assistantMessageID": {
  18387. "type": "string",
  18388. "pattern": "^msg_"
  18389. },
  18390. "callID": {
  18391. "type": "string"
  18392. },
  18393. "delta": {
  18394. "type": "string"
  18395. }
  18396. },
  18397. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18398. "additionalProperties": false
  18399. }
  18400. },
  18401. "required": ["id", "type", "properties"],
  18402. "additionalProperties": false
  18403. },
  18404. {
  18405. "type": "object",
  18406. "properties": {
  18407. "id": {
  18408. "type": "string",
  18409. "pattern": "^evt_"
  18410. },
  18411. "type": {
  18412. "type": "string",
  18413. "enum": ["session.next.tool.input.ended"]
  18414. },
  18415. "properties": {
  18416. "type": "object",
  18417. "properties": {
  18418. "timestamp": {
  18419. "type": "number"
  18420. },
  18421. "sessionID": {
  18422. "type": "string",
  18423. "pattern": "^ses"
  18424. },
  18425. "assistantMessageID": {
  18426. "type": "string",
  18427. "pattern": "^msg_"
  18428. },
  18429. "callID": {
  18430. "type": "string"
  18431. },
  18432. "text": {
  18433. "type": "string"
  18434. }
  18435. },
  18436. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18437. "additionalProperties": false
  18438. }
  18439. },
  18440. "required": ["id", "type", "properties"],
  18441. "additionalProperties": false
  18442. },
  18443. {
  18444. "type": "object",
  18445. "properties": {
  18446. "id": {
  18447. "type": "string",
  18448. "pattern": "^evt_"
  18449. },
  18450. "type": {
  18451. "type": "string",
  18452. "enum": ["session.next.tool.called"]
  18453. },
  18454. "properties": {
  18455. "type": "object",
  18456. "properties": {
  18457. "timestamp": {
  18458. "type": "number"
  18459. },
  18460. "sessionID": {
  18461. "type": "string",
  18462. "pattern": "^ses"
  18463. },
  18464. "assistantMessageID": {
  18465. "type": "string",
  18466. "pattern": "^msg_"
  18467. },
  18468. "callID": {
  18469. "type": "string"
  18470. },
  18471. "tool": {
  18472. "type": "string"
  18473. },
  18474. "input": {
  18475. "type": "object"
  18476. },
  18477. "provider": {
  18478. "type": "object",
  18479. "properties": {
  18480. "executed": {
  18481. "type": "boolean"
  18482. },
  18483. "metadata": {
  18484. "$ref": "#/components/schemas/LLMProviderMetadata"
  18485. }
  18486. },
  18487. "required": ["executed"],
  18488. "additionalProperties": false
  18489. }
  18490. },
  18491. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18492. "additionalProperties": false
  18493. }
  18494. },
  18495. "required": ["id", "type", "properties"],
  18496. "additionalProperties": false
  18497. },
  18498. {
  18499. "type": "object",
  18500. "properties": {
  18501. "id": {
  18502. "type": "string",
  18503. "pattern": "^evt_"
  18504. },
  18505. "type": {
  18506. "type": "string",
  18507. "enum": ["session.next.tool.progress"]
  18508. },
  18509. "properties": {
  18510. "type": "object",
  18511. "properties": {
  18512. "timestamp": {
  18513. "type": "number"
  18514. },
  18515. "sessionID": {
  18516. "type": "string",
  18517. "pattern": "^ses"
  18518. },
  18519. "assistantMessageID": {
  18520. "type": "string",
  18521. "pattern": "^msg_"
  18522. },
  18523. "callID": {
  18524. "type": "string"
  18525. },
  18526. "structured": {
  18527. "type": "object"
  18528. },
  18529. "content": {
  18530. "type": "array",
  18531. "items": {
  18532. "$ref": "#/components/schemas/LLMToolContent"
  18533. }
  18534. }
  18535. },
  18536. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18537. "additionalProperties": false
  18538. }
  18539. },
  18540. "required": ["id", "type", "properties"],
  18541. "additionalProperties": false
  18542. },
  18543. {
  18544. "type": "object",
  18545. "properties": {
  18546. "id": {
  18547. "type": "string",
  18548. "pattern": "^evt_"
  18549. },
  18550. "type": {
  18551. "type": "string",
  18552. "enum": ["session.next.tool.success"]
  18553. },
  18554. "properties": {
  18555. "type": "object",
  18556. "properties": {
  18557. "timestamp": {
  18558. "type": "number"
  18559. },
  18560. "sessionID": {
  18561. "type": "string",
  18562. "pattern": "^ses"
  18563. },
  18564. "assistantMessageID": {
  18565. "type": "string",
  18566. "pattern": "^msg_"
  18567. },
  18568. "callID": {
  18569. "type": "string"
  18570. },
  18571. "structured": {
  18572. "type": "object"
  18573. },
  18574. "content": {
  18575. "type": "array",
  18576. "items": {
  18577. "$ref": "#/components/schemas/LLMToolContent"
  18578. }
  18579. },
  18580. "outputPaths": {
  18581. "type": "array",
  18582. "items": {
  18583. "type": "string"
  18584. }
  18585. },
  18586. "result": {},
  18587. "provider": {
  18588. "type": "object",
  18589. "properties": {
  18590. "executed": {
  18591. "type": "boolean"
  18592. },
  18593. "metadata": {
  18594. "$ref": "#/components/schemas/LLMProviderMetadata"
  18595. }
  18596. },
  18597. "required": ["executed"],
  18598. "additionalProperties": false
  18599. }
  18600. },
  18601. "required": [
  18602. "timestamp",
  18603. "sessionID",
  18604. "assistantMessageID",
  18605. "callID",
  18606. "structured",
  18607. "content",
  18608. "provider"
  18609. ],
  18610. "additionalProperties": false
  18611. }
  18612. },
  18613. "required": ["id", "type", "properties"],
  18614. "additionalProperties": false
  18615. },
  18616. {
  18617. "type": "object",
  18618. "properties": {
  18619. "id": {
  18620. "type": "string",
  18621. "pattern": "^evt_"
  18622. },
  18623. "type": {
  18624. "type": "string",
  18625. "enum": ["session.next.tool.failed"]
  18626. },
  18627. "properties": {
  18628. "type": "object",
  18629. "properties": {
  18630. "timestamp": {
  18631. "type": "number"
  18632. },
  18633. "sessionID": {
  18634. "type": "string",
  18635. "pattern": "^ses"
  18636. },
  18637. "assistantMessageID": {
  18638. "type": "string",
  18639. "pattern": "^msg_"
  18640. },
  18641. "callID": {
  18642. "type": "string"
  18643. },
  18644. "error": {
  18645. "$ref": "#/components/schemas/SessionErrorUnknown"
  18646. },
  18647. "result": {},
  18648. "provider": {
  18649. "type": "object",
  18650. "properties": {
  18651. "executed": {
  18652. "type": "boolean"
  18653. },
  18654. "metadata": {
  18655. "$ref": "#/components/schemas/LLMProviderMetadata"
  18656. }
  18657. },
  18658. "required": ["executed"],
  18659. "additionalProperties": false
  18660. }
  18661. },
  18662. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18663. "additionalProperties": false
  18664. }
  18665. },
  18666. "required": ["id", "type", "properties"],
  18667. "additionalProperties": false
  18668. },
  18669. {
  18670. "type": "object",
  18671. "properties": {
  18672. "id": {
  18673. "type": "string",
  18674. "pattern": "^evt_"
  18675. },
  18676. "type": {
  18677. "type": "string",
  18678. "enum": ["session.next.retried"]
  18679. },
  18680. "properties": {
  18681. "type": "object",
  18682. "properties": {
  18683. "timestamp": {
  18684. "type": "number"
  18685. },
  18686. "sessionID": {
  18687. "type": "string",
  18688. "pattern": "^ses"
  18689. },
  18690. "attempt": {
  18691. "type": "number"
  18692. },
  18693. "error": {
  18694. "$ref": "#/components/schemas/SessionNextRetry_error"
  18695. }
  18696. },
  18697. "required": ["timestamp", "sessionID", "attempt", "error"],
  18698. "additionalProperties": false
  18699. }
  18700. },
  18701. "required": ["id", "type", "properties"],
  18702. "additionalProperties": false
  18703. },
  18704. {
  18705. "type": "object",
  18706. "properties": {
  18707. "id": {
  18708. "type": "string",
  18709. "pattern": "^evt_"
  18710. },
  18711. "type": {
  18712. "type": "string",
  18713. "enum": ["session.next.compaction.started"]
  18714. },
  18715. "properties": {
  18716. "type": "object",
  18717. "properties": {
  18718. "timestamp": {
  18719. "type": "number"
  18720. },
  18721. "sessionID": {
  18722. "type": "string",
  18723. "pattern": "^ses"
  18724. },
  18725. "messageID": {
  18726. "type": "string",
  18727. "pattern": "^msg_"
  18728. },
  18729. "reason": {
  18730. "type": "string",
  18731. "enum": ["auto", "manual"]
  18732. }
  18733. },
  18734. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18735. "additionalProperties": false
  18736. }
  18737. },
  18738. "required": ["id", "type", "properties"],
  18739. "additionalProperties": false
  18740. },
  18741. {
  18742. "type": "object",
  18743. "properties": {
  18744. "id": {
  18745. "type": "string",
  18746. "pattern": "^evt_"
  18747. },
  18748. "type": {
  18749. "type": "string",
  18750. "enum": ["session.next.compaction.delta"]
  18751. },
  18752. "properties": {
  18753. "type": "object",
  18754. "properties": {
  18755. "timestamp": {
  18756. "type": "number"
  18757. },
  18758. "sessionID": {
  18759. "type": "string",
  18760. "pattern": "^ses"
  18761. },
  18762. "messageID": {
  18763. "type": "string",
  18764. "pattern": "^msg_"
  18765. },
  18766. "text": {
  18767. "type": "string"
  18768. }
  18769. },
  18770. "required": ["timestamp", "sessionID", "messageID", "text"],
  18771. "additionalProperties": false
  18772. }
  18773. },
  18774. "required": ["id", "type", "properties"],
  18775. "additionalProperties": false
  18776. },
  18777. {
  18778. "type": "object",
  18779. "properties": {
  18780. "id": {
  18781. "type": "string",
  18782. "pattern": "^evt_"
  18783. },
  18784. "type": {
  18785. "type": "string",
  18786. "enum": ["session.next.compaction.ended"]
  18787. },
  18788. "properties": {
  18789. "type": "object",
  18790. "properties": {
  18791. "timestamp": {
  18792. "type": "number"
  18793. },
  18794. "sessionID": {
  18795. "type": "string",
  18796. "pattern": "^ses"
  18797. },
  18798. "messageID": {
  18799. "type": "string",
  18800. "pattern": "^msg_"
  18801. },
  18802. "reason": {
  18803. "type": "string",
  18804. "enum": ["auto", "manual"]
  18805. },
  18806. "text": {
  18807. "type": "string"
  18808. },
  18809. "recent": {
  18810. "type": "string"
  18811. }
  18812. },
  18813. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18814. "additionalProperties": false
  18815. }
  18816. },
  18817. "required": ["id", "type", "properties"],
  18818. "additionalProperties": false
  18819. },
  18820. {
  18821. "type": "object",
  18822. "properties": {
  18823. "id": {
  18824. "type": "string",
  18825. "pattern": "^evt_"
  18826. },
  18827. "type": {
  18828. "type": "string",
  18829. "enum": ["session.next.revert.staged"]
  18830. },
  18831. "properties": {
  18832. "type": "object",
  18833. "properties": {
  18834. "timestamp": {
  18835. "type": "number"
  18836. },
  18837. "sessionID": {
  18838. "type": "string",
  18839. "pattern": "^ses"
  18840. },
  18841. "revert": {
  18842. "$ref": "#/components/schemas/RevertState"
  18843. }
  18844. },
  18845. "required": ["timestamp", "sessionID", "revert"],
  18846. "additionalProperties": false
  18847. }
  18848. },
  18849. "required": ["id", "type", "properties"],
  18850. "additionalProperties": false
  18851. },
  18852. {
  18853. "type": "object",
  18854. "properties": {
  18855. "id": {
  18856. "type": "string",
  18857. "pattern": "^evt_"
  18858. },
  18859. "type": {
  18860. "type": "string",
  18861. "enum": ["session.next.revert.cleared"]
  18862. },
  18863. "properties": {
  18864. "type": "object",
  18865. "properties": {
  18866. "timestamp": {
  18867. "type": "number"
  18868. },
  18869. "sessionID": {
  18870. "type": "string",
  18871. "pattern": "^ses"
  18872. }
  18873. },
  18874. "required": ["timestamp", "sessionID"],
  18875. "additionalProperties": false
  18876. }
  18877. },
  18878. "required": ["id", "type", "properties"],
  18879. "additionalProperties": false
  18880. },
  18881. {
  18882. "type": "object",
  18883. "properties": {
  18884. "id": {
  18885. "type": "string",
  18886. "pattern": "^evt_"
  18887. },
  18888. "type": {
  18889. "type": "string",
  18890. "enum": ["session.next.revert.committed"]
  18891. },
  18892. "properties": {
  18893. "type": "object",
  18894. "properties": {
  18895. "timestamp": {
  18896. "type": "number"
  18897. },
  18898. "sessionID": {
  18899. "type": "string",
  18900. "pattern": "^ses"
  18901. },
  18902. "messageID": {
  18903. "type": "string",
  18904. "pattern": "^msg_"
  18905. }
  18906. },
  18907. "required": ["timestamp", "sessionID", "messageID"],
  18908. "additionalProperties": false
  18909. }
  18910. },
  18911. "required": ["id", "type", "properties"],
  18912. "additionalProperties": false
  18913. },
  18914. {
  18915. "type": "object",
  18916. "properties": {
  18917. "id": {
  18918. "type": "string",
  18919. "pattern": "^evt_"
  18920. },
  18921. "type": {
  18922. "type": "string",
  18923. "enum": ["message.part.delta"]
  18924. },
  18925. "properties": {
  18926. "type": "object",
  18927. "properties": {
  18928. "sessionID": {
  18929. "type": "string",
  18930. "pattern": "^ses"
  18931. },
  18932. "messageID": {
  18933. "type": "string",
  18934. "pattern": "^msg"
  18935. },
  18936. "partID": {
  18937. "type": "string",
  18938. "pattern": "^prt"
  18939. },
  18940. "field": {
  18941. "type": "string"
  18942. },
  18943. "delta": {
  18944. "type": "string"
  18945. }
  18946. },
  18947. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18948. "additionalProperties": false
  18949. }
  18950. },
  18951. "required": ["id", "type", "properties"],
  18952. "additionalProperties": false
  18953. },
  18954. {
  18955. "type": "object",
  18956. "properties": {
  18957. "id": {
  18958. "type": "string",
  18959. "pattern": "^evt_"
  18960. },
  18961. "type": {
  18962. "type": "string",
  18963. "enum": ["session.diff"]
  18964. },
  18965. "properties": {
  18966. "type": "object",
  18967. "properties": {
  18968. "sessionID": {
  18969. "type": "string",
  18970. "pattern": "^ses"
  18971. },
  18972. "diff": {
  18973. "type": "array",
  18974. "items": {
  18975. "$ref": "#/components/schemas/SnapshotFileDiff"
  18976. }
  18977. }
  18978. },
  18979. "required": ["sessionID", "diff"],
  18980. "additionalProperties": false
  18981. }
  18982. },
  18983. "required": ["id", "type", "properties"],
  18984. "additionalProperties": false
  18985. },
  18986. {
  18987. "type": "object",
  18988. "properties": {
  18989. "id": {
  18990. "type": "string",
  18991. "pattern": "^evt_"
  18992. },
  18993. "type": {
  18994. "type": "string",
  18995. "enum": ["session.error"]
  18996. },
  18997. "properties": {
  18998. "type": "object",
  18999. "properties": {
  19000. "sessionID": {
  19001. "type": "string",
  19002. "pattern": "^ses"
  19003. },
  19004. "error": {
  19005. "anyOf": [
  19006. {
  19007. "$ref": "#/components/schemas/ProviderAuthError"
  19008. },
  19009. {
  19010. "$ref": "#/components/schemas/UnknownError"
  19011. },
  19012. {
  19013. "$ref": "#/components/schemas/MessageOutputLengthError"
  19014. },
  19015. {
  19016. "$ref": "#/components/schemas/MessageAbortedError"
  19017. },
  19018. {
  19019. "$ref": "#/components/schemas/StructuredOutputError"
  19020. },
  19021. {
  19022. "$ref": "#/components/schemas/ContextOverflowError"
  19023. },
  19024. {
  19025. "$ref": "#/components/schemas/ContentFilterError"
  19026. },
  19027. {
  19028. "$ref": "#/components/schemas/APIError"
  19029. }
  19030. ]
  19031. }
  19032. },
  19033. "additionalProperties": false
  19034. }
  19035. },
  19036. "required": ["id", "type", "properties"],
  19037. "additionalProperties": false
  19038. },
  19039. {
  19040. "type": "object",
  19041. "properties": {
  19042. "id": {
  19043. "type": "string",
  19044. "pattern": "^evt_"
  19045. },
  19046. "type": {
  19047. "type": "string",
  19048. "enum": ["installation.updated"]
  19049. },
  19050. "properties": {
  19051. "type": "object",
  19052. "properties": {
  19053. "version": {
  19054. "type": "string"
  19055. }
  19056. },
  19057. "required": ["version"],
  19058. "additionalProperties": false
  19059. }
  19060. },
  19061. "required": ["id", "type", "properties"],
  19062. "additionalProperties": false
  19063. },
  19064. {
  19065. "type": "object",
  19066. "properties": {
  19067. "id": {
  19068. "type": "string",
  19069. "pattern": "^evt_"
  19070. },
  19071. "type": {
  19072. "type": "string",
  19073. "enum": ["installation.update-available"]
  19074. },
  19075. "properties": {
  19076. "type": "object",
  19077. "properties": {
  19078. "version": {
  19079. "type": "string"
  19080. }
  19081. },
  19082. "required": ["version"],
  19083. "additionalProperties": false
  19084. }
  19085. },
  19086. "required": ["id", "type", "properties"],
  19087. "additionalProperties": false
  19088. },
  19089. {
  19090. "type": "object",
  19091. "properties": {
  19092. "id": {
  19093. "type": "string",
  19094. "pattern": "^evt_"
  19095. },
  19096. "type": {
  19097. "type": "string",
  19098. "enum": ["file.edited"]
  19099. },
  19100. "properties": {
  19101. "type": "object",
  19102. "properties": {
  19103. "file": {
  19104. "type": "string"
  19105. }
  19106. },
  19107. "required": ["file"],
  19108. "additionalProperties": false
  19109. }
  19110. },
  19111. "required": ["id", "type", "properties"],
  19112. "additionalProperties": false
  19113. },
  19114. {
  19115. "type": "object",
  19116. "properties": {
  19117. "id": {
  19118. "type": "string",
  19119. "pattern": "^evt_"
  19120. },
  19121. "type": {
  19122. "type": "string",
  19123. "enum": ["reference.updated"]
  19124. },
  19125. "properties": {
  19126. "type": "object",
  19127. "properties": {}
  19128. }
  19129. },
  19130. "required": ["id", "type", "properties"],
  19131. "additionalProperties": false
  19132. },
  19133. {
  19134. "type": "object",
  19135. "properties": {
  19136. "id": {
  19137. "type": "string",
  19138. "pattern": "^evt_"
  19139. },
  19140. "type": {
  19141. "type": "string",
  19142. "enum": ["permission.v2.asked"]
  19143. },
  19144. "properties": {
  19145. "type": "object",
  19146. "properties": {
  19147. "id": {
  19148. "type": "string",
  19149. "pattern": "^per"
  19150. },
  19151. "sessionID": {
  19152. "type": "string",
  19153. "pattern": "^ses"
  19154. },
  19155. "action": {
  19156. "type": "string"
  19157. },
  19158. "resources": {
  19159. "type": "array",
  19160. "items": {
  19161. "type": "string"
  19162. }
  19163. },
  19164. "save": {
  19165. "type": "array",
  19166. "items": {
  19167. "type": "string"
  19168. }
  19169. },
  19170. "metadata": {
  19171. "type": "object"
  19172. },
  19173. "source": {
  19174. "$ref": "#/components/schemas/PermissionV2Source"
  19175. }
  19176. },
  19177. "required": ["id", "sessionID", "action", "resources"],
  19178. "additionalProperties": false
  19179. }
  19180. },
  19181. "required": ["id", "type", "properties"],
  19182. "additionalProperties": false
  19183. },
  19184. {
  19185. "type": "object",
  19186. "properties": {
  19187. "id": {
  19188. "type": "string",
  19189. "pattern": "^evt_"
  19190. },
  19191. "type": {
  19192. "type": "string",
  19193. "enum": ["permission.v2.replied"]
  19194. },
  19195. "properties": {
  19196. "type": "object",
  19197. "properties": {
  19198. "sessionID": {
  19199. "type": "string",
  19200. "pattern": "^ses"
  19201. },
  19202. "requestID": {
  19203. "type": "string",
  19204. "pattern": "^per"
  19205. },
  19206. "reply": {
  19207. "$ref": "#/components/schemas/PermissionV2Reply"
  19208. }
  19209. },
  19210. "required": ["sessionID", "requestID", "reply"],
  19211. "additionalProperties": false
  19212. }
  19213. },
  19214. "required": ["id", "type", "properties"],
  19215. "additionalProperties": false
  19216. },
  19217. {
  19218. "type": "object",
  19219. "properties": {
  19220. "id": {
  19221. "type": "string",
  19222. "pattern": "^evt_"
  19223. },
  19224. "type": {
  19225. "type": "string",
  19226. "enum": ["plugin.added"]
  19227. },
  19228. "properties": {
  19229. "type": "object",
  19230. "properties": {
  19231. "id": {
  19232. "type": "string"
  19233. }
  19234. },
  19235. "required": ["id"],
  19236. "additionalProperties": false
  19237. }
  19238. },
  19239. "required": ["id", "type", "properties"],
  19240. "additionalProperties": false
  19241. },
  19242. {
  19243. "type": "object",
  19244. "properties": {
  19245. "id": {
  19246. "type": "string",
  19247. "pattern": "^evt_"
  19248. },
  19249. "type": {
  19250. "type": "string",
  19251. "enum": ["project.directories.updated"]
  19252. },
  19253. "properties": {
  19254. "type": "object",
  19255. "properties": {
  19256. "projectID": {
  19257. "type": "string"
  19258. }
  19259. },
  19260. "required": ["projectID"],
  19261. "additionalProperties": false
  19262. }
  19263. },
  19264. "required": ["id", "type", "properties"],
  19265. "additionalProperties": false
  19266. },
  19267. {
  19268. "type": "object",
  19269. "properties": {
  19270. "id": {
  19271. "type": "string",
  19272. "pattern": "^evt_"
  19273. },
  19274. "type": {
  19275. "type": "string",
  19276. "enum": ["file.watcher.updated"]
  19277. },
  19278. "properties": {
  19279. "type": "object",
  19280. "properties": {
  19281. "file": {
  19282. "type": "string"
  19283. },
  19284. "event": {
  19285. "type": "string",
  19286. "enum": ["add", "change", "unlink"]
  19287. }
  19288. },
  19289. "required": ["file", "event"],
  19290. "additionalProperties": false
  19291. }
  19292. },
  19293. "required": ["id", "type", "properties"],
  19294. "additionalProperties": false
  19295. },
  19296. {
  19297. "type": "object",
  19298. "properties": {
  19299. "id": {
  19300. "type": "string",
  19301. "pattern": "^evt_"
  19302. },
  19303. "type": {
  19304. "type": "string",
  19305. "enum": ["pty.created"]
  19306. },
  19307. "properties": {
  19308. "type": "object",
  19309. "properties": {
  19310. "info": {
  19311. "$ref": "#/components/schemas/Pty"
  19312. }
  19313. },
  19314. "required": ["info"],
  19315. "additionalProperties": false
  19316. }
  19317. },
  19318. "required": ["id", "type", "properties"],
  19319. "additionalProperties": false
  19320. },
  19321. {
  19322. "type": "object",
  19323. "properties": {
  19324. "id": {
  19325. "type": "string",
  19326. "pattern": "^evt_"
  19327. },
  19328. "type": {
  19329. "type": "string",
  19330. "enum": ["pty.updated"]
  19331. },
  19332. "properties": {
  19333. "type": "object",
  19334. "properties": {
  19335. "info": {
  19336. "$ref": "#/components/schemas/Pty"
  19337. }
  19338. },
  19339. "required": ["info"],
  19340. "additionalProperties": false
  19341. }
  19342. },
  19343. "required": ["id", "type", "properties"],
  19344. "additionalProperties": false
  19345. },
  19346. {
  19347. "type": "object",
  19348. "properties": {
  19349. "id": {
  19350. "type": "string",
  19351. "pattern": "^evt_"
  19352. },
  19353. "type": {
  19354. "type": "string",
  19355. "enum": ["pty.exited"]
  19356. },
  19357. "properties": {
  19358. "type": "object",
  19359. "properties": {
  19360. "id": {
  19361. "type": "string",
  19362. "pattern": "^pty"
  19363. },
  19364. "exitCode": {
  19365. "type": "integer",
  19366. "minimum": 0
  19367. }
  19368. },
  19369. "required": ["id", "exitCode"],
  19370. "additionalProperties": false
  19371. }
  19372. },
  19373. "required": ["id", "type", "properties"],
  19374. "additionalProperties": false
  19375. },
  19376. {
  19377. "type": "object",
  19378. "properties": {
  19379. "id": {
  19380. "type": "string",
  19381. "pattern": "^evt_"
  19382. },
  19383. "type": {
  19384. "type": "string",
  19385. "enum": ["pty.deleted"]
  19386. },
  19387. "properties": {
  19388. "type": "object",
  19389. "properties": {
  19390. "id": {
  19391. "type": "string",
  19392. "pattern": "^pty"
  19393. }
  19394. },
  19395. "required": ["id"],
  19396. "additionalProperties": false
  19397. }
  19398. },
  19399. "required": ["id", "type", "properties"],
  19400. "additionalProperties": false
  19401. },
  19402. {
  19403. "type": "object",
  19404. "properties": {
  19405. "id": {
  19406. "type": "string",
  19407. "pattern": "^evt_"
  19408. },
  19409. "type": {
  19410. "type": "string",
  19411. "enum": ["question.v2.asked"]
  19412. },
  19413. "properties": {
  19414. "type": "object",
  19415. "properties": {
  19416. "id": {
  19417. "type": "string",
  19418. "pattern": "^que"
  19419. },
  19420. "sessionID": {
  19421. "type": "string",
  19422. "pattern": "^ses"
  19423. },
  19424. "questions": {
  19425. "type": "array",
  19426. "items": {
  19427. "$ref": "#/components/schemas/QuestionV2Info"
  19428. },
  19429. "description": "Questions to ask"
  19430. },
  19431. "tool": {
  19432. "$ref": "#/components/schemas/QuestionV2Tool"
  19433. }
  19434. },
  19435. "required": ["id", "sessionID", "questions"],
  19436. "additionalProperties": false
  19437. }
  19438. },
  19439. "required": ["id", "type", "properties"],
  19440. "additionalProperties": false
  19441. },
  19442. {
  19443. "type": "object",
  19444. "properties": {
  19445. "id": {
  19446. "type": "string",
  19447. "pattern": "^evt_"
  19448. },
  19449. "type": {
  19450. "type": "string",
  19451. "enum": ["question.v2.replied"]
  19452. },
  19453. "properties": {
  19454. "type": "object",
  19455. "properties": {
  19456. "sessionID": {
  19457. "type": "string",
  19458. "pattern": "^ses"
  19459. },
  19460. "requestID": {
  19461. "type": "string",
  19462. "pattern": "^que"
  19463. },
  19464. "answers": {
  19465. "type": "array",
  19466. "items": {
  19467. "$ref": "#/components/schemas/QuestionV2Answer"
  19468. }
  19469. }
  19470. },
  19471. "required": ["sessionID", "requestID", "answers"],
  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.rejected"]
  19488. },
  19489. "properties": {
  19490. "type": "object",
  19491. "properties": {
  19492. "sessionID": {
  19493. "type": "string",
  19494. "pattern": "^ses"
  19495. },
  19496. "requestID": {
  19497. "type": "string",
  19498. "pattern": "^que"
  19499. }
  19500. },
  19501. "required": ["sessionID", "requestID"],
  19502. "additionalProperties": false
  19503. }
  19504. },
  19505. "required": ["id", "type", "properties"],
  19506. "additionalProperties": false
  19507. },
  19508. {
  19509. "type": "object",
  19510. "properties": {
  19511. "id": {
  19512. "type": "string",
  19513. "pattern": "^evt_"
  19514. },
  19515. "type": {
  19516. "type": "string",
  19517. "enum": ["lsp.updated"]
  19518. },
  19519. "properties": {
  19520. "type": "object",
  19521. "properties": {}
  19522. }
  19523. },
  19524. "required": ["id", "type", "properties"],
  19525. "additionalProperties": false
  19526. },
  19527. {
  19528. "type": "object",
  19529. "properties": {
  19530. "id": {
  19531. "type": "string",
  19532. "pattern": "^evt_"
  19533. },
  19534. "type": {
  19535. "type": "string",
  19536. "enum": ["permission.asked"]
  19537. },
  19538. "properties": {
  19539. "type": "object",
  19540. "properties": {
  19541. "id": {
  19542. "type": "string",
  19543. "pattern": "^per"
  19544. },
  19545. "sessionID": {
  19546. "type": "string",
  19547. "pattern": "^ses"
  19548. },
  19549. "permission": {
  19550. "type": "string"
  19551. },
  19552. "patterns": {
  19553. "type": "array",
  19554. "items": {
  19555. "type": "string"
  19556. }
  19557. },
  19558. "metadata": {
  19559. "type": "object"
  19560. },
  19561. "always": {
  19562. "type": "array",
  19563. "items": {
  19564. "type": "string"
  19565. }
  19566. },
  19567. "tool": {
  19568. "type": "object",
  19569. "properties": {
  19570. "messageID": {
  19571. "type": "string"
  19572. },
  19573. "callID": {
  19574. "type": "string"
  19575. }
  19576. },
  19577. "required": ["messageID", "callID"],
  19578. "additionalProperties": false
  19579. }
  19580. },
  19581. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19582. "additionalProperties": false
  19583. }
  19584. },
  19585. "required": ["id", "type", "properties"],
  19586. "additionalProperties": false
  19587. },
  19588. {
  19589. "type": "object",
  19590. "properties": {
  19591. "id": {
  19592. "type": "string",
  19593. "pattern": "^evt_"
  19594. },
  19595. "type": {
  19596. "type": "string",
  19597. "enum": ["permission.replied"]
  19598. },
  19599. "properties": {
  19600. "type": "object",
  19601. "properties": {
  19602. "sessionID": {
  19603. "type": "string",
  19604. "pattern": "^ses"
  19605. },
  19606. "requestID": {
  19607. "type": "string",
  19608. "pattern": "^per"
  19609. },
  19610. "reply": {
  19611. "type": "string",
  19612. "enum": ["once", "always", "reject"]
  19613. }
  19614. },
  19615. "required": ["sessionID", "requestID", "reply"],
  19616. "additionalProperties": false
  19617. }
  19618. },
  19619. "required": ["id", "type", "properties"],
  19620. "additionalProperties": false
  19621. },
  19622. {
  19623. "type": "object",
  19624. "properties": {
  19625. "id": {
  19626. "type": "string",
  19627. "pattern": "^evt_"
  19628. },
  19629. "type": {
  19630. "type": "string",
  19631. "enum": ["tui.prompt.append"]
  19632. },
  19633. "properties": {
  19634. "type": "object",
  19635. "properties": {
  19636. "text": {
  19637. "type": "string"
  19638. }
  19639. },
  19640. "required": ["text"],
  19641. "additionalProperties": false
  19642. }
  19643. },
  19644. "required": ["id", "type", "properties"],
  19645. "additionalProperties": false
  19646. },
  19647. {
  19648. "type": "object",
  19649. "properties": {
  19650. "id": {
  19651. "type": "string",
  19652. "pattern": "^evt_"
  19653. },
  19654. "type": {
  19655. "type": "string",
  19656. "enum": ["tui.command.execute"]
  19657. },
  19658. "properties": {
  19659. "type": "object",
  19660. "properties": {
  19661. "command": {
  19662. "anyOf": [
  19663. {
  19664. "type": "string",
  19665. "enum": [
  19666. "session.list",
  19667. "session.new",
  19668. "session.share",
  19669. "session.interrupt",
  19670. "session.compact",
  19671. "session.page.up",
  19672. "session.page.down",
  19673. "session.line.up",
  19674. "session.line.down",
  19675. "session.half.page.up",
  19676. "session.half.page.down",
  19677. "session.first",
  19678. "session.last",
  19679. "prompt.clear",
  19680. "prompt.submit",
  19681. "agent.cycle"
  19682. ]
  19683. },
  19684. {
  19685. "type": "string"
  19686. }
  19687. ]
  19688. }
  19689. },
  19690. "required": ["command"],
  19691. "additionalProperties": false
  19692. }
  19693. },
  19694. "required": ["id", "type", "properties"],
  19695. "additionalProperties": false
  19696. },
  19697. {
  19698. "type": "object",
  19699. "properties": {
  19700. "id": {
  19701. "type": "string",
  19702. "pattern": "^evt_"
  19703. },
  19704. "type": {
  19705. "type": "string",
  19706. "enum": ["tui.toast.show"]
  19707. },
  19708. "properties": {
  19709. "type": "object",
  19710. "properties": {
  19711. "title": {
  19712. "type": "string"
  19713. },
  19714. "message": {
  19715. "type": "string"
  19716. },
  19717. "variant": {
  19718. "type": "string",
  19719. "enum": ["info", "success", "warning", "error"]
  19720. },
  19721. "duration": {
  19722. "type": "integer",
  19723. "exclusiveMinimum": 0
  19724. }
  19725. },
  19726. "required": ["message", "variant"],
  19727. "additionalProperties": false
  19728. }
  19729. },
  19730. "required": ["id", "type", "properties"],
  19731. "additionalProperties": false
  19732. },
  19733. {
  19734. "type": "object",
  19735. "properties": {
  19736. "id": {
  19737. "type": "string",
  19738. "pattern": "^evt_"
  19739. },
  19740. "type": {
  19741. "type": "string",
  19742. "enum": ["tui.session.select"]
  19743. },
  19744. "properties": {
  19745. "type": "object",
  19746. "properties": {
  19747. "sessionID": {
  19748. "type": "string",
  19749. "pattern": "^ses",
  19750. "description": "Session ID to navigate to"
  19751. }
  19752. },
  19753. "required": ["sessionID"],
  19754. "additionalProperties": false
  19755. }
  19756. },
  19757. "required": ["id", "type", "properties"],
  19758. "additionalProperties": false
  19759. },
  19760. {
  19761. "type": "object",
  19762. "properties": {
  19763. "id": {
  19764. "type": "string",
  19765. "pattern": "^evt_"
  19766. },
  19767. "type": {
  19768. "type": "string",
  19769. "enum": ["mcp.tools.changed"]
  19770. },
  19771. "properties": {
  19772. "type": "object",
  19773. "properties": {
  19774. "server": {
  19775. "type": "string"
  19776. }
  19777. },
  19778. "required": ["server"],
  19779. "additionalProperties": false
  19780. }
  19781. },
  19782. "required": ["id", "type", "properties"],
  19783. "additionalProperties": false
  19784. },
  19785. {
  19786. "type": "object",
  19787. "properties": {
  19788. "id": {
  19789. "type": "string",
  19790. "pattern": "^evt_"
  19791. },
  19792. "type": {
  19793. "type": "string",
  19794. "enum": ["mcp.browser.open.failed"]
  19795. },
  19796. "properties": {
  19797. "type": "object",
  19798. "properties": {
  19799. "mcpName": {
  19800. "type": "string"
  19801. },
  19802. "url": {
  19803. "type": "string"
  19804. }
  19805. },
  19806. "required": ["mcpName", "url"],
  19807. "additionalProperties": false
  19808. }
  19809. },
  19810. "required": ["id", "type", "properties"],
  19811. "additionalProperties": false
  19812. },
  19813. {
  19814. "type": "object",
  19815. "properties": {
  19816. "id": {
  19817. "type": "string",
  19818. "pattern": "^evt_"
  19819. },
  19820. "type": {
  19821. "type": "string",
  19822. "enum": ["command.executed"]
  19823. },
  19824. "properties": {
  19825. "type": "object",
  19826. "properties": {
  19827. "name": {
  19828. "type": "string"
  19829. },
  19830. "sessionID": {
  19831. "type": "string",
  19832. "pattern": "^ses"
  19833. },
  19834. "arguments": {
  19835. "type": "string"
  19836. },
  19837. "messageID": {
  19838. "type": "string",
  19839. "pattern": "^msg"
  19840. }
  19841. },
  19842. "required": ["name", "sessionID", "arguments", "messageID"],
  19843. "additionalProperties": false
  19844. }
  19845. },
  19846. "required": ["id", "type", "properties"],
  19847. "additionalProperties": false
  19848. },
  19849. {
  19850. "type": "object",
  19851. "properties": {
  19852. "id": {
  19853. "type": "string",
  19854. "pattern": "^evt_"
  19855. },
  19856. "type": {
  19857. "type": "string",
  19858. "enum": ["project.updated"]
  19859. },
  19860. "properties": {
  19861. "type": "object",
  19862. "properties": {
  19863. "id": {
  19864. "type": "string"
  19865. },
  19866. "worktree": {
  19867. "type": "string"
  19868. },
  19869. "vcs": {
  19870. "$ref": "#/components/schemas/ProjectVcs"
  19871. },
  19872. "name": {
  19873. "type": "string"
  19874. },
  19875. "icon": {
  19876. "$ref": "#/components/schemas/ProjectIcon"
  19877. },
  19878. "commands": {
  19879. "$ref": "#/components/schemas/ProjectCommands"
  19880. },
  19881. "time": {
  19882. "$ref": "#/components/schemas/ProjectTime"
  19883. },
  19884. "sandboxes": {
  19885. "type": "array",
  19886. "items": {
  19887. "type": "string"
  19888. }
  19889. }
  19890. },
  19891. "required": ["id", "worktree", "time", "sandboxes"],
  19892. "additionalProperties": false
  19893. }
  19894. },
  19895. "required": ["id", "type", "properties"],
  19896. "additionalProperties": false
  19897. },
  19898. {
  19899. "type": "object",
  19900. "properties": {
  19901. "id": {
  19902. "type": "string",
  19903. "pattern": "^evt_"
  19904. },
  19905. "type": {
  19906. "type": "string",
  19907. "enum": ["session.status"]
  19908. },
  19909. "properties": {
  19910. "type": "object",
  19911. "properties": {
  19912. "sessionID": {
  19913. "type": "string",
  19914. "pattern": "^ses"
  19915. },
  19916. "status": {
  19917. "$ref": "#/components/schemas/SessionStatus"
  19918. }
  19919. },
  19920. "required": ["sessionID", "status"],
  19921. "additionalProperties": false
  19922. }
  19923. },
  19924. "required": ["id", "type", "properties"],
  19925. "additionalProperties": false
  19926. },
  19927. {
  19928. "type": "object",
  19929. "properties": {
  19930. "id": {
  19931. "type": "string",
  19932. "pattern": "^evt_"
  19933. },
  19934. "type": {
  19935. "type": "string",
  19936. "enum": ["session.idle"]
  19937. },
  19938. "properties": {
  19939. "type": "object",
  19940. "properties": {
  19941. "sessionID": {
  19942. "type": "string",
  19943. "pattern": "^ses"
  19944. }
  19945. },
  19946. "required": ["sessionID"],
  19947. "additionalProperties": false
  19948. }
  19949. },
  19950. "required": ["id", "type", "properties"],
  19951. "additionalProperties": false
  19952. },
  19953. {
  19954. "type": "object",
  19955. "properties": {
  19956. "id": {
  19957. "type": "string",
  19958. "pattern": "^evt_"
  19959. },
  19960. "type": {
  19961. "type": "string",
  19962. "enum": ["question.asked"]
  19963. },
  19964. "properties": {
  19965. "type": "object",
  19966. "properties": {
  19967. "id": {
  19968. "type": "string",
  19969. "pattern": "^que"
  19970. },
  19971. "sessionID": {
  19972. "type": "string",
  19973. "pattern": "^ses"
  19974. },
  19975. "questions": {
  19976. "type": "array",
  19977. "items": {
  19978. "$ref": "#/components/schemas/QuestionInfo"
  19979. },
  19980. "description": "Questions to ask"
  19981. },
  19982. "tool": {
  19983. "$ref": "#/components/schemas/QuestionTool"
  19984. }
  19985. },
  19986. "required": ["id", "sessionID", "questions"],
  19987. "additionalProperties": false
  19988. }
  19989. },
  19990. "required": ["id", "type", "properties"],
  19991. "additionalProperties": false
  19992. },
  19993. {
  19994. "type": "object",
  19995. "properties": {
  19996. "id": {
  19997. "type": "string",
  19998. "pattern": "^evt_"
  19999. },
  20000. "type": {
  20001. "type": "string",
  20002. "enum": ["question.replied"]
  20003. },
  20004. "properties": {
  20005. "type": "object",
  20006. "properties": {
  20007. "sessionID": {
  20008. "type": "string",
  20009. "pattern": "^ses"
  20010. },
  20011. "requestID": {
  20012. "type": "string",
  20013. "pattern": "^que"
  20014. },
  20015. "answers": {
  20016. "type": "array",
  20017. "items": {
  20018. "$ref": "#/components/schemas/QuestionAnswer"
  20019. }
  20020. }
  20021. },
  20022. "required": ["sessionID", "requestID", "answers"],
  20023. "additionalProperties": false
  20024. }
  20025. },
  20026. "required": ["id", "type", "properties"],
  20027. "additionalProperties": false
  20028. },
  20029. {
  20030. "type": "object",
  20031. "properties": {
  20032. "id": {
  20033. "type": "string",
  20034. "pattern": "^evt_"
  20035. },
  20036. "type": {
  20037. "type": "string",
  20038. "enum": ["question.rejected"]
  20039. },
  20040. "properties": {
  20041. "type": "object",
  20042. "properties": {
  20043. "sessionID": {
  20044. "type": "string",
  20045. "pattern": "^ses"
  20046. },
  20047. "requestID": {
  20048. "type": "string",
  20049. "pattern": "^que"
  20050. }
  20051. },
  20052. "required": ["sessionID", "requestID"],
  20053. "additionalProperties": false
  20054. }
  20055. },
  20056. "required": ["id", "type", "properties"],
  20057. "additionalProperties": false
  20058. },
  20059. {
  20060. "type": "object",
  20061. "properties": {
  20062. "id": {
  20063. "type": "string",
  20064. "pattern": "^evt_"
  20065. },
  20066. "type": {
  20067. "type": "string",
  20068. "enum": ["session.compacted"]
  20069. },
  20070. "properties": {
  20071. "type": "object",
  20072. "properties": {
  20073. "sessionID": {
  20074. "type": "string",
  20075. "pattern": "^ses"
  20076. }
  20077. },
  20078. "required": ["sessionID"],
  20079. "additionalProperties": false
  20080. }
  20081. },
  20082. "required": ["id", "type", "properties"],
  20083. "additionalProperties": false
  20084. },
  20085. {
  20086. "type": "object",
  20087. "properties": {
  20088. "id": {
  20089. "type": "string",
  20090. "pattern": "^evt_"
  20091. },
  20092. "type": {
  20093. "type": "string",
  20094. "enum": ["vcs.branch.updated"]
  20095. },
  20096. "properties": {
  20097. "type": "object",
  20098. "properties": {
  20099. "branch": {
  20100. "type": "string"
  20101. }
  20102. },
  20103. "additionalProperties": false
  20104. }
  20105. },
  20106. "required": ["id", "type", "properties"],
  20107. "additionalProperties": false
  20108. },
  20109. {
  20110. "type": "object",
  20111. "properties": {
  20112. "id": {
  20113. "type": "string",
  20114. "pattern": "^evt_"
  20115. },
  20116. "type": {
  20117. "type": "string",
  20118. "enum": ["workspace.ready"]
  20119. },
  20120. "properties": {
  20121. "type": "object",
  20122. "properties": {
  20123. "name": {
  20124. "type": "string"
  20125. }
  20126. },
  20127. "required": ["name"],
  20128. "additionalProperties": false
  20129. }
  20130. },
  20131. "required": ["id", "type", "properties"],
  20132. "additionalProperties": false
  20133. },
  20134. {
  20135. "type": "object",
  20136. "properties": {
  20137. "id": {
  20138. "type": "string",
  20139. "pattern": "^evt_"
  20140. },
  20141. "type": {
  20142. "type": "string",
  20143. "enum": ["workspace.failed"]
  20144. },
  20145. "properties": {
  20146. "type": "object",
  20147. "properties": {
  20148. "message": {
  20149. "type": "string"
  20150. }
  20151. },
  20152. "required": ["message"],
  20153. "additionalProperties": false
  20154. }
  20155. },
  20156. "required": ["id", "type", "properties"],
  20157. "additionalProperties": false
  20158. },
  20159. {
  20160. "type": "object",
  20161. "properties": {
  20162. "id": {
  20163. "type": "string",
  20164. "pattern": "^evt_"
  20165. },
  20166. "type": {
  20167. "type": "string",
  20168. "enum": ["workspace.status"]
  20169. },
  20170. "properties": {
  20171. "type": "object",
  20172. "properties": {
  20173. "workspaceID": {
  20174. "type": "string",
  20175. "pattern": "^wrk"
  20176. },
  20177. "status": {
  20178. "type": "string",
  20179. "enum": ["connected", "connecting", "disconnected", "error"]
  20180. }
  20181. },
  20182. "required": ["workspaceID", "status"],
  20183. "additionalProperties": false
  20184. }
  20185. },
  20186. "required": ["id", "type", "properties"],
  20187. "additionalProperties": false
  20188. },
  20189. {
  20190. "type": "object",
  20191. "properties": {
  20192. "id": {
  20193. "type": "string",
  20194. "pattern": "^evt_"
  20195. },
  20196. "type": {
  20197. "type": "string",
  20198. "enum": ["worktree.ready"]
  20199. },
  20200. "properties": {
  20201. "type": "object",
  20202. "properties": {
  20203. "name": {
  20204. "type": "string"
  20205. },
  20206. "branch": {
  20207. "type": "string"
  20208. }
  20209. },
  20210. "required": ["name"],
  20211. "additionalProperties": false
  20212. }
  20213. },
  20214. "required": ["id", "type", "properties"],
  20215. "additionalProperties": false
  20216. },
  20217. {
  20218. "type": "object",
  20219. "properties": {
  20220. "id": {
  20221. "type": "string",
  20222. "pattern": "^evt_"
  20223. },
  20224. "type": {
  20225. "type": "string",
  20226. "enum": ["worktree.failed"]
  20227. },
  20228. "properties": {
  20229. "type": "object",
  20230. "properties": {
  20231. "message": {
  20232. "type": "string"
  20233. }
  20234. },
  20235. "required": ["message"],
  20236. "additionalProperties": false
  20237. }
  20238. },
  20239. "required": ["id", "type", "properties"],
  20240. "additionalProperties": false
  20241. },
  20242. {
  20243. "type": "object",
  20244. "properties": {
  20245. "id": {
  20246. "type": "string",
  20247. "pattern": "^evt_"
  20248. },
  20249. "type": {
  20250. "type": "string",
  20251. "enum": ["server.connected"]
  20252. },
  20253. "properties": {
  20254. "type": "object",
  20255. "properties": {}
  20256. }
  20257. },
  20258. "required": ["id", "type", "properties"],
  20259. "additionalProperties": false
  20260. },
  20261. {
  20262. "type": "object",
  20263. "properties": {
  20264. "id": {
  20265. "type": "string",
  20266. "pattern": "^evt_"
  20267. },
  20268. "type": {
  20269. "type": "string",
  20270. "enum": ["global.disposed"]
  20271. },
  20272. "properties": {
  20273. "type": "object",
  20274. "properties": {}
  20275. }
  20276. },
  20277. "required": ["id", "type", "properties"],
  20278. "additionalProperties": false
  20279. },
  20280. {
  20281. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20282. },
  20283. {
  20284. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20285. },
  20286. {
  20287. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20288. },
  20289. {
  20290. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20291. },
  20292. {
  20293. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20294. },
  20295. {
  20296. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20297. },
  20298. {
  20299. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20300. },
  20301. {
  20302. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20303. },
  20304. {
  20305. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20306. },
  20307. {
  20308. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20309. },
  20310. {
  20311. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20312. },
  20313. {
  20314. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20315. },
  20316. {
  20317. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20318. },
  20319. {
  20320. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20321. },
  20322. {
  20323. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20324. },
  20325. {
  20326. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20327. },
  20328. {
  20329. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20330. },
  20331. {
  20332. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20333. },
  20334. {
  20335. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20336. },
  20337. {
  20338. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20339. },
  20340. {
  20341. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20342. },
  20343. {
  20344. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20345. },
  20346. {
  20347. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20348. },
  20349. {
  20350. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20351. },
  20352. {
  20353. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20354. },
  20355. {
  20356. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20357. },
  20358. {
  20359. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20360. },
  20361. {
  20362. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20363. },
  20364. {
  20365. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20366. },
  20367. {
  20368. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20369. },
  20370. {
  20371. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20372. },
  20373. {
  20374. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20375. },
  20376. {
  20377. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20378. },
  20379. {
  20380. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20381. },
  20382. {
  20383. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20384. },
  20385. {
  20386. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20387. }
  20388. ]
  20389. }
  20390. },
  20391. "required": ["directory", "payload"],
  20392. "additionalProperties": false
  20393. },
  20394. "LogLevel": {
  20395. "type": "string",
  20396. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20397. "description": "Log level"
  20398. },
  20399. "ServerConfig": {
  20400. "type": "object",
  20401. "properties": {
  20402. "port": {
  20403. "type": "integer",
  20404. "exclusiveMinimum": 0
  20405. },
  20406. "hostname": {
  20407. "type": "string"
  20408. },
  20409. "mdns": {
  20410. "type": "boolean"
  20411. },
  20412. "mdnsDomain": {
  20413. "type": "string"
  20414. },
  20415. "cors": {
  20416. "type": "array",
  20417. "items": {
  20418. "type": "string"
  20419. }
  20420. }
  20421. },
  20422. "additionalProperties": false,
  20423. "description": "Server configuration for opencode serve and web commands"
  20424. },
  20425. "PermissionActionConfig": {
  20426. "type": "string",
  20427. "enum": ["ask", "allow", "deny"]
  20428. },
  20429. "PermissionObjectConfig": {
  20430. "type": "object",
  20431. "additionalProperties": {
  20432. "$ref": "#/components/schemas/PermissionActionConfig"
  20433. }
  20434. },
  20435. "PermissionRuleConfig": {
  20436. "anyOf": [
  20437. {
  20438. "$ref": "#/components/schemas/PermissionActionConfig"
  20439. },
  20440. {
  20441. "$ref": "#/components/schemas/PermissionObjectConfig"
  20442. }
  20443. ]
  20444. },
  20445. "PermissionConfig": {
  20446. "anyOf": [
  20447. {
  20448. "$ref": "#/components/schemas/PermissionActionConfig"
  20449. },
  20450. {
  20451. "type": "object",
  20452. "properties": {
  20453. "read": {
  20454. "$ref": "#/components/schemas/PermissionRuleConfig"
  20455. },
  20456. "edit": {
  20457. "$ref": "#/components/schemas/PermissionRuleConfig"
  20458. },
  20459. "glob": {
  20460. "$ref": "#/components/schemas/PermissionRuleConfig"
  20461. },
  20462. "grep": {
  20463. "$ref": "#/components/schemas/PermissionRuleConfig"
  20464. },
  20465. "list": {
  20466. "$ref": "#/components/schemas/PermissionRuleConfig"
  20467. },
  20468. "bash": {
  20469. "$ref": "#/components/schemas/PermissionRuleConfig"
  20470. },
  20471. "task": {
  20472. "$ref": "#/components/schemas/PermissionRuleConfig"
  20473. },
  20474. "external_directory": {
  20475. "$ref": "#/components/schemas/PermissionRuleConfig"
  20476. },
  20477. "question": {
  20478. "$ref": "#/components/schemas/PermissionActionConfig"
  20479. },
  20480. "webfetch": {
  20481. "$ref": "#/components/schemas/PermissionActionConfig"
  20482. },
  20483. "websearch": {
  20484. "$ref": "#/components/schemas/PermissionActionConfig"
  20485. },
  20486. "lsp": {
  20487. "$ref": "#/components/schemas/PermissionRuleConfig"
  20488. },
  20489. "doom_loop": {
  20490. "$ref": "#/components/schemas/PermissionActionConfig"
  20491. },
  20492. "skill": {
  20493. "$ref": "#/components/schemas/PermissionRuleConfig"
  20494. }
  20495. },
  20496. "additionalProperties": {
  20497. "$ref": "#/components/schemas/PermissionRuleConfig"
  20498. }
  20499. }
  20500. ]
  20501. },
  20502. "AgentConfig": {
  20503. "type": "object",
  20504. "properties": {
  20505. "model": {
  20506. "type": "string"
  20507. },
  20508. "variant": {
  20509. "type": "string"
  20510. },
  20511. "temperature": {
  20512. "type": "number"
  20513. },
  20514. "top_p": {
  20515. "type": "number"
  20516. },
  20517. "prompt": {
  20518. "type": "string"
  20519. },
  20520. "tools": {
  20521. "type": "object",
  20522. "additionalProperties": {
  20523. "type": "boolean"
  20524. }
  20525. },
  20526. "disable": {
  20527. "type": "boolean"
  20528. },
  20529. "description": {
  20530. "type": "string"
  20531. },
  20532. "mode": {
  20533. "type": "string",
  20534. "enum": ["subagent", "primary", "all"]
  20535. },
  20536. "hidden": {
  20537. "type": "boolean"
  20538. },
  20539. "options": {
  20540. "type": "object"
  20541. },
  20542. "color": {
  20543. "anyOf": [
  20544. {
  20545. "type": "string",
  20546. "pattern": "^#[0-9a-fA-F]{6}$"
  20547. },
  20548. {
  20549. "type": "string",
  20550. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20551. }
  20552. ],
  20553. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20554. },
  20555. "steps": {
  20556. "type": "integer",
  20557. "exclusiveMinimum": 0
  20558. },
  20559. "maxSteps": {
  20560. "type": "integer",
  20561. "exclusiveMinimum": 0
  20562. },
  20563. "permission": {
  20564. "$ref": "#/components/schemas/PermissionConfig"
  20565. }
  20566. },
  20567. "additionalProperties": {}
  20568. },
  20569. "ProviderConfig": {
  20570. "type": "object",
  20571. "properties": {
  20572. "api": {
  20573. "type": "string"
  20574. },
  20575. "name": {
  20576. "type": "string"
  20577. },
  20578. "env": {
  20579. "type": "array",
  20580. "items": {
  20581. "type": "string"
  20582. }
  20583. },
  20584. "id": {
  20585. "type": "string"
  20586. },
  20587. "npm": {
  20588. "type": "string"
  20589. },
  20590. "whitelist": {
  20591. "type": "array",
  20592. "items": {
  20593. "type": "string"
  20594. }
  20595. },
  20596. "blacklist": {
  20597. "type": "array",
  20598. "items": {
  20599. "type": "string"
  20600. }
  20601. },
  20602. "options": {
  20603. "type": "object",
  20604. "properties": {
  20605. "apiKey": {
  20606. "type": "string"
  20607. },
  20608. "baseURL": {
  20609. "type": "string"
  20610. },
  20611. "enterpriseUrl": {
  20612. "type": "string"
  20613. },
  20614. "setCacheKey": {
  20615. "type": "boolean"
  20616. },
  20617. "timeout": {
  20618. "anyOf": [
  20619. {
  20620. "type": "integer",
  20621. "exclusiveMinimum": 0
  20622. },
  20623. {
  20624. "type": "boolean",
  20625. "enum": [false]
  20626. }
  20627. ],
  20628. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20629. },
  20630. "headerTimeout": {
  20631. "anyOf": [
  20632. {
  20633. "type": "integer",
  20634. "exclusiveMinimum": 0
  20635. },
  20636. {
  20637. "type": "boolean",
  20638. "enum": [false]
  20639. }
  20640. ],
  20641. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20642. },
  20643. "chunkTimeout": {
  20644. "type": "integer",
  20645. "exclusiveMinimum": 0
  20646. }
  20647. },
  20648. "additionalProperties": {}
  20649. },
  20650. "models": {
  20651. "type": "object",
  20652. "additionalProperties": {
  20653. "type": "object",
  20654. "properties": {
  20655. "id": {
  20656. "type": "string"
  20657. },
  20658. "name": {
  20659. "type": "string"
  20660. },
  20661. "family": {
  20662. "type": "string"
  20663. },
  20664. "release_date": {
  20665. "type": "string"
  20666. },
  20667. "attachment": {
  20668. "type": "boolean"
  20669. },
  20670. "reasoning": {
  20671. "type": "boolean"
  20672. },
  20673. "temperature": {
  20674. "type": "boolean"
  20675. },
  20676. "tool_call": {
  20677. "type": "boolean"
  20678. },
  20679. "interleaved": {
  20680. "anyOf": [
  20681. {
  20682. "type": "boolean",
  20683. "enum": [true]
  20684. },
  20685. {
  20686. "type": "object",
  20687. "properties": {
  20688. "field": {
  20689. "type": "string",
  20690. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20691. }
  20692. },
  20693. "required": ["field"],
  20694. "additionalProperties": false
  20695. }
  20696. ]
  20697. },
  20698. "cost": {
  20699. "type": "object",
  20700. "properties": {
  20701. "input": {
  20702. "type": "number"
  20703. },
  20704. "output": {
  20705. "type": "number"
  20706. },
  20707. "cache_read": {
  20708. "type": "number"
  20709. },
  20710. "cache_write": {
  20711. "type": "number"
  20712. },
  20713. "context_over_200k": {
  20714. "type": "object",
  20715. "properties": {
  20716. "input": {
  20717. "type": "number"
  20718. },
  20719. "output": {
  20720. "type": "number"
  20721. },
  20722. "cache_read": {
  20723. "type": "number"
  20724. },
  20725. "cache_write": {
  20726. "type": "number"
  20727. }
  20728. },
  20729. "required": ["input", "output"],
  20730. "additionalProperties": false
  20731. }
  20732. },
  20733. "required": ["input", "output"],
  20734. "additionalProperties": false
  20735. },
  20736. "limit": {
  20737. "type": "object",
  20738. "properties": {
  20739. "context": {
  20740. "type": "number"
  20741. },
  20742. "input": {
  20743. "type": "number"
  20744. },
  20745. "output": {
  20746. "type": "number"
  20747. }
  20748. },
  20749. "required": ["context", "output"],
  20750. "additionalProperties": false
  20751. },
  20752. "modalities": {
  20753. "type": "object",
  20754. "properties": {
  20755. "input": {
  20756. "type": "array",
  20757. "items": {
  20758. "type": "string",
  20759. "enum": ["text", "audio", "image", "video", "pdf"]
  20760. }
  20761. },
  20762. "output": {
  20763. "type": "array",
  20764. "items": {
  20765. "type": "string",
  20766. "enum": ["text", "audio", "image", "video", "pdf"]
  20767. }
  20768. }
  20769. },
  20770. "additionalProperties": false
  20771. },
  20772. "experimental": {
  20773. "type": "boolean"
  20774. },
  20775. "status": {
  20776. "type": "string",
  20777. "enum": ["alpha", "beta", "deprecated", "active"]
  20778. },
  20779. "provider": {
  20780. "type": "object",
  20781. "properties": {
  20782. "npm": {
  20783. "type": "string"
  20784. },
  20785. "api": {
  20786. "type": "string"
  20787. }
  20788. },
  20789. "additionalProperties": false
  20790. },
  20791. "options": {
  20792. "type": "object"
  20793. },
  20794. "headers": {
  20795. "type": "object",
  20796. "additionalProperties": {
  20797. "type": "string"
  20798. }
  20799. },
  20800. "variants": {
  20801. "type": "object",
  20802. "additionalProperties": {
  20803. "type": "object",
  20804. "properties": {
  20805. "disabled": {
  20806. "type": "boolean"
  20807. }
  20808. },
  20809. "additionalProperties": {}
  20810. },
  20811. "description": "Variant-specific configuration"
  20812. }
  20813. },
  20814. "additionalProperties": false
  20815. }
  20816. }
  20817. },
  20818. "additionalProperties": false
  20819. },
  20820. "McpLocalConfig": {
  20821. "type": "object",
  20822. "properties": {
  20823. "type": {
  20824. "type": "string",
  20825. "enum": ["local"],
  20826. "description": "Type of MCP server connection"
  20827. },
  20828. "command": {
  20829. "type": "array",
  20830. "items": {
  20831. "type": "string"
  20832. },
  20833. "description": "Command and arguments to run the MCP server"
  20834. },
  20835. "cwd": {
  20836. "type": "string"
  20837. },
  20838. "environment": {
  20839. "type": "object",
  20840. "additionalProperties": {
  20841. "type": "string"
  20842. }
  20843. },
  20844. "enabled": {
  20845. "type": "boolean"
  20846. },
  20847. "timeout": {
  20848. "type": "integer",
  20849. "exclusiveMinimum": 0
  20850. }
  20851. },
  20852. "required": ["type", "command"],
  20853. "additionalProperties": false
  20854. },
  20855. "McpOAuthConfig": {
  20856. "type": "object",
  20857. "properties": {
  20858. "clientId": {
  20859. "type": "string"
  20860. },
  20861. "clientSecret": {
  20862. "type": "string"
  20863. },
  20864. "scope": {
  20865. "type": "string"
  20866. },
  20867. "callbackPort": {
  20868. "type": "integer",
  20869. "minimum": 1,
  20870. "maximum": 65535
  20871. },
  20872. "redirectUri": {
  20873. "type": "string"
  20874. }
  20875. },
  20876. "additionalProperties": false
  20877. },
  20878. "McpRemoteConfig": {
  20879. "type": "object",
  20880. "properties": {
  20881. "type": {
  20882. "type": "string",
  20883. "enum": ["remote"],
  20884. "description": "Type of MCP server connection"
  20885. },
  20886. "url": {
  20887. "type": "string",
  20888. "description": "URL of the remote MCP server"
  20889. },
  20890. "enabled": {
  20891. "type": "boolean"
  20892. },
  20893. "headers": {
  20894. "type": "object",
  20895. "additionalProperties": {
  20896. "type": "string"
  20897. }
  20898. },
  20899. "oauth": {
  20900. "anyOf": [
  20901. {
  20902. "$ref": "#/components/schemas/McpOAuthConfig"
  20903. },
  20904. {
  20905. "type": "boolean",
  20906. "enum": [false]
  20907. }
  20908. ],
  20909. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20910. },
  20911. "timeout": {
  20912. "type": "integer",
  20913. "exclusiveMinimum": 0
  20914. }
  20915. },
  20916. "required": ["type", "url"],
  20917. "additionalProperties": false
  20918. },
  20919. "LayoutConfig": {
  20920. "type": "string",
  20921. "enum": ["auto", "stretch"],
  20922. "description": "@deprecated Always uses stretch layout."
  20923. },
  20924. "ImageAttachmentConfig": {
  20925. "type": "object",
  20926. "properties": {
  20927. "auto_resize": {
  20928. "type": "boolean"
  20929. },
  20930. "max_width": {
  20931. "type": "integer",
  20932. "exclusiveMinimum": 0
  20933. },
  20934. "max_height": {
  20935. "type": "integer",
  20936. "exclusiveMinimum": 0
  20937. },
  20938. "max_base64_bytes": {
  20939. "type": "integer",
  20940. "exclusiveMinimum": 0
  20941. }
  20942. },
  20943. "additionalProperties": false
  20944. },
  20945. "AttachmentConfig": {
  20946. "type": "object",
  20947. "properties": {
  20948. "image": {
  20949. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20950. }
  20951. },
  20952. "additionalProperties": false
  20953. },
  20954. "Config": {
  20955. "type": "object",
  20956. "properties": {
  20957. "$schema": {
  20958. "type": "string"
  20959. },
  20960. "shell": {
  20961. "type": "string"
  20962. },
  20963. "logLevel": {
  20964. "$ref": "#/components/schemas/LogLevel"
  20965. },
  20966. "server": {
  20967. "$ref": "#/components/schemas/ServerConfig"
  20968. },
  20969. "command": {
  20970. "type": "object",
  20971. "additionalProperties": {
  20972. "type": "object",
  20973. "properties": {
  20974. "template": {
  20975. "type": "string"
  20976. },
  20977. "description": {
  20978. "type": "string"
  20979. },
  20980. "agent": {
  20981. "type": "string"
  20982. },
  20983. "model": {
  20984. "type": "string"
  20985. },
  20986. "variant": {
  20987. "type": "string"
  20988. },
  20989. "subtask": {
  20990. "type": "boolean"
  20991. }
  20992. },
  20993. "required": ["template"],
  20994. "additionalProperties": false
  20995. }
  20996. },
  20997. "skills": {
  20998. "type": "object",
  20999. "properties": {
  21000. "paths": {
  21001. "type": "array",
  21002. "items": {
  21003. "type": "string"
  21004. }
  21005. },
  21006. "urls": {
  21007. "type": "array",
  21008. "items": {
  21009. "type": "string"
  21010. }
  21011. }
  21012. },
  21013. "additionalProperties": false
  21014. },
  21015. "references": {
  21016. "type": "object",
  21017. "additionalProperties": {
  21018. "anyOf": [
  21019. {
  21020. "type": "string"
  21021. },
  21022. {
  21023. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21024. },
  21025. {
  21026. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21027. }
  21028. ]
  21029. }
  21030. },
  21031. "reference": {
  21032. "type": "object",
  21033. "additionalProperties": {
  21034. "anyOf": [
  21035. {
  21036. "type": "string"
  21037. },
  21038. {
  21039. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21040. },
  21041. {
  21042. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21043. }
  21044. ]
  21045. }
  21046. },
  21047. "watcher": {
  21048. "type": "object",
  21049. "properties": {
  21050. "ignore": {
  21051. "type": "array",
  21052. "items": {
  21053. "type": "string"
  21054. }
  21055. }
  21056. },
  21057. "additionalProperties": false
  21058. },
  21059. "snapshot": {
  21060. "type": "boolean"
  21061. },
  21062. "plugin": {
  21063. "type": "array",
  21064. "items": {
  21065. "anyOf": [
  21066. {
  21067. "type": "string"
  21068. },
  21069. {
  21070. "type": "array",
  21071. "prefixItems": [
  21072. {
  21073. "type": "string"
  21074. },
  21075. {
  21076. "type": "object"
  21077. }
  21078. ],
  21079. "maxItems": 2,
  21080. "minItems": 2
  21081. }
  21082. ]
  21083. }
  21084. },
  21085. "share": {
  21086. "type": "string",
  21087. "enum": ["manual", "auto", "disabled"]
  21088. },
  21089. "autoshare": {
  21090. "type": "boolean"
  21091. },
  21092. "autoupdate": {
  21093. "anyOf": [
  21094. {
  21095. "type": "boolean"
  21096. },
  21097. {
  21098. "type": "string",
  21099. "enum": ["notify"]
  21100. }
  21101. ],
  21102. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21103. },
  21104. "disabled_providers": {
  21105. "type": "array",
  21106. "items": {
  21107. "type": "string"
  21108. }
  21109. },
  21110. "enabled_providers": {
  21111. "type": "array",
  21112. "items": {
  21113. "type": "string"
  21114. }
  21115. },
  21116. "model": {
  21117. "type": "string"
  21118. },
  21119. "small_model": {
  21120. "type": "string"
  21121. },
  21122. "default_agent": {
  21123. "type": "string"
  21124. },
  21125. "subagent_depth": {
  21126. "type": "integer",
  21127. "minimum": 0
  21128. },
  21129. "username": {
  21130. "type": "string"
  21131. },
  21132. "mode": {
  21133. "type": "object",
  21134. "properties": {
  21135. "build": {
  21136. "$ref": "#/components/schemas/AgentConfig"
  21137. },
  21138. "plan": {
  21139. "$ref": "#/components/schemas/AgentConfig"
  21140. }
  21141. },
  21142. "additionalProperties": {
  21143. "$ref": "#/components/schemas/AgentConfig"
  21144. }
  21145. },
  21146. "agent": {
  21147. "type": "object",
  21148. "properties": {
  21149. "plan": {
  21150. "$ref": "#/components/schemas/AgentConfig"
  21151. },
  21152. "build": {
  21153. "$ref": "#/components/schemas/AgentConfig"
  21154. },
  21155. "general": {
  21156. "$ref": "#/components/schemas/AgentConfig"
  21157. },
  21158. "explore": {
  21159. "$ref": "#/components/schemas/AgentConfig"
  21160. },
  21161. "title": {
  21162. "$ref": "#/components/schemas/AgentConfig"
  21163. },
  21164. "summary": {
  21165. "$ref": "#/components/schemas/AgentConfig"
  21166. },
  21167. "compaction": {
  21168. "$ref": "#/components/schemas/AgentConfig"
  21169. }
  21170. },
  21171. "additionalProperties": {
  21172. "$ref": "#/components/schemas/AgentConfig"
  21173. }
  21174. },
  21175. "provider": {
  21176. "type": "object",
  21177. "additionalProperties": {
  21178. "$ref": "#/components/schemas/ProviderConfig"
  21179. }
  21180. },
  21181. "mcp": {
  21182. "type": "object",
  21183. "additionalProperties": {
  21184. "anyOf": [
  21185. {
  21186. "$ref": "#/components/schemas/McpLocalConfig"
  21187. },
  21188. {
  21189. "$ref": "#/components/schemas/McpRemoteConfig"
  21190. },
  21191. {
  21192. "type": "object",
  21193. "properties": {
  21194. "enabled": {
  21195. "type": "boolean"
  21196. }
  21197. },
  21198. "required": ["enabled"],
  21199. "additionalProperties": false
  21200. }
  21201. ]
  21202. }
  21203. },
  21204. "formatter": {
  21205. "anyOf": [
  21206. {
  21207. "type": "boolean"
  21208. },
  21209. {
  21210. "type": "object",
  21211. "additionalProperties": {
  21212. "type": "object",
  21213. "properties": {
  21214. "disabled": {
  21215. "type": "boolean"
  21216. },
  21217. "command": {
  21218. "type": "array",
  21219. "items": {
  21220. "type": "string"
  21221. }
  21222. },
  21223. "environment": {
  21224. "type": "object",
  21225. "additionalProperties": {
  21226. "type": "string"
  21227. }
  21228. },
  21229. "extensions": {
  21230. "type": "array",
  21231. "items": {
  21232. "type": "string"
  21233. }
  21234. }
  21235. },
  21236. "additionalProperties": false
  21237. }
  21238. }
  21239. ],
  21240. "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."
  21241. },
  21242. "lsp": {
  21243. "anyOf": [
  21244. {
  21245. "type": "boolean"
  21246. },
  21247. {
  21248. "type": "object",
  21249. "additionalProperties": {
  21250. "anyOf": [
  21251. {
  21252. "type": "object",
  21253. "properties": {
  21254. "disabled": {
  21255. "type": "boolean",
  21256. "enum": [true]
  21257. }
  21258. },
  21259. "required": ["disabled"],
  21260. "additionalProperties": false
  21261. },
  21262. {
  21263. "type": "object",
  21264. "properties": {
  21265. "command": {
  21266. "type": "array",
  21267. "items": {
  21268. "type": "string"
  21269. }
  21270. },
  21271. "extensions": {
  21272. "type": "array",
  21273. "items": {
  21274. "type": "string"
  21275. }
  21276. },
  21277. "disabled": {
  21278. "type": "boolean"
  21279. },
  21280. "env": {
  21281. "type": "object",
  21282. "additionalProperties": {
  21283. "type": "string"
  21284. }
  21285. },
  21286. "initialization": {
  21287. "type": "object"
  21288. }
  21289. },
  21290. "required": ["command"],
  21291. "additionalProperties": false
  21292. }
  21293. ]
  21294. }
  21295. }
  21296. ],
  21297. "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."
  21298. },
  21299. "instructions": {
  21300. "type": "array",
  21301. "items": {
  21302. "type": "string"
  21303. }
  21304. },
  21305. "layout": {
  21306. "$ref": "#/components/schemas/LayoutConfig"
  21307. },
  21308. "permission": {
  21309. "$ref": "#/components/schemas/PermissionConfig"
  21310. },
  21311. "tools": {
  21312. "type": "object",
  21313. "additionalProperties": {
  21314. "type": "boolean"
  21315. }
  21316. },
  21317. "attachment": {
  21318. "$ref": "#/components/schemas/AttachmentConfig"
  21319. },
  21320. "enterprise": {
  21321. "type": "object",
  21322. "properties": {
  21323. "url": {
  21324. "type": "string"
  21325. }
  21326. },
  21327. "additionalProperties": false
  21328. },
  21329. "tool_output": {
  21330. "type": "object",
  21331. "properties": {
  21332. "max_lines": {
  21333. "type": "integer",
  21334. "exclusiveMinimum": 0
  21335. },
  21336. "max_bytes": {
  21337. "type": "integer",
  21338. "exclusiveMinimum": 0
  21339. }
  21340. },
  21341. "additionalProperties": false
  21342. },
  21343. "compaction": {
  21344. "type": "object",
  21345. "properties": {
  21346. "auto": {
  21347. "type": "boolean"
  21348. },
  21349. "prune": {
  21350. "type": "boolean"
  21351. },
  21352. "tail_turns": {
  21353. "type": "integer",
  21354. "minimum": 0
  21355. },
  21356. "preserve_recent_tokens": {
  21357. "type": "integer",
  21358. "minimum": 0
  21359. },
  21360. "reserved": {
  21361. "type": "integer",
  21362. "minimum": 0
  21363. }
  21364. },
  21365. "additionalProperties": false
  21366. },
  21367. "experimental": {
  21368. "type": "object",
  21369. "properties": {
  21370. "disable_paste_summary": {
  21371. "type": "boolean"
  21372. },
  21373. "batch_tool": {
  21374. "type": "boolean"
  21375. },
  21376. "openTelemetry": {
  21377. "type": "boolean"
  21378. },
  21379. "primary_tools": {
  21380. "type": "array",
  21381. "items": {
  21382. "type": "string"
  21383. }
  21384. },
  21385. "continue_loop_on_deny": {
  21386. "type": "boolean"
  21387. },
  21388. "mcp_timeout": {
  21389. "type": "integer",
  21390. "exclusiveMinimum": 0
  21391. },
  21392. "policies": {
  21393. "type": "array",
  21394. "items": {
  21395. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21396. }
  21397. }
  21398. },
  21399. "additionalProperties": false
  21400. }
  21401. },
  21402. "additionalProperties": false
  21403. },
  21404. "Model": {
  21405. "type": "object",
  21406. "properties": {
  21407. "id": {
  21408. "type": "string"
  21409. },
  21410. "providerID": {
  21411. "type": "string"
  21412. },
  21413. "api": {
  21414. "type": "object",
  21415. "properties": {
  21416. "id": {
  21417. "type": "string"
  21418. },
  21419. "url": {
  21420. "type": "string"
  21421. },
  21422. "npm": {
  21423. "type": "string"
  21424. }
  21425. },
  21426. "required": ["id", "url", "npm"],
  21427. "additionalProperties": false
  21428. },
  21429. "name": {
  21430. "type": "string"
  21431. },
  21432. "family": {
  21433. "type": "string"
  21434. },
  21435. "capabilities": {
  21436. "type": "object",
  21437. "properties": {
  21438. "temperature": {
  21439. "type": "boolean"
  21440. },
  21441. "reasoning": {
  21442. "type": "boolean"
  21443. },
  21444. "attachment": {
  21445. "type": "boolean"
  21446. },
  21447. "toolcall": {
  21448. "type": "boolean"
  21449. },
  21450. "input": {
  21451. "type": "object",
  21452. "properties": {
  21453. "text": {
  21454. "type": "boolean"
  21455. },
  21456. "audio": {
  21457. "type": "boolean"
  21458. },
  21459. "image": {
  21460. "type": "boolean"
  21461. },
  21462. "video": {
  21463. "type": "boolean"
  21464. },
  21465. "pdf": {
  21466. "type": "boolean"
  21467. }
  21468. },
  21469. "required": ["text", "audio", "image", "video", "pdf"],
  21470. "additionalProperties": false
  21471. },
  21472. "output": {
  21473. "type": "object",
  21474. "properties": {
  21475. "text": {
  21476. "type": "boolean"
  21477. },
  21478. "audio": {
  21479. "type": "boolean"
  21480. },
  21481. "image": {
  21482. "type": "boolean"
  21483. },
  21484. "video": {
  21485. "type": "boolean"
  21486. },
  21487. "pdf": {
  21488. "type": "boolean"
  21489. }
  21490. },
  21491. "required": ["text", "audio", "image", "video", "pdf"],
  21492. "additionalProperties": false
  21493. },
  21494. "interleaved": {
  21495. "anyOf": [
  21496. {
  21497. "type": "boolean"
  21498. },
  21499. {
  21500. "type": "object",
  21501. "properties": {
  21502. "field": {
  21503. "type": "string",
  21504. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21505. }
  21506. },
  21507. "required": ["field"],
  21508. "additionalProperties": false
  21509. }
  21510. ]
  21511. }
  21512. },
  21513. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21514. "additionalProperties": false
  21515. },
  21516. "cost": {
  21517. "type": "object",
  21518. "properties": {
  21519. "input": {
  21520. "type": "number"
  21521. },
  21522. "output": {
  21523. "type": "number"
  21524. },
  21525. "cache": {
  21526. "type": "object",
  21527. "properties": {
  21528. "read": {
  21529. "type": "number"
  21530. },
  21531. "write": {
  21532. "type": "number"
  21533. }
  21534. },
  21535. "required": ["read", "write"],
  21536. "additionalProperties": false
  21537. },
  21538. "tiers": {
  21539. "type": "array",
  21540. "items": {
  21541. "type": "object",
  21542. "properties": {
  21543. "input": {
  21544. "type": "number"
  21545. },
  21546. "output": {
  21547. "type": "number"
  21548. },
  21549. "cache": {
  21550. "type": "object",
  21551. "properties": {
  21552. "read": {
  21553. "type": "number"
  21554. },
  21555. "write": {
  21556. "type": "number"
  21557. }
  21558. },
  21559. "required": ["read", "write"],
  21560. "additionalProperties": false
  21561. },
  21562. "tier": {
  21563. "type": "object",
  21564. "properties": {
  21565. "type": {
  21566. "type": "string",
  21567. "enum": ["context"]
  21568. },
  21569. "size": {
  21570. "type": "number"
  21571. }
  21572. },
  21573. "required": ["type", "size"],
  21574. "additionalProperties": false
  21575. }
  21576. },
  21577. "required": ["input", "output", "cache", "tier"],
  21578. "additionalProperties": false
  21579. }
  21580. },
  21581. "experimentalOver200K": {
  21582. "type": "object",
  21583. "properties": {
  21584. "input": {
  21585. "type": "number"
  21586. },
  21587. "output": {
  21588. "type": "number"
  21589. },
  21590. "cache": {
  21591. "type": "object",
  21592. "properties": {
  21593. "read": {
  21594. "type": "number"
  21595. },
  21596. "write": {
  21597. "type": "number"
  21598. }
  21599. },
  21600. "required": ["read", "write"],
  21601. "additionalProperties": false
  21602. }
  21603. },
  21604. "required": ["input", "output", "cache"],
  21605. "additionalProperties": false
  21606. }
  21607. },
  21608. "required": ["input", "output", "cache"],
  21609. "additionalProperties": false
  21610. },
  21611. "limit": {
  21612. "type": "object",
  21613. "properties": {
  21614. "context": {
  21615. "type": "number"
  21616. },
  21617. "input": {
  21618. "type": "number"
  21619. },
  21620. "output": {
  21621. "type": "number"
  21622. }
  21623. },
  21624. "required": ["context", "output"],
  21625. "additionalProperties": false
  21626. },
  21627. "status": {
  21628. "type": "string",
  21629. "enum": ["alpha", "beta", "deprecated", "active"]
  21630. },
  21631. "options": {
  21632. "type": "object"
  21633. },
  21634. "headers": {
  21635. "type": "object",
  21636. "additionalProperties": {
  21637. "type": "string"
  21638. }
  21639. },
  21640. "release_date": {
  21641. "type": "string"
  21642. },
  21643. "variants": {
  21644. "type": "object",
  21645. "additionalProperties": {
  21646. "type": "object"
  21647. }
  21648. }
  21649. },
  21650. "required": [
  21651. "id",
  21652. "providerID",
  21653. "api",
  21654. "name",
  21655. "capabilities",
  21656. "cost",
  21657. "limit",
  21658. "status",
  21659. "options",
  21660. "headers",
  21661. "release_date"
  21662. ],
  21663. "additionalProperties": false
  21664. },
  21665. "Provider": {
  21666. "type": "object",
  21667. "properties": {
  21668. "id": {
  21669. "type": "string"
  21670. },
  21671. "name": {
  21672. "type": "string"
  21673. },
  21674. "source": {
  21675. "type": "string",
  21676. "enum": ["env", "config", "custom", "api"]
  21677. },
  21678. "env": {
  21679. "type": "array",
  21680. "items": {
  21681. "type": "string"
  21682. }
  21683. },
  21684. "key": {
  21685. "type": "string"
  21686. },
  21687. "options": {
  21688. "type": "object"
  21689. },
  21690. "models": {
  21691. "type": "object",
  21692. "additionalProperties": {
  21693. "$ref": "#/components/schemas/Model"
  21694. }
  21695. }
  21696. },
  21697. "required": ["id", "name", "source", "env", "options", "models"],
  21698. "additionalProperties": false
  21699. },
  21700. "ExperimentalCapabilities": {
  21701. "type": "object",
  21702. "properties": {
  21703. "backgroundSubagents": {
  21704. "type": "boolean"
  21705. }
  21706. },
  21707. "required": ["backgroundSubagents"],
  21708. "additionalProperties": false
  21709. },
  21710. "ConsoleState": {
  21711. "type": "object",
  21712. "properties": {
  21713. "consoleManagedProviders": {
  21714. "type": "array",
  21715. "items": {
  21716. "type": "string"
  21717. }
  21718. },
  21719. "activeOrgName": {
  21720. "type": "string"
  21721. },
  21722. "switchableOrgCount": {
  21723. "type": "integer",
  21724. "minimum": 0
  21725. }
  21726. },
  21727. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21728. "additionalProperties": false
  21729. },
  21730. "effect_HttpApiError_InternalServerError": {
  21731. "type": "object",
  21732. "properties": {
  21733. "_tag": {
  21734. "type": "string",
  21735. "enum": ["InternalServerError"]
  21736. }
  21737. },
  21738. "required": ["_tag"],
  21739. "additionalProperties": false
  21740. },
  21741. "ToolListItem": {
  21742. "type": "object",
  21743. "properties": {
  21744. "id": {
  21745. "type": "string"
  21746. },
  21747. "description": {
  21748. "type": "string"
  21749. },
  21750. "parameters": {}
  21751. },
  21752. "required": ["id", "description", "parameters"],
  21753. "additionalProperties": false
  21754. },
  21755. "ToolList": {
  21756. "type": "array",
  21757. "items": {
  21758. "$ref": "#/components/schemas/ToolListItem"
  21759. }
  21760. },
  21761. "ToolIDs": {
  21762. "type": "array",
  21763. "items": {
  21764. "type": "string"
  21765. }
  21766. },
  21767. "WorktreeError": {
  21768. "type": "object",
  21769. "properties": {
  21770. "name": {
  21771. "type": "string",
  21772. "enum": [
  21773. "WorktreeNotGitError",
  21774. "WorktreeNameGenerationFailedError",
  21775. "WorktreeCreateFailedError",
  21776. "WorktreeStartCommandFailedError",
  21777. "WorktreeRemoveFailedError",
  21778. "WorktreeResetFailedError",
  21779. "WorktreeListFailedError"
  21780. ]
  21781. },
  21782. "data": {
  21783. "type": "object",
  21784. "properties": {
  21785. "message": {
  21786. "type": "string"
  21787. }
  21788. },
  21789. "required": ["message"],
  21790. "additionalProperties": false
  21791. }
  21792. },
  21793. "required": ["name", "data"],
  21794. "additionalProperties": false
  21795. },
  21796. "WorktreeCreateInput": {
  21797. "type": "object",
  21798. "properties": {
  21799. "name": {
  21800. "type": "string"
  21801. },
  21802. "startCommand": {
  21803. "type": "string",
  21804. "description": "Additional startup script to run after the project's start command"
  21805. }
  21806. },
  21807. "additionalProperties": false
  21808. },
  21809. "Worktree": {
  21810. "type": "object",
  21811. "properties": {
  21812. "name": {
  21813. "type": "string"
  21814. },
  21815. "branch": {
  21816. "type": "string"
  21817. },
  21818. "directory": {
  21819. "type": "string"
  21820. }
  21821. },
  21822. "required": ["name", "directory"],
  21823. "additionalProperties": false
  21824. },
  21825. "WorktreeRemoveInput": {
  21826. "type": "object",
  21827. "properties": {
  21828. "directory": {
  21829. "type": "string"
  21830. }
  21831. },
  21832. "required": ["directory"],
  21833. "additionalProperties": false
  21834. },
  21835. "WorktreeResetInput": {
  21836. "type": "object",
  21837. "properties": {
  21838. "directory": {
  21839. "type": "string"
  21840. }
  21841. },
  21842. "required": ["directory"],
  21843. "additionalProperties": false
  21844. },
  21845. "ProjectSummary": {
  21846. "type": "object",
  21847. "properties": {
  21848. "id": {
  21849. "type": "string"
  21850. },
  21851. "name": {
  21852. "type": "string"
  21853. },
  21854. "worktree": {
  21855. "type": "string"
  21856. }
  21857. },
  21858. "required": ["id", "worktree"],
  21859. "additionalProperties": false
  21860. },
  21861. "GlobalSession": {
  21862. "type": "object",
  21863. "properties": {
  21864. "id": {
  21865. "type": "string",
  21866. "pattern": "^ses"
  21867. },
  21868. "slug": {
  21869. "type": "string"
  21870. },
  21871. "projectID": {
  21872. "type": "string"
  21873. },
  21874. "workspaceID": {
  21875. "type": "string",
  21876. "pattern": "^wrk"
  21877. },
  21878. "directory": {
  21879. "type": "string"
  21880. },
  21881. "path": {
  21882. "type": "string"
  21883. },
  21884. "parentID": {
  21885. "type": "string",
  21886. "pattern": "^ses"
  21887. },
  21888. "summary": {
  21889. "type": "object",
  21890. "properties": {
  21891. "additions": {
  21892. "type": "number"
  21893. },
  21894. "deletions": {
  21895. "type": "number"
  21896. },
  21897. "files": {
  21898. "type": "number"
  21899. },
  21900. "diffs": {
  21901. "type": "array",
  21902. "items": {
  21903. "$ref": "#/components/schemas/SnapshotFileDiff"
  21904. }
  21905. }
  21906. },
  21907. "required": ["additions", "deletions", "files"],
  21908. "additionalProperties": false
  21909. },
  21910. "cost": {
  21911. "type": "number"
  21912. },
  21913. "tokens": {
  21914. "type": "object",
  21915. "properties": {
  21916. "input": {
  21917. "type": "number"
  21918. },
  21919. "output": {
  21920. "type": "number"
  21921. },
  21922. "reasoning": {
  21923. "type": "number"
  21924. },
  21925. "cache": {
  21926. "type": "object",
  21927. "properties": {
  21928. "read": {
  21929. "type": "number"
  21930. },
  21931. "write": {
  21932. "type": "number"
  21933. }
  21934. },
  21935. "required": ["read", "write"],
  21936. "additionalProperties": false
  21937. }
  21938. },
  21939. "required": ["input", "output", "reasoning", "cache"],
  21940. "additionalProperties": false
  21941. },
  21942. "share": {
  21943. "type": "object",
  21944. "properties": {
  21945. "url": {
  21946. "type": "string"
  21947. }
  21948. },
  21949. "required": ["url"],
  21950. "additionalProperties": false
  21951. },
  21952. "title": {
  21953. "type": "string"
  21954. },
  21955. "agent": {
  21956. "type": "string"
  21957. },
  21958. "model": {
  21959. "type": "object",
  21960. "properties": {
  21961. "id": {
  21962. "type": "string"
  21963. },
  21964. "providerID": {
  21965. "type": "string"
  21966. },
  21967. "variant": {
  21968. "type": "string"
  21969. }
  21970. },
  21971. "required": ["id", "providerID"],
  21972. "additionalProperties": false
  21973. },
  21974. "version": {
  21975. "type": "string"
  21976. },
  21977. "metadata": {
  21978. "type": "object"
  21979. },
  21980. "time": {
  21981. "type": "object",
  21982. "properties": {
  21983. "created": {
  21984. "type": "integer",
  21985. "minimum": 0
  21986. },
  21987. "updated": {
  21988. "type": "integer",
  21989. "minimum": 0
  21990. },
  21991. "compacting": {
  21992. "type": "integer",
  21993. "minimum": 0
  21994. },
  21995. "archived": {
  21996. "type": "number"
  21997. }
  21998. },
  21999. "required": ["created", "updated"],
  22000. "additionalProperties": false
  22001. },
  22002. "permission": {
  22003. "$ref": "#/components/schemas/PermissionRuleset"
  22004. },
  22005. "revert": {
  22006. "type": "object",
  22007. "properties": {
  22008. "messageID": {
  22009. "type": "string",
  22010. "pattern": "^msg"
  22011. },
  22012. "partID": {
  22013. "type": "string",
  22014. "pattern": "^prt"
  22015. },
  22016. "snapshot": {
  22017. "type": "string"
  22018. },
  22019. "diff": {
  22020. "type": "string"
  22021. }
  22022. },
  22023. "required": ["messageID"],
  22024. "additionalProperties": false
  22025. },
  22026. "project": {
  22027. "anyOf": [
  22028. {
  22029. "$ref": "#/components/schemas/ProjectSummary"
  22030. },
  22031. {
  22032. "type": "null"
  22033. }
  22034. ]
  22035. }
  22036. },
  22037. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22038. "additionalProperties": false
  22039. },
  22040. "McpResource": {
  22041. "type": "object",
  22042. "properties": {
  22043. "name": {
  22044. "type": "string"
  22045. },
  22046. "uri": {
  22047. "type": "string"
  22048. },
  22049. "description": {
  22050. "type": "string"
  22051. },
  22052. "mimeType": {
  22053. "type": "string"
  22054. },
  22055. "client": {
  22056. "type": "string"
  22057. }
  22058. },
  22059. "required": ["name", "uri", "client"],
  22060. "additionalProperties": false
  22061. },
  22062. "Symbol": {
  22063. "type": "object",
  22064. "properties": {
  22065. "name": {
  22066. "type": "string"
  22067. },
  22068. "kind": {
  22069. "type": "integer",
  22070. "minimum": 0
  22071. },
  22072. "location": {
  22073. "type": "object",
  22074. "properties": {
  22075. "uri": {
  22076. "type": "string"
  22077. },
  22078. "range": {
  22079. "$ref": "#/components/schemas/Range"
  22080. }
  22081. },
  22082. "required": ["uri", "range"],
  22083. "additionalProperties": false
  22084. }
  22085. },
  22086. "required": ["name", "kind", "location"],
  22087. "additionalProperties": false
  22088. },
  22089. "FileNode": {
  22090. "type": "object",
  22091. "properties": {
  22092. "name": {
  22093. "type": "string"
  22094. },
  22095. "path": {
  22096. "type": "string"
  22097. },
  22098. "absolute": {
  22099. "type": "string"
  22100. },
  22101. "type": {
  22102. "type": "string",
  22103. "enum": ["file", "directory"]
  22104. },
  22105. "ignored": {
  22106. "type": "boolean"
  22107. }
  22108. },
  22109. "required": ["name", "path", "absolute", "type", "ignored"],
  22110. "additionalProperties": false
  22111. },
  22112. "FileContent": {
  22113. "type": "object",
  22114. "properties": {
  22115. "type": {
  22116. "type": "string",
  22117. "enum": ["text", "binary"]
  22118. },
  22119. "content": {
  22120. "type": "string"
  22121. },
  22122. "diff": {
  22123. "type": "string"
  22124. },
  22125. "patch": {
  22126. "type": "object",
  22127. "properties": {
  22128. "oldFileName": {
  22129. "type": "string"
  22130. },
  22131. "newFileName": {
  22132. "type": "string"
  22133. },
  22134. "oldHeader": {
  22135. "type": "string"
  22136. },
  22137. "newHeader": {
  22138. "type": "string"
  22139. },
  22140. "hunks": {
  22141. "type": "array",
  22142. "items": {
  22143. "type": "object",
  22144. "properties": {
  22145. "oldStart": {
  22146. "type": "integer",
  22147. "minimum": 0
  22148. },
  22149. "oldLines": {
  22150. "type": "integer",
  22151. "minimum": 0
  22152. },
  22153. "newStart": {
  22154. "type": "integer",
  22155. "minimum": 0
  22156. },
  22157. "newLines": {
  22158. "type": "integer",
  22159. "minimum": 0
  22160. },
  22161. "lines": {
  22162. "type": "array",
  22163. "items": {
  22164. "type": "string"
  22165. }
  22166. }
  22167. },
  22168. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22169. "additionalProperties": false
  22170. }
  22171. },
  22172. "index": {
  22173. "type": "string"
  22174. }
  22175. },
  22176. "required": ["oldFileName", "newFileName", "hunks"],
  22177. "additionalProperties": false
  22178. },
  22179. "encoding": {
  22180. "type": "string",
  22181. "enum": ["base64"]
  22182. },
  22183. "mimeType": {
  22184. "type": "string"
  22185. }
  22186. },
  22187. "required": ["type", "content"],
  22188. "additionalProperties": false
  22189. },
  22190. "File": {
  22191. "type": "object",
  22192. "properties": {
  22193. "path": {
  22194. "type": "string"
  22195. },
  22196. "added": {
  22197. "type": "integer",
  22198. "minimum": 0
  22199. },
  22200. "removed": {
  22201. "type": "integer",
  22202. "minimum": 0
  22203. },
  22204. "status": {
  22205. "type": "string",
  22206. "enum": ["added", "deleted", "modified"]
  22207. }
  22208. },
  22209. "required": ["path", "added", "removed", "status"],
  22210. "additionalProperties": false
  22211. },
  22212. "Path": {
  22213. "type": "object",
  22214. "properties": {
  22215. "home": {
  22216. "type": "string"
  22217. },
  22218. "state": {
  22219. "type": "string"
  22220. },
  22221. "config": {
  22222. "type": "string"
  22223. },
  22224. "worktree": {
  22225. "type": "string"
  22226. },
  22227. "directory": {
  22228. "type": "string"
  22229. }
  22230. },
  22231. "required": ["home", "state", "config", "worktree", "directory"],
  22232. "additionalProperties": false
  22233. },
  22234. "VcsInfo": {
  22235. "type": "object",
  22236. "properties": {
  22237. "branch": {
  22238. "type": "string"
  22239. },
  22240. "default_branch": {
  22241. "type": "string"
  22242. }
  22243. },
  22244. "additionalProperties": false
  22245. },
  22246. "VcsFileStatus": {
  22247. "type": "object",
  22248. "properties": {
  22249. "file": {
  22250. "type": "string"
  22251. },
  22252. "additions": {
  22253. "type": "number"
  22254. },
  22255. "deletions": {
  22256. "type": "number"
  22257. },
  22258. "status": {
  22259. "type": "string",
  22260. "enum": ["added", "deleted", "modified"]
  22261. }
  22262. },
  22263. "required": ["file", "additions", "deletions", "status"],
  22264. "additionalProperties": false
  22265. },
  22266. "VcsFileDiff": {
  22267. "type": "object",
  22268. "properties": {
  22269. "file": {
  22270. "type": "string"
  22271. },
  22272. "patch": {
  22273. "type": "string"
  22274. },
  22275. "additions": {
  22276. "type": "number"
  22277. },
  22278. "deletions": {
  22279. "type": "number"
  22280. },
  22281. "status": {
  22282. "type": "string",
  22283. "enum": ["added", "deleted", "modified"]
  22284. }
  22285. },
  22286. "required": ["file", "additions", "deletions"],
  22287. "additionalProperties": false
  22288. },
  22289. "VcsApplyError": {
  22290. "type": "object",
  22291. "properties": {
  22292. "name": {
  22293. "type": "string",
  22294. "enum": ["VcsApplyError"]
  22295. },
  22296. "data": {
  22297. "type": "object",
  22298. "properties": {
  22299. "message": {
  22300. "type": "string"
  22301. },
  22302. "reason": {
  22303. "type": "string",
  22304. "enum": ["non-git", "not-clean"]
  22305. }
  22306. },
  22307. "required": ["message", "reason"],
  22308. "additionalProperties": false
  22309. }
  22310. },
  22311. "required": ["name", "data"],
  22312. "additionalProperties": false
  22313. },
  22314. "Command": {
  22315. "type": "object",
  22316. "properties": {
  22317. "name": {
  22318. "type": "string"
  22319. },
  22320. "description": {
  22321. "type": "string"
  22322. },
  22323. "agent": {
  22324. "type": "string"
  22325. },
  22326. "model": {
  22327. "type": "string"
  22328. },
  22329. "source": {
  22330. "type": "string",
  22331. "enum": ["command", "mcp", "skill"]
  22332. },
  22333. "template": {
  22334. "type": "string"
  22335. },
  22336. "subtask": {
  22337. "type": "boolean"
  22338. },
  22339. "hints": {
  22340. "type": "array",
  22341. "items": {
  22342. "type": "string"
  22343. }
  22344. }
  22345. },
  22346. "required": ["name", "template", "hints"],
  22347. "additionalProperties": false
  22348. },
  22349. "Agent": {
  22350. "type": "object",
  22351. "properties": {
  22352. "name": {
  22353. "type": "string"
  22354. },
  22355. "description": {
  22356. "type": "string"
  22357. },
  22358. "mode": {
  22359. "type": "string",
  22360. "enum": ["subagent", "primary", "all"]
  22361. },
  22362. "native": {
  22363. "type": "boolean"
  22364. },
  22365. "hidden": {
  22366. "type": "boolean"
  22367. },
  22368. "topP": {
  22369. "type": "number"
  22370. },
  22371. "temperature": {
  22372. "type": "number"
  22373. },
  22374. "color": {
  22375. "type": "string"
  22376. },
  22377. "permission": {
  22378. "$ref": "#/components/schemas/PermissionRuleset"
  22379. },
  22380. "model": {
  22381. "type": "object",
  22382. "properties": {
  22383. "modelID": {
  22384. "type": "string"
  22385. },
  22386. "providerID": {
  22387. "type": "string"
  22388. }
  22389. },
  22390. "required": ["modelID", "providerID"],
  22391. "additionalProperties": false
  22392. },
  22393. "variant": {
  22394. "type": "string"
  22395. },
  22396. "prompt": {
  22397. "type": "string"
  22398. },
  22399. "options": {
  22400. "type": "object"
  22401. },
  22402. "steps": {
  22403. "type": "number"
  22404. }
  22405. },
  22406. "required": ["name", "mode", "permission", "options"],
  22407. "additionalProperties": false
  22408. },
  22409. "LSPStatus": {
  22410. "type": "object",
  22411. "properties": {
  22412. "id": {
  22413. "type": "string"
  22414. },
  22415. "name": {
  22416. "type": "string"
  22417. },
  22418. "root": {
  22419. "type": "string"
  22420. },
  22421. "status": {
  22422. "type": "string",
  22423. "enum": ["connected", "error"]
  22424. }
  22425. },
  22426. "required": ["id", "name", "root", "status"],
  22427. "additionalProperties": false
  22428. },
  22429. "FormatterStatus": {
  22430. "type": "object",
  22431. "properties": {
  22432. "name": {
  22433. "type": "string"
  22434. },
  22435. "extensions": {
  22436. "type": "array",
  22437. "items": {
  22438. "type": "string"
  22439. }
  22440. },
  22441. "enabled": {
  22442. "type": "boolean"
  22443. }
  22444. },
  22445. "required": ["name", "extensions", "enabled"],
  22446. "additionalProperties": false
  22447. },
  22448. "MCPStatusConnected": {
  22449. "type": "object",
  22450. "properties": {
  22451. "status": {
  22452. "type": "string",
  22453. "enum": ["connected"]
  22454. }
  22455. },
  22456. "required": ["status"],
  22457. "additionalProperties": false
  22458. },
  22459. "MCPStatusDisabled": {
  22460. "type": "object",
  22461. "properties": {
  22462. "status": {
  22463. "type": "string",
  22464. "enum": ["disabled"]
  22465. }
  22466. },
  22467. "required": ["status"],
  22468. "additionalProperties": false
  22469. },
  22470. "MCPStatusFailed": {
  22471. "type": "object",
  22472. "properties": {
  22473. "status": {
  22474. "type": "string",
  22475. "enum": ["failed"]
  22476. },
  22477. "error": {
  22478. "type": "string"
  22479. }
  22480. },
  22481. "required": ["status", "error"],
  22482. "additionalProperties": false
  22483. },
  22484. "MCPStatusNeedsAuth": {
  22485. "type": "object",
  22486. "properties": {
  22487. "status": {
  22488. "type": "string",
  22489. "enum": ["needs_auth"]
  22490. }
  22491. },
  22492. "required": ["status"],
  22493. "additionalProperties": false
  22494. },
  22495. "MCPStatusNeedsClientRegistration": {
  22496. "type": "object",
  22497. "properties": {
  22498. "status": {
  22499. "type": "string",
  22500. "enum": ["needs_client_registration"]
  22501. },
  22502. "error": {
  22503. "type": "string"
  22504. }
  22505. },
  22506. "required": ["status", "error"],
  22507. "additionalProperties": false
  22508. },
  22509. "MCPStatus": {
  22510. "anyOf": [
  22511. {
  22512. "$ref": "#/components/schemas/MCPStatusConnected"
  22513. },
  22514. {
  22515. "$ref": "#/components/schemas/MCPStatusDisabled"
  22516. },
  22517. {
  22518. "$ref": "#/components/schemas/MCPStatusFailed"
  22519. },
  22520. {
  22521. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22522. },
  22523. {
  22524. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22525. }
  22526. ]
  22527. },
  22528. "McpUnsupportedOAuthError": {
  22529. "type": "object",
  22530. "properties": {
  22531. "error": {
  22532. "type": "string"
  22533. }
  22534. },
  22535. "required": ["error"],
  22536. "additionalProperties": false
  22537. },
  22538. "McpServerNotFoundError": {
  22539. "type": "object",
  22540. "properties": {
  22541. "_tag": {
  22542. "type": "string",
  22543. "enum": ["McpServerNotFoundError"]
  22544. },
  22545. "name": {
  22546. "type": "string"
  22547. },
  22548. "message": {
  22549. "type": "string"
  22550. }
  22551. },
  22552. "required": ["_tag", "name", "message"],
  22553. "additionalProperties": false
  22554. },
  22555. "Project": {
  22556. "type": "object",
  22557. "properties": {
  22558. "id": {
  22559. "type": "string"
  22560. },
  22561. "worktree": {
  22562. "type": "string"
  22563. },
  22564. "vcs": {
  22565. "$ref": "#/components/schemas/ProjectVcs"
  22566. },
  22567. "name": {
  22568. "type": "string"
  22569. },
  22570. "icon": {
  22571. "$ref": "#/components/schemas/ProjectIcon"
  22572. },
  22573. "commands": {
  22574. "$ref": "#/components/schemas/ProjectCommands"
  22575. },
  22576. "time": {
  22577. "$ref": "#/components/schemas/ProjectTime"
  22578. },
  22579. "sandboxes": {
  22580. "type": "array",
  22581. "items": {
  22582. "type": "string"
  22583. }
  22584. }
  22585. },
  22586. "required": ["id", "worktree", "time", "sandboxes"],
  22587. "additionalProperties": false
  22588. },
  22589. "ProjectNotFoundError": {
  22590. "type": "object",
  22591. "properties": {
  22592. "_tag": {
  22593. "type": "string",
  22594. "enum": ["ProjectNotFoundError"]
  22595. },
  22596. "projectID": {
  22597. "type": "string"
  22598. },
  22599. "message": {
  22600. "type": "string"
  22601. }
  22602. },
  22603. "required": ["_tag", "projectID", "message"],
  22604. "additionalProperties": false
  22605. },
  22606. "PtyNotFoundError": {
  22607. "type": "object",
  22608. "properties": {
  22609. "_tag": {
  22610. "type": "string",
  22611. "enum": ["PtyNotFoundError"]
  22612. },
  22613. "ptyID": {
  22614. "type": "string"
  22615. },
  22616. "message": {
  22617. "type": "string"
  22618. }
  22619. },
  22620. "required": ["_tag", "ptyID", "message"],
  22621. "additionalProperties": false
  22622. },
  22623. "PtyForbiddenError": {
  22624. "type": "object",
  22625. "properties": {
  22626. "_tag": {
  22627. "type": "string",
  22628. "enum": ["PtyForbiddenError"]
  22629. },
  22630. "message": {
  22631. "type": "string"
  22632. }
  22633. },
  22634. "required": ["_tag", "message"],
  22635. "additionalProperties": false
  22636. },
  22637. "QuestionRequest": {
  22638. "type": "object",
  22639. "properties": {
  22640. "id": {
  22641. "type": "string",
  22642. "pattern": "^que"
  22643. },
  22644. "sessionID": {
  22645. "type": "string",
  22646. "pattern": "^ses"
  22647. },
  22648. "questions": {
  22649. "type": "array",
  22650. "items": {
  22651. "$ref": "#/components/schemas/QuestionInfo"
  22652. },
  22653. "description": "Questions to ask"
  22654. },
  22655. "tool": {
  22656. "$ref": "#/components/schemas/QuestionTool"
  22657. }
  22658. },
  22659. "required": ["id", "sessionID", "questions"],
  22660. "additionalProperties": false
  22661. },
  22662. "QuestionNotFoundError": {
  22663. "type": "object",
  22664. "properties": {
  22665. "_tag": {
  22666. "type": "string",
  22667. "enum": ["QuestionNotFoundError"]
  22668. },
  22669. "requestID": {
  22670. "type": "string"
  22671. },
  22672. "message": {
  22673. "type": "string"
  22674. }
  22675. },
  22676. "required": ["_tag", "requestID", "message"],
  22677. "additionalProperties": false
  22678. },
  22679. "PermissionRequest": {
  22680. "type": "object",
  22681. "properties": {
  22682. "id": {
  22683. "type": "string",
  22684. "pattern": "^per"
  22685. },
  22686. "sessionID": {
  22687. "type": "string",
  22688. "pattern": "^ses"
  22689. },
  22690. "permission": {
  22691. "type": "string"
  22692. },
  22693. "patterns": {
  22694. "type": "array",
  22695. "items": {
  22696. "type": "string"
  22697. }
  22698. },
  22699. "metadata": {
  22700. "type": "object"
  22701. },
  22702. "always": {
  22703. "type": "array",
  22704. "items": {
  22705. "type": "string"
  22706. }
  22707. },
  22708. "tool": {
  22709. "type": "object",
  22710. "properties": {
  22711. "messageID": {
  22712. "type": "string"
  22713. },
  22714. "callID": {
  22715. "type": "string"
  22716. }
  22717. },
  22718. "required": ["messageID", "callID"],
  22719. "additionalProperties": false
  22720. }
  22721. },
  22722. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22723. "additionalProperties": false
  22724. },
  22725. "PermissionNotFoundError": {
  22726. "type": "object",
  22727. "properties": {
  22728. "_tag": {
  22729. "type": "string",
  22730. "enum": ["PermissionNotFoundError"]
  22731. },
  22732. "requestID": {
  22733. "type": "string"
  22734. },
  22735. "message": {
  22736. "type": "string"
  22737. }
  22738. },
  22739. "required": ["_tag", "requestID", "message"],
  22740. "additionalProperties": false
  22741. },
  22742. "ProviderAuthMethod": {
  22743. "type": "object",
  22744. "properties": {
  22745. "type": {
  22746. "type": "string",
  22747. "enum": ["oauth", "api"]
  22748. },
  22749. "label": {
  22750. "type": "string"
  22751. },
  22752. "prompts": {
  22753. "type": "array",
  22754. "items": {
  22755. "anyOf": [
  22756. {
  22757. "type": "object",
  22758. "properties": {
  22759. "type": {
  22760. "type": "string",
  22761. "enum": ["text"]
  22762. },
  22763. "key": {
  22764. "type": "string"
  22765. },
  22766. "message": {
  22767. "type": "string"
  22768. },
  22769. "placeholder": {
  22770. "type": "string"
  22771. },
  22772. "when": {
  22773. "type": "object",
  22774. "properties": {
  22775. "key": {
  22776. "type": "string"
  22777. },
  22778. "op": {
  22779. "type": "string",
  22780. "enum": ["eq", "neq"]
  22781. },
  22782. "value": {
  22783. "type": "string"
  22784. }
  22785. },
  22786. "required": ["key", "op", "value"],
  22787. "additionalProperties": false
  22788. }
  22789. },
  22790. "required": ["type", "key", "message"],
  22791. "additionalProperties": false
  22792. },
  22793. {
  22794. "type": "object",
  22795. "properties": {
  22796. "type": {
  22797. "type": "string",
  22798. "enum": ["select"]
  22799. },
  22800. "key": {
  22801. "type": "string"
  22802. },
  22803. "message": {
  22804. "type": "string"
  22805. },
  22806. "options": {
  22807. "type": "array",
  22808. "items": {
  22809. "type": "object",
  22810. "properties": {
  22811. "label": {
  22812. "type": "string"
  22813. },
  22814. "value": {
  22815. "type": "string"
  22816. },
  22817. "hint": {
  22818. "type": "string"
  22819. }
  22820. },
  22821. "required": ["label", "value"],
  22822. "additionalProperties": false
  22823. }
  22824. },
  22825. "when": {
  22826. "type": "object",
  22827. "properties": {
  22828. "key": {
  22829. "type": "string"
  22830. },
  22831. "op": {
  22832. "type": "string",
  22833. "enum": ["eq", "neq"]
  22834. },
  22835. "value": {
  22836. "type": "string"
  22837. }
  22838. },
  22839. "required": ["key", "op", "value"],
  22840. "additionalProperties": false
  22841. }
  22842. },
  22843. "required": ["type", "key", "message", "options"],
  22844. "additionalProperties": false
  22845. }
  22846. ]
  22847. }
  22848. }
  22849. },
  22850. "required": ["type", "label"],
  22851. "additionalProperties": false
  22852. },
  22853. "ProviderAuthAuthorization": {
  22854. "type": "object",
  22855. "properties": {
  22856. "url": {
  22857. "type": "string"
  22858. },
  22859. "method": {
  22860. "type": "string",
  22861. "enum": ["auto", "code"]
  22862. },
  22863. "instructions": {
  22864. "type": "string"
  22865. }
  22866. },
  22867. "required": ["url", "method", "instructions"],
  22868. "additionalProperties": false
  22869. },
  22870. "ProviderAuthError1": {
  22871. "type": "object",
  22872. "properties": {
  22873. "name": {
  22874. "type": "string",
  22875. "enum": [
  22876. "BadRequest",
  22877. "ProviderAuthOauthMissing",
  22878. "ProviderAuthOauthCodeMissing",
  22879. "ProviderAuthOauthCallbackFailed",
  22880. "ProviderAuthValidationFailed"
  22881. ]
  22882. },
  22883. "data": {
  22884. "type": "object",
  22885. "properties": {
  22886. "providerID": {
  22887. "type": "string"
  22888. },
  22889. "field": {
  22890. "type": "string"
  22891. },
  22892. "message": {
  22893. "type": "string"
  22894. },
  22895. "kind": {
  22896. "type": "string"
  22897. }
  22898. },
  22899. "additionalProperties": false
  22900. }
  22901. },
  22902. "required": ["name", "data"],
  22903. "additionalProperties": false
  22904. },
  22905. "NotFoundError": {
  22906. "type": "object",
  22907. "required": ["name", "data"],
  22908. "properties": {
  22909. "name": {
  22910. "type": "string",
  22911. "enum": ["NotFoundError"]
  22912. },
  22913. "data": {
  22914. "type": "object",
  22915. "required": ["message"],
  22916. "properties": {
  22917. "message": {
  22918. "type": "string"
  22919. }
  22920. }
  22921. }
  22922. }
  22923. },
  22924. "TextPartInput": {
  22925. "type": "object",
  22926. "properties": {
  22927. "id": {
  22928. "type": "string",
  22929. "pattern": "^prt"
  22930. },
  22931. "type": {
  22932. "type": "string",
  22933. "enum": ["text"]
  22934. },
  22935. "text": {
  22936. "type": "string"
  22937. },
  22938. "session.synthetic": {
  22939. "type": "boolean"
  22940. },
  22941. "ignored": {
  22942. "type": "boolean"
  22943. },
  22944. "time": {
  22945. "type": "object",
  22946. "properties": {
  22947. "start": {
  22948. "type": "integer",
  22949. "minimum": 0
  22950. },
  22951. "end": {
  22952. "type": "integer",
  22953. "minimum": 0
  22954. }
  22955. },
  22956. "required": ["start"],
  22957. "additionalProperties": false
  22958. },
  22959. "metadata": {
  22960. "type": "object"
  22961. }
  22962. },
  22963. "required": ["type", "text"],
  22964. "additionalProperties": false
  22965. },
  22966. "FilePartInput": {
  22967. "type": "object",
  22968. "properties": {
  22969. "id": {
  22970. "type": "string",
  22971. "pattern": "^prt"
  22972. },
  22973. "type": {
  22974. "type": "string",
  22975. "enum": ["file"]
  22976. },
  22977. "mime": {
  22978. "type": "string"
  22979. },
  22980. "filename": {
  22981. "type": "string"
  22982. },
  22983. "url": {
  22984. "type": "string"
  22985. },
  22986. "source": {
  22987. "$ref": "#/components/schemas/FilePartSource"
  22988. }
  22989. },
  22990. "required": ["type", "mime", "url"],
  22991. "additionalProperties": false
  22992. },
  22993. "AgentPartInput": {
  22994. "type": "object",
  22995. "properties": {
  22996. "id": {
  22997. "type": "string",
  22998. "pattern": "^prt"
  22999. },
  23000. "type": {
  23001. "type": "string",
  23002. "enum": ["agent"]
  23003. },
  23004. "name": {
  23005. "type": "string"
  23006. },
  23007. "source": {
  23008. "type": "object",
  23009. "properties": {
  23010. "value": {
  23011. "type": "string"
  23012. },
  23013. "start": {
  23014. "type": "integer",
  23015. "minimum": 0
  23016. },
  23017. "end": {
  23018. "type": "integer",
  23019. "minimum": 0
  23020. }
  23021. },
  23022. "required": ["value", "start", "end"],
  23023. "additionalProperties": false
  23024. }
  23025. },
  23026. "required": ["type", "name"],
  23027. "additionalProperties": false
  23028. },
  23029. "SubtaskPartInput": {
  23030. "type": "object",
  23031. "properties": {
  23032. "id": {
  23033. "type": "string",
  23034. "pattern": "^prt"
  23035. },
  23036. "type": {
  23037. "type": "string",
  23038. "enum": ["subtask"]
  23039. },
  23040. "prompt": {
  23041. "type": "string"
  23042. },
  23043. "description": {
  23044. "type": "string"
  23045. },
  23046. "agent": {
  23047. "type": "string"
  23048. },
  23049. "model": {
  23050. "type": "object",
  23051. "properties": {
  23052. "providerID": {
  23053. "type": "string"
  23054. },
  23055. "modelID": {
  23056. "type": "string"
  23057. }
  23058. },
  23059. "required": ["providerID", "modelID"],
  23060. "additionalProperties": false
  23061. },
  23062. "command": {
  23063. "type": "string"
  23064. }
  23065. },
  23066. "required": ["type", "prompt", "description", "agent"],
  23067. "additionalProperties": false
  23068. },
  23069. "SessionBusyError": {
  23070. "type": "object",
  23071. "properties": {
  23072. "_tag": {
  23073. "type": "string",
  23074. "enum": ["SessionBusyError"]
  23075. },
  23076. "sessionID": {
  23077. "type": "string"
  23078. },
  23079. "message": {
  23080. "type": "string"
  23081. }
  23082. },
  23083. "required": ["_tag", "sessionID", "message"],
  23084. "additionalProperties": false
  23085. },
  23086. "EventTuiPromptAppend": {
  23087. "type": "object",
  23088. "properties": {
  23089. "type": {
  23090. "type": "string",
  23091. "enum": ["tui.prompt.append"]
  23092. },
  23093. "properties": {
  23094. "type": "object",
  23095. "properties": {
  23096. "text": {
  23097. "type": "string"
  23098. }
  23099. },
  23100. "required": ["text"],
  23101. "additionalProperties": false
  23102. }
  23103. },
  23104. "required": ["type", "properties"],
  23105. "additionalProperties": false
  23106. },
  23107. "EventTuiCommandExecute": {
  23108. "type": "object",
  23109. "properties": {
  23110. "type": {
  23111. "type": "string",
  23112. "enum": ["tui.command.execute"]
  23113. },
  23114. "properties": {
  23115. "type": "object",
  23116. "properties": {
  23117. "command": {
  23118. "anyOf": [
  23119. {
  23120. "type": "string",
  23121. "enum": [
  23122. "session.list",
  23123. "session.new",
  23124. "session.share",
  23125. "session.interrupt",
  23126. "session.compact",
  23127. "session.page.up",
  23128. "session.page.down",
  23129. "session.line.up",
  23130. "session.line.down",
  23131. "session.half.page.up",
  23132. "session.half.page.down",
  23133. "session.first",
  23134. "session.last",
  23135. "prompt.clear",
  23136. "prompt.submit",
  23137. "agent.cycle"
  23138. ]
  23139. },
  23140. {
  23141. "type": "string"
  23142. }
  23143. ]
  23144. }
  23145. },
  23146. "required": ["command"],
  23147. "additionalProperties": false
  23148. }
  23149. },
  23150. "required": ["type", "properties"],
  23151. "additionalProperties": false
  23152. },
  23153. "EventTuiToastShow": {
  23154. "type": "object",
  23155. "properties": {
  23156. "type": {
  23157. "type": "string",
  23158. "enum": ["tui.toast.show"]
  23159. },
  23160. "properties": {
  23161. "type": "object",
  23162. "properties": {
  23163. "title": {
  23164. "type": "string"
  23165. },
  23166. "message": {
  23167. "type": "string"
  23168. },
  23169. "variant": {
  23170. "type": "string",
  23171. "enum": ["info", "success", "warning", "error"]
  23172. },
  23173. "duration": {
  23174. "type": "integer",
  23175. "exclusiveMinimum": 0
  23176. }
  23177. },
  23178. "required": ["message", "variant"],
  23179. "additionalProperties": false
  23180. }
  23181. },
  23182. "required": ["type", "properties"],
  23183. "additionalProperties": false
  23184. },
  23185. "EventTuiSessionSelect": {
  23186. "type": "object",
  23187. "properties": {
  23188. "type": {
  23189. "type": "string",
  23190. "enum": ["tui.session.select"]
  23191. },
  23192. "properties": {
  23193. "type": "object",
  23194. "properties": {
  23195. "sessionID": {
  23196. "type": "string",
  23197. "pattern": "^ses",
  23198. "description": "Session ID to navigate to"
  23199. }
  23200. },
  23201. "required": ["sessionID"],
  23202. "additionalProperties": false
  23203. }
  23204. },
  23205. "required": ["type", "properties"],
  23206. "additionalProperties": false
  23207. },
  23208. "Workspace": {
  23209. "type": "object",
  23210. "properties": {
  23211. "id": {
  23212. "type": "string",
  23213. "pattern": "^wrk"
  23214. },
  23215. "type": {
  23216. "type": "string"
  23217. },
  23218. "name": {
  23219. "type": "string"
  23220. },
  23221. "branch": {
  23222. "anyOf": [
  23223. {
  23224. "type": "string"
  23225. },
  23226. {
  23227. "type": "null"
  23228. }
  23229. ]
  23230. },
  23231. "directory": {
  23232. "anyOf": [
  23233. {
  23234. "type": "string"
  23235. },
  23236. {
  23237. "type": "null"
  23238. }
  23239. ]
  23240. },
  23241. "extra": {
  23242. "anyOf": [
  23243. {},
  23244. {
  23245. "type": "null"
  23246. }
  23247. ]
  23248. },
  23249. "projectID": {
  23250. "type": "string"
  23251. },
  23252. "timeUsed": {
  23253. "anyOf": [
  23254. {
  23255. "type": "number"
  23256. },
  23257. {
  23258. "type": "string",
  23259. "enum": ["NaN"]
  23260. },
  23261. {
  23262. "type": "string",
  23263. "enum": ["Infinity"]
  23264. },
  23265. {
  23266. "type": "string",
  23267. "enum": ["-Infinity"]
  23268. },
  23269. {
  23270. "type": "string",
  23271. "enum": ["Infinity", "-Infinity", "NaN"]
  23272. }
  23273. ]
  23274. }
  23275. },
  23276. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23277. "additionalProperties": false
  23278. },
  23279. "WorkspaceCreateError": {
  23280. "type": "object",
  23281. "properties": {
  23282. "name": {
  23283. "type": "string",
  23284. "enum": ["WorkspaceCreateError"]
  23285. },
  23286. "data": {
  23287. "type": "object",
  23288. "properties": {
  23289. "message": {
  23290. "type": "string"
  23291. }
  23292. },
  23293. "required": ["message"],
  23294. "additionalProperties": false
  23295. }
  23296. },
  23297. "required": ["name", "data"],
  23298. "additionalProperties": false
  23299. },
  23300. "WorkspaceWarpError": {
  23301. "type": "object",
  23302. "properties": {
  23303. "name": {
  23304. "type": "string",
  23305. "enum": ["WorkspaceWarpError"]
  23306. },
  23307. "data": {
  23308. "type": "object",
  23309. "properties": {
  23310. "message": {
  23311. "type": "string"
  23312. }
  23313. },
  23314. "required": ["message"],
  23315. "additionalProperties": false
  23316. }
  23317. },
  23318. "required": ["name", "data"],
  23319. "additionalProperties": false
  23320. },
  23321. "UnauthorizedError": {
  23322. "type": "object",
  23323. "properties": {
  23324. "_tag": {
  23325. "type": "string",
  23326. "enum": ["UnauthorizedError"]
  23327. },
  23328. "message": {
  23329. "type": "string"
  23330. }
  23331. },
  23332. "required": ["_tag", "message"],
  23333. "additionalProperties": false
  23334. },
  23335. "SessionsResponse": {
  23336. "type": "object",
  23337. "properties": {
  23338. "data": {
  23339. "type": "array",
  23340. "items": {
  23341. "$ref": "#/components/schemas/SessionV2Info"
  23342. }
  23343. },
  23344. "cursor": {
  23345. "type": "object",
  23346. "properties": {
  23347. "previous": {
  23348. "type": "string"
  23349. },
  23350. "next": {
  23351. "type": "string"
  23352. }
  23353. },
  23354. "additionalProperties": false
  23355. }
  23356. },
  23357. "required": ["data", "cursor"],
  23358. "additionalProperties": false
  23359. },
  23360. "InvalidCursorError": {
  23361. "type": "object",
  23362. "properties": {
  23363. "_tag": {
  23364. "type": "string",
  23365. "enum": ["InvalidCursorError"]
  23366. },
  23367. "message": {
  23368. "type": "string"
  23369. }
  23370. },
  23371. "required": ["_tag", "message"],
  23372. "additionalProperties": false
  23373. },
  23374. "SessionActive": {
  23375. "type": "object",
  23376. "properties": {
  23377. "type": {
  23378. "type": "string",
  23379. "enum": ["running"]
  23380. }
  23381. },
  23382. "required": ["type"],
  23383. "additionalProperties": false
  23384. },
  23385. "SessionNotFoundError": {
  23386. "type": "object",
  23387. "properties": {
  23388. "_tag": {
  23389. "type": "string",
  23390. "enum": ["SessionNotFoundError"]
  23391. },
  23392. "sessionID": {
  23393. "type": "string"
  23394. },
  23395. "message": {
  23396. "type": "string"
  23397. }
  23398. },
  23399. "required": ["_tag", "sessionID", "message"],
  23400. "additionalProperties": false
  23401. },
  23402. "PromptInput": {
  23403. "type": "object",
  23404. "properties": {
  23405. "text": {
  23406. "type": "string"
  23407. },
  23408. "files": {
  23409. "type": "array",
  23410. "items": {
  23411. "$ref": "#/components/schemas/PromptInputFileAttachment"
  23412. }
  23413. },
  23414. "agents": {
  23415. "type": "array",
  23416. "items": {
  23417. "$ref": "#/components/schemas/PromptAgentAttachment"
  23418. }
  23419. }
  23420. },
  23421. "required": ["text"],
  23422. "additionalProperties": false
  23423. },
  23424. "ConflictError": {
  23425. "type": "object",
  23426. "properties": {
  23427. "_tag": {
  23428. "type": "string",
  23429. "enum": ["ConflictError"]
  23430. },
  23431. "message": {
  23432. "type": "string"
  23433. },
  23434. "resource": {
  23435. "type": "string"
  23436. }
  23437. },
  23438. "required": ["_tag", "message"],
  23439. "additionalProperties": false
  23440. },
  23441. "ServiceUnavailableError": {
  23442. "type": "object",
  23443. "properties": {
  23444. "_tag": {
  23445. "type": "string",
  23446. "enum": ["ServiceUnavailableError"]
  23447. },
  23448. "message": {
  23449. "type": "string"
  23450. },
  23451. "service": {
  23452. "type": "string"
  23453. }
  23454. },
  23455. "required": ["_tag", "message"],
  23456. "additionalProperties": false
  23457. },
  23458. "MessageNotFoundError": {
  23459. "type": "object",
  23460. "properties": {
  23461. "_tag": {
  23462. "type": "string",
  23463. "enum": ["MessageNotFoundError"]
  23464. },
  23465. "sessionID": {
  23466. "type": "string"
  23467. },
  23468. "messageID": {
  23469. "type": "string"
  23470. },
  23471. "message": {
  23472. "type": "string"
  23473. }
  23474. },
  23475. "required": ["_tag", "sessionID", "messageID", "message"],
  23476. "additionalProperties": false
  23477. },
  23478. "UnknownError1": {
  23479. "type": "object",
  23480. "properties": {
  23481. "_tag": {
  23482. "type": "string",
  23483. "enum": ["UnknownError"]
  23484. },
  23485. "message": {
  23486. "type": "string"
  23487. },
  23488. "ref": {
  23489. "type": "string"
  23490. }
  23491. },
  23492. "required": ["_tag", "message"],
  23493. "additionalProperties": false
  23494. },
  23495. "SessionDurableEvent": {
  23496. "oneOf": [
  23497. {
  23498. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23499. },
  23500. {
  23501. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23502. },
  23503. {
  23504. "$ref": "#/components/schemas/SessionNextMoved"
  23505. },
  23506. {
  23507. "$ref": "#/components/schemas/SessionNextPrompted"
  23508. },
  23509. {
  23510. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23511. },
  23512. {
  23513. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23514. },
  23515. {
  23516. "$ref": "#/components/schemas/SessionNextSynthetic"
  23517. },
  23518. {
  23519. "$ref": "#/components/schemas/SessionNextShellStarted"
  23520. },
  23521. {
  23522. "$ref": "#/components/schemas/SessionNextShellEnded"
  23523. },
  23524. {
  23525. "$ref": "#/components/schemas/SessionNextStepStarted"
  23526. },
  23527. {
  23528. "$ref": "#/components/schemas/SessionNextStepEnded"
  23529. },
  23530. {
  23531. "$ref": "#/components/schemas/SessionNextStepFailed"
  23532. },
  23533. {
  23534. "$ref": "#/components/schemas/SessionNextTextStarted"
  23535. },
  23536. {
  23537. "$ref": "#/components/schemas/SessionNextTextEnded"
  23538. },
  23539. {
  23540. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23541. },
  23542. {
  23543. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23544. },
  23545. {
  23546. "$ref": "#/components/schemas/SessionNextToolCalled"
  23547. },
  23548. {
  23549. "$ref": "#/components/schemas/SessionNextToolProgress"
  23550. },
  23551. {
  23552. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23553. },
  23554. {
  23555. "$ref": "#/components/schemas/SessionNextToolFailed"
  23556. },
  23557. {
  23558. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23559. },
  23560. {
  23561. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23562. },
  23563. {
  23564. "$ref": "#/components/schemas/SessionNextRetried"
  23565. },
  23566. {
  23567. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23568. },
  23569. {
  23570. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23571. },
  23572. {
  23573. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23574. },
  23575. {
  23576. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23577. },
  23578. {
  23579. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23580. }
  23581. ]
  23582. },
  23583. "SessionHistory": {
  23584. "type": "object",
  23585. "properties": {
  23586. "data": {
  23587. "type": "array",
  23588. "items": {
  23589. "$ref": "#/components/schemas/SessionDurableEvent"
  23590. }
  23591. },
  23592. "hasMore": {
  23593. "type": "boolean"
  23594. }
  23595. },
  23596. "required": ["data", "hasMore"],
  23597. "additionalProperties": false
  23598. },
  23599. "SessionDurableEventStream": {
  23600. "type": "string",
  23601. "contentSchema": {
  23602. "$ref": "#/components/schemas/SessionDurableEvent"
  23603. },
  23604. "contentMediaType": "application/json"
  23605. },
  23606. "SessionMessagesResponse": {
  23607. "type": "object",
  23608. "properties": {
  23609. "data": {
  23610. "type": "array",
  23611. "items": {
  23612. "$ref": "#/components/schemas/SessionMessage"
  23613. }
  23614. },
  23615. "cursor": {
  23616. "type": "object",
  23617. "properties": {
  23618. "previous": {
  23619. "type": "string"
  23620. },
  23621. "next": {
  23622. "type": "string"
  23623. }
  23624. },
  23625. "additionalProperties": false
  23626. }
  23627. },
  23628. "required": ["data", "cursor"],
  23629. "additionalProperties": false
  23630. },
  23631. "ProviderNotFoundError": {
  23632. "type": "object",
  23633. "properties": {
  23634. "_tag": {
  23635. "type": "string",
  23636. "enum": ["ProviderNotFoundError"]
  23637. },
  23638. "providerID": {
  23639. "type": "string"
  23640. },
  23641. "message": {
  23642. "type": "string"
  23643. }
  23644. },
  23645. "required": ["_tag", "providerID", "message"],
  23646. "additionalProperties": false
  23647. },
  23648. "OutputFormat1": {
  23649. "anyOf": [
  23650. {
  23651. "type": "object",
  23652. "properties": {
  23653. "type": {
  23654. "type": "string",
  23655. "enum": ["text"]
  23656. }
  23657. },
  23658. "required": ["type"],
  23659. "additionalProperties": false
  23660. },
  23661. {
  23662. "type": "object",
  23663. "properties": {
  23664. "type": {
  23665. "type": "string",
  23666. "enum": ["json_schema"]
  23667. },
  23668. "schema": {
  23669. "$ref": "#/components/schemas/JSONSchema"
  23670. },
  23671. "retryCount": {
  23672. "type": "integer",
  23673. "minimum": 0
  23674. }
  23675. },
  23676. "required": ["type", "schema"],
  23677. "additionalProperties": false
  23678. }
  23679. ]
  23680. },
  23681. "session.status": {
  23682. "type": "object",
  23683. "properties": {
  23684. "id": {
  23685. "type": "string",
  23686. "pattern": "^evt_"
  23687. },
  23688. "metadata": {
  23689. "type": "object"
  23690. },
  23691. "type": {
  23692. "type": "string",
  23693. "enum": ["session.status"]
  23694. },
  23695. "durable": {
  23696. "type": "object",
  23697. "properties": {
  23698. "aggregateID": {
  23699. "type": "string"
  23700. },
  23701. "seq": {
  23702. "type": "integer"
  23703. },
  23704. "version": {
  23705. "type": "integer"
  23706. }
  23707. },
  23708. "required": ["aggregateID", "seq", "version"],
  23709. "additionalProperties": false
  23710. },
  23711. "location": {
  23712. "$ref": "#/components/schemas/LocationRef"
  23713. },
  23714. "data": {
  23715. "type": "object",
  23716. "properties": {
  23717. "sessionID": {
  23718. "type": "string",
  23719. "pattern": "^ses"
  23720. },
  23721. "status": {
  23722. "$ref": "#/components/schemas/SessionStatus"
  23723. }
  23724. },
  23725. "required": ["sessionID", "status"],
  23726. "additionalProperties": false
  23727. }
  23728. },
  23729. "required": ["id", "type", "data"],
  23730. "additionalProperties": false
  23731. },
  23732. "question.replied": {
  23733. "type": "object",
  23734. "properties": {
  23735. "id": {
  23736. "type": "string",
  23737. "pattern": "^evt_"
  23738. },
  23739. "metadata": {
  23740. "type": "object"
  23741. },
  23742. "type": {
  23743. "type": "string",
  23744. "enum": ["question.replied"]
  23745. },
  23746. "durable": {
  23747. "type": "object",
  23748. "properties": {
  23749. "aggregateID": {
  23750. "type": "string"
  23751. },
  23752. "seq": {
  23753. "type": "integer"
  23754. },
  23755. "version": {
  23756. "type": "integer"
  23757. }
  23758. },
  23759. "required": ["aggregateID", "seq", "version"],
  23760. "additionalProperties": false
  23761. },
  23762. "location": {
  23763. "$ref": "#/components/schemas/LocationRef"
  23764. },
  23765. "data": {
  23766. "type": "object",
  23767. "properties": {
  23768. "sessionID": {
  23769. "type": "string",
  23770. "pattern": "^ses"
  23771. },
  23772. "requestID": {
  23773. "type": "string",
  23774. "pattern": "^que"
  23775. },
  23776. "answers": {
  23777. "type": "array",
  23778. "items": {
  23779. "$ref": "#/components/schemas/QuestionAnswer"
  23780. }
  23781. }
  23782. },
  23783. "required": ["sessionID", "requestID", "answers"],
  23784. "additionalProperties": false
  23785. }
  23786. },
  23787. "required": ["id", "type", "data"],
  23788. "additionalProperties": false
  23789. },
  23790. "question.rejected": {
  23791. "type": "object",
  23792. "properties": {
  23793. "id": {
  23794. "type": "string",
  23795. "pattern": "^evt_"
  23796. },
  23797. "metadata": {
  23798. "type": "object"
  23799. },
  23800. "type": {
  23801. "type": "string",
  23802. "enum": ["question.rejected"]
  23803. },
  23804. "durable": {
  23805. "type": "object",
  23806. "properties": {
  23807. "aggregateID": {
  23808. "type": "string"
  23809. },
  23810. "seq": {
  23811. "type": "integer"
  23812. },
  23813. "version": {
  23814. "type": "integer"
  23815. }
  23816. },
  23817. "required": ["aggregateID", "seq", "version"],
  23818. "additionalProperties": false
  23819. },
  23820. "location": {
  23821. "$ref": "#/components/schemas/LocationRef"
  23822. },
  23823. "data": {
  23824. "type": "object",
  23825. "properties": {
  23826. "sessionID": {
  23827. "type": "string",
  23828. "pattern": "^ses"
  23829. },
  23830. "requestID": {
  23831. "type": "string",
  23832. "pattern": "^que"
  23833. }
  23834. },
  23835. "required": ["sessionID", "requestID"],
  23836. "additionalProperties": false
  23837. }
  23838. },
  23839. "required": ["id", "type", "data"],
  23840. "additionalProperties": false
  23841. },
  23842. "V2Event": {
  23843. "anyOf": [
  23844. {
  23845. "$ref": "#/components/schemas/Models-devRefreshed"
  23846. },
  23847. {
  23848. "$ref": "#/components/schemas/IntegrationUpdated"
  23849. },
  23850. {
  23851. "$ref": "#/components/schemas/IntegrationConnectionUpdated"
  23852. },
  23853. {
  23854. "$ref": "#/components/schemas/CatalogUpdated"
  23855. },
  23856. {
  23857. "$ref": "#/components/schemas/SessionCreated"
  23858. },
  23859. {
  23860. "$ref": "#/components/schemas/SessionUpdated"
  23861. },
  23862. {
  23863. "$ref": "#/components/schemas/SessionDeleted"
  23864. },
  23865. {
  23866. "$ref": "#/components/schemas/MessageUpdated"
  23867. },
  23868. {
  23869. "$ref": "#/components/schemas/MessageRemoved"
  23870. },
  23871. {
  23872. "$ref": "#/components/schemas/MessagePartUpdated"
  23873. },
  23874. {
  23875. "$ref": "#/components/schemas/MessagePartRemoved"
  23876. },
  23877. {
  23878. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23879. },
  23880. {
  23881. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23882. },
  23883. {
  23884. "$ref": "#/components/schemas/SessionNextMoved"
  23885. },
  23886. {
  23887. "$ref": "#/components/schemas/SessionNextPrompted"
  23888. },
  23889. {
  23890. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23891. },
  23892. {
  23893. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23894. },
  23895. {
  23896. "$ref": "#/components/schemas/SessionNextSynthetic"
  23897. },
  23898. {
  23899. "$ref": "#/components/schemas/SessionNextShellStarted"
  23900. },
  23901. {
  23902. "$ref": "#/components/schemas/SessionNextShellEnded"
  23903. },
  23904. {
  23905. "$ref": "#/components/schemas/SessionNextStepStarted"
  23906. },
  23907. {
  23908. "$ref": "#/components/schemas/SessionNextStepEnded"
  23909. },
  23910. {
  23911. "$ref": "#/components/schemas/SessionNextStepFailed"
  23912. },
  23913. {
  23914. "$ref": "#/components/schemas/SessionNextTextStarted"
  23915. },
  23916. {
  23917. "$ref": "#/components/schemas/SessionNextTextDelta"
  23918. },
  23919. {
  23920. "$ref": "#/components/schemas/SessionNextTextEnded"
  23921. },
  23922. {
  23923. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23924. },
  23925. {
  23926. "$ref": "#/components/schemas/SessionNextReasoningDelta"
  23927. },
  23928. {
  23929. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23930. },
  23931. {
  23932. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23933. },
  23934. {
  23935. "$ref": "#/components/schemas/SessionNextToolInputDelta"
  23936. },
  23937. {
  23938. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23939. },
  23940. {
  23941. "$ref": "#/components/schemas/SessionNextToolCalled"
  23942. },
  23943. {
  23944. "$ref": "#/components/schemas/SessionNextToolProgress"
  23945. },
  23946. {
  23947. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23948. },
  23949. {
  23950. "$ref": "#/components/schemas/SessionNextToolFailed"
  23951. },
  23952. {
  23953. "$ref": "#/components/schemas/SessionNextRetried"
  23954. },
  23955. {
  23956. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23957. },
  23958. {
  23959. "$ref": "#/components/schemas/SessionNextCompactionDelta"
  23960. },
  23961. {
  23962. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23963. },
  23964. {
  23965. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23966. },
  23967. {
  23968. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23969. },
  23970. {
  23971. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23972. },
  23973. {
  23974. "$ref": "#/components/schemas/MessagePartDelta"
  23975. },
  23976. {
  23977. "$ref": "#/components/schemas/SessionDiff"
  23978. },
  23979. {
  23980. "$ref": "#/components/schemas/SessionError"
  23981. },
  23982. {
  23983. "$ref": "#/components/schemas/InstallationUpdated"
  23984. },
  23985. {
  23986. "$ref": "#/components/schemas/InstallationUpdate-available"
  23987. },
  23988. {
  23989. "$ref": "#/components/schemas/FileEdited"
  23990. },
  23991. {
  23992. "$ref": "#/components/schemas/ReferenceUpdated"
  23993. },
  23994. {
  23995. "$ref": "#/components/schemas/PermissionV2Asked"
  23996. },
  23997. {
  23998. "$ref": "#/components/schemas/PermissionV2Replied"
  23999. },
  24000. {
  24001. "$ref": "#/components/schemas/PluginAdded"
  24002. },
  24003. {
  24004. "$ref": "#/components/schemas/ProjectDirectoriesUpdated"
  24005. },
  24006. {
  24007. "$ref": "#/components/schemas/FileWatcherUpdated"
  24008. },
  24009. {
  24010. "$ref": "#/components/schemas/PtyCreated"
  24011. },
  24012. {
  24013. "$ref": "#/components/schemas/PtyUpdated"
  24014. },
  24015. {
  24016. "$ref": "#/components/schemas/PtyExited"
  24017. },
  24018. {
  24019. "$ref": "#/components/schemas/PtyDeleted"
  24020. },
  24021. {
  24022. "$ref": "#/components/schemas/QuestionV2Asked"
  24023. },
  24024. {
  24025. "$ref": "#/components/schemas/QuestionV2Replied"
  24026. },
  24027. {
  24028. "$ref": "#/components/schemas/QuestionV2Rejected"
  24029. },
  24030. {
  24031. "$ref": "#/components/schemas/LspUpdated"
  24032. },
  24033. {
  24034. "$ref": "#/components/schemas/PermissionAsked"
  24035. },
  24036. {
  24037. "$ref": "#/components/schemas/PermissionReplied"
  24038. },
  24039. {
  24040. "$ref": "#/components/schemas/TuiPromptAppend"
  24041. },
  24042. {
  24043. "$ref": "#/components/schemas/TuiCommandExecute"
  24044. },
  24045. {
  24046. "$ref": "#/components/schemas/TuiToastShow"
  24047. },
  24048. {
  24049. "$ref": "#/components/schemas/TuiSessionSelect"
  24050. },
  24051. {
  24052. "$ref": "#/components/schemas/McpToolsChanged"
  24053. },
  24054. {
  24055. "$ref": "#/components/schemas/McpBrowserOpenFailed"
  24056. },
  24057. {
  24058. "$ref": "#/components/schemas/CommandExecuted"
  24059. },
  24060. {
  24061. "$ref": "#/components/schemas/ProjectUpdated"
  24062. },
  24063. {
  24064. "$ref": "#/components/schemas/session.status"
  24065. },
  24066. {
  24067. "$ref": "#/components/schemas/SessionIdle"
  24068. },
  24069. {
  24070. "$ref": "#/components/schemas/QuestionAsked"
  24071. },
  24072. {
  24073. "$ref": "#/components/schemas/question.replied"
  24074. },
  24075. {
  24076. "$ref": "#/components/schemas/question.rejected"
  24077. },
  24078. {
  24079. "$ref": "#/components/schemas/SessionCompacted"
  24080. },
  24081. {
  24082. "$ref": "#/components/schemas/VcsBranchUpdated"
  24083. },
  24084. {
  24085. "$ref": "#/components/schemas/WorkspaceReady"
  24086. },
  24087. {
  24088. "$ref": "#/components/schemas/WorkspaceFailed"
  24089. },
  24090. {
  24091. "$ref": "#/components/schemas/WorkspaceStatus"
  24092. },
  24093. {
  24094. "$ref": "#/components/schemas/WorktreeReady"
  24095. },
  24096. {
  24097. "$ref": "#/components/schemas/WorktreeFailed"
  24098. },
  24099. {
  24100. "$ref": "#/components/schemas/ServerConnected"
  24101. },
  24102. {
  24103. "$ref": "#/components/schemas/GlobalDisposed"
  24104. }
  24105. ]
  24106. },
  24107. "V2EventStream": {
  24108. "type": "string",
  24109. "contentSchema": {
  24110. "$ref": "#/components/schemas/V2Event"
  24111. },
  24112. "contentMediaType": "application/json"
  24113. },
  24114. "ForbiddenError": {
  24115. "type": "object",
  24116. "properties": {
  24117. "_tag": {
  24118. "type": "string",
  24119. "enum": ["ForbiddenError"]
  24120. },
  24121. "message": {
  24122. "type": "string"
  24123. }
  24124. },
  24125. "required": ["_tag", "message"],
  24126. "additionalProperties": false
  24127. },
  24128. "ProjectCopyError": {
  24129. "type": "object",
  24130. "properties": {
  24131. "name": {
  24132. "type": "string",
  24133. "enum": ["ProjectCopyError"]
  24134. },
  24135. "data": {
  24136. "type": "object",
  24137. "properties": {
  24138. "message": {
  24139. "type": "string"
  24140. },
  24141. "forceRequired": {
  24142. "type": "boolean"
  24143. }
  24144. },
  24145. "required": ["message"],
  24146. "additionalProperties": false
  24147. }
  24148. },
  24149. "required": ["name", "data"],
  24150. "additionalProperties": false
  24151. },
  24152. "effect_HttpApiError_Forbidden": {
  24153. "type": "object",
  24154. "properties": {
  24155. "_tag": {
  24156. "type": "string",
  24157. "enum": ["Forbidden"]
  24158. }
  24159. },
  24160. "required": ["_tag"],
  24161. "additionalProperties": false
  24162. },
  24163. "Event.tui.prompt.append": {
  24164. "type": "object",
  24165. "properties": {
  24166. "id": {
  24167. "type": "string",
  24168. "pattern": "^evt_"
  24169. },
  24170. "type": {
  24171. "type": "string",
  24172. "enum": ["tui.prompt.append"]
  24173. },
  24174. "properties": {
  24175. "type": "object",
  24176. "properties": {
  24177. "text": {
  24178. "type": "string"
  24179. }
  24180. },
  24181. "required": ["text"],
  24182. "additionalProperties": false
  24183. }
  24184. },
  24185. "required": ["id", "type", "properties"],
  24186. "additionalProperties": false
  24187. },
  24188. "Event.tui.command.execute": {
  24189. "type": "object",
  24190. "properties": {
  24191. "id": {
  24192. "type": "string",
  24193. "pattern": "^evt_"
  24194. },
  24195. "type": {
  24196. "type": "string",
  24197. "enum": ["tui.command.execute"]
  24198. },
  24199. "properties": {
  24200. "type": "object",
  24201. "properties": {
  24202. "command": {
  24203. "anyOf": [
  24204. {
  24205. "type": "string",
  24206. "enum": [
  24207. "session.list",
  24208. "session.new",
  24209. "session.share",
  24210. "session.interrupt",
  24211. "session.compact",
  24212. "session.page.up",
  24213. "session.page.down",
  24214. "session.line.up",
  24215. "session.line.down",
  24216. "session.half.page.up",
  24217. "session.half.page.down",
  24218. "session.first",
  24219. "session.last",
  24220. "prompt.clear",
  24221. "prompt.submit",
  24222. "agent.cycle"
  24223. ]
  24224. },
  24225. {
  24226. "type": "string"
  24227. }
  24228. ]
  24229. }
  24230. },
  24231. "required": ["command"],
  24232. "additionalProperties": false
  24233. }
  24234. },
  24235. "required": ["id", "type", "properties"],
  24236. "additionalProperties": false
  24237. },
  24238. "Event.tui.toast.show": {
  24239. "type": "object",
  24240. "properties": {
  24241. "id": {
  24242. "type": "string",
  24243. "pattern": "^evt_"
  24244. },
  24245. "type": {
  24246. "type": "string",
  24247. "enum": ["tui.toast.show"]
  24248. },
  24249. "properties": {
  24250. "type": "object",
  24251. "properties": {
  24252. "title": {
  24253. "type": "string"
  24254. },
  24255. "message": {
  24256. "type": "string"
  24257. },
  24258. "variant": {
  24259. "type": "string",
  24260. "enum": ["info", "success", "warning", "error"]
  24261. },
  24262. "duration": {
  24263. "type": "integer",
  24264. "exclusiveMinimum": 0
  24265. }
  24266. },
  24267. "required": ["message", "variant"],
  24268. "additionalProperties": false
  24269. }
  24270. },
  24271. "required": ["id", "type", "properties"],
  24272. "additionalProperties": false
  24273. },
  24274. "Event.tui.session.select": {
  24275. "type": "object",
  24276. "properties": {
  24277. "id": {
  24278. "type": "string",
  24279. "pattern": "^evt_"
  24280. },
  24281. "type": {
  24282. "type": "string",
  24283. "enum": ["tui.session.select"]
  24284. },
  24285. "properties": {
  24286. "type": "object",
  24287. "properties": {
  24288. "sessionID": {
  24289. "type": "string",
  24290. "pattern": "^ses",
  24291. "description": "Session ID to navigate to"
  24292. }
  24293. },
  24294. "required": ["sessionID"],
  24295. "additionalProperties": false
  24296. }
  24297. },
  24298. "required": ["id", "type", "properties"],
  24299. "additionalProperties": false
  24300. },
  24301. "CredentialValue": {
  24302. "anyOf": [
  24303. {
  24304. "$ref": "#/components/schemas/CredentialOAuth"
  24305. },
  24306. {
  24307. "$ref": "#/components/schemas/CredentialKey"
  24308. }
  24309. ]
  24310. },
  24311. "IntegrationInputs": {
  24312. "type": "object",
  24313. "additionalProperties": {
  24314. "type": "string"
  24315. }
  24316. },
  24317. "IntegrationMethod": {
  24318. "anyOf": [
  24319. {
  24320. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24321. },
  24322. {
  24323. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24324. },
  24325. {
  24326. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24327. }
  24328. ]
  24329. },
  24330. "IntegrationRef": {
  24331. "type": "object",
  24332. "properties": {
  24333. "id": {
  24334. "type": "string"
  24335. },
  24336. "name": {
  24337. "type": "string"
  24338. }
  24339. },
  24340. "required": ["id", "name"],
  24341. "additionalProperties": false
  24342. },
  24343. "SkillV2Source": {
  24344. "anyOf": [
  24345. {
  24346. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24347. },
  24348. {
  24349. "$ref": "#/components/schemas/SkillV2UrlSource"
  24350. },
  24351. {
  24352. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24353. }
  24354. ]
  24355. },
  24356. "MoveSessionDestination": {
  24357. "type": "object",
  24358. "properties": {
  24359. "directory": {
  24360. "type": "string"
  24361. }
  24362. },
  24363. "required": ["directory"],
  24364. "additionalProperties": false
  24365. },
  24366. "ModelRef": {
  24367. "type": "object",
  24368. "properties": {
  24369. "id": {
  24370. "type": "string"
  24371. },
  24372. "providerID": {
  24373. "type": "string"
  24374. },
  24375. "variant": {
  24376. "type": "string"
  24377. }
  24378. },
  24379. "required": ["id", "providerID"],
  24380. "additionalProperties": false
  24381. },
  24382. "LocationRef": {
  24383. "type": "object",
  24384. "properties": {
  24385. "directory": {
  24386. "type": "string"
  24387. },
  24388. "workspaceID": {
  24389. "type": "string",
  24390. "pattern": "^wrk"
  24391. }
  24392. },
  24393. "required": ["directory"],
  24394. "additionalProperties": false
  24395. },
  24396. "PromptSource": {
  24397. "type": "object",
  24398. "properties": {
  24399. "start": {
  24400. "type": "number"
  24401. },
  24402. "end": {
  24403. "type": "number"
  24404. },
  24405. "text": {
  24406. "type": "string"
  24407. }
  24408. },
  24409. "required": ["start", "end", "text"],
  24410. "additionalProperties": false
  24411. },
  24412. "PromptFileAttachment": {
  24413. "type": "object",
  24414. "properties": {
  24415. "uri": {
  24416. "type": "string"
  24417. },
  24418. "mime": {
  24419. "type": "string"
  24420. },
  24421. "name": {
  24422. "type": "string"
  24423. },
  24424. "description": {
  24425. "type": "string"
  24426. },
  24427. "source": {
  24428. "$ref": "#/components/schemas/PromptSource"
  24429. }
  24430. },
  24431. "required": ["uri", "mime"],
  24432. "additionalProperties": false
  24433. },
  24434. "PromptAgentAttachment": {
  24435. "type": "object",
  24436. "properties": {
  24437. "name": {
  24438. "type": "string"
  24439. },
  24440. "source": {
  24441. "$ref": "#/components/schemas/PromptSource"
  24442. }
  24443. },
  24444. "required": ["name"],
  24445. "additionalProperties": false
  24446. },
  24447. "SessionErrorUnknown": {
  24448. "type": "object",
  24449. "properties": {
  24450. "type": {
  24451. "type": "string",
  24452. "enum": ["unknown"]
  24453. },
  24454. "message": {
  24455. "type": "string"
  24456. }
  24457. },
  24458. "required": ["type", "message"],
  24459. "additionalProperties": false
  24460. },
  24461. "LLMProviderMetadata": {
  24462. "type": "object",
  24463. "additionalProperties": {
  24464. "type": "object"
  24465. }
  24466. },
  24467. "ToolTextContent": {
  24468. "type": "object",
  24469. "properties": {
  24470. "type": {
  24471. "type": "string",
  24472. "enum": ["text"]
  24473. },
  24474. "text": {
  24475. "type": "string"
  24476. }
  24477. },
  24478. "required": ["type", "text"],
  24479. "additionalProperties": false
  24480. },
  24481. "ToolFileContent": {
  24482. "type": "object",
  24483. "properties": {
  24484. "type": {
  24485. "type": "string",
  24486. "enum": ["file"]
  24487. },
  24488. "uri": {
  24489. "type": "string"
  24490. },
  24491. "mime": {
  24492. "type": "string"
  24493. },
  24494. "name": {
  24495. "type": "string"
  24496. }
  24497. },
  24498. "required": ["type", "uri", "mime"],
  24499. "additionalProperties": false
  24500. },
  24501. "LLMToolContent": {
  24502. "anyOf": [
  24503. {
  24504. "$ref": "#/components/schemas/ToolTextContent"
  24505. },
  24506. {
  24507. "$ref": "#/components/schemas/ToolFileContent"
  24508. }
  24509. ]
  24510. },
  24511. "SessionNextRetry_error": {
  24512. "type": "object",
  24513. "properties": {
  24514. "message": {
  24515. "type": "string"
  24516. },
  24517. "statusCode": {
  24518. "type": "number"
  24519. },
  24520. "isRetryable": {
  24521. "type": "boolean"
  24522. },
  24523. "responseHeaders": {
  24524. "type": "object",
  24525. "additionalProperties": {
  24526. "type": "string"
  24527. }
  24528. },
  24529. "responseBody": {
  24530. "type": "string"
  24531. },
  24532. "metadata": {
  24533. "type": "object",
  24534. "additionalProperties": {
  24535. "type": "string"
  24536. }
  24537. }
  24538. },
  24539. "required": ["message", "isRetryable"],
  24540. "additionalProperties": false
  24541. },
  24542. "FileDiff": {
  24543. "type": "object",
  24544. "properties": {
  24545. "path": {
  24546. "type": "string"
  24547. },
  24548. "status": {
  24549. "type": "string",
  24550. "enum": ["added", "modified", "deleted"]
  24551. },
  24552. "additions": {
  24553. "type": "integer",
  24554. "minimum": 0
  24555. },
  24556. "deletions": {
  24557. "type": "integer",
  24558. "minimum": 0
  24559. },
  24560. "patch": {
  24561. "type": "string"
  24562. }
  24563. },
  24564. "required": ["path", "status", "additions", "deletions", "patch"],
  24565. "additionalProperties": false
  24566. },
  24567. "RevertState": {
  24568. "type": "object",
  24569. "properties": {
  24570. "messageID": {
  24571. "type": "string",
  24572. "pattern": "^msg_"
  24573. },
  24574. "partID": {
  24575. "type": "string"
  24576. },
  24577. "snapshot": {
  24578. "type": "string"
  24579. },
  24580. "diff": {
  24581. "type": "string"
  24582. },
  24583. "files": {
  24584. "type": "array",
  24585. "items": {
  24586. "$ref": "#/components/schemas/FileDiff"
  24587. }
  24588. }
  24589. },
  24590. "required": ["messageID"],
  24591. "additionalProperties": false
  24592. },
  24593. "PermissionV2Source": {
  24594. "type": "object",
  24595. "properties": {
  24596. "type": {
  24597. "type": "string",
  24598. "enum": ["tool"]
  24599. },
  24600. "messageID": {
  24601. "type": "string"
  24602. },
  24603. "callID": {
  24604. "type": "string"
  24605. }
  24606. },
  24607. "required": ["type", "messageID", "callID"],
  24608. "additionalProperties": false
  24609. },
  24610. "PermissionV2Reply": {
  24611. "type": "string",
  24612. "enum": ["once", "always", "reject"]
  24613. },
  24614. "QuestionV2Option": {
  24615. "type": "object",
  24616. "properties": {
  24617. "label": {
  24618. "type": "string",
  24619. "description": "Display text (1-5 words, concise)"
  24620. },
  24621. "description": {
  24622. "type": "string",
  24623. "description": "Explanation of choice"
  24624. }
  24625. },
  24626. "required": ["label", "description"],
  24627. "additionalProperties": false
  24628. },
  24629. "QuestionV2Info": {
  24630. "type": "object",
  24631. "properties": {
  24632. "question": {
  24633. "type": "string",
  24634. "description": "Complete question"
  24635. },
  24636. "header": {
  24637. "type": "string",
  24638. "description": "Very short label (max 30 chars)"
  24639. },
  24640. "options": {
  24641. "type": "array",
  24642. "items": {
  24643. "$ref": "#/components/schemas/QuestionV2Option"
  24644. },
  24645. "description": "Available choices"
  24646. },
  24647. "multiple": {
  24648. "type": "boolean"
  24649. },
  24650. "custom": {
  24651. "type": "boolean"
  24652. }
  24653. },
  24654. "required": ["question", "header", "options"],
  24655. "additionalProperties": false
  24656. },
  24657. "QuestionV2Tool": {
  24658. "type": "object",
  24659. "properties": {
  24660. "messageID": {
  24661. "type": "string"
  24662. },
  24663. "callID": {
  24664. "type": "string"
  24665. }
  24666. },
  24667. "required": ["messageID", "callID"],
  24668. "additionalProperties": false
  24669. },
  24670. "QuestionV2Answer": {
  24671. "type": "array",
  24672. "items": {
  24673. "type": "string"
  24674. }
  24675. },
  24676. "ProjectVcs": {
  24677. "type": "string",
  24678. "enum": ["git"]
  24679. },
  24680. "ProjectIcon": {
  24681. "type": "object",
  24682. "properties": {
  24683. "url": {
  24684. "type": "string"
  24685. },
  24686. "override": {
  24687. "type": "string"
  24688. },
  24689. "color": {
  24690. "type": "string"
  24691. }
  24692. },
  24693. "additionalProperties": false
  24694. },
  24695. "ProjectCommands": {
  24696. "type": "object",
  24697. "properties": {
  24698. "start": {
  24699. "type": "string",
  24700. "description": "Startup script to run when creating a new workspace (worktree)"
  24701. }
  24702. },
  24703. "additionalProperties": false
  24704. },
  24705. "ProjectTime": {
  24706. "type": "object",
  24707. "properties": {
  24708. "created": {
  24709. "type": "integer",
  24710. "minimum": 0
  24711. },
  24712. "updated": {
  24713. "type": "integer",
  24714. "minimum": 0
  24715. },
  24716. "initialized": {
  24717. "type": "integer",
  24718. "minimum": 0
  24719. }
  24720. },
  24721. "required": ["created", "updated"],
  24722. "additionalProperties": false
  24723. },
  24724. "EventServerInstanceDisposed": {
  24725. "type": "object",
  24726. "properties": {
  24727. "id": {
  24728. "type": "string"
  24729. },
  24730. "type": {
  24731. "type": "string",
  24732. "enum": ["server.instance.disposed"]
  24733. },
  24734. "properties": {
  24735. "type": "object",
  24736. "properties": {
  24737. "directory": {
  24738. "type": "string"
  24739. }
  24740. },
  24741. "required": ["directory"],
  24742. "additionalProperties": false
  24743. }
  24744. },
  24745. "required": ["id", "type", "properties"],
  24746. "additionalProperties": false
  24747. },
  24748. "SyncEventSessionCreated": {
  24749. "type": "object",
  24750. "properties": {
  24751. "type": {
  24752. "type": "string",
  24753. "enum": ["sync"]
  24754. },
  24755. "id": {
  24756. "type": "string",
  24757. "pattern": "^evt_"
  24758. },
  24759. "syncEvent": {
  24760. "type": "object",
  24761. "properties": {
  24762. "type": {
  24763. "type": "string",
  24764. "enum": ["session.created.1"]
  24765. },
  24766. "id": {
  24767. "type": "string",
  24768. "pattern": "^evt_"
  24769. },
  24770. "seq": {
  24771. "type": "number"
  24772. },
  24773. "aggregateID": {
  24774. "type": "string"
  24775. },
  24776. "data": {
  24777. "type": "object",
  24778. "properties": {
  24779. "sessionID": {
  24780. "type": "string",
  24781. "pattern": "^ses"
  24782. },
  24783. "info": {
  24784. "$ref": "#/components/schemas/Session"
  24785. }
  24786. },
  24787. "required": ["sessionID", "info"],
  24788. "additionalProperties": false
  24789. }
  24790. },
  24791. "required": ["type", "id", "seq", "aggregateID", "data"],
  24792. "additionalProperties": false
  24793. }
  24794. },
  24795. "required": ["type", "id", "syncEvent"],
  24796. "additionalProperties": false
  24797. },
  24798. "SyncEventSessionUpdated": {
  24799. "type": "object",
  24800. "properties": {
  24801. "type": {
  24802. "type": "string",
  24803. "enum": ["sync"]
  24804. },
  24805. "id": {
  24806. "type": "string",
  24807. "pattern": "^evt_"
  24808. },
  24809. "syncEvent": {
  24810. "type": "object",
  24811. "properties": {
  24812. "type": {
  24813. "type": "string",
  24814. "enum": ["session.updated.1"]
  24815. },
  24816. "id": {
  24817. "type": "string",
  24818. "pattern": "^evt_"
  24819. },
  24820. "seq": {
  24821. "type": "number"
  24822. },
  24823. "aggregateID": {
  24824. "type": "string"
  24825. },
  24826. "data": {
  24827. "type": "object",
  24828. "properties": {
  24829. "sessionID": {
  24830. "type": "string",
  24831. "pattern": "^ses"
  24832. },
  24833. "info": {
  24834. "$ref": "#/components/schemas/Session"
  24835. }
  24836. },
  24837. "required": ["sessionID", "info"],
  24838. "additionalProperties": false
  24839. }
  24840. },
  24841. "required": ["type", "id", "seq", "aggregateID", "data"],
  24842. "additionalProperties": false
  24843. }
  24844. },
  24845. "required": ["type", "id", "syncEvent"],
  24846. "additionalProperties": false
  24847. },
  24848. "SyncEventSessionDeleted": {
  24849. "type": "object",
  24850. "properties": {
  24851. "type": {
  24852. "type": "string",
  24853. "enum": ["sync"]
  24854. },
  24855. "id": {
  24856. "type": "string",
  24857. "pattern": "^evt_"
  24858. },
  24859. "syncEvent": {
  24860. "type": "object",
  24861. "properties": {
  24862. "type": {
  24863. "type": "string",
  24864. "enum": ["session.deleted.1"]
  24865. },
  24866. "id": {
  24867. "type": "string",
  24868. "pattern": "^evt_"
  24869. },
  24870. "seq": {
  24871. "type": "number"
  24872. },
  24873. "aggregateID": {
  24874. "type": "string"
  24875. },
  24876. "data": {
  24877. "type": "object",
  24878. "properties": {
  24879. "sessionID": {
  24880. "type": "string",
  24881. "pattern": "^ses"
  24882. },
  24883. "info": {
  24884. "$ref": "#/components/schemas/Session"
  24885. }
  24886. },
  24887. "required": ["sessionID", "info"],
  24888. "additionalProperties": false
  24889. }
  24890. },
  24891. "required": ["type", "id", "seq", "aggregateID", "data"],
  24892. "additionalProperties": false
  24893. }
  24894. },
  24895. "required": ["type", "id", "syncEvent"],
  24896. "additionalProperties": false
  24897. },
  24898. "SyncEventMessageUpdated": {
  24899. "type": "object",
  24900. "properties": {
  24901. "type": {
  24902. "type": "string",
  24903. "enum": ["sync"]
  24904. },
  24905. "id": {
  24906. "type": "string",
  24907. "pattern": "^evt_"
  24908. },
  24909. "syncEvent": {
  24910. "type": "object",
  24911. "properties": {
  24912. "type": {
  24913. "type": "string",
  24914. "enum": ["message.updated.1"]
  24915. },
  24916. "id": {
  24917. "type": "string",
  24918. "pattern": "^evt_"
  24919. },
  24920. "seq": {
  24921. "type": "number"
  24922. },
  24923. "aggregateID": {
  24924. "type": "string"
  24925. },
  24926. "data": {
  24927. "type": "object",
  24928. "properties": {
  24929. "sessionID": {
  24930. "type": "string",
  24931. "pattern": "^ses"
  24932. },
  24933. "info": {
  24934. "$ref": "#/components/schemas/Message"
  24935. }
  24936. },
  24937. "required": ["sessionID", "info"],
  24938. "additionalProperties": false
  24939. }
  24940. },
  24941. "required": ["type", "id", "seq", "aggregateID", "data"],
  24942. "additionalProperties": false
  24943. }
  24944. },
  24945. "required": ["type", "id", "syncEvent"],
  24946. "additionalProperties": false
  24947. },
  24948. "SyncEventMessageRemoved": {
  24949. "type": "object",
  24950. "properties": {
  24951. "type": {
  24952. "type": "string",
  24953. "enum": ["sync"]
  24954. },
  24955. "id": {
  24956. "type": "string",
  24957. "pattern": "^evt_"
  24958. },
  24959. "syncEvent": {
  24960. "type": "object",
  24961. "properties": {
  24962. "type": {
  24963. "type": "string",
  24964. "enum": ["message.removed.1"]
  24965. },
  24966. "id": {
  24967. "type": "string",
  24968. "pattern": "^evt_"
  24969. },
  24970. "seq": {
  24971. "type": "number"
  24972. },
  24973. "aggregateID": {
  24974. "type": "string"
  24975. },
  24976. "data": {
  24977. "type": "object",
  24978. "properties": {
  24979. "sessionID": {
  24980. "type": "string",
  24981. "pattern": "^ses"
  24982. },
  24983. "messageID": {
  24984. "type": "string",
  24985. "pattern": "^msg"
  24986. }
  24987. },
  24988. "required": ["sessionID", "messageID"],
  24989. "additionalProperties": false
  24990. }
  24991. },
  24992. "required": ["type", "id", "seq", "aggregateID", "data"],
  24993. "additionalProperties": false
  24994. }
  24995. },
  24996. "required": ["type", "id", "syncEvent"],
  24997. "additionalProperties": false
  24998. },
  24999. "SyncEventMessagePartUpdated": {
  25000. "type": "object",
  25001. "properties": {
  25002. "type": {
  25003. "type": "string",
  25004. "enum": ["sync"]
  25005. },
  25006. "id": {
  25007. "type": "string",
  25008. "pattern": "^evt_"
  25009. },
  25010. "syncEvent": {
  25011. "type": "object",
  25012. "properties": {
  25013. "type": {
  25014. "type": "string",
  25015. "enum": ["message.part.updated.1"]
  25016. },
  25017. "id": {
  25018. "type": "string",
  25019. "pattern": "^evt_"
  25020. },
  25021. "seq": {
  25022. "type": "number"
  25023. },
  25024. "aggregateID": {
  25025. "type": "string"
  25026. },
  25027. "data": {
  25028. "type": "object",
  25029. "properties": {
  25030. "sessionID": {
  25031. "type": "string",
  25032. "pattern": "^ses"
  25033. },
  25034. "part": {
  25035. "$ref": "#/components/schemas/Part"
  25036. },
  25037. "time": {
  25038. "type": "number"
  25039. }
  25040. },
  25041. "required": ["sessionID", "part", "time"],
  25042. "additionalProperties": false
  25043. }
  25044. },
  25045. "required": ["type", "id", "seq", "aggregateID", "data"],
  25046. "additionalProperties": false
  25047. }
  25048. },
  25049. "required": ["type", "id", "syncEvent"],
  25050. "additionalProperties": false
  25051. },
  25052. "SyncEventMessagePartRemoved": {
  25053. "type": "object",
  25054. "properties": {
  25055. "type": {
  25056. "type": "string",
  25057. "enum": ["sync"]
  25058. },
  25059. "id": {
  25060. "type": "string",
  25061. "pattern": "^evt_"
  25062. },
  25063. "syncEvent": {
  25064. "type": "object",
  25065. "properties": {
  25066. "type": {
  25067. "type": "string",
  25068. "enum": ["message.part.removed.1"]
  25069. },
  25070. "id": {
  25071. "type": "string",
  25072. "pattern": "^evt_"
  25073. },
  25074. "seq": {
  25075. "type": "number"
  25076. },
  25077. "aggregateID": {
  25078. "type": "string"
  25079. },
  25080. "data": {
  25081. "type": "object",
  25082. "properties": {
  25083. "sessionID": {
  25084. "type": "string",
  25085. "pattern": "^ses"
  25086. },
  25087. "messageID": {
  25088. "type": "string",
  25089. "pattern": "^msg"
  25090. },
  25091. "partID": {
  25092. "type": "string",
  25093. "pattern": "^prt"
  25094. }
  25095. },
  25096. "required": ["sessionID", "messageID", "partID"],
  25097. "additionalProperties": false
  25098. }
  25099. },
  25100. "required": ["type", "id", "seq", "aggregateID", "data"],
  25101. "additionalProperties": false
  25102. }
  25103. },
  25104. "required": ["type", "id", "syncEvent"],
  25105. "additionalProperties": false
  25106. },
  25107. "SyncEventSessionNextAgentSwitched": {
  25108. "type": "object",
  25109. "properties": {
  25110. "type": {
  25111. "type": "string",
  25112. "enum": ["sync"]
  25113. },
  25114. "id": {
  25115. "type": "string",
  25116. "pattern": "^evt_"
  25117. },
  25118. "syncEvent": {
  25119. "type": "object",
  25120. "properties": {
  25121. "type": {
  25122. "type": "string",
  25123. "enum": ["session.next.agent.switched.1"]
  25124. },
  25125. "id": {
  25126. "type": "string",
  25127. "pattern": "^evt_"
  25128. },
  25129. "seq": {
  25130. "type": "number"
  25131. },
  25132. "aggregateID": {
  25133. "type": "string"
  25134. },
  25135. "data": {
  25136. "type": "object",
  25137. "properties": {
  25138. "timestamp": {
  25139. "type": "number"
  25140. },
  25141. "sessionID": {
  25142. "type": "string",
  25143. "pattern": "^ses"
  25144. },
  25145. "messageID": {
  25146. "type": "string",
  25147. "pattern": "^msg_"
  25148. },
  25149. "agent": {
  25150. "type": "string"
  25151. }
  25152. },
  25153. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25154. "additionalProperties": false
  25155. }
  25156. },
  25157. "required": ["type", "id", "seq", "aggregateID", "data"],
  25158. "additionalProperties": false
  25159. }
  25160. },
  25161. "required": ["type", "id", "syncEvent"],
  25162. "additionalProperties": false
  25163. },
  25164. "SyncEventSessionNextModelSwitched": {
  25165. "type": "object",
  25166. "properties": {
  25167. "type": {
  25168. "type": "string",
  25169. "enum": ["sync"]
  25170. },
  25171. "id": {
  25172. "type": "string",
  25173. "pattern": "^evt_"
  25174. },
  25175. "syncEvent": {
  25176. "type": "object",
  25177. "properties": {
  25178. "type": {
  25179. "type": "string",
  25180. "enum": ["session.next.model.switched.1"]
  25181. },
  25182. "id": {
  25183. "type": "string",
  25184. "pattern": "^evt_"
  25185. },
  25186. "seq": {
  25187. "type": "number"
  25188. },
  25189. "aggregateID": {
  25190. "type": "string"
  25191. },
  25192. "data": {
  25193. "type": "object",
  25194. "properties": {
  25195. "timestamp": {
  25196. "type": "number"
  25197. },
  25198. "sessionID": {
  25199. "type": "string",
  25200. "pattern": "^ses"
  25201. },
  25202. "messageID": {
  25203. "type": "string",
  25204. "pattern": "^msg_"
  25205. },
  25206. "model": {
  25207. "$ref": "#/components/schemas/ModelRef"
  25208. }
  25209. },
  25210. "required": ["timestamp", "sessionID", "messageID", "model"],
  25211. "additionalProperties": false
  25212. }
  25213. },
  25214. "required": ["type", "id", "seq", "aggregateID", "data"],
  25215. "additionalProperties": false
  25216. }
  25217. },
  25218. "required": ["type", "id", "syncEvent"],
  25219. "additionalProperties": false
  25220. },
  25221. "SyncEventSessionNextMoved": {
  25222. "type": "object",
  25223. "properties": {
  25224. "type": {
  25225. "type": "string",
  25226. "enum": ["sync"]
  25227. },
  25228. "id": {
  25229. "type": "string",
  25230. "pattern": "^evt_"
  25231. },
  25232. "syncEvent": {
  25233. "type": "object",
  25234. "properties": {
  25235. "type": {
  25236. "type": "string",
  25237. "enum": ["session.next.moved.1"]
  25238. },
  25239. "id": {
  25240. "type": "string",
  25241. "pattern": "^evt_"
  25242. },
  25243. "seq": {
  25244. "type": "number"
  25245. },
  25246. "aggregateID": {
  25247. "type": "string"
  25248. },
  25249. "data": {
  25250. "type": "object",
  25251. "properties": {
  25252. "timestamp": {
  25253. "type": "number"
  25254. },
  25255. "sessionID": {
  25256. "type": "string",
  25257. "pattern": "^ses"
  25258. },
  25259. "location": {
  25260. "$ref": "#/components/schemas/LocationRef"
  25261. },
  25262. "subdirectory": {
  25263. "type": "string"
  25264. }
  25265. },
  25266. "required": ["timestamp", "sessionID", "location"],
  25267. "additionalProperties": false
  25268. }
  25269. },
  25270. "required": ["type", "id", "seq", "aggregateID", "data"],
  25271. "additionalProperties": false
  25272. }
  25273. },
  25274. "required": ["type", "id", "syncEvent"],
  25275. "additionalProperties": false
  25276. },
  25277. "SyncEventSessionNextPrompted": {
  25278. "type": "object",
  25279. "properties": {
  25280. "type": {
  25281. "type": "string",
  25282. "enum": ["sync"]
  25283. },
  25284. "id": {
  25285. "type": "string",
  25286. "pattern": "^evt_"
  25287. },
  25288. "syncEvent": {
  25289. "type": "object",
  25290. "properties": {
  25291. "type": {
  25292. "type": "string",
  25293. "enum": ["session.next.prompted.1"]
  25294. },
  25295. "id": {
  25296. "type": "string",
  25297. "pattern": "^evt_"
  25298. },
  25299. "seq": {
  25300. "type": "number"
  25301. },
  25302. "aggregateID": {
  25303. "type": "string"
  25304. },
  25305. "data": {
  25306. "type": "object",
  25307. "properties": {
  25308. "timestamp": {
  25309. "type": "number"
  25310. },
  25311. "sessionID": {
  25312. "type": "string",
  25313. "pattern": "^ses"
  25314. },
  25315. "messageID": {
  25316. "type": "string",
  25317. "pattern": "^msg_"
  25318. },
  25319. "prompt": {
  25320. "$ref": "#/components/schemas/Prompt"
  25321. },
  25322. "delivery": {
  25323. "type": "string",
  25324. "enum": ["steer", "queue"]
  25325. }
  25326. },
  25327. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25328. "additionalProperties": false
  25329. }
  25330. },
  25331. "required": ["type", "id", "seq", "aggregateID", "data"],
  25332. "additionalProperties": false
  25333. }
  25334. },
  25335. "required": ["type", "id", "syncEvent"],
  25336. "additionalProperties": false
  25337. },
  25338. "SyncEventSessionNextPromptAdmitted": {
  25339. "type": "object",
  25340. "properties": {
  25341. "type": {
  25342. "type": "string",
  25343. "enum": ["sync"]
  25344. },
  25345. "id": {
  25346. "type": "string",
  25347. "pattern": "^evt_"
  25348. },
  25349. "syncEvent": {
  25350. "type": "object",
  25351. "properties": {
  25352. "type": {
  25353. "type": "string",
  25354. "enum": ["session.next.prompt.admitted.1"]
  25355. },
  25356. "id": {
  25357. "type": "string",
  25358. "pattern": "^evt_"
  25359. },
  25360. "seq": {
  25361. "type": "number"
  25362. },
  25363. "aggregateID": {
  25364. "type": "string"
  25365. },
  25366. "data": {
  25367. "type": "object",
  25368. "properties": {
  25369. "timestamp": {
  25370. "type": "number"
  25371. },
  25372. "sessionID": {
  25373. "type": "string",
  25374. "pattern": "^ses"
  25375. },
  25376. "messageID": {
  25377. "type": "string",
  25378. "pattern": "^msg_"
  25379. },
  25380. "prompt": {
  25381. "$ref": "#/components/schemas/Prompt"
  25382. },
  25383. "delivery": {
  25384. "type": "string",
  25385. "enum": ["steer", "queue"]
  25386. }
  25387. },
  25388. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25389. "additionalProperties": false
  25390. }
  25391. },
  25392. "required": ["type", "id", "seq", "aggregateID", "data"],
  25393. "additionalProperties": false
  25394. }
  25395. },
  25396. "required": ["type", "id", "syncEvent"],
  25397. "additionalProperties": false
  25398. },
  25399. "SyncEventSessionNextContextUpdated": {
  25400. "type": "object",
  25401. "properties": {
  25402. "type": {
  25403. "type": "string",
  25404. "enum": ["sync"]
  25405. },
  25406. "id": {
  25407. "type": "string",
  25408. "pattern": "^evt_"
  25409. },
  25410. "syncEvent": {
  25411. "type": "object",
  25412. "properties": {
  25413. "type": {
  25414. "type": "string",
  25415. "enum": ["session.next.context.updated.1"]
  25416. },
  25417. "id": {
  25418. "type": "string",
  25419. "pattern": "^evt_"
  25420. },
  25421. "seq": {
  25422. "type": "number"
  25423. },
  25424. "aggregateID": {
  25425. "type": "string"
  25426. },
  25427. "data": {
  25428. "type": "object",
  25429. "properties": {
  25430. "timestamp": {
  25431. "type": "number"
  25432. },
  25433. "sessionID": {
  25434. "type": "string",
  25435. "pattern": "^ses"
  25436. },
  25437. "messageID": {
  25438. "type": "string",
  25439. "pattern": "^msg_"
  25440. },
  25441. "text": {
  25442. "type": "string"
  25443. }
  25444. },
  25445. "required": ["timestamp", "sessionID", "messageID", "text"],
  25446. "additionalProperties": false
  25447. }
  25448. },
  25449. "required": ["type", "id", "seq", "aggregateID", "data"],
  25450. "additionalProperties": false
  25451. }
  25452. },
  25453. "required": ["type", "id", "syncEvent"],
  25454. "additionalProperties": false
  25455. },
  25456. "SyncEventSessionNextSynthetic": {
  25457. "type": "object",
  25458. "properties": {
  25459. "type": {
  25460. "type": "string",
  25461. "enum": ["sync"]
  25462. },
  25463. "id": {
  25464. "type": "string",
  25465. "pattern": "^evt_"
  25466. },
  25467. "syncEvent": {
  25468. "type": "object",
  25469. "properties": {
  25470. "type": {
  25471. "type": "string",
  25472. "enum": ["session.next.synthetic.1"]
  25473. },
  25474. "id": {
  25475. "type": "string",
  25476. "pattern": "^evt_"
  25477. },
  25478. "seq": {
  25479. "type": "number"
  25480. },
  25481. "aggregateID": {
  25482. "type": "string"
  25483. },
  25484. "data": {
  25485. "type": "object",
  25486. "properties": {
  25487. "timestamp": {
  25488. "type": "number"
  25489. },
  25490. "sessionID": {
  25491. "type": "string",
  25492. "pattern": "^ses"
  25493. },
  25494. "messageID": {
  25495. "type": "string",
  25496. "pattern": "^msg_"
  25497. },
  25498. "text": {
  25499. "type": "string"
  25500. }
  25501. },
  25502. "required": ["timestamp", "sessionID", "messageID", "text"],
  25503. "additionalProperties": false
  25504. }
  25505. },
  25506. "required": ["type", "id", "seq", "aggregateID", "data"],
  25507. "additionalProperties": false
  25508. }
  25509. },
  25510. "required": ["type", "id", "syncEvent"],
  25511. "additionalProperties": false
  25512. },
  25513. "SyncEventSessionNextShellStarted": {
  25514. "type": "object",
  25515. "properties": {
  25516. "type": {
  25517. "type": "string",
  25518. "enum": ["sync"]
  25519. },
  25520. "id": {
  25521. "type": "string",
  25522. "pattern": "^evt_"
  25523. },
  25524. "syncEvent": {
  25525. "type": "object",
  25526. "properties": {
  25527. "type": {
  25528. "type": "string",
  25529. "enum": ["session.next.shell.started.1"]
  25530. },
  25531. "id": {
  25532. "type": "string",
  25533. "pattern": "^evt_"
  25534. },
  25535. "seq": {
  25536. "type": "number"
  25537. },
  25538. "aggregateID": {
  25539. "type": "string"
  25540. },
  25541. "data": {
  25542. "type": "object",
  25543. "properties": {
  25544. "timestamp": {
  25545. "type": "number"
  25546. },
  25547. "sessionID": {
  25548. "type": "string",
  25549. "pattern": "^ses"
  25550. },
  25551. "messageID": {
  25552. "type": "string",
  25553. "pattern": "^msg_"
  25554. },
  25555. "callID": {
  25556. "type": "string"
  25557. },
  25558. "command": {
  25559. "type": "string"
  25560. }
  25561. },
  25562. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25563. "additionalProperties": false
  25564. }
  25565. },
  25566. "required": ["type", "id", "seq", "aggregateID", "data"],
  25567. "additionalProperties": false
  25568. }
  25569. },
  25570. "required": ["type", "id", "syncEvent"],
  25571. "additionalProperties": false
  25572. },
  25573. "SyncEventSessionNextShellEnded": {
  25574. "type": "object",
  25575. "properties": {
  25576. "type": {
  25577. "type": "string",
  25578. "enum": ["sync"]
  25579. },
  25580. "id": {
  25581. "type": "string",
  25582. "pattern": "^evt_"
  25583. },
  25584. "syncEvent": {
  25585. "type": "object",
  25586. "properties": {
  25587. "type": {
  25588. "type": "string",
  25589. "enum": ["session.next.shell.ended.1"]
  25590. },
  25591. "id": {
  25592. "type": "string",
  25593. "pattern": "^evt_"
  25594. },
  25595. "seq": {
  25596. "type": "number"
  25597. },
  25598. "aggregateID": {
  25599. "type": "string"
  25600. },
  25601. "data": {
  25602. "type": "object",
  25603. "properties": {
  25604. "timestamp": {
  25605. "type": "number"
  25606. },
  25607. "sessionID": {
  25608. "type": "string",
  25609. "pattern": "^ses"
  25610. },
  25611. "callID": {
  25612. "type": "string"
  25613. },
  25614. "output": {
  25615. "type": "string"
  25616. }
  25617. },
  25618. "required": ["timestamp", "sessionID", "callID", "output"],
  25619. "additionalProperties": false
  25620. }
  25621. },
  25622. "required": ["type", "id", "seq", "aggregateID", "data"],
  25623. "additionalProperties": false
  25624. }
  25625. },
  25626. "required": ["type", "id", "syncEvent"],
  25627. "additionalProperties": false
  25628. },
  25629. "SyncEventSessionNextStepStarted": {
  25630. "type": "object",
  25631. "properties": {
  25632. "type": {
  25633. "type": "string",
  25634. "enum": ["sync"]
  25635. },
  25636. "id": {
  25637. "type": "string",
  25638. "pattern": "^evt_"
  25639. },
  25640. "syncEvent": {
  25641. "type": "object",
  25642. "properties": {
  25643. "type": {
  25644. "type": "string",
  25645. "enum": ["session.next.step.started.1"]
  25646. },
  25647. "id": {
  25648. "type": "string",
  25649. "pattern": "^evt_"
  25650. },
  25651. "seq": {
  25652. "type": "number"
  25653. },
  25654. "aggregateID": {
  25655. "type": "string"
  25656. },
  25657. "data": {
  25658. "type": "object",
  25659. "properties": {
  25660. "timestamp": {
  25661. "type": "number"
  25662. },
  25663. "sessionID": {
  25664. "type": "string",
  25665. "pattern": "^ses"
  25666. },
  25667. "assistantMessageID": {
  25668. "type": "string",
  25669. "pattern": "^msg_"
  25670. },
  25671. "agent": {
  25672. "type": "string"
  25673. },
  25674. "model": {
  25675. "$ref": "#/components/schemas/ModelRef"
  25676. },
  25677. "snapshot": {
  25678. "type": "string"
  25679. }
  25680. },
  25681. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25682. "additionalProperties": false
  25683. }
  25684. },
  25685. "required": ["type", "id", "seq", "aggregateID", "data"],
  25686. "additionalProperties": false
  25687. }
  25688. },
  25689. "required": ["type", "id", "syncEvent"],
  25690. "additionalProperties": false
  25691. },
  25692. "SyncEventSessionNextStepEnded": {
  25693. "type": "object",
  25694. "properties": {
  25695. "type": {
  25696. "type": "string",
  25697. "enum": ["sync"]
  25698. },
  25699. "id": {
  25700. "type": "string",
  25701. "pattern": "^evt_"
  25702. },
  25703. "syncEvent": {
  25704. "type": "object",
  25705. "properties": {
  25706. "type": {
  25707. "type": "string",
  25708. "enum": ["session.next.step.ended.2"]
  25709. },
  25710. "id": {
  25711. "type": "string",
  25712. "pattern": "^evt_"
  25713. },
  25714. "seq": {
  25715. "type": "number"
  25716. },
  25717. "aggregateID": {
  25718. "type": "string"
  25719. },
  25720. "data": {
  25721. "type": "object",
  25722. "properties": {
  25723. "timestamp": {
  25724. "type": "number"
  25725. },
  25726. "sessionID": {
  25727. "type": "string",
  25728. "pattern": "^ses"
  25729. },
  25730. "assistantMessageID": {
  25731. "type": "string",
  25732. "pattern": "^msg_"
  25733. },
  25734. "finish": {
  25735. "type": "string"
  25736. },
  25737. "cost": {
  25738. "type": "number"
  25739. },
  25740. "tokens": {
  25741. "type": "object",
  25742. "properties": {
  25743. "input": {
  25744. "type": "number"
  25745. },
  25746. "output": {
  25747. "type": "number"
  25748. },
  25749. "reasoning": {
  25750. "type": "number"
  25751. },
  25752. "cache": {
  25753. "type": "object",
  25754. "properties": {
  25755. "read": {
  25756. "type": "number"
  25757. },
  25758. "write": {
  25759. "type": "number"
  25760. }
  25761. },
  25762. "required": ["read", "write"],
  25763. "additionalProperties": false
  25764. }
  25765. },
  25766. "required": ["input", "output", "reasoning", "cache"],
  25767. "additionalProperties": false
  25768. },
  25769. "snapshot": {
  25770. "type": "string"
  25771. },
  25772. "files": {
  25773. "type": "array",
  25774. "items": {
  25775. "type": "string"
  25776. }
  25777. }
  25778. },
  25779. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25780. "additionalProperties": false
  25781. }
  25782. },
  25783. "required": ["type", "id", "seq", "aggregateID", "data"],
  25784. "additionalProperties": false
  25785. }
  25786. },
  25787. "required": ["type", "id", "syncEvent"],
  25788. "additionalProperties": false
  25789. },
  25790. "SyncEventSessionNextStepFailed": {
  25791. "type": "object",
  25792. "properties": {
  25793. "type": {
  25794. "type": "string",
  25795. "enum": ["sync"]
  25796. },
  25797. "id": {
  25798. "type": "string",
  25799. "pattern": "^evt_"
  25800. },
  25801. "syncEvent": {
  25802. "type": "object",
  25803. "properties": {
  25804. "type": {
  25805. "type": "string",
  25806. "enum": ["session.next.step.failed.2"]
  25807. },
  25808. "id": {
  25809. "type": "string",
  25810. "pattern": "^evt_"
  25811. },
  25812. "seq": {
  25813. "type": "number"
  25814. },
  25815. "aggregateID": {
  25816. "type": "string"
  25817. },
  25818. "data": {
  25819. "type": "object",
  25820. "properties": {
  25821. "timestamp": {
  25822. "type": "number"
  25823. },
  25824. "sessionID": {
  25825. "type": "string",
  25826. "pattern": "^ses"
  25827. },
  25828. "assistantMessageID": {
  25829. "type": "string",
  25830. "pattern": "^msg_"
  25831. },
  25832. "error": {
  25833. "$ref": "#/components/schemas/SessionErrorUnknown"
  25834. }
  25835. },
  25836. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25837. "additionalProperties": false
  25838. }
  25839. },
  25840. "required": ["type", "id", "seq", "aggregateID", "data"],
  25841. "additionalProperties": false
  25842. }
  25843. },
  25844. "required": ["type", "id", "syncEvent"],
  25845. "additionalProperties": false
  25846. },
  25847. "SyncEventSessionNextTextStarted": {
  25848. "type": "object",
  25849. "properties": {
  25850. "type": {
  25851. "type": "string",
  25852. "enum": ["sync"]
  25853. },
  25854. "id": {
  25855. "type": "string",
  25856. "pattern": "^evt_"
  25857. },
  25858. "syncEvent": {
  25859. "type": "object",
  25860. "properties": {
  25861. "type": {
  25862. "type": "string",
  25863. "enum": ["session.next.text.started.1"]
  25864. },
  25865. "id": {
  25866. "type": "string",
  25867. "pattern": "^evt_"
  25868. },
  25869. "seq": {
  25870. "type": "number"
  25871. },
  25872. "aggregateID": {
  25873. "type": "string"
  25874. },
  25875. "data": {
  25876. "type": "object",
  25877. "properties": {
  25878. "timestamp": {
  25879. "type": "number"
  25880. },
  25881. "sessionID": {
  25882. "type": "string",
  25883. "pattern": "^ses"
  25884. },
  25885. "assistantMessageID": {
  25886. "type": "string",
  25887. "pattern": "^msg_"
  25888. },
  25889. "textID": {
  25890. "type": "string"
  25891. }
  25892. },
  25893. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25894. "additionalProperties": false
  25895. }
  25896. },
  25897. "required": ["type", "id", "seq", "aggregateID", "data"],
  25898. "additionalProperties": false
  25899. }
  25900. },
  25901. "required": ["type", "id", "syncEvent"],
  25902. "additionalProperties": false
  25903. },
  25904. "SyncEventSessionNextTextEnded": {
  25905. "type": "object",
  25906. "properties": {
  25907. "type": {
  25908. "type": "string",
  25909. "enum": ["sync"]
  25910. },
  25911. "id": {
  25912. "type": "string",
  25913. "pattern": "^evt_"
  25914. },
  25915. "syncEvent": {
  25916. "type": "object",
  25917. "properties": {
  25918. "type": {
  25919. "type": "string",
  25920. "enum": ["session.next.text.ended.1"]
  25921. },
  25922. "id": {
  25923. "type": "string",
  25924. "pattern": "^evt_"
  25925. },
  25926. "seq": {
  25927. "type": "number"
  25928. },
  25929. "aggregateID": {
  25930. "type": "string"
  25931. },
  25932. "data": {
  25933. "type": "object",
  25934. "properties": {
  25935. "timestamp": {
  25936. "type": "number"
  25937. },
  25938. "sessionID": {
  25939. "type": "string",
  25940. "pattern": "^ses"
  25941. },
  25942. "assistantMessageID": {
  25943. "type": "string",
  25944. "pattern": "^msg_"
  25945. },
  25946. "textID": {
  25947. "type": "string"
  25948. },
  25949. "text": {
  25950. "type": "string"
  25951. }
  25952. },
  25953. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25954. "additionalProperties": false
  25955. }
  25956. },
  25957. "required": ["type", "id", "seq", "aggregateID", "data"],
  25958. "additionalProperties": false
  25959. }
  25960. },
  25961. "required": ["type", "id", "syncEvent"],
  25962. "additionalProperties": false
  25963. },
  25964. "SyncEventSessionNextReasoningStarted": {
  25965. "type": "object",
  25966. "properties": {
  25967. "type": {
  25968. "type": "string",
  25969. "enum": ["sync"]
  25970. },
  25971. "id": {
  25972. "type": "string",
  25973. "pattern": "^evt_"
  25974. },
  25975. "syncEvent": {
  25976. "type": "object",
  25977. "properties": {
  25978. "type": {
  25979. "type": "string",
  25980. "enum": ["session.next.reasoning.started.1"]
  25981. },
  25982. "id": {
  25983. "type": "string",
  25984. "pattern": "^evt_"
  25985. },
  25986. "seq": {
  25987. "type": "number"
  25988. },
  25989. "aggregateID": {
  25990. "type": "string"
  25991. },
  25992. "data": {
  25993. "type": "object",
  25994. "properties": {
  25995. "timestamp": {
  25996. "type": "number"
  25997. },
  25998. "sessionID": {
  25999. "type": "string",
  26000. "pattern": "^ses"
  26001. },
  26002. "assistantMessageID": {
  26003. "type": "string",
  26004. "pattern": "^msg_"
  26005. },
  26006. "reasoningID": {
  26007. "type": "string"
  26008. },
  26009. "providerMetadata": {
  26010. "$ref": "#/components/schemas/LLMProviderMetadata"
  26011. }
  26012. },
  26013. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26014. "additionalProperties": false
  26015. }
  26016. },
  26017. "required": ["type", "id", "seq", "aggregateID", "data"],
  26018. "additionalProperties": false
  26019. }
  26020. },
  26021. "required": ["type", "id", "syncEvent"],
  26022. "additionalProperties": false
  26023. },
  26024. "SyncEventSessionNextReasoningEnded": {
  26025. "type": "object",
  26026. "properties": {
  26027. "type": {
  26028. "type": "string",
  26029. "enum": ["sync"]
  26030. },
  26031. "id": {
  26032. "type": "string",
  26033. "pattern": "^evt_"
  26034. },
  26035. "syncEvent": {
  26036. "type": "object",
  26037. "properties": {
  26038. "type": {
  26039. "type": "string",
  26040. "enum": ["session.next.reasoning.ended.1"]
  26041. },
  26042. "id": {
  26043. "type": "string",
  26044. "pattern": "^evt_"
  26045. },
  26046. "seq": {
  26047. "type": "number"
  26048. },
  26049. "aggregateID": {
  26050. "type": "string"
  26051. },
  26052. "data": {
  26053. "type": "object",
  26054. "properties": {
  26055. "timestamp": {
  26056. "type": "number"
  26057. },
  26058. "sessionID": {
  26059. "type": "string",
  26060. "pattern": "^ses"
  26061. },
  26062. "assistantMessageID": {
  26063. "type": "string",
  26064. "pattern": "^msg_"
  26065. },
  26066. "reasoningID": {
  26067. "type": "string"
  26068. },
  26069. "text": {
  26070. "type": "string"
  26071. },
  26072. "providerMetadata": {
  26073. "$ref": "#/components/schemas/LLMProviderMetadata"
  26074. }
  26075. },
  26076. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26077. "additionalProperties": false
  26078. }
  26079. },
  26080. "required": ["type", "id", "seq", "aggregateID", "data"],
  26081. "additionalProperties": false
  26082. }
  26083. },
  26084. "required": ["type", "id", "syncEvent"],
  26085. "additionalProperties": false
  26086. },
  26087. "SyncEventSessionNextToolInputStarted": {
  26088. "type": "object",
  26089. "properties": {
  26090. "type": {
  26091. "type": "string",
  26092. "enum": ["sync"]
  26093. },
  26094. "id": {
  26095. "type": "string",
  26096. "pattern": "^evt_"
  26097. },
  26098. "syncEvent": {
  26099. "type": "object",
  26100. "properties": {
  26101. "type": {
  26102. "type": "string",
  26103. "enum": ["session.next.tool.input.started.1"]
  26104. },
  26105. "id": {
  26106. "type": "string",
  26107. "pattern": "^evt_"
  26108. },
  26109. "seq": {
  26110. "type": "number"
  26111. },
  26112. "aggregateID": {
  26113. "type": "string"
  26114. },
  26115. "data": {
  26116. "type": "object",
  26117. "properties": {
  26118. "timestamp": {
  26119. "type": "number"
  26120. },
  26121. "sessionID": {
  26122. "type": "string",
  26123. "pattern": "^ses"
  26124. },
  26125. "assistantMessageID": {
  26126. "type": "string",
  26127. "pattern": "^msg_"
  26128. },
  26129. "callID": {
  26130. "type": "string"
  26131. },
  26132. "name": {
  26133. "type": "string"
  26134. }
  26135. },
  26136. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26137. "additionalProperties": false
  26138. }
  26139. },
  26140. "required": ["type", "id", "seq", "aggregateID", "data"],
  26141. "additionalProperties": false
  26142. }
  26143. },
  26144. "required": ["type", "id", "syncEvent"],
  26145. "additionalProperties": false
  26146. },
  26147. "SyncEventSessionNextToolInputEnded": {
  26148. "type": "object",
  26149. "properties": {
  26150. "type": {
  26151. "type": "string",
  26152. "enum": ["sync"]
  26153. },
  26154. "id": {
  26155. "type": "string",
  26156. "pattern": "^evt_"
  26157. },
  26158. "syncEvent": {
  26159. "type": "object",
  26160. "properties": {
  26161. "type": {
  26162. "type": "string",
  26163. "enum": ["session.next.tool.input.ended.1"]
  26164. },
  26165. "id": {
  26166. "type": "string",
  26167. "pattern": "^evt_"
  26168. },
  26169. "seq": {
  26170. "type": "number"
  26171. },
  26172. "aggregateID": {
  26173. "type": "string"
  26174. },
  26175. "data": {
  26176. "type": "object",
  26177. "properties": {
  26178. "timestamp": {
  26179. "type": "number"
  26180. },
  26181. "sessionID": {
  26182. "type": "string",
  26183. "pattern": "^ses"
  26184. },
  26185. "assistantMessageID": {
  26186. "type": "string",
  26187. "pattern": "^msg_"
  26188. },
  26189. "callID": {
  26190. "type": "string"
  26191. },
  26192. "text": {
  26193. "type": "string"
  26194. }
  26195. },
  26196. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26197. "additionalProperties": false
  26198. }
  26199. },
  26200. "required": ["type", "id", "seq", "aggregateID", "data"],
  26201. "additionalProperties": false
  26202. }
  26203. },
  26204. "required": ["type", "id", "syncEvent"],
  26205. "additionalProperties": false
  26206. },
  26207. "SyncEventSessionNextToolCalled": {
  26208. "type": "object",
  26209. "properties": {
  26210. "type": {
  26211. "type": "string",
  26212. "enum": ["sync"]
  26213. },
  26214. "id": {
  26215. "type": "string",
  26216. "pattern": "^evt_"
  26217. },
  26218. "syncEvent": {
  26219. "type": "object",
  26220. "properties": {
  26221. "type": {
  26222. "type": "string",
  26223. "enum": ["session.next.tool.called.1"]
  26224. },
  26225. "id": {
  26226. "type": "string",
  26227. "pattern": "^evt_"
  26228. },
  26229. "seq": {
  26230. "type": "number"
  26231. },
  26232. "aggregateID": {
  26233. "type": "string"
  26234. },
  26235. "data": {
  26236. "type": "object",
  26237. "properties": {
  26238. "timestamp": {
  26239. "type": "number"
  26240. },
  26241. "sessionID": {
  26242. "type": "string",
  26243. "pattern": "^ses"
  26244. },
  26245. "assistantMessageID": {
  26246. "type": "string",
  26247. "pattern": "^msg_"
  26248. },
  26249. "callID": {
  26250. "type": "string"
  26251. },
  26252. "tool": {
  26253. "type": "string"
  26254. },
  26255. "input": {
  26256. "type": "object"
  26257. },
  26258. "provider": {
  26259. "type": "object",
  26260. "properties": {
  26261. "executed": {
  26262. "type": "boolean"
  26263. },
  26264. "metadata": {
  26265. "$ref": "#/components/schemas/LLMProviderMetadata"
  26266. }
  26267. },
  26268. "required": ["executed"],
  26269. "additionalProperties": false
  26270. }
  26271. },
  26272. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26273. "additionalProperties": false
  26274. }
  26275. },
  26276. "required": ["type", "id", "seq", "aggregateID", "data"],
  26277. "additionalProperties": false
  26278. }
  26279. },
  26280. "required": ["type", "id", "syncEvent"],
  26281. "additionalProperties": false
  26282. },
  26283. "SyncEventSessionNextToolProgress": {
  26284. "type": "object",
  26285. "properties": {
  26286. "type": {
  26287. "type": "string",
  26288. "enum": ["sync"]
  26289. },
  26290. "id": {
  26291. "type": "string",
  26292. "pattern": "^evt_"
  26293. },
  26294. "syncEvent": {
  26295. "type": "object",
  26296. "properties": {
  26297. "type": {
  26298. "type": "string",
  26299. "enum": ["session.next.tool.progress.1"]
  26300. },
  26301. "id": {
  26302. "type": "string",
  26303. "pattern": "^evt_"
  26304. },
  26305. "seq": {
  26306. "type": "number"
  26307. },
  26308. "aggregateID": {
  26309. "type": "string"
  26310. },
  26311. "data": {
  26312. "type": "object",
  26313. "properties": {
  26314. "timestamp": {
  26315. "type": "number"
  26316. },
  26317. "sessionID": {
  26318. "type": "string",
  26319. "pattern": "^ses"
  26320. },
  26321. "assistantMessageID": {
  26322. "type": "string",
  26323. "pattern": "^msg_"
  26324. },
  26325. "callID": {
  26326. "type": "string"
  26327. },
  26328. "structured": {
  26329. "type": "object"
  26330. },
  26331. "content": {
  26332. "type": "array",
  26333. "items": {
  26334. "$ref": "#/components/schemas/LLMToolContent"
  26335. }
  26336. }
  26337. },
  26338. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26339. "additionalProperties": false
  26340. }
  26341. },
  26342. "required": ["type", "id", "seq", "aggregateID", "data"],
  26343. "additionalProperties": false
  26344. }
  26345. },
  26346. "required": ["type", "id", "syncEvent"],
  26347. "additionalProperties": false
  26348. },
  26349. "SyncEventSessionNextToolSuccess": {
  26350. "type": "object",
  26351. "properties": {
  26352. "type": {
  26353. "type": "string",
  26354. "enum": ["sync"]
  26355. },
  26356. "id": {
  26357. "type": "string",
  26358. "pattern": "^evt_"
  26359. },
  26360. "syncEvent": {
  26361. "type": "object",
  26362. "properties": {
  26363. "type": {
  26364. "type": "string",
  26365. "enum": ["session.next.tool.success.1"]
  26366. },
  26367. "id": {
  26368. "type": "string",
  26369. "pattern": "^evt_"
  26370. },
  26371. "seq": {
  26372. "type": "number"
  26373. },
  26374. "aggregateID": {
  26375. "type": "string"
  26376. },
  26377. "data": {
  26378. "type": "object",
  26379. "properties": {
  26380. "timestamp": {
  26381. "type": "number"
  26382. },
  26383. "sessionID": {
  26384. "type": "string",
  26385. "pattern": "^ses"
  26386. },
  26387. "assistantMessageID": {
  26388. "type": "string",
  26389. "pattern": "^msg_"
  26390. },
  26391. "callID": {
  26392. "type": "string"
  26393. },
  26394. "structured": {
  26395. "type": "object"
  26396. },
  26397. "content": {
  26398. "type": "array",
  26399. "items": {
  26400. "$ref": "#/components/schemas/LLMToolContent"
  26401. }
  26402. },
  26403. "outputPaths": {
  26404. "type": "array",
  26405. "items": {
  26406. "type": "string"
  26407. }
  26408. },
  26409. "result": {},
  26410. "provider": {
  26411. "type": "object",
  26412. "properties": {
  26413. "executed": {
  26414. "type": "boolean"
  26415. },
  26416. "metadata": {
  26417. "$ref": "#/components/schemas/LLMProviderMetadata"
  26418. }
  26419. },
  26420. "required": ["executed"],
  26421. "additionalProperties": false
  26422. }
  26423. },
  26424. "required": [
  26425. "timestamp",
  26426. "sessionID",
  26427. "assistantMessageID",
  26428. "callID",
  26429. "structured",
  26430. "content",
  26431. "provider"
  26432. ],
  26433. "additionalProperties": false
  26434. }
  26435. },
  26436. "required": ["type", "id", "seq", "aggregateID", "data"],
  26437. "additionalProperties": false
  26438. }
  26439. },
  26440. "required": ["type", "id", "syncEvent"],
  26441. "additionalProperties": false
  26442. },
  26443. "SyncEventSessionNextToolFailed": {
  26444. "type": "object",
  26445. "properties": {
  26446. "type": {
  26447. "type": "string",
  26448. "enum": ["sync"]
  26449. },
  26450. "id": {
  26451. "type": "string",
  26452. "pattern": "^evt_"
  26453. },
  26454. "syncEvent": {
  26455. "type": "object",
  26456. "properties": {
  26457. "type": {
  26458. "type": "string",
  26459. "enum": ["session.next.tool.failed.1"]
  26460. },
  26461. "id": {
  26462. "type": "string",
  26463. "pattern": "^evt_"
  26464. },
  26465. "seq": {
  26466. "type": "number"
  26467. },
  26468. "aggregateID": {
  26469. "type": "string"
  26470. },
  26471. "data": {
  26472. "type": "object",
  26473. "properties": {
  26474. "timestamp": {
  26475. "type": "number"
  26476. },
  26477. "sessionID": {
  26478. "type": "string",
  26479. "pattern": "^ses"
  26480. },
  26481. "assistantMessageID": {
  26482. "type": "string",
  26483. "pattern": "^msg_"
  26484. },
  26485. "callID": {
  26486. "type": "string"
  26487. },
  26488. "error": {
  26489. "$ref": "#/components/schemas/SessionErrorUnknown"
  26490. },
  26491. "result": {},
  26492. "provider": {
  26493. "type": "object",
  26494. "properties": {
  26495. "executed": {
  26496. "type": "boolean"
  26497. },
  26498. "metadata": {
  26499. "$ref": "#/components/schemas/LLMProviderMetadata"
  26500. }
  26501. },
  26502. "required": ["executed"],
  26503. "additionalProperties": false
  26504. }
  26505. },
  26506. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26507. "additionalProperties": false
  26508. }
  26509. },
  26510. "required": ["type", "id", "seq", "aggregateID", "data"],
  26511. "additionalProperties": false
  26512. }
  26513. },
  26514. "required": ["type", "id", "syncEvent"],
  26515. "additionalProperties": false
  26516. },
  26517. "SyncEventSessionNextRetried": {
  26518. "type": "object",
  26519. "properties": {
  26520. "type": {
  26521. "type": "string",
  26522. "enum": ["sync"]
  26523. },
  26524. "id": {
  26525. "type": "string",
  26526. "pattern": "^evt_"
  26527. },
  26528. "syncEvent": {
  26529. "type": "object",
  26530. "properties": {
  26531. "type": {
  26532. "type": "string",
  26533. "enum": ["session.next.retried.1"]
  26534. },
  26535. "id": {
  26536. "type": "string",
  26537. "pattern": "^evt_"
  26538. },
  26539. "seq": {
  26540. "type": "number"
  26541. },
  26542. "aggregateID": {
  26543. "type": "string"
  26544. },
  26545. "data": {
  26546. "type": "object",
  26547. "properties": {
  26548. "timestamp": {
  26549. "type": "number"
  26550. },
  26551. "sessionID": {
  26552. "type": "string",
  26553. "pattern": "^ses"
  26554. },
  26555. "attempt": {
  26556. "type": "number"
  26557. },
  26558. "error": {
  26559. "$ref": "#/components/schemas/SessionNextRetry_error"
  26560. }
  26561. },
  26562. "required": ["timestamp", "sessionID", "attempt", "error"],
  26563. "additionalProperties": false
  26564. }
  26565. },
  26566. "required": ["type", "id", "seq", "aggregateID", "data"],
  26567. "additionalProperties": false
  26568. }
  26569. },
  26570. "required": ["type", "id", "syncEvent"],
  26571. "additionalProperties": false
  26572. },
  26573. "SyncEventSessionNextCompactionStarted": {
  26574. "type": "object",
  26575. "properties": {
  26576. "type": {
  26577. "type": "string",
  26578. "enum": ["sync"]
  26579. },
  26580. "id": {
  26581. "type": "string",
  26582. "pattern": "^evt_"
  26583. },
  26584. "syncEvent": {
  26585. "type": "object",
  26586. "properties": {
  26587. "type": {
  26588. "type": "string",
  26589. "enum": ["session.next.compaction.started.1"]
  26590. },
  26591. "id": {
  26592. "type": "string",
  26593. "pattern": "^evt_"
  26594. },
  26595. "seq": {
  26596. "type": "number"
  26597. },
  26598. "aggregateID": {
  26599. "type": "string"
  26600. },
  26601. "data": {
  26602. "type": "object",
  26603. "properties": {
  26604. "timestamp": {
  26605. "type": "number"
  26606. },
  26607. "sessionID": {
  26608. "type": "string",
  26609. "pattern": "^ses"
  26610. },
  26611. "messageID": {
  26612. "type": "string",
  26613. "pattern": "^msg_"
  26614. },
  26615. "reason": {
  26616. "type": "string",
  26617. "enum": ["auto", "manual"]
  26618. }
  26619. },
  26620. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26621. "additionalProperties": false
  26622. }
  26623. },
  26624. "required": ["type", "id", "seq", "aggregateID", "data"],
  26625. "additionalProperties": false
  26626. }
  26627. },
  26628. "required": ["type", "id", "syncEvent"],
  26629. "additionalProperties": false
  26630. },
  26631. "SyncEventSessionNextCompactionEnded": {
  26632. "type": "object",
  26633. "properties": {
  26634. "type": {
  26635. "type": "string",
  26636. "enum": ["sync"]
  26637. },
  26638. "id": {
  26639. "type": "string",
  26640. "pattern": "^evt_"
  26641. },
  26642. "syncEvent": {
  26643. "type": "object",
  26644. "properties": {
  26645. "type": {
  26646. "type": "string",
  26647. "enum": ["session.next.compaction.ended.1"]
  26648. },
  26649. "id": {
  26650. "type": "string",
  26651. "pattern": "^evt_"
  26652. },
  26653. "seq": {
  26654. "type": "number"
  26655. },
  26656. "aggregateID": {
  26657. "type": "string"
  26658. },
  26659. "data": {
  26660. "type": "object",
  26661. "properties": {
  26662. "timestamp": {
  26663. "type": "number"
  26664. },
  26665. "sessionID": {
  26666. "type": "string",
  26667. "pattern": "^ses"
  26668. },
  26669. "messageID": {
  26670. "type": "string",
  26671. "pattern": "^msg_"
  26672. },
  26673. "reason": {
  26674. "type": "string",
  26675. "enum": ["auto", "manual"]
  26676. },
  26677. "text": {
  26678. "type": "string"
  26679. },
  26680. "recent": {
  26681. "type": "string"
  26682. }
  26683. },
  26684. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26685. "additionalProperties": false
  26686. }
  26687. },
  26688. "required": ["type", "id", "seq", "aggregateID", "data"],
  26689. "additionalProperties": false
  26690. }
  26691. },
  26692. "required": ["type", "id", "syncEvent"],
  26693. "additionalProperties": false
  26694. },
  26695. "SyncEventSessionNextRevertStaged": {
  26696. "type": "object",
  26697. "properties": {
  26698. "type": {
  26699. "type": "string",
  26700. "enum": ["sync"]
  26701. },
  26702. "id": {
  26703. "type": "string",
  26704. "pattern": "^evt_"
  26705. },
  26706. "syncEvent": {
  26707. "type": "object",
  26708. "properties": {
  26709. "type": {
  26710. "type": "string",
  26711. "enum": ["session.next.revert.staged.1"]
  26712. },
  26713. "id": {
  26714. "type": "string",
  26715. "pattern": "^evt_"
  26716. },
  26717. "seq": {
  26718. "type": "number"
  26719. },
  26720. "aggregateID": {
  26721. "type": "string"
  26722. },
  26723. "data": {
  26724. "type": "object",
  26725. "properties": {
  26726. "timestamp": {
  26727. "type": "number"
  26728. },
  26729. "sessionID": {
  26730. "type": "string",
  26731. "pattern": "^ses"
  26732. },
  26733. "revert": {
  26734. "$ref": "#/components/schemas/RevertState"
  26735. }
  26736. },
  26737. "required": ["timestamp", "sessionID", "revert"],
  26738. "additionalProperties": false
  26739. }
  26740. },
  26741. "required": ["type", "id", "seq", "aggregateID", "data"],
  26742. "additionalProperties": false
  26743. }
  26744. },
  26745. "required": ["type", "id", "syncEvent"],
  26746. "additionalProperties": false
  26747. },
  26748. "SyncEventSessionNextRevertCleared": {
  26749. "type": "object",
  26750. "properties": {
  26751. "type": {
  26752. "type": "string",
  26753. "enum": ["sync"]
  26754. },
  26755. "id": {
  26756. "type": "string",
  26757. "pattern": "^evt_"
  26758. },
  26759. "syncEvent": {
  26760. "type": "object",
  26761. "properties": {
  26762. "type": {
  26763. "type": "string",
  26764. "enum": ["session.next.revert.cleared.1"]
  26765. },
  26766. "id": {
  26767. "type": "string",
  26768. "pattern": "^evt_"
  26769. },
  26770. "seq": {
  26771. "type": "number"
  26772. },
  26773. "aggregateID": {
  26774. "type": "string"
  26775. },
  26776. "data": {
  26777. "type": "object",
  26778. "properties": {
  26779. "timestamp": {
  26780. "type": "number"
  26781. },
  26782. "sessionID": {
  26783. "type": "string",
  26784. "pattern": "^ses"
  26785. }
  26786. },
  26787. "required": ["timestamp", "sessionID"],
  26788. "additionalProperties": false
  26789. }
  26790. },
  26791. "required": ["type", "id", "seq", "aggregateID", "data"],
  26792. "additionalProperties": false
  26793. }
  26794. },
  26795. "required": ["type", "id", "syncEvent"],
  26796. "additionalProperties": false
  26797. },
  26798. "SyncEventSessionNextRevertCommitted": {
  26799. "type": "object",
  26800. "properties": {
  26801. "type": {
  26802. "type": "string",
  26803. "enum": ["sync"]
  26804. },
  26805. "id": {
  26806. "type": "string",
  26807. "pattern": "^evt_"
  26808. },
  26809. "syncEvent": {
  26810. "type": "object",
  26811. "properties": {
  26812. "type": {
  26813. "type": "string",
  26814. "enum": ["session.next.revert.committed.1"]
  26815. },
  26816. "id": {
  26817. "type": "string",
  26818. "pattern": "^evt_"
  26819. },
  26820. "seq": {
  26821. "type": "number"
  26822. },
  26823. "aggregateID": {
  26824. "type": "string"
  26825. },
  26826. "data": {
  26827. "type": "object",
  26828. "properties": {
  26829. "timestamp": {
  26830. "type": "number"
  26831. },
  26832. "sessionID": {
  26833. "type": "string",
  26834. "pattern": "^ses"
  26835. },
  26836. "messageID": {
  26837. "type": "string",
  26838. "pattern": "^msg_"
  26839. }
  26840. },
  26841. "required": ["timestamp", "sessionID", "messageID"],
  26842. "additionalProperties": false
  26843. }
  26844. },
  26845. "required": ["type", "id", "seq", "aggregateID", "data"],
  26846. "additionalProperties": false
  26847. }
  26848. },
  26849. "required": ["type", "id", "syncEvent"],
  26850. "additionalProperties": false
  26851. },
  26852. "ConfigV2ReferenceGit": {
  26853. "type": "object",
  26854. "properties": {
  26855. "repository": {
  26856. "type": "string"
  26857. },
  26858. "branch": {
  26859. "type": "string"
  26860. },
  26861. "description": {
  26862. "type": "string"
  26863. },
  26864. "hidden": {
  26865. "type": "boolean"
  26866. }
  26867. },
  26868. "required": ["repository"],
  26869. "additionalProperties": false
  26870. },
  26871. "ConfigV2ReferenceLocal": {
  26872. "type": "object",
  26873. "properties": {
  26874. "path": {
  26875. "type": "string"
  26876. },
  26877. "description": {
  26878. "type": "string"
  26879. },
  26880. "hidden": {
  26881. "type": "boolean"
  26882. }
  26883. },
  26884. "required": ["path"],
  26885. "additionalProperties": false
  26886. },
  26887. "PolicyEffect": {
  26888. "type": "string",
  26889. "enum": ["allow", "deny"]
  26890. },
  26891. "ConfigV2ExperimentalPolicy": {
  26892. "type": "object",
  26893. "properties": {
  26894. "action": {
  26895. "type": "string",
  26896. "enum": ["provider.use"]
  26897. },
  26898. "effect": {
  26899. "$ref": "#/components/schemas/PolicyEffect"
  26900. },
  26901. "resource": {
  26902. "type": "string"
  26903. }
  26904. },
  26905. "required": ["action", "effect", "resource"],
  26906. "additionalProperties": false
  26907. },
  26908. "ProjectDirectories": {
  26909. "type": "array",
  26910. "items": {
  26911. "type": "object",
  26912. "properties": {
  26913. "directory": {
  26914. "type": "string"
  26915. },
  26916. "strategy": {
  26917. "type": "string"
  26918. }
  26919. },
  26920. "required": ["directory"],
  26921. "additionalProperties": false
  26922. }
  26923. },
  26924. "PtyTicketConnectToken": {
  26925. "type": "object",
  26926. "properties": {
  26927. "ticket": {
  26928. "type": "string"
  26929. },
  26930. "expires_in": {
  26931. "type": "integer",
  26932. "exclusiveMinimum": 0
  26933. }
  26934. },
  26935. "required": ["ticket", "expires_in"],
  26936. "additionalProperties": false
  26937. },
  26938. "WorkspaceEventConnectionStatus": {
  26939. "type": "object",
  26940. "properties": {
  26941. "workspaceID": {
  26942. "type": "string",
  26943. "pattern": "^wrk"
  26944. },
  26945. "status": {
  26946. "type": "string",
  26947. "enum": ["connected", "connecting", "disconnected", "error"]
  26948. }
  26949. },
  26950. "required": ["workspaceID", "status"],
  26951. "additionalProperties": false
  26952. },
  26953. "LocationInfo": {
  26954. "type": "object",
  26955. "properties": {
  26956. "directory": {
  26957. "type": "string"
  26958. },
  26959. "workspaceID": {
  26960. "type": "string",
  26961. "pattern": "^wrk"
  26962. },
  26963. "project": {
  26964. "type": "object",
  26965. "properties": {
  26966. "id": {
  26967. "type": "string"
  26968. },
  26969. "directory": {
  26970. "type": "string"
  26971. }
  26972. },
  26973. "required": ["id", "directory"],
  26974. "additionalProperties": false
  26975. }
  26976. },
  26977. "required": ["directory", "project"],
  26978. "additionalProperties": false
  26979. },
  26980. "ProviderRequest": {
  26981. "type": "object",
  26982. "properties": {
  26983. "headers": {
  26984. "type": "object",
  26985. "additionalProperties": {
  26986. "type": "string"
  26987. }
  26988. },
  26989. "body": {
  26990. "type": "object"
  26991. }
  26992. },
  26993. "required": ["headers", "body"],
  26994. "additionalProperties": false
  26995. },
  26996. "AgentColor": {
  26997. "anyOf": [
  26998. {
  26999. "type": "string",
  27000. "pattern": "^#[0-9a-fA-F]{6}$"
  27001. },
  27002. {
  27003. "type": "string",
  27004. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  27005. }
  27006. ]
  27007. },
  27008. "PermissionV2Effect": {
  27009. "type": "string",
  27010. "enum": ["allow", "deny", "ask"]
  27011. },
  27012. "PermissionV2Rule": {
  27013. "type": "object",
  27014. "properties": {
  27015. "action": {
  27016. "type": "string"
  27017. },
  27018. "resource": {
  27019. "type": "string"
  27020. },
  27021. "effect": {
  27022. "$ref": "#/components/schemas/PermissionV2Effect"
  27023. }
  27024. },
  27025. "required": ["action", "resource", "effect"],
  27026. "additionalProperties": false
  27027. },
  27028. "PermissionV2Ruleset": {
  27029. "type": "array",
  27030. "items": {
  27031. "$ref": "#/components/schemas/PermissionV2Rule"
  27032. }
  27033. },
  27034. "AgentV2Info": {
  27035. "type": "object",
  27036. "properties": {
  27037. "id": {
  27038. "type": "string"
  27039. },
  27040. "model": {
  27041. "$ref": "#/components/schemas/ModelRef"
  27042. },
  27043. "request": {
  27044. "$ref": "#/components/schemas/ProviderRequest"
  27045. },
  27046. "system": {
  27047. "type": "string"
  27048. },
  27049. "description": {
  27050. "type": "string"
  27051. },
  27052. "mode": {
  27053. "type": "string",
  27054. "enum": ["subagent", "primary", "all"]
  27055. },
  27056. "hidden": {
  27057. "type": "boolean"
  27058. },
  27059. "color": {
  27060. "$ref": "#/components/schemas/AgentColor"
  27061. },
  27062. "steps": {
  27063. "type": "integer",
  27064. "exclusiveMinimum": 0
  27065. },
  27066. "permissions": {
  27067. "$ref": "#/components/schemas/PermissionV2Ruleset"
  27068. }
  27069. },
  27070. "required": ["id", "request", "mode", "hidden", "permissions"],
  27071. "additionalProperties": false
  27072. },
  27073. "SessionV2Info": {
  27074. "type": "object",
  27075. "properties": {
  27076. "id": {
  27077. "type": "string",
  27078. "pattern": "^ses"
  27079. },
  27080. "parentID": {
  27081. "type": "string",
  27082. "pattern": "^ses"
  27083. },
  27084. "projectID": {
  27085. "type": "string"
  27086. },
  27087. "agent": {
  27088. "type": "string"
  27089. },
  27090. "model": {
  27091. "$ref": "#/components/schemas/ModelRef"
  27092. },
  27093. "cost": {
  27094. "type": "number"
  27095. },
  27096. "tokens": {
  27097. "type": "object",
  27098. "properties": {
  27099. "input": {
  27100. "type": "number"
  27101. },
  27102. "output": {
  27103. "type": "number"
  27104. },
  27105. "reasoning": {
  27106. "type": "number"
  27107. },
  27108. "cache": {
  27109. "type": "object",
  27110. "properties": {
  27111. "read": {
  27112. "type": "number"
  27113. },
  27114. "write": {
  27115. "type": "number"
  27116. }
  27117. },
  27118. "required": ["read", "write"],
  27119. "additionalProperties": false
  27120. }
  27121. },
  27122. "required": ["input", "output", "reasoning", "cache"],
  27123. "additionalProperties": false
  27124. },
  27125. "time": {
  27126. "type": "object",
  27127. "properties": {
  27128. "created": {
  27129. "type": "number"
  27130. },
  27131. "updated": {
  27132. "type": "number"
  27133. },
  27134. "archived": {
  27135. "type": "number"
  27136. }
  27137. },
  27138. "required": ["created", "updated"],
  27139. "additionalProperties": false
  27140. },
  27141. "title": {
  27142. "type": "string"
  27143. },
  27144. "location": {
  27145. "$ref": "#/components/schemas/LocationRef"
  27146. },
  27147. "subpath": {
  27148. "type": "string"
  27149. },
  27150. "revert": {
  27151. "$ref": "#/components/schemas/RevertState"
  27152. }
  27153. },
  27154. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  27155. "additionalProperties": false
  27156. },
  27157. "PromptInputFileAttachment": {
  27158. "type": "object",
  27159. "properties": {
  27160. "uri": {
  27161. "type": "string"
  27162. },
  27163. "name": {
  27164. "type": "string"
  27165. },
  27166. "description": {
  27167. "type": "string"
  27168. },
  27169. "source": {
  27170. "$ref": "#/components/schemas/PromptSource"
  27171. }
  27172. },
  27173. "required": ["uri"],
  27174. "additionalProperties": false
  27175. },
  27176. "SessionInputAdmitted": {
  27177. "type": "object",
  27178. "properties": {
  27179. "admittedSeq": {
  27180. "type": "integer",
  27181. "minimum": 0
  27182. },
  27183. "id": {
  27184. "type": "string",
  27185. "pattern": "^msg_"
  27186. },
  27187. "sessionID": {
  27188. "type": "string",
  27189. "pattern": "^ses"
  27190. },
  27191. "prompt": {
  27192. "$ref": "#/components/schemas/Prompt"
  27193. },
  27194. "delivery": {
  27195. "type": "string",
  27196. "enum": ["steer", "queue"]
  27197. },
  27198. "timeCreated": {
  27199. "type": "number"
  27200. },
  27201. "promotedSeq": {
  27202. "type": "integer",
  27203. "minimum": 0
  27204. }
  27205. },
  27206. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27207. "additionalProperties": false
  27208. },
  27209. "SessionMessageAgentSwitched": {
  27210. "type": "object",
  27211. "properties": {
  27212. "id": {
  27213. "type": "string",
  27214. "pattern": "^msg_"
  27215. },
  27216. "metadata": {
  27217. "type": "object"
  27218. },
  27219. "time": {
  27220. "type": "object",
  27221. "properties": {
  27222. "created": {
  27223. "type": "number"
  27224. }
  27225. },
  27226. "required": ["created"],
  27227. "additionalProperties": false
  27228. },
  27229. "type": {
  27230. "type": "string",
  27231. "enum": ["agent-switched"]
  27232. },
  27233. "agent": {
  27234. "type": "string"
  27235. }
  27236. },
  27237. "required": ["id", "time", "type", "agent"],
  27238. "additionalProperties": false
  27239. },
  27240. "SessionMessageModelSwitched": {
  27241. "type": "object",
  27242. "properties": {
  27243. "id": {
  27244. "type": "string",
  27245. "pattern": "^msg_"
  27246. },
  27247. "metadata": {
  27248. "type": "object"
  27249. },
  27250. "time": {
  27251. "type": "object",
  27252. "properties": {
  27253. "created": {
  27254. "type": "number"
  27255. }
  27256. },
  27257. "required": ["created"],
  27258. "additionalProperties": false
  27259. },
  27260. "type": {
  27261. "type": "string",
  27262. "enum": ["model-switched"]
  27263. },
  27264. "model": {
  27265. "$ref": "#/components/schemas/ModelRef"
  27266. }
  27267. },
  27268. "required": ["id", "time", "type", "model"],
  27269. "additionalProperties": false
  27270. },
  27271. "SessionMessageUser": {
  27272. "type": "object",
  27273. "properties": {
  27274. "id": {
  27275. "type": "string",
  27276. "pattern": "^msg_"
  27277. },
  27278. "metadata": {
  27279. "type": "object"
  27280. },
  27281. "time": {
  27282. "type": "object",
  27283. "properties": {
  27284. "created": {
  27285. "type": "number"
  27286. }
  27287. },
  27288. "required": ["created"],
  27289. "additionalProperties": false
  27290. },
  27291. "text": {
  27292. "type": "string"
  27293. },
  27294. "files": {
  27295. "type": "array",
  27296. "items": {
  27297. "$ref": "#/components/schemas/PromptFileAttachment"
  27298. }
  27299. },
  27300. "agents": {
  27301. "type": "array",
  27302. "items": {
  27303. "$ref": "#/components/schemas/PromptAgentAttachment"
  27304. }
  27305. },
  27306. "type": {
  27307. "type": "string",
  27308. "enum": ["user"]
  27309. }
  27310. },
  27311. "required": ["id", "time", "text", "type"],
  27312. "additionalProperties": false
  27313. },
  27314. "SessionMessageSynthetic": {
  27315. "type": "object",
  27316. "properties": {
  27317. "id": {
  27318. "type": "string",
  27319. "pattern": "^msg_"
  27320. },
  27321. "metadata": {
  27322. "type": "object"
  27323. },
  27324. "time": {
  27325. "type": "object",
  27326. "properties": {
  27327. "created": {
  27328. "type": "number"
  27329. }
  27330. },
  27331. "required": ["created"],
  27332. "additionalProperties": false
  27333. },
  27334. "sessionID": {
  27335. "type": "string",
  27336. "pattern": "^ses"
  27337. },
  27338. "text": {
  27339. "type": "string"
  27340. },
  27341. "type": {
  27342. "type": "string",
  27343. "enum": ["session.synthetic"]
  27344. }
  27345. },
  27346. "required": ["id", "time", "sessionID", "text", "type"],
  27347. "additionalProperties": false
  27348. },
  27349. "SessionMessageSystem": {
  27350. "type": "object",
  27351. "properties": {
  27352. "id": {
  27353. "type": "string",
  27354. "pattern": "^msg_"
  27355. },
  27356. "metadata": {
  27357. "type": "object"
  27358. },
  27359. "time": {
  27360. "type": "object",
  27361. "properties": {
  27362. "created": {
  27363. "type": "number"
  27364. }
  27365. },
  27366. "required": ["created"],
  27367. "additionalProperties": false
  27368. },
  27369. "type": {
  27370. "type": "string",
  27371. "enum": ["system"]
  27372. },
  27373. "text": {
  27374. "type": "string"
  27375. }
  27376. },
  27377. "required": ["id", "time", "type", "text"],
  27378. "additionalProperties": false
  27379. },
  27380. "SessionMessageShell": {
  27381. "type": "object",
  27382. "properties": {
  27383. "id": {
  27384. "type": "string",
  27385. "pattern": "^msg_"
  27386. },
  27387. "metadata": {
  27388. "type": "object"
  27389. },
  27390. "time": {
  27391. "type": "object",
  27392. "properties": {
  27393. "created": {
  27394. "type": "number"
  27395. },
  27396. "completed": {
  27397. "type": "number"
  27398. }
  27399. },
  27400. "required": ["created"],
  27401. "additionalProperties": false
  27402. },
  27403. "type": {
  27404. "type": "string",
  27405. "enum": ["shell"]
  27406. },
  27407. "callID": {
  27408. "type": "string"
  27409. },
  27410. "command": {
  27411. "type": "string"
  27412. },
  27413. "output": {
  27414. "type": "string"
  27415. }
  27416. },
  27417. "required": ["id", "time", "type", "callID", "command", "output"],
  27418. "additionalProperties": false
  27419. },
  27420. "SessionMessageAssistantText": {
  27421. "type": "object",
  27422. "properties": {
  27423. "type": {
  27424. "type": "string",
  27425. "enum": ["text"]
  27426. },
  27427. "id": {
  27428. "type": "string"
  27429. },
  27430. "text": {
  27431. "type": "string"
  27432. }
  27433. },
  27434. "required": ["type", "id", "text"],
  27435. "additionalProperties": false
  27436. },
  27437. "SessionMessageAssistantReasoning": {
  27438. "type": "object",
  27439. "properties": {
  27440. "type": {
  27441. "type": "string",
  27442. "enum": ["reasoning"]
  27443. },
  27444. "id": {
  27445. "type": "string"
  27446. },
  27447. "text": {
  27448. "type": "string"
  27449. },
  27450. "providerMetadata": {
  27451. "$ref": "#/components/schemas/LLMProviderMetadata"
  27452. },
  27453. "time": {
  27454. "type": "object",
  27455. "properties": {
  27456. "created": {
  27457. "type": "number"
  27458. },
  27459. "completed": {
  27460. "type": "number"
  27461. }
  27462. },
  27463. "required": ["created"],
  27464. "additionalProperties": false
  27465. }
  27466. },
  27467. "required": ["type", "id", "text"],
  27468. "additionalProperties": false
  27469. },
  27470. "SessionMessageToolStatePending": {
  27471. "type": "object",
  27472. "properties": {
  27473. "status": {
  27474. "type": "string",
  27475. "enum": ["pending"]
  27476. },
  27477. "input": {
  27478. "type": "string"
  27479. }
  27480. },
  27481. "required": ["status", "input"],
  27482. "additionalProperties": false
  27483. },
  27484. "SessionMessageToolStateRunning": {
  27485. "type": "object",
  27486. "properties": {
  27487. "status": {
  27488. "type": "string",
  27489. "enum": ["running"]
  27490. },
  27491. "input": {
  27492. "type": "object"
  27493. },
  27494. "structured": {
  27495. "type": "object"
  27496. },
  27497. "content": {
  27498. "type": "array",
  27499. "items": {
  27500. "$ref": "#/components/schemas/LLMToolContent"
  27501. }
  27502. }
  27503. },
  27504. "required": ["status", "input", "structured", "content"],
  27505. "additionalProperties": false
  27506. },
  27507. "SessionMessageToolStateCompleted": {
  27508. "type": "object",
  27509. "properties": {
  27510. "status": {
  27511. "type": "string",
  27512. "enum": ["completed"]
  27513. },
  27514. "input": {
  27515. "type": "object"
  27516. },
  27517. "attachments": {
  27518. "type": "array",
  27519. "items": {
  27520. "$ref": "#/components/schemas/PromptFileAttachment"
  27521. }
  27522. },
  27523. "content": {
  27524. "type": "array",
  27525. "items": {
  27526. "$ref": "#/components/schemas/LLMToolContent"
  27527. }
  27528. },
  27529. "outputPaths": {
  27530. "type": "array",
  27531. "items": {
  27532. "type": "string"
  27533. }
  27534. },
  27535. "structured": {
  27536. "type": "object"
  27537. },
  27538. "result": {}
  27539. },
  27540. "required": ["status", "input", "content", "structured"],
  27541. "additionalProperties": false
  27542. },
  27543. "SessionMessageToolStateError": {
  27544. "type": "object",
  27545. "properties": {
  27546. "status": {
  27547. "type": "string",
  27548. "enum": ["error"]
  27549. },
  27550. "input": {
  27551. "type": "object"
  27552. },
  27553. "content": {
  27554. "type": "array",
  27555. "items": {
  27556. "$ref": "#/components/schemas/LLMToolContent"
  27557. }
  27558. },
  27559. "structured": {
  27560. "type": "object"
  27561. },
  27562. "error": {
  27563. "$ref": "#/components/schemas/SessionErrorUnknown"
  27564. },
  27565. "result": {}
  27566. },
  27567. "required": ["status", "input", "content", "structured", "error"],
  27568. "additionalProperties": false
  27569. },
  27570. "SessionMessageAssistantTool": {
  27571. "type": "object",
  27572. "properties": {
  27573. "type": {
  27574. "type": "string",
  27575. "enum": ["tool"]
  27576. },
  27577. "id": {
  27578. "type": "string"
  27579. },
  27580. "name": {
  27581. "type": "string"
  27582. },
  27583. "provider": {
  27584. "type": "object",
  27585. "properties": {
  27586. "executed": {
  27587. "type": "boolean"
  27588. },
  27589. "metadata": {
  27590. "$ref": "#/components/schemas/LLMProviderMetadata"
  27591. },
  27592. "resultMetadata": {
  27593. "$ref": "#/components/schemas/LLMProviderMetadata"
  27594. }
  27595. },
  27596. "required": ["executed"],
  27597. "additionalProperties": false
  27598. },
  27599. "state": {
  27600. "anyOf": [
  27601. {
  27602. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27603. },
  27604. {
  27605. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27606. },
  27607. {
  27608. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27609. },
  27610. {
  27611. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27612. }
  27613. ]
  27614. },
  27615. "time": {
  27616. "type": "object",
  27617. "properties": {
  27618. "created": {
  27619. "type": "number"
  27620. },
  27621. "ran": {
  27622. "type": "number"
  27623. },
  27624. "completed": {
  27625. "type": "number"
  27626. },
  27627. "pruned": {
  27628. "type": "number"
  27629. }
  27630. },
  27631. "required": ["created"],
  27632. "additionalProperties": false
  27633. }
  27634. },
  27635. "required": ["type", "id", "name", "state", "time"],
  27636. "additionalProperties": false
  27637. },
  27638. "SessionMessageAssistant": {
  27639. "type": "object",
  27640. "properties": {
  27641. "id": {
  27642. "type": "string",
  27643. "pattern": "^msg_"
  27644. },
  27645. "metadata": {
  27646. "type": "object"
  27647. },
  27648. "time": {
  27649. "type": "object",
  27650. "properties": {
  27651. "created": {
  27652. "type": "number"
  27653. },
  27654. "completed": {
  27655. "type": "number"
  27656. }
  27657. },
  27658. "required": ["created"],
  27659. "additionalProperties": false
  27660. },
  27661. "type": {
  27662. "type": "string",
  27663. "enum": ["assistant"]
  27664. },
  27665. "agent": {
  27666. "type": "string"
  27667. },
  27668. "model": {
  27669. "$ref": "#/components/schemas/ModelRef"
  27670. },
  27671. "content": {
  27672. "type": "array",
  27673. "items": {
  27674. "anyOf": [
  27675. {
  27676. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27677. },
  27678. {
  27679. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27680. },
  27681. {
  27682. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27683. }
  27684. ]
  27685. }
  27686. },
  27687. "snapshot": {
  27688. "type": "object",
  27689. "properties": {
  27690. "start": {
  27691. "type": "string"
  27692. },
  27693. "end": {
  27694. "type": "string"
  27695. },
  27696. "files": {
  27697. "type": "array",
  27698. "items": {
  27699. "type": "string"
  27700. }
  27701. }
  27702. },
  27703. "additionalProperties": false
  27704. },
  27705. "finish": {
  27706. "type": "string"
  27707. },
  27708. "cost": {
  27709. "type": "number"
  27710. },
  27711. "tokens": {
  27712. "type": "object",
  27713. "properties": {
  27714. "input": {
  27715. "type": "number"
  27716. },
  27717. "output": {
  27718. "type": "number"
  27719. },
  27720. "reasoning": {
  27721. "type": "number"
  27722. },
  27723. "cache": {
  27724. "type": "object",
  27725. "properties": {
  27726. "read": {
  27727. "type": "number"
  27728. },
  27729. "write": {
  27730. "type": "number"
  27731. }
  27732. },
  27733. "required": ["read", "write"],
  27734. "additionalProperties": false
  27735. }
  27736. },
  27737. "required": ["input", "output", "reasoning", "cache"],
  27738. "additionalProperties": false
  27739. },
  27740. "error": {
  27741. "$ref": "#/components/schemas/SessionErrorUnknown"
  27742. }
  27743. },
  27744. "required": ["id", "time", "type", "agent", "model", "content"],
  27745. "additionalProperties": false
  27746. },
  27747. "SessionMessageCompaction": {
  27748. "type": "object",
  27749. "properties": {
  27750. "type": {
  27751. "type": "string",
  27752. "enum": ["compaction"]
  27753. },
  27754. "reason": {
  27755. "type": "string",
  27756. "enum": ["auto", "manual"]
  27757. },
  27758. "summary": {
  27759. "type": "string"
  27760. },
  27761. "recent": {
  27762. "type": "string"
  27763. },
  27764. "id": {
  27765. "type": "string",
  27766. "pattern": "^msg_"
  27767. },
  27768. "metadata": {
  27769. "type": "object"
  27770. },
  27771. "time": {
  27772. "type": "object",
  27773. "properties": {
  27774. "created": {
  27775. "type": "number"
  27776. }
  27777. },
  27778. "required": ["created"],
  27779. "additionalProperties": false
  27780. }
  27781. },
  27782. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27783. "additionalProperties": false
  27784. },
  27785. "SessionMessage": {
  27786. "anyOf": [
  27787. {
  27788. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27789. },
  27790. {
  27791. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27792. },
  27793. {
  27794. "$ref": "#/components/schemas/SessionMessageUser"
  27795. },
  27796. {
  27797. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27798. },
  27799. {
  27800. "$ref": "#/components/schemas/SessionMessageSystem"
  27801. },
  27802. {
  27803. "$ref": "#/components/schemas/SessionMessageShell"
  27804. },
  27805. {
  27806. "$ref": "#/components/schemas/SessionMessageAssistant"
  27807. },
  27808. {
  27809. "$ref": "#/components/schemas/SessionMessageCompaction"
  27810. }
  27811. ]
  27812. },
  27813. "SessionNextAgentSwitched": {
  27814. "type": "object",
  27815. "properties": {
  27816. "id": {
  27817. "type": "string",
  27818. "pattern": "^evt_"
  27819. },
  27820. "metadata": {
  27821. "type": "object"
  27822. },
  27823. "type": {
  27824. "type": "string",
  27825. "enum": ["session.next.agent.switched"]
  27826. },
  27827. "durable": {
  27828. "type": "object",
  27829. "properties": {
  27830. "aggregateID": {
  27831. "type": "string"
  27832. },
  27833. "seq": {
  27834. "type": "integer"
  27835. },
  27836. "version": {
  27837. "type": "integer"
  27838. }
  27839. },
  27840. "required": ["aggregateID", "seq", "version"],
  27841. "additionalProperties": false
  27842. },
  27843. "location": {
  27844. "$ref": "#/components/schemas/LocationRef"
  27845. },
  27846. "data": {
  27847. "type": "object",
  27848. "properties": {
  27849. "timestamp": {
  27850. "type": "number"
  27851. },
  27852. "sessionID": {
  27853. "type": "string",
  27854. "pattern": "^ses"
  27855. },
  27856. "messageID": {
  27857. "type": "string",
  27858. "pattern": "^msg_"
  27859. },
  27860. "agent": {
  27861. "type": "string"
  27862. }
  27863. },
  27864. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27865. "additionalProperties": false
  27866. }
  27867. },
  27868. "required": ["id", "type", "data"],
  27869. "additionalProperties": false
  27870. },
  27871. "SessionNextModelSwitched": {
  27872. "type": "object",
  27873. "properties": {
  27874. "id": {
  27875. "type": "string",
  27876. "pattern": "^evt_"
  27877. },
  27878. "metadata": {
  27879. "type": "object"
  27880. },
  27881. "type": {
  27882. "type": "string",
  27883. "enum": ["session.next.model.switched"]
  27884. },
  27885. "durable": {
  27886. "type": "object",
  27887. "properties": {
  27888. "aggregateID": {
  27889. "type": "string"
  27890. },
  27891. "seq": {
  27892. "type": "integer"
  27893. },
  27894. "version": {
  27895. "type": "integer"
  27896. }
  27897. },
  27898. "required": ["aggregateID", "seq", "version"],
  27899. "additionalProperties": false
  27900. },
  27901. "location": {
  27902. "$ref": "#/components/schemas/LocationRef"
  27903. },
  27904. "data": {
  27905. "type": "object",
  27906. "properties": {
  27907. "timestamp": {
  27908. "type": "number"
  27909. },
  27910. "sessionID": {
  27911. "type": "string",
  27912. "pattern": "^ses"
  27913. },
  27914. "messageID": {
  27915. "type": "string",
  27916. "pattern": "^msg_"
  27917. },
  27918. "model": {
  27919. "$ref": "#/components/schemas/ModelRef"
  27920. }
  27921. },
  27922. "required": ["timestamp", "sessionID", "messageID", "model"],
  27923. "additionalProperties": false
  27924. }
  27925. },
  27926. "required": ["id", "type", "data"],
  27927. "additionalProperties": false
  27928. },
  27929. "SessionNextMoved": {
  27930. "type": "object",
  27931. "properties": {
  27932. "id": {
  27933. "type": "string",
  27934. "pattern": "^evt_"
  27935. },
  27936. "metadata": {
  27937. "type": "object"
  27938. },
  27939. "type": {
  27940. "type": "string",
  27941. "enum": ["session.next.moved"]
  27942. },
  27943. "durable": {
  27944. "type": "object",
  27945. "properties": {
  27946. "aggregateID": {
  27947. "type": "string"
  27948. },
  27949. "seq": {
  27950. "type": "integer"
  27951. },
  27952. "version": {
  27953. "type": "integer"
  27954. }
  27955. },
  27956. "required": ["aggregateID", "seq", "version"],
  27957. "additionalProperties": false
  27958. },
  27959. "location": {
  27960. "$ref": "#/components/schemas/LocationRef"
  27961. },
  27962. "data": {
  27963. "type": "object",
  27964. "properties": {
  27965. "timestamp": {
  27966. "type": "number"
  27967. },
  27968. "sessionID": {
  27969. "type": "string",
  27970. "pattern": "^ses"
  27971. },
  27972. "location": {
  27973. "$ref": "#/components/schemas/LocationRef"
  27974. },
  27975. "subdirectory": {
  27976. "type": "string"
  27977. }
  27978. },
  27979. "required": ["timestamp", "sessionID", "location"],
  27980. "additionalProperties": false
  27981. }
  27982. },
  27983. "required": ["id", "type", "data"],
  27984. "additionalProperties": false
  27985. },
  27986. "SessionNextPrompted": {
  27987. "type": "object",
  27988. "properties": {
  27989. "id": {
  27990. "type": "string",
  27991. "pattern": "^evt_"
  27992. },
  27993. "metadata": {
  27994. "type": "object"
  27995. },
  27996. "type": {
  27997. "type": "string",
  27998. "enum": ["session.next.prompted"]
  27999. },
  28000. "durable": {
  28001. "type": "object",
  28002. "properties": {
  28003. "aggregateID": {
  28004. "type": "string"
  28005. },
  28006. "seq": {
  28007. "type": "integer"
  28008. },
  28009. "version": {
  28010. "type": "integer"
  28011. }
  28012. },
  28013. "required": ["aggregateID", "seq", "version"],
  28014. "additionalProperties": false
  28015. },
  28016. "location": {
  28017. "$ref": "#/components/schemas/LocationRef"
  28018. },
  28019. "data": {
  28020. "type": "object",
  28021. "properties": {
  28022. "timestamp": {
  28023. "type": "number"
  28024. },
  28025. "sessionID": {
  28026. "type": "string",
  28027. "pattern": "^ses"
  28028. },
  28029. "messageID": {
  28030. "type": "string",
  28031. "pattern": "^msg_"
  28032. },
  28033. "prompt": {
  28034. "$ref": "#/components/schemas/Prompt"
  28035. },
  28036. "delivery": {
  28037. "type": "string",
  28038. "enum": ["steer", "queue"]
  28039. }
  28040. },
  28041. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28042. "additionalProperties": false
  28043. }
  28044. },
  28045. "required": ["id", "type", "data"],
  28046. "additionalProperties": false
  28047. },
  28048. "SessionNextPromptAdmitted": {
  28049. "type": "object",
  28050. "properties": {
  28051. "id": {
  28052. "type": "string",
  28053. "pattern": "^evt_"
  28054. },
  28055. "metadata": {
  28056. "type": "object"
  28057. },
  28058. "type": {
  28059. "type": "string",
  28060. "enum": ["session.next.prompt.admitted"]
  28061. },
  28062. "durable": {
  28063. "type": "object",
  28064. "properties": {
  28065. "aggregateID": {
  28066. "type": "string"
  28067. },
  28068. "seq": {
  28069. "type": "integer"
  28070. },
  28071. "version": {
  28072. "type": "integer"
  28073. }
  28074. },
  28075. "required": ["aggregateID", "seq", "version"],
  28076. "additionalProperties": false
  28077. },
  28078. "location": {
  28079. "$ref": "#/components/schemas/LocationRef"
  28080. },
  28081. "data": {
  28082. "type": "object",
  28083. "properties": {
  28084. "timestamp": {
  28085. "type": "number"
  28086. },
  28087. "sessionID": {
  28088. "type": "string",
  28089. "pattern": "^ses"
  28090. },
  28091. "messageID": {
  28092. "type": "string",
  28093. "pattern": "^msg_"
  28094. },
  28095. "prompt": {
  28096. "$ref": "#/components/schemas/Prompt"
  28097. },
  28098. "delivery": {
  28099. "type": "string",
  28100. "enum": ["steer", "queue"]
  28101. }
  28102. },
  28103. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28104. "additionalProperties": false
  28105. }
  28106. },
  28107. "required": ["id", "type", "data"],
  28108. "additionalProperties": false
  28109. },
  28110. "SessionNextContextUpdated": {
  28111. "type": "object",
  28112. "properties": {
  28113. "id": {
  28114. "type": "string",
  28115. "pattern": "^evt_"
  28116. },
  28117. "metadata": {
  28118. "type": "object"
  28119. },
  28120. "type": {
  28121. "type": "string",
  28122. "enum": ["session.next.context.updated"]
  28123. },
  28124. "durable": {
  28125. "type": "object",
  28126. "properties": {
  28127. "aggregateID": {
  28128. "type": "string"
  28129. },
  28130. "seq": {
  28131. "type": "integer"
  28132. },
  28133. "version": {
  28134. "type": "integer"
  28135. }
  28136. },
  28137. "required": ["aggregateID", "seq", "version"],
  28138. "additionalProperties": false
  28139. },
  28140. "location": {
  28141. "$ref": "#/components/schemas/LocationRef"
  28142. },
  28143. "data": {
  28144. "type": "object",
  28145. "properties": {
  28146. "timestamp": {
  28147. "type": "number"
  28148. },
  28149. "sessionID": {
  28150. "type": "string",
  28151. "pattern": "^ses"
  28152. },
  28153. "messageID": {
  28154. "type": "string",
  28155. "pattern": "^msg_"
  28156. },
  28157. "text": {
  28158. "type": "string"
  28159. }
  28160. },
  28161. "required": ["timestamp", "sessionID", "messageID", "text"],
  28162. "additionalProperties": false
  28163. }
  28164. },
  28165. "required": ["id", "type", "data"],
  28166. "additionalProperties": false
  28167. },
  28168. "SessionNextSynthetic": {
  28169. "type": "object",
  28170. "properties": {
  28171. "id": {
  28172. "type": "string",
  28173. "pattern": "^evt_"
  28174. },
  28175. "metadata": {
  28176. "type": "object"
  28177. },
  28178. "type": {
  28179. "type": "string",
  28180. "enum": ["session.next.synthetic"]
  28181. },
  28182. "durable": {
  28183. "type": "object",
  28184. "properties": {
  28185. "aggregateID": {
  28186. "type": "string"
  28187. },
  28188. "seq": {
  28189. "type": "integer"
  28190. },
  28191. "version": {
  28192. "type": "integer"
  28193. }
  28194. },
  28195. "required": ["aggregateID", "seq", "version"],
  28196. "additionalProperties": false
  28197. },
  28198. "location": {
  28199. "$ref": "#/components/schemas/LocationRef"
  28200. },
  28201. "data": {
  28202. "type": "object",
  28203. "properties": {
  28204. "timestamp": {
  28205. "type": "number"
  28206. },
  28207. "sessionID": {
  28208. "type": "string",
  28209. "pattern": "^ses"
  28210. },
  28211. "messageID": {
  28212. "type": "string",
  28213. "pattern": "^msg_"
  28214. },
  28215. "text": {
  28216. "type": "string"
  28217. }
  28218. },
  28219. "required": ["timestamp", "sessionID", "messageID", "text"],
  28220. "additionalProperties": false
  28221. }
  28222. },
  28223. "required": ["id", "type", "data"],
  28224. "additionalProperties": false
  28225. },
  28226. "SessionNextShellStarted": {
  28227. "type": "object",
  28228. "properties": {
  28229. "id": {
  28230. "type": "string",
  28231. "pattern": "^evt_"
  28232. },
  28233. "metadata": {
  28234. "type": "object"
  28235. },
  28236. "type": {
  28237. "type": "string",
  28238. "enum": ["session.next.shell.started"]
  28239. },
  28240. "durable": {
  28241. "type": "object",
  28242. "properties": {
  28243. "aggregateID": {
  28244. "type": "string"
  28245. },
  28246. "seq": {
  28247. "type": "integer"
  28248. },
  28249. "version": {
  28250. "type": "integer"
  28251. }
  28252. },
  28253. "required": ["aggregateID", "seq", "version"],
  28254. "additionalProperties": false
  28255. },
  28256. "location": {
  28257. "$ref": "#/components/schemas/LocationRef"
  28258. },
  28259. "data": {
  28260. "type": "object",
  28261. "properties": {
  28262. "timestamp": {
  28263. "type": "number"
  28264. },
  28265. "sessionID": {
  28266. "type": "string",
  28267. "pattern": "^ses"
  28268. },
  28269. "messageID": {
  28270. "type": "string",
  28271. "pattern": "^msg_"
  28272. },
  28273. "callID": {
  28274. "type": "string"
  28275. },
  28276. "command": {
  28277. "type": "string"
  28278. }
  28279. },
  28280. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28281. "additionalProperties": false
  28282. }
  28283. },
  28284. "required": ["id", "type", "data"],
  28285. "additionalProperties": false
  28286. },
  28287. "SessionNextShellEnded": {
  28288. "type": "object",
  28289. "properties": {
  28290. "id": {
  28291. "type": "string",
  28292. "pattern": "^evt_"
  28293. },
  28294. "metadata": {
  28295. "type": "object"
  28296. },
  28297. "type": {
  28298. "type": "string",
  28299. "enum": ["session.next.shell.ended"]
  28300. },
  28301. "durable": {
  28302. "type": "object",
  28303. "properties": {
  28304. "aggregateID": {
  28305. "type": "string"
  28306. },
  28307. "seq": {
  28308. "type": "integer"
  28309. },
  28310. "version": {
  28311. "type": "integer"
  28312. }
  28313. },
  28314. "required": ["aggregateID", "seq", "version"],
  28315. "additionalProperties": false
  28316. },
  28317. "location": {
  28318. "$ref": "#/components/schemas/LocationRef"
  28319. },
  28320. "data": {
  28321. "type": "object",
  28322. "properties": {
  28323. "timestamp": {
  28324. "type": "number"
  28325. },
  28326. "sessionID": {
  28327. "type": "string",
  28328. "pattern": "^ses"
  28329. },
  28330. "callID": {
  28331. "type": "string"
  28332. },
  28333. "output": {
  28334. "type": "string"
  28335. }
  28336. },
  28337. "required": ["timestamp", "sessionID", "callID", "output"],
  28338. "additionalProperties": false
  28339. }
  28340. },
  28341. "required": ["id", "type", "data"],
  28342. "additionalProperties": false
  28343. },
  28344. "SessionNextStepStarted": {
  28345. "type": "object",
  28346. "properties": {
  28347. "id": {
  28348. "type": "string",
  28349. "pattern": "^evt_"
  28350. },
  28351. "metadata": {
  28352. "type": "object"
  28353. },
  28354. "type": {
  28355. "type": "string",
  28356. "enum": ["session.next.step.started"]
  28357. },
  28358. "durable": {
  28359. "type": "object",
  28360. "properties": {
  28361. "aggregateID": {
  28362. "type": "string"
  28363. },
  28364. "seq": {
  28365. "type": "integer"
  28366. },
  28367. "version": {
  28368. "type": "integer"
  28369. }
  28370. },
  28371. "required": ["aggregateID", "seq", "version"],
  28372. "additionalProperties": false
  28373. },
  28374. "location": {
  28375. "$ref": "#/components/schemas/LocationRef"
  28376. },
  28377. "data": {
  28378. "type": "object",
  28379. "properties": {
  28380. "timestamp": {
  28381. "type": "number"
  28382. },
  28383. "sessionID": {
  28384. "type": "string",
  28385. "pattern": "^ses"
  28386. },
  28387. "assistantMessageID": {
  28388. "type": "string",
  28389. "pattern": "^msg_"
  28390. },
  28391. "agent": {
  28392. "type": "string"
  28393. },
  28394. "model": {
  28395. "$ref": "#/components/schemas/ModelRef"
  28396. },
  28397. "snapshot": {
  28398. "type": "string"
  28399. }
  28400. },
  28401. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28402. "additionalProperties": false
  28403. }
  28404. },
  28405. "required": ["id", "type", "data"],
  28406. "additionalProperties": false
  28407. },
  28408. "SessionNextStepEnded": {
  28409. "type": "object",
  28410. "properties": {
  28411. "id": {
  28412. "type": "string",
  28413. "pattern": "^evt_"
  28414. },
  28415. "metadata": {
  28416. "type": "object"
  28417. },
  28418. "type": {
  28419. "type": "string",
  28420. "enum": ["session.next.step.ended"]
  28421. },
  28422. "durable": {
  28423. "type": "object",
  28424. "properties": {
  28425. "aggregateID": {
  28426. "type": "string"
  28427. },
  28428. "seq": {
  28429. "type": "integer"
  28430. },
  28431. "version": {
  28432. "type": "integer"
  28433. }
  28434. },
  28435. "required": ["aggregateID", "seq", "version"],
  28436. "additionalProperties": false
  28437. },
  28438. "location": {
  28439. "$ref": "#/components/schemas/LocationRef"
  28440. },
  28441. "data": {
  28442. "type": "object",
  28443. "properties": {
  28444. "timestamp": {
  28445. "type": "number"
  28446. },
  28447. "sessionID": {
  28448. "type": "string",
  28449. "pattern": "^ses"
  28450. },
  28451. "assistantMessageID": {
  28452. "type": "string",
  28453. "pattern": "^msg_"
  28454. },
  28455. "finish": {
  28456. "type": "string"
  28457. },
  28458. "cost": {
  28459. "type": "number"
  28460. },
  28461. "tokens": {
  28462. "type": "object",
  28463. "properties": {
  28464. "input": {
  28465. "type": "number"
  28466. },
  28467. "output": {
  28468. "type": "number"
  28469. },
  28470. "reasoning": {
  28471. "type": "number"
  28472. },
  28473. "cache": {
  28474. "type": "object",
  28475. "properties": {
  28476. "read": {
  28477. "type": "number"
  28478. },
  28479. "write": {
  28480. "type": "number"
  28481. }
  28482. },
  28483. "required": ["read", "write"],
  28484. "additionalProperties": false
  28485. }
  28486. },
  28487. "required": ["input", "output", "reasoning", "cache"],
  28488. "additionalProperties": false
  28489. },
  28490. "snapshot": {
  28491. "type": "string"
  28492. },
  28493. "files": {
  28494. "type": "array",
  28495. "items": {
  28496. "type": "string"
  28497. }
  28498. }
  28499. },
  28500. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28501. "additionalProperties": false
  28502. }
  28503. },
  28504. "required": ["id", "type", "data"],
  28505. "additionalProperties": false
  28506. },
  28507. "SessionNextStepFailed": {
  28508. "type": "object",
  28509. "properties": {
  28510. "id": {
  28511. "type": "string",
  28512. "pattern": "^evt_"
  28513. },
  28514. "metadata": {
  28515. "type": "object"
  28516. },
  28517. "type": {
  28518. "type": "string",
  28519. "enum": ["session.next.step.failed"]
  28520. },
  28521. "durable": {
  28522. "type": "object",
  28523. "properties": {
  28524. "aggregateID": {
  28525. "type": "string"
  28526. },
  28527. "seq": {
  28528. "type": "integer"
  28529. },
  28530. "version": {
  28531. "type": "integer"
  28532. }
  28533. },
  28534. "required": ["aggregateID", "seq", "version"],
  28535. "additionalProperties": false
  28536. },
  28537. "location": {
  28538. "$ref": "#/components/schemas/LocationRef"
  28539. },
  28540. "data": {
  28541. "type": "object",
  28542. "properties": {
  28543. "timestamp": {
  28544. "type": "number"
  28545. },
  28546. "sessionID": {
  28547. "type": "string",
  28548. "pattern": "^ses"
  28549. },
  28550. "assistantMessageID": {
  28551. "type": "string",
  28552. "pattern": "^msg_"
  28553. },
  28554. "error": {
  28555. "$ref": "#/components/schemas/SessionErrorUnknown"
  28556. }
  28557. },
  28558. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28559. "additionalProperties": false
  28560. }
  28561. },
  28562. "required": ["id", "type", "data"],
  28563. "additionalProperties": false
  28564. },
  28565. "SessionNextTextStarted": {
  28566. "type": "object",
  28567. "properties": {
  28568. "id": {
  28569. "type": "string",
  28570. "pattern": "^evt_"
  28571. },
  28572. "metadata": {
  28573. "type": "object"
  28574. },
  28575. "type": {
  28576. "type": "string",
  28577. "enum": ["session.next.text.started"]
  28578. },
  28579. "durable": {
  28580. "type": "object",
  28581. "properties": {
  28582. "aggregateID": {
  28583. "type": "string"
  28584. },
  28585. "seq": {
  28586. "type": "integer"
  28587. },
  28588. "version": {
  28589. "type": "integer"
  28590. }
  28591. },
  28592. "required": ["aggregateID", "seq", "version"],
  28593. "additionalProperties": false
  28594. },
  28595. "location": {
  28596. "$ref": "#/components/schemas/LocationRef"
  28597. },
  28598. "data": {
  28599. "type": "object",
  28600. "properties": {
  28601. "timestamp": {
  28602. "type": "number"
  28603. },
  28604. "sessionID": {
  28605. "type": "string",
  28606. "pattern": "^ses"
  28607. },
  28608. "assistantMessageID": {
  28609. "type": "string",
  28610. "pattern": "^msg_"
  28611. },
  28612. "textID": {
  28613. "type": "string"
  28614. }
  28615. },
  28616. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28617. "additionalProperties": false
  28618. }
  28619. },
  28620. "required": ["id", "type", "data"],
  28621. "additionalProperties": false
  28622. },
  28623. "SessionNextTextEnded": {
  28624. "type": "object",
  28625. "properties": {
  28626. "id": {
  28627. "type": "string",
  28628. "pattern": "^evt_"
  28629. },
  28630. "metadata": {
  28631. "type": "object"
  28632. },
  28633. "type": {
  28634. "type": "string",
  28635. "enum": ["session.next.text.ended"]
  28636. },
  28637. "durable": {
  28638. "type": "object",
  28639. "properties": {
  28640. "aggregateID": {
  28641. "type": "string"
  28642. },
  28643. "seq": {
  28644. "type": "integer"
  28645. },
  28646. "version": {
  28647. "type": "integer"
  28648. }
  28649. },
  28650. "required": ["aggregateID", "seq", "version"],
  28651. "additionalProperties": false
  28652. },
  28653. "location": {
  28654. "$ref": "#/components/schemas/LocationRef"
  28655. },
  28656. "data": {
  28657. "type": "object",
  28658. "properties": {
  28659. "timestamp": {
  28660. "type": "number"
  28661. },
  28662. "sessionID": {
  28663. "type": "string",
  28664. "pattern": "^ses"
  28665. },
  28666. "assistantMessageID": {
  28667. "type": "string",
  28668. "pattern": "^msg_"
  28669. },
  28670. "textID": {
  28671. "type": "string"
  28672. },
  28673. "text": {
  28674. "type": "string"
  28675. }
  28676. },
  28677. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28678. "additionalProperties": false
  28679. }
  28680. },
  28681. "required": ["id", "type", "data"],
  28682. "additionalProperties": false
  28683. },
  28684. "SessionNextToolInputStarted": {
  28685. "type": "object",
  28686. "properties": {
  28687. "id": {
  28688. "type": "string",
  28689. "pattern": "^evt_"
  28690. },
  28691. "metadata": {
  28692. "type": "object"
  28693. },
  28694. "type": {
  28695. "type": "string",
  28696. "enum": ["session.next.tool.input.started"]
  28697. },
  28698. "durable": {
  28699. "type": "object",
  28700. "properties": {
  28701. "aggregateID": {
  28702. "type": "string"
  28703. },
  28704. "seq": {
  28705. "type": "integer"
  28706. },
  28707. "version": {
  28708. "type": "integer"
  28709. }
  28710. },
  28711. "required": ["aggregateID", "seq", "version"],
  28712. "additionalProperties": false
  28713. },
  28714. "location": {
  28715. "$ref": "#/components/schemas/LocationRef"
  28716. },
  28717. "data": {
  28718. "type": "object",
  28719. "properties": {
  28720. "timestamp": {
  28721. "type": "number"
  28722. },
  28723. "sessionID": {
  28724. "type": "string",
  28725. "pattern": "^ses"
  28726. },
  28727. "assistantMessageID": {
  28728. "type": "string",
  28729. "pattern": "^msg_"
  28730. },
  28731. "callID": {
  28732. "type": "string"
  28733. },
  28734. "name": {
  28735. "type": "string"
  28736. }
  28737. },
  28738. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28739. "additionalProperties": false
  28740. }
  28741. },
  28742. "required": ["id", "type", "data"],
  28743. "additionalProperties": false
  28744. },
  28745. "SessionNextToolInputEnded": {
  28746. "type": "object",
  28747. "properties": {
  28748. "id": {
  28749. "type": "string",
  28750. "pattern": "^evt_"
  28751. },
  28752. "metadata": {
  28753. "type": "object"
  28754. },
  28755. "type": {
  28756. "type": "string",
  28757. "enum": ["session.next.tool.input.ended"]
  28758. },
  28759. "durable": {
  28760. "type": "object",
  28761. "properties": {
  28762. "aggregateID": {
  28763. "type": "string"
  28764. },
  28765. "seq": {
  28766. "type": "integer"
  28767. },
  28768. "version": {
  28769. "type": "integer"
  28770. }
  28771. },
  28772. "required": ["aggregateID", "seq", "version"],
  28773. "additionalProperties": false
  28774. },
  28775. "location": {
  28776. "$ref": "#/components/schemas/LocationRef"
  28777. },
  28778. "data": {
  28779. "type": "object",
  28780. "properties": {
  28781. "timestamp": {
  28782. "type": "number"
  28783. },
  28784. "sessionID": {
  28785. "type": "string",
  28786. "pattern": "^ses"
  28787. },
  28788. "assistantMessageID": {
  28789. "type": "string",
  28790. "pattern": "^msg_"
  28791. },
  28792. "callID": {
  28793. "type": "string"
  28794. },
  28795. "text": {
  28796. "type": "string"
  28797. }
  28798. },
  28799. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28800. "additionalProperties": false
  28801. }
  28802. },
  28803. "required": ["id", "type", "data"],
  28804. "additionalProperties": false
  28805. },
  28806. "SessionNextToolCalled": {
  28807. "type": "object",
  28808. "properties": {
  28809. "id": {
  28810. "type": "string",
  28811. "pattern": "^evt_"
  28812. },
  28813. "metadata": {
  28814. "type": "object"
  28815. },
  28816. "type": {
  28817. "type": "string",
  28818. "enum": ["session.next.tool.called"]
  28819. },
  28820. "durable": {
  28821. "type": "object",
  28822. "properties": {
  28823. "aggregateID": {
  28824. "type": "string"
  28825. },
  28826. "seq": {
  28827. "type": "integer"
  28828. },
  28829. "version": {
  28830. "type": "integer"
  28831. }
  28832. },
  28833. "required": ["aggregateID", "seq", "version"],
  28834. "additionalProperties": false
  28835. },
  28836. "location": {
  28837. "$ref": "#/components/schemas/LocationRef"
  28838. },
  28839. "data": {
  28840. "type": "object",
  28841. "properties": {
  28842. "timestamp": {
  28843. "type": "number"
  28844. },
  28845. "sessionID": {
  28846. "type": "string",
  28847. "pattern": "^ses"
  28848. },
  28849. "assistantMessageID": {
  28850. "type": "string",
  28851. "pattern": "^msg_"
  28852. },
  28853. "callID": {
  28854. "type": "string"
  28855. },
  28856. "tool": {
  28857. "type": "string"
  28858. },
  28859. "input": {
  28860. "type": "object"
  28861. },
  28862. "provider": {
  28863. "type": "object",
  28864. "properties": {
  28865. "executed": {
  28866. "type": "boolean"
  28867. },
  28868. "metadata": {
  28869. "$ref": "#/components/schemas/LLMProviderMetadata"
  28870. }
  28871. },
  28872. "required": ["executed"],
  28873. "additionalProperties": false
  28874. }
  28875. },
  28876. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  28877. "additionalProperties": false
  28878. }
  28879. },
  28880. "required": ["id", "type", "data"],
  28881. "additionalProperties": false
  28882. },
  28883. "SessionNextToolProgress": {
  28884. "type": "object",
  28885. "properties": {
  28886. "id": {
  28887. "type": "string",
  28888. "pattern": "^evt_"
  28889. },
  28890. "metadata": {
  28891. "type": "object"
  28892. },
  28893. "type": {
  28894. "type": "string",
  28895. "enum": ["session.next.tool.progress"]
  28896. },
  28897. "durable": {
  28898. "type": "object",
  28899. "properties": {
  28900. "aggregateID": {
  28901. "type": "string"
  28902. },
  28903. "seq": {
  28904. "type": "integer"
  28905. },
  28906. "version": {
  28907. "type": "integer"
  28908. }
  28909. },
  28910. "required": ["aggregateID", "seq", "version"],
  28911. "additionalProperties": false
  28912. },
  28913. "location": {
  28914. "$ref": "#/components/schemas/LocationRef"
  28915. },
  28916. "data": {
  28917. "type": "object",
  28918. "properties": {
  28919. "timestamp": {
  28920. "type": "number"
  28921. },
  28922. "sessionID": {
  28923. "type": "string",
  28924. "pattern": "^ses"
  28925. },
  28926. "assistantMessageID": {
  28927. "type": "string",
  28928. "pattern": "^msg_"
  28929. },
  28930. "callID": {
  28931. "type": "string"
  28932. },
  28933. "structured": {
  28934. "type": "object"
  28935. },
  28936. "content": {
  28937. "type": "array",
  28938. "items": {
  28939. "$ref": "#/components/schemas/LLMToolContent"
  28940. }
  28941. }
  28942. },
  28943. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  28944. "additionalProperties": false
  28945. }
  28946. },
  28947. "required": ["id", "type", "data"],
  28948. "additionalProperties": false
  28949. },
  28950. "SessionNextToolSuccess": {
  28951. "type": "object",
  28952. "properties": {
  28953. "id": {
  28954. "type": "string",
  28955. "pattern": "^evt_"
  28956. },
  28957. "metadata": {
  28958. "type": "object"
  28959. },
  28960. "type": {
  28961. "type": "string",
  28962. "enum": ["session.next.tool.success"]
  28963. },
  28964. "durable": {
  28965. "type": "object",
  28966. "properties": {
  28967. "aggregateID": {
  28968. "type": "string"
  28969. },
  28970. "seq": {
  28971. "type": "integer"
  28972. },
  28973. "version": {
  28974. "type": "integer"
  28975. }
  28976. },
  28977. "required": ["aggregateID", "seq", "version"],
  28978. "additionalProperties": false
  28979. },
  28980. "location": {
  28981. "$ref": "#/components/schemas/LocationRef"
  28982. },
  28983. "data": {
  28984. "type": "object",
  28985. "properties": {
  28986. "timestamp": {
  28987. "type": "number"
  28988. },
  28989. "sessionID": {
  28990. "type": "string",
  28991. "pattern": "^ses"
  28992. },
  28993. "assistantMessageID": {
  28994. "type": "string",
  28995. "pattern": "^msg_"
  28996. },
  28997. "callID": {
  28998. "type": "string"
  28999. },
  29000. "structured": {
  29001. "type": "object"
  29002. },
  29003. "content": {
  29004. "type": "array",
  29005. "items": {
  29006. "$ref": "#/components/schemas/LLMToolContent"
  29007. }
  29008. },
  29009. "outputPaths": {
  29010. "type": "array",
  29011. "items": {
  29012. "type": "string"
  29013. }
  29014. },
  29015. "result": {},
  29016. "provider": {
  29017. "type": "object",
  29018. "properties": {
  29019. "executed": {
  29020. "type": "boolean"
  29021. },
  29022. "metadata": {
  29023. "$ref": "#/components/schemas/LLMProviderMetadata"
  29024. }
  29025. },
  29026. "required": ["executed"],
  29027. "additionalProperties": false
  29028. }
  29029. },
  29030. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29031. "additionalProperties": false
  29032. }
  29033. },
  29034. "required": ["id", "type", "data"],
  29035. "additionalProperties": false
  29036. },
  29037. "SessionNextToolFailed": {
  29038. "type": "object",
  29039. "properties": {
  29040. "id": {
  29041. "type": "string",
  29042. "pattern": "^evt_"
  29043. },
  29044. "metadata": {
  29045. "type": "object"
  29046. },
  29047. "type": {
  29048. "type": "string",
  29049. "enum": ["session.next.tool.failed"]
  29050. },
  29051. "durable": {
  29052. "type": "object",
  29053. "properties": {
  29054. "aggregateID": {
  29055. "type": "string"
  29056. },
  29057. "seq": {
  29058. "type": "integer"
  29059. },
  29060. "version": {
  29061. "type": "integer"
  29062. }
  29063. },
  29064. "required": ["aggregateID", "seq", "version"],
  29065. "additionalProperties": false
  29066. },
  29067. "location": {
  29068. "$ref": "#/components/schemas/LocationRef"
  29069. },
  29070. "data": {
  29071. "type": "object",
  29072. "properties": {
  29073. "timestamp": {
  29074. "type": "number"
  29075. },
  29076. "sessionID": {
  29077. "type": "string",
  29078. "pattern": "^ses"
  29079. },
  29080. "assistantMessageID": {
  29081. "type": "string",
  29082. "pattern": "^msg_"
  29083. },
  29084. "callID": {
  29085. "type": "string"
  29086. },
  29087. "error": {
  29088. "$ref": "#/components/schemas/SessionErrorUnknown"
  29089. },
  29090. "result": {},
  29091. "provider": {
  29092. "type": "object",
  29093. "properties": {
  29094. "executed": {
  29095. "type": "boolean"
  29096. },
  29097. "metadata": {
  29098. "$ref": "#/components/schemas/LLMProviderMetadata"
  29099. }
  29100. },
  29101. "required": ["executed"],
  29102. "additionalProperties": false
  29103. }
  29104. },
  29105. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29106. "additionalProperties": false
  29107. }
  29108. },
  29109. "required": ["id", "type", "data"],
  29110. "additionalProperties": false
  29111. },
  29112. "SessionNextReasoningStarted": {
  29113. "type": "object",
  29114. "properties": {
  29115. "id": {
  29116. "type": "string",
  29117. "pattern": "^evt_"
  29118. },
  29119. "metadata": {
  29120. "type": "object"
  29121. },
  29122. "type": {
  29123. "type": "string",
  29124. "enum": ["session.next.reasoning.started"]
  29125. },
  29126. "durable": {
  29127. "type": "object",
  29128. "properties": {
  29129. "aggregateID": {
  29130. "type": "string"
  29131. },
  29132. "seq": {
  29133. "type": "integer"
  29134. },
  29135. "version": {
  29136. "type": "integer"
  29137. }
  29138. },
  29139. "required": ["aggregateID", "seq", "version"],
  29140. "additionalProperties": false
  29141. },
  29142. "location": {
  29143. "$ref": "#/components/schemas/LocationRef"
  29144. },
  29145. "data": {
  29146. "type": "object",
  29147. "properties": {
  29148. "timestamp": {
  29149. "type": "number"
  29150. },
  29151. "sessionID": {
  29152. "type": "string",
  29153. "pattern": "^ses"
  29154. },
  29155. "assistantMessageID": {
  29156. "type": "string",
  29157. "pattern": "^msg_"
  29158. },
  29159. "reasoningID": {
  29160. "type": "string"
  29161. },
  29162. "providerMetadata": {
  29163. "$ref": "#/components/schemas/LLMProviderMetadata"
  29164. }
  29165. },
  29166. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29167. "additionalProperties": false
  29168. }
  29169. },
  29170. "required": ["id", "type", "data"],
  29171. "additionalProperties": false
  29172. },
  29173. "SessionNextReasoningEnded": {
  29174. "type": "object",
  29175. "properties": {
  29176. "id": {
  29177. "type": "string",
  29178. "pattern": "^evt_"
  29179. },
  29180. "metadata": {
  29181. "type": "object"
  29182. },
  29183. "type": {
  29184. "type": "string",
  29185. "enum": ["session.next.reasoning.ended"]
  29186. },
  29187. "durable": {
  29188. "type": "object",
  29189. "properties": {
  29190. "aggregateID": {
  29191. "type": "string"
  29192. },
  29193. "seq": {
  29194. "type": "integer"
  29195. },
  29196. "version": {
  29197. "type": "integer"
  29198. }
  29199. },
  29200. "required": ["aggregateID", "seq", "version"],
  29201. "additionalProperties": false
  29202. },
  29203. "location": {
  29204. "$ref": "#/components/schemas/LocationRef"
  29205. },
  29206. "data": {
  29207. "type": "object",
  29208. "properties": {
  29209. "timestamp": {
  29210. "type": "number"
  29211. },
  29212. "sessionID": {
  29213. "type": "string",
  29214. "pattern": "^ses"
  29215. },
  29216. "assistantMessageID": {
  29217. "type": "string",
  29218. "pattern": "^msg_"
  29219. },
  29220. "reasoningID": {
  29221. "type": "string"
  29222. },
  29223. "text": {
  29224. "type": "string"
  29225. },
  29226. "providerMetadata": {
  29227. "$ref": "#/components/schemas/LLMProviderMetadata"
  29228. }
  29229. },
  29230. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29231. "additionalProperties": false
  29232. }
  29233. },
  29234. "required": ["id", "type", "data"],
  29235. "additionalProperties": false
  29236. },
  29237. "SessionNextRetried": {
  29238. "type": "object",
  29239. "properties": {
  29240. "id": {
  29241. "type": "string",
  29242. "pattern": "^evt_"
  29243. },
  29244. "metadata": {
  29245. "type": "object"
  29246. },
  29247. "type": {
  29248. "type": "string",
  29249. "enum": ["session.next.retried"]
  29250. },
  29251. "durable": {
  29252. "type": "object",
  29253. "properties": {
  29254. "aggregateID": {
  29255. "type": "string"
  29256. },
  29257. "seq": {
  29258. "type": "integer"
  29259. },
  29260. "version": {
  29261. "type": "integer"
  29262. }
  29263. },
  29264. "required": ["aggregateID", "seq", "version"],
  29265. "additionalProperties": false
  29266. },
  29267. "location": {
  29268. "$ref": "#/components/schemas/LocationRef"
  29269. },
  29270. "data": {
  29271. "type": "object",
  29272. "properties": {
  29273. "timestamp": {
  29274. "type": "number"
  29275. },
  29276. "sessionID": {
  29277. "type": "string",
  29278. "pattern": "^ses"
  29279. },
  29280. "attempt": {
  29281. "type": "number"
  29282. },
  29283. "error": {
  29284. "$ref": "#/components/schemas/SessionNextRetry_error"
  29285. }
  29286. },
  29287. "required": ["timestamp", "sessionID", "attempt", "error"],
  29288. "additionalProperties": false
  29289. }
  29290. },
  29291. "required": ["id", "type", "data"],
  29292. "additionalProperties": false
  29293. },
  29294. "SessionNextCompactionStarted": {
  29295. "type": "object",
  29296. "properties": {
  29297. "id": {
  29298. "type": "string",
  29299. "pattern": "^evt_"
  29300. },
  29301. "metadata": {
  29302. "type": "object"
  29303. },
  29304. "type": {
  29305. "type": "string",
  29306. "enum": ["session.next.compaction.started"]
  29307. },
  29308. "durable": {
  29309. "type": "object",
  29310. "properties": {
  29311. "aggregateID": {
  29312. "type": "string"
  29313. },
  29314. "seq": {
  29315. "type": "integer"
  29316. },
  29317. "version": {
  29318. "type": "integer"
  29319. }
  29320. },
  29321. "required": ["aggregateID", "seq", "version"],
  29322. "additionalProperties": false
  29323. },
  29324. "location": {
  29325. "$ref": "#/components/schemas/LocationRef"
  29326. },
  29327. "data": {
  29328. "type": "object",
  29329. "properties": {
  29330. "timestamp": {
  29331. "type": "number"
  29332. },
  29333. "sessionID": {
  29334. "type": "string",
  29335. "pattern": "^ses"
  29336. },
  29337. "messageID": {
  29338. "type": "string",
  29339. "pattern": "^msg_"
  29340. },
  29341. "reason": {
  29342. "type": "string",
  29343. "enum": ["auto", "manual"]
  29344. }
  29345. },
  29346. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29347. "additionalProperties": false
  29348. }
  29349. },
  29350. "required": ["id", "type", "data"],
  29351. "additionalProperties": false
  29352. },
  29353. "SessionNextCompactionEnded": {
  29354. "type": "object",
  29355. "properties": {
  29356. "id": {
  29357. "type": "string",
  29358. "pattern": "^evt_"
  29359. },
  29360. "metadata": {
  29361. "type": "object"
  29362. },
  29363. "type": {
  29364. "type": "string",
  29365. "enum": ["session.next.compaction.ended"]
  29366. },
  29367. "durable": {
  29368. "type": "object",
  29369. "properties": {
  29370. "aggregateID": {
  29371. "type": "string"
  29372. },
  29373. "seq": {
  29374. "type": "integer"
  29375. },
  29376. "version": {
  29377. "type": "integer"
  29378. }
  29379. },
  29380. "required": ["aggregateID", "seq", "version"],
  29381. "additionalProperties": false
  29382. },
  29383. "location": {
  29384. "$ref": "#/components/schemas/LocationRef"
  29385. },
  29386. "data": {
  29387. "type": "object",
  29388. "properties": {
  29389. "timestamp": {
  29390. "type": "number"
  29391. },
  29392. "sessionID": {
  29393. "type": "string",
  29394. "pattern": "^ses"
  29395. },
  29396. "messageID": {
  29397. "type": "string",
  29398. "pattern": "^msg_"
  29399. },
  29400. "reason": {
  29401. "type": "string",
  29402. "enum": ["auto", "manual"]
  29403. },
  29404. "text": {
  29405. "type": "string"
  29406. },
  29407. "recent": {
  29408. "type": "string"
  29409. }
  29410. },
  29411. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29412. "additionalProperties": false
  29413. }
  29414. },
  29415. "required": ["id", "type", "data"],
  29416. "additionalProperties": false
  29417. },
  29418. "SessionNextRevertStaged": {
  29419. "type": "object",
  29420. "properties": {
  29421. "id": {
  29422. "type": "string",
  29423. "pattern": "^evt_"
  29424. },
  29425. "metadata": {
  29426. "type": "object"
  29427. },
  29428. "type": {
  29429. "type": "string",
  29430. "enum": ["session.next.revert.staged"]
  29431. },
  29432. "durable": {
  29433. "type": "object",
  29434. "properties": {
  29435. "aggregateID": {
  29436. "type": "string"
  29437. },
  29438. "seq": {
  29439. "type": "integer"
  29440. },
  29441. "version": {
  29442. "type": "integer"
  29443. }
  29444. },
  29445. "required": ["aggregateID", "seq", "version"],
  29446. "additionalProperties": false
  29447. },
  29448. "location": {
  29449. "$ref": "#/components/schemas/LocationRef"
  29450. },
  29451. "data": {
  29452. "type": "object",
  29453. "properties": {
  29454. "timestamp": {
  29455. "type": "number"
  29456. },
  29457. "sessionID": {
  29458. "type": "string",
  29459. "pattern": "^ses"
  29460. },
  29461. "revert": {
  29462. "$ref": "#/components/schemas/RevertState"
  29463. }
  29464. },
  29465. "required": ["timestamp", "sessionID", "revert"],
  29466. "additionalProperties": false
  29467. }
  29468. },
  29469. "required": ["id", "type", "data"],
  29470. "additionalProperties": false
  29471. },
  29472. "SessionNextRevertCleared": {
  29473. "type": "object",
  29474. "properties": {
  29475. "id": {
  29476. "type": "string",
  29477. "pattern": "^evt_"
  29478. },
  29479. "metadata": {
  29480. "type": "object"
  29481. },
  29482. "type": {
  29483. "type": "string",
  29484. "enum": ["session.next.revert.cleared"]
  29485. },
  29486. "durable": {
  29487. "type": "object",
  29488. "properties": {
  29489. "aggregateID": {
  29490. "type": "string"
  29491. },
  29492. "seq": {
  29493. "type": "integer"
  29494. },
  29495. "version": {
  29496. "type": "integer"
  29497. }
  29498. },
  29499. "required": ["aggregateID", "seq", "version"],
  29500. "additionalProperties": false
  29501. },
  29502. "location": {
  29503. "$ref": "#/components/schemas/LocationRef"
  29504. },
  29505. "data": {
  29506. "type": "object",
  29507. "properties": {
  29508. "timestamp": {
  29509. "type": "number"
  29510. },
  29511. "sessionID": {
  29512. "type": "string",
  29513. "pattern": "^ses"
  29514. }
  29515. },
  29516. "required": ["timestamp", "sessionID"],
  29517. "additionalProperties": false
  29518. }
  29519. },
  29520. "required": ["id", "type", "data"],
  29521. "additionalProperties": false
  29522. },
  29523. "SessionNextRevertCommitted": {
  29524. "type": "object",
  29525. "properties": {
  29526. "id": {
  29527. "type": "string",
  29528. "pattern": "^evt_"
  29529. },
  29530. "metadata": {
  29531. "type": "object"
  29532. },
  29533. "type": {
  29534. "type": "string",
  29535. "enum": ["session.next.revert.committed"]
  29536. },
  29537. "durable": {
  29538. "type": "object",
  29539. "properties": {
  29540. "aggregateID": {
  29541. "type": "string"
  29542. },
  29543. "seq": {
  29544. "type": "integer"
  29545. },
  29546. "version": {
  29547. "type": "integer"
  29548. }
  29549. },
  29550. "required": ["aggregateID", "seq", "version"],
  29551. "additionalProperties": false
  29552. },
  29553. "location": {
  29554. "$ref": "#/components/schemas/LocationRef"
  29555. },
  29556. "data": {
  29557. "type": "object",
  29558. "properties": {
  29559. "timestamp": {
  29560. "type": "number"
  29561. },
  29562. "sessionID": {
  29563. "type": "string",
  29564. "pattern": "^ses"
  29565. },
  29566. "messageID": {
  29567. "type": "string",
  29568. "pattern": "^msg_"
  29569. }
  29570. },
  29571. "required": ["timestamp", "sessionID", "messageID"],
  29572. "additionalProperties": false
  29573. }
  29574. },
  29575. "required": ["id", "type", "data"],
  29576. "additionalProperties": false
  29577. },
  29578. "ModelApi": {
  29579. "anyOf": [
  29580. {
  29581. "type": "object",
  29582. "properties": {
  29583. "id": {
  29584. "type": "string"
  29585. },
  29586. "type": {
  29587. "type": "string",
  29588. "enum": ["aisdk"]
  29589. },
  29590. "package": {
  29591. "type": "string"
  29592. },
  29593. "url": {
  29594. "type": "string"
  29595. },
  29596. "settings": {
  29597. "type": "object"
  29598. }
  29599. },
  29600. "required": ["id", "type", "package"],
  29601. "additionalProperties": false
  29602. },
  29603. {
  29604. "type": "object",
  29605. "properties": {
  29606. "id": {
  29607. "type": "string"
  29608. },
  29609. "type": {
  29610. "type": "string",
  29611. "enum": ["native"]
  29612. },
  29613. "url": {
  29614. "type": "string"
  29615. },
  29616. "settings": {
  29617. "type": "object"
  29618. }
  29619. },
  29620. "required": ["id", "type", "settings"],
  29621. "additionalProperties": false
  29622. }
  29623. ]
  29624. },
  29625. "ModelCapabilities": {
  29626. "type": "object",
  29627. "properties": {
  29628. "tools": {
  29629. "type": "boolean"
  29630. },
  29631. "input": {
  29632. "type": "array",
  29633. "items": {
  29634. "type": "string"
  29635. }
  29636. },
  29637. "output": {
  29638. "type": "array",
  29639. "items": {
  29640. "type": "string"
  29641. }
  29642. }
  29643. },
  29644. "required": ["tools", "input", "output"],
  29645. "additionalProperties": false
  29646. },
  29647. "ModelCost": {
  29648. "type": "object",
  29649. "properties": {
  29650. "tier": {
  29651. "type": "object",
  29652. "properties": {
  29653. "type": {
  29654. "type": "string",
  29655. "enum": ["context"]
  29656. },
  29657. "size": {
  29658. "type": "integer"
  29659. }
  29660. },
  29661. "required": ["type", "size"],
  29662. "additionalProperties": false
  29663. },
  29664. "input": {
  29665. "type": "number"
  29666. },
  29667. "output": {
  29668. "type": "number"
  29669. },
  29670. "cache": {
  29671. "type": "object",
  29672. "properties": {
  29673. "read": {
  29674. "type": "number"
  29675. },
  29676. "write": {
  29677. "type": "number"
  29678. }
  29679. },
  29680. "required": ["read", "write"],
  29681. "additionalProperties": false
  29682. }
  29683. },
  29684. "required": ["input", "output", "cache"],
  29685. "additionalProperties": false
  29686. },
  29687. "ModelV2Info": {
  29688. "type": "object",
  29689. "properties": {
  29690. "id": {
  29691. "type": "string"
  29692. },
  29693. "providerID": {
  29694. "type": "string"
  29695. },
  29696. "family": {
  29697. "type": "string"
  29698. },
  29699. "name": {
  29700. "type": "string"
  29701. },
  29702. "api": {
  29703. "$ref": "#/components/schemas/ModelApi"
  29704. },
  29705. "capabilities": {
  29706. "$ref": "#/components/schemas/ModelCapabilities"
  29707. },
  29708. "request": {
  29709. "type": "object",
  29710. "properties": {
  29711. "headers": {
  29712. "type": "object",
  29713. "additionalProperties": {
  29714. "type": "string"
  29715. }
  29716. },
  29717. "body": {
  29718. "type": "object"
  29719. },
  29720. "variant": {
  29721. "type": "string"
  29722. }
  29723. },
  29724. "required": ["headers", "body"],
  29725. "additionalProperties": false
  29726. },
  29727. "variants": {
  29728. "type": "array",
  29729. "items": {
  29730. "type": "object",
  29731. "properties": {
  29732. "id": {
  29733. "type": "string"
  29734. },
  29735. "headers": {
  29736. "type": "object",
  29737. "additionalProperties": {
  29738. "type": "string"
  29739. }
  29740. },
  29741. "body": {
  29742. "type": "object"
  29743. }
  29744. },
  29745. "required": ["id", "headers", "body"],
  29746. "additionalProperties": false
  29747. }
  29748. },
  29749. "time": {
  29750. "type": "object",
  29751. "properties": {
  29752. "released": {
  29753. "type": "number"
  29754. }
  29755. },
  29756. "required": ["released"],
  29757. "additionalProperties": false
  29758. },
  29759. "cost": {
  29760. "type": "array",
  29761. "items": {
  29762. "$ref": "#/components/schemas/ModelCost"
  29763. }
  29764. },
  29765. "status": {
  29766. "type": "string",
  29767. "enum": ["alpha", "beta", "deprecated", "active"]
  29768. },
  29769. "enabled": {
  29770. "type": "boolean"
  29771. },
  29772. "limit": {
  29773. "type": "object",
  29774. "properties": {
  29775. "context": {
  29776. "type": "integer"
  29777. },
  29778. "input": {
  29779. "type": "integer"
  29780. },
  29781. "output": {
  29782. "type": "integer"
  29783. }
  29784. },
  29785. "required": ["context", "output"],
  29786. "additionalProperties": false
  29787. }
  29788. },
  29789. "required": [
  29790. "id",
  29791. "providerID",
  29792. "name",
  29793. "api",
  29794. "capabilities",
  29795. "request",
  29796. "variants",
  29797. "time",
  29798. "cost",
  29799. "status",
  29800. "enabled",
  29801. "limit"
  29802. ],
  29803. "additionalProperties": false
  29804. },
  29805. "ProviderAISDK": {
  29806. "type": "object",
  29807. "properties": {
  29808. "type": {
  29809. "type": "string",
  29810. "enum": ["aisdk"]
  29811. },
  29812. "package": {
  29813. "type": "string"
  29814. },
  29815. "url": {
  29816. "type": "string"
  29817. },
  29818. "settings": {
  29819. "type": "object"
  29820. }
  29821. },
  29822. "required": ["type", "package"],
  29823. "additionalProperties": false
  29824. },
  29825. "ProviderNative": {
  29826. "type": "object",
  29827. "properties": {
  29828. "type": {
  29829. "type": "string",
  29830. "enum": ["native"]
  29831. },
  29832. "url": {
  29833. "type": "string"
  29834. },
  29835. "settings": {
  29836. "type": "object"
  29837. }
  29838. },
  29839. "required": ["type", "settings"],
  29840. "additionalProperties": false
  29841. },
  29842. "ProviderApi": {
  29843. "anyOf": [
  29844. {
  29845. "$ref": "#/components/schemas/ProviderAISDK"
  29846. },
  29847. {
  29848. "$ref": "#/components/schemas/ProviderNative"
  29849. }
  29850. ]
  29851. },
  29852. "ProviderV2Info": {
  29853. "type": "object",
  29854. "properties": {
  29855. "id": {
  29856. "type": "string"
  29857. },
  29858. "integrationID": {
  29859. "type": "string"
  29860. },
  29861. "name": {
  29862. "type": "string"
  29863. },
  29864. "disabled": {
  29865. "type": "boolean"
  29866. },
  29867. "api": {
  29868. "$ref": "#/components/schemas/ProviderApi"
  29869. },
  29870. "request": {
  29871. "$ref": "#/components/schemas/ProviderRequest"
  29872. }
  29873. },
  29874. "required": ["id", "name", "api", "request"],
  29875. "additionalProperties": false
  29876. },
  29877. "IntegrationWhen": {
  29878. "type": "object",
  29879. "properties": {
  29880. "key": {
  29881. "type": "string"
  29882. },
  29883. "op": {
  29884. "type": "string",
  29885. "enum": ["eq", "neq"]
  29886. },
  29887. "value": {
  29888. "type": "string"
  29889. }
  29890. },
  29891. "required": ["key", "op", "value"],
  29892. "additionalProperties": false
  29893. },
  29894. "IntegrationTextPrompt": {
  29895. "type": "object",
  29896. "properties": {
  29897. "type": {
  29898. "type": "string",
  29899. "enum": ["text"]
  29900. },
  29901. "key": {
  29902. "type": "string"
  29903. },
  29904. "message": {
  29905. "type": "string"
  29906. },
  29907. "placeholder": {
  29908. "type": "string"
  29909. },
  29910. "when": {
  29911. "$ref": "#/components/schemas/IntegrationWhen"
  29912. }
  29913. },
  29914. "required": ["type", "key", "message"],
  29915. "additionalProperties": false
  29916. },
  29917. "IntegrationSelectPrompt": {
  29918. "type": "object",
  29919. "properties": {
  29920. "type": {
  29921. "type": "string",
  29922. "enum": ["select"]
  29923. },
  29924. "key": {
  29925. "type": "string"
  29926. },
  29927. "message": {
  29928. "type": "string"
  29929. },
  29930. "options": {
  29931. "type": "array",
  29932. "items": {
  29933. "type": "object",
  29934. "properties": {
  29935. "label": {
  29936. "type": "string"
  29937. },
  29938. "value": {
  29939. "type": "string"
  29940. },
  29941. "hint": {
  29942. "type": "string"
  29943. }
  29944. },
  29945. "required": ["label", "value"],
  29946. "additionalProperties": false
  29947. }
  29948. },
  29949. "when": {
  29950. "$ref": "#/components/schemas/IntegrationWhen"
  29951. }
  29952. },
  29953. "required": ["type", "key", "message", "options"],
  29954. "additionalProperties": false
  29955. },
  29956. "IntegrationOAuthMethod": {
  29957. "type": "object",
  29958. "properties": {
  29959. "id": {
  29960. "type": "string"
  29961. },
  29962. "type": {
  29963. "type": "string",
  29964. "enum": ["oauth"]
  29965. },
  29966. "label": {
  29967. "type": "string"
  29968. },
  29969. "prompts": {
  29970. "type": "array",
  29971. "items": {
  29972. "anyOf": [
  29973. {
  29974. "$ref": "#/components/schemas/IntegrationTextPrompt"
  29975. },
  29976. {
  29977. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  29978. }
  29979. ]
  29980. }
  29981. }
  29982. },
  29983. "required": ["id", "type", "label"],
  29984. "additionalProperties": false
  29985. },
  29986. "IntegrationKeyMethod": {
  29987. "type": "object",
  29988. "properties": {
  29989. "type": {
  29990. "type": "string",
  29991. "enum": ["key"]
  29992. },
  29993. "label": {
  29994. "type": "string"
  29995. }
  29996. },
  29997. "required": ["type"],
  29998. "additionalProperties": false
  29999. },
  30000. "IntegrationEnvMethod": {
  30001. "type": "object",
  30002. "properties": {
  30003. "type": {
  30004. "type": "string",
  30005. "enum": ["env"]
  30006. },
  30007. "names": {
  30008. "type": "array",
  30009. "items": {
  30010. "type": "string"
  30011. }
  30012. }
  30013. },
  30014. "required": ["type", "names"],
  30015. "additionalProperties": false
  30016. },
  30017. "ConnectionCredentialInfo": {
  30018. "type": "object",
  30019. "properties": {
  30020. "type": {
  30021. "type": "string",
  30022. "enum": ["credential"]
  30023. },
  30024. "id": {
  30025. "type": "string"
  30026. },
  30027. "label": {
  30028. "type": "string"
  30029. }
  30030. },
  30031. "required": ["type", "id", "label"],
  30032. "additionalProperties": false
  30033. },
  30034. "ConnectionEnvInfo": {
  30035. "type": "object",
  30036. "properties": {
  30037. "type": {
  30038. "type": "string",
  30039. "enum": ["env"]
  30040. },
  30041. "name": {
  30042. "type": "string"
  30043. }
  30044. },
  30045. "required": ["type", "name"],
  30046. "additionalProperties": false
  30047. },
  30048. "ConnectionInfo": {
  30049. "anyOf": [
  30050. {
  30051. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30052. },
  30053. {
  30054. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30055. }
  30056. ]
  30057. },
  30058. "IntegrationInfo": {
  30059. "type": "object",
  30060. "properties": {
  30061. "id": {
  30062. "type": "string"
  30063. },
  30064. "name": {
  30065. "type": "string"
  30066. },
  30067. "methods": {
  30068. "type": "array",
  30069. "items": {
  30070. "$ref": "#/components/schemas/IntegrationMethod"
  30071. }
  30072. },
  30073. "connections": {
  30074. "type": "array",
  30075. "items": {
  30076. "$ref": "#/components/schemas/ConnectionInfo"
  30077. }
  30078. }
  30079. },
  30080. "required": ["id", "name", "methods", "connections"],
  30081. "additionalProperties": false
  30082. },
  30083. "IntegrationAttempt": {
  30084. "type": "object",
  30085. "properties": {
  30086. "attemptID": {
  30087. "type": "string"
  30088. },
  30089. "url": {
  30090. "type": "string"
  30091. },
  30092. "instructions": {
  30093. "type": "string"
  30094. },
  30095. "mode": {
  30096. "type": "string",
  30097. "enum": ["auto", "code"]
  30098. },
  30099. "time": {
  30100. "type": "object",
  30101. "properties": {
  30102. "created": {
  30103. "anyOf": [
  30104. {
  30105. "type": "number"
  30106. },
  30107. {
  30108. "type": "string",
  30109. "enum": ["NaN"]
  30110. },
  30111. {
  30112. "type": "string",
  30113. "enum": ["Infinity"]
  30114. },
  30115. {
  30116. "type": "string",
  30117. "enum": ["-Infinity"]
  30118. },
  30119. {
  30120. "type": "string",
  30121. "enum": ["Infinity", "-Infinity", "NaN"]
  30122. }
  30123. ]
  30124. },
  30125. "expires": {
  30126. "anyOf": [
  30127. {
  30128. "type": "number"
  30129. },
  30130. {
  30131. "type": "string",
  30132. "enum": ["NaN"]
  30133. },
  30134. {
  30135. "type": "string",
  30136. "enum": ["Infinity"]
  30137. },
  30138. {
  30139. "type": "string",
  30140. "enum": ["-Infinity"]
  30141. },
  30142. {
  30143. "type": "string",
  30144. "enum": ["Infinity", "-Infinity", "NaN"]
  30145. }
  30146. ]
  30147. }
  30148. },
  30149. "required": ["created", "expires"],
  30150. "additionalProperties": false
  30151. }
  30152. },
  30153. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30154. "additionalProperties": false
  30155. },
  30156. "IntegrationAttemptStatus": {
  30157. "anyOf": [
  30158. {
  30159. "type": "object",
  30160. "properties": {
  30161. "status": {
  30162. "type": "string",
  30163. "enum": ["pending"]
  30164. },
  30165. "time": {
  30166. "type": "object",
  30167. "properties": {
  30168. "created": {
  30169. "anyOf": [
  30170. {
  30171. "type": "number"
  30172. },
  30173. {
  30174. "type": "string",
  30175. "enum": ["NaN"]
  30176. },
  30177. {
  30178. "type": "string",
  30179. "enum": ["Infinity"]
  30180. },
  30181. {
  30182. "type": "string",
  30183. "enum": ["-Infinity"]
  30184. },
  30185. {
  30186. "type": "string",
  30187. "enum": ["Infinity", "-Infinity", "NaN"]
  30188. }
  30189. ]
  30190. },
  30191. "expires": {
  30192. "anyOf": [
  30193. {
  30194. "type": "number"
  30195. },
  30196. {
  30197. "type": "string",
  30198. "enum": ["NaN"]
  30199. },
  30200. {
  30201. "type": "string",
  30202. "enum": ["Infinity"]
  30203. },
  30204. {
  30205. "type": "string",
  30206. "enum": ["-Infinity"]
  30207. },
  30208. {
  30209. "type": "string",
  30210. "enum": ["Infinity", "-Infinity", "NaN"]
  30211. }
  30212. ]
  30213. }
  30214. },
  30215. "required": ["created", "expires"],
  30216. "additionalProperties": false
  30217. }
  30218. },
  30219. "required": ["status", "time"],
  30220. "additionalProperties": false
  30221. },
  30222. {
  30223. "type": "object",
  30224. "properties": {
  30225. "status": {
  30226. "type": "string",
  30227. "enum": ["complete"]
  30228. },
  30229. "time": {
  30230. "type": "object",
  30231. "properties": {
  30232. "created": {
  30233. "anyOf": [
  30234. {
  30235. "type": "number"
  30236. },
  30237. {
  30238. "type": "string",
  30239. "enum": ["NaN"]
  30240. },
  30241. {
  30242. "type": "string",
  30243. "enum": ["Infinity"]
  30244. },
  30245. {
  30246. "type": "string",
  30247. "enum": ["-Infinity"]
  30248. },
  30249. {
  30250. "type": "string",
  30251. "enum": ["Infinity", "-Infinity", "NaN"]
  30252. }
  30253. ]
  30254. },
  30255. "expires": {
  30256. "anyOf": [
  30257. {
  30258. "type": "number"
  30259. },
  30260. {
  30261. "type": "string",
  30262. "enum": ["NaN"]
  30263. },
  30264. {
  30265. "type": "string",
  30266. "enum": ["Infinity"]
  30267. },
  30268. {
  30269. "type": "string",
  30270. "enum": ["-Infinity"]
  30271. },
  30272. {
  30273. "type": "string",
  30274. "enum": ["Infinity", "-Infinity", "NaN"]
  30275. }
  30276. ]
  30277. }
  30278. },
  30279. "required": ["created", "expires"],
  30280. "additionalProperties": false
  30281. }
  30282. },
  30283. "required": ["status", "time"],
  30284. "additionalProperties": false
  30285. },
  30286. {
  30287. "type": "object",
  30288. "properties": {
  30289. "status": {
  30290. "type": "string",
  30291. "enum": ["failed"]
  30292. },
  30293. "message": {
  30294. "type": "string"
  30295. },
  30296. "time": {
  30297. "type": "object",
  30298. "properties": {
  30299. "created": {
  30300. "anyOf": [
  30301. {
  30302. "type": "number"
  30303. },
  30304. {
  30305. "type": "string",
  30306. "enum": ["NaN"]
  30307. },
  30308. {
  30309. "type": "string",
  30310. "enum": ["Infinity"]
  30311. },
  30312. {
  30313. "type": "string",
  30314. "enum": ["-Infinity"]
  30315. },
  30316. {
  30317. "type": "string",
  30318. "enum": ["Infinity", "-Infinity", "NaN"]
  30319. }
  30320. ]
  30321. },
  30322. "expires": {
  30323. "anyOf": [
  30324. {
  30325. "type": "number"
  30326. },
  30327. {
  30328. "type": "string",
  30329. "enum": ["NaN"]
  30330. },
  30331. {
  30332. "type": "string",
  30333. "enum": ["Infinity"]
  30334. },
  30335. {
  30336. "type": "string",
  30337. "enum": ["-Infinity"]
  30338. },
  30339. {
  30340. "type": "string",
  30341. "enum": ["Infinity", "-Infinity", "NaN"]
  30342. }
  30343. ]
  30344. }
  30345. },
  30346. "required": ["created", "expires"],
  30347. "additionalProperties": false
  30348. }
  30349. },
  30350. "required": ["status", "message", "time"],
  30351. "additionalProperties": false
  30352. },
  30353. {
  30354. "type": "object",
  30355. "properties": {
  30356. "status": {
  30357. "type": "string",
  30358. "enum": ["expired"]
  30359. },
  30360. "time": {
  30361. "type": "object",
  30362. "properties": {
  30363. "created": {
  30364. "anyOf": [
  30365. {
  30366. "type": "number"
  30367. },
  30368. {
  30369. "type": "string",
  30370. "enum": ["NaN"]
  30371. },
  30372. {
  30373. "type": "string",
  30374. "enum": ["Infinity"]
  30375. },
  30376. {
  30377. "type": "string",
  30378. "enum": ["-Infinity"]
  30379. },
  30380. {
  30381. "type": "string",
  30382. "enum": ["Infinity", "-Infinity", "NaN"]
  30383. }
  30384. ]
  30385. },
  30386. "expires": {
  30387. "anyOf": [
  30388. {
  30389. "type": "number"
  30390. },
  30391. {
  30392. "type": "string",
  30393. "enum": ["NaN"]
  30394. },
  30395. {
  30396. "type": "string",
  30397. "enum": ["Infinity"]
  30398. },
  30399. {
  30400. "type": "string",
  30401. "enum": ["-Infinity"]
  30402. },
  30403. {
  30404. "type": "string",
  30405. "enum": ["Infinity", "-Infinity", "NaN"]
  30406. }
  30407. ]
  30408. }
  30409. },
  30410. "required": ["created", "expires"],
  30411. "additionalProperties": false
  30412. }
  30413. },
  30414. "required": ["status", "time"],
  30415. "additionalProperties": false
  30416. }
  30417. ]
  30418. },
  30419. "PermissionV2Request": {
  30420. "type": "object",
  30421. "properties": {
  30422. "id": {
  30423. "type": "string",
  30424. "pattern": "^per"
  30425. },
  30426. "sessionID": {
  30427. "type": "string",
  30428. "pattern": "^ses"
  30429. },
  30430. "action": {
  30431. "type": "string"
  30432. },
  30433. "resources": {
  30434. "type": "array",
  30435. "items": {
  30436. "type": "string"
  30437. }
  30438. },
  30439. "save": {
  30440. "type": "array",
  30441. "items": {
  30442. "type": "string"
  30443. }
  30444. },
  30445. "metadata": {
  30446. "type": "object"
  30447. },
  30448. "source": {
  30449. "$ref": "#/components/schemas/PermissionV2Source"
  30450. }
  30451. },
  30452. "required": ["id", "sessionID", "action", "resources"],
  30453. "additionalProperties": false
  30454. },
  30455. "PermissionSavedInfo": {
  30456. "type": "object",
  30457. "properties": {
  30458. "id": {
  30459. "type": "string"
  30460. },
  30461. "projectID": {
  30462. "type": "string"
  30463. },
  30464. "action": {
  30465. "type": "string"
  30466. },
  30467. "resource": {
  30468. "type": "string"
  30469. }
  30470. },
  30471. "required": ["id", "projectID", "action", "resource"],
  30472. "additionalProperties": false
  30473. },
  30474. "FileSystemEntry": {
  30475. "type": "object",
  30476. "properties": {
  30477. "path": {
  30478. "type": "string"
  30479. },
  30480. "type": {
  30481. "type": "string",
  30482. "enum": ["file", "directory"]
  30483. }
  30484. },
  30485. "required": ["path", "type"],
  30486. "additionalProperties": false
  30487. },
  30488. "CommandV2Info": {
  30489. "type": "object",
  30490. "properties": {
  30491. "name": {
  30492. "type": "string"
  30493. },
  30494. "template": {
  30495. "type": "string"
  30496. },
  30497. "description": {
  30498. "type": "string"
  30499. },
  30500. "agent": {
  30501. "type": "string"
  30502. },
  30503. "model": {
  30504. "$ref": "#/components/schemas/ModelRef"
  30505. },
  30506. "subtask": {
  30507. "type": "boolean"
  30508. }
  30509. },
  30510. "required": ["name", "template"],
  30511. "additionalProperties": false
  30512. },
  30513. "SkillV2Info": {
  30514. "type": "object",
  30515. "properties": {
  30516. "name": {
  30517. "type": "string"
  30518. },
  30519. "description": {
  30520. "type": "string"
  30521. },
  30522. "slash": {
  30523. "type": "boolean"
  30524. },
  30525. "location": {
  30526. "type": "string"
  30527. },
  30528. "content": {
  30529. "type": "string"
  30530. }
  30531. },
  30532. "required": ["name", "location", "content"],
  30533. "additionalProperties": false
  30534. },
  30535. "Models-devRefreshed": {
  30536. "type": "object",
  30537. "properties": {
  30538. "id": {
  30539. "type": "string",
  30540. "pattern": "^evt_"
  30541. },
  30542. "metadata": {
  30543. "type": "object"
  30544. },
  30545. "type": {
  30546. "type": "string",
  30547. "enum": ["models-dev.refreshed"]
  30548. },
  30549. "durable": {
  30550. "type": "object",
  30551. "properties": {
  30552. "aggregateID": {
  30553. "type": "string"
  30554. },
  30555. "seq": {
  30556. "type": "integer"
  30557. },
  30558. "version": {
  30559. "type": "integer"
  30560. }
  30561. },
  30562. "required": ["aggregateID", "seq", "version"],
  30563. "additionalProperties": false
  30564. },
  30565. "location": {
  30566. "$ref": "#/components/schemas/LocationRef"
  30567. },
  30568. "data": {
  30569. "type": "object",
  30570. "properties": {}
  30571. }
  30572. },
  30573. "required": ["id", "type", "data"],
  30574. "additionalProperties": false
  30575. },
  30576. "IntegrationUpdated": {
  30577. "type": "object",
  30578. "properties": {
  30579. "id": {
  30580. "type": "string",
  30581. "pattern": "^evt_"
  30582. },
  30583. "metadata": {
  30584. "type": "object"
  30585. },
  30586. "type": {
  30587. "type": "string",
  30588. "enum": ["integration.updated"]
  30589. },
  30590. "durable": {
  30591. "type": "object",
  30592. "properties": {
  30593. "aggregateID": {
  30594. "type": "string"
  30595. },
  30596. "seq": {
  30597. "type": "integer"
  30598. },
  30599. "version": {
  30600. "type": "integer"
  30601. }
  30602. },
  30603. "required": ["aggregateID", "seq", "version"],
  30604. "additionalProperties": false
  30605. },
  30606. "location": {
  30607. "$ref": "#/components/schemas/LocationRef"
  30608. },
  30609. "data": {
  30610. "type": "object",
  30611. "properties": {}
  30612. }
  30613. },
  30614. "required": ["id", "type", "data"],
  30615. "additionalProperties": false
  30616. },
  30617. "IntegrationConnectionUpdated": {
  30618. "type": "object",
  30619. "properties": {
  30620. "id": {
  30621. "type": "string",
  30622. "pattern": "^evt_"
  30623. },
  30624. "metadata": {
  30625. "type": "object"
  30626. },
  30627. "type": {
  30628. "type": "string",
  30629. "enum": ["integration.connection.updated"]
  30630. },
  30631. "durable": {
  30632. "type": "object",
  30633. "properties": {
  30634. "aggregateID": {
  30635. "type": "string"
  30636. },
  30637. "seq": {
  30638. "type": "integer"
  30639. },
  30640. "version": {
  30641. "type": "integer"
  30642. }
  30643. },
  30644. "required": ["aggregateID", "seq", "version"],
  30645. "additionalProperties": false
  30646. },
  30647. "location": {
  30648. "$ref": "#/components/schemas/LocationRef"
  30649. },
  30650. "data": {
  30651. "type": "object",
  30652. "properties": {
  30653. "integrationID": {
  30654. "type": "string"
  30655. }
  30656. },
  30657. "required": ["integrationID"],
  30658. "additionalProperties": false
  30659. }
  30660. },
  30661. "required": ["id", "type", "data"],
  30662. "additionalProperties": false
  30663. },
  30664. "CatalogUpdated": {
  30665. "type": "object",
  30666. "properties": {
  30667. "id": {
  30668. "type": "string",
  30669. "pattern": "^evt_"
  30670. },
  30671. "metadata": {
  30672. "type": "object"
  30673. },
  30674. "type": {
  30675. "type": "string",
  30676. "enum": ["catalog.updated"]
  30677. },
  30678. "durable": {
  30679. "type": "object",
  30680. "properties": {
  30681. "aggregateID": {
  30682. "type": "string"
  30683. },
  30684. "seq": {
  30685. "type": "integer"
  30686. },
  30687. "version": {
  30688. "type": "integer"
  30689. }
  30690. },
  30691. "required": ["aggregateID", "seq", "version"],
  30692. "additionalProperties": false
  30693. },
  30694. "location": {
  30695. "$ref": "#/components/schemas/LocationRef"
  30696. },
  30697. "data": {
  30698. "type": "object",
  30699. "properties": {}
  30700. }
  30701. },
  30702. "required": ["id", "type", "data"],
  30703. "additionalProperties": false
  30704. },
  30705. "SessionCreated": {
  30706. "type": "object",
  30707. "properties": {
  30708. "id": {
  30709. "type": "string",
  30710. "pattern": "^evt_"
  30711. },
  30712. "metadata": {
  30713. "type": "object"
  30714. },
  30715. "type": {
  30716. "type": "string",
  30717. "enum": ["session.created"]
  30718. },
  30719. "durable": {
  30720. "type": "object",
  30721. "properties": {
  30722. "aggregateID": {
  30723. "type": "string"
  30724. },
  30725. "seq": {
  30726. "type": "integer"
  30727. },
  30728. "version": {
  30729. "type": "integer"
  30730. }
  30731. },
  30732. "required": ["aggregateID", "seq", "version"],
  30733. "additionalProperties": false
  30734. },
  30735. "location": {
  30736. "$ref": "#/components/schemas/LocationRef"
  30737. },
  30738. "data": {
  30739. "type": "object",
  30740. "properties": {
  30741. "sessionID": {
  30742. "type": "string",
  30743. "pattern": "^ses"
  30744. },
  30745. "info": {
  30746. "$ref": "#/components/schemas/Session"
  30747. }
  30748. },
  30749. "required": ["sessionID", "info"],
  30750. "additionalProperties": false
  30751. }
  30752. },
  30753. "required": ["id", "type", "data"],
  30754. "additionalProperties": false
  30755. },
  30756. "SessionUpdated": {
  30757. "type": "object",
  30758. "properties": {
  30759. "id": {
  30760. "type": "string",
  30761. "pattern": "^evt_"
  30762. },
  30763. "metadata": {
  30764. "type": "object"
  30765. },
  30766. "type": {
  30767. "type": "string",
  30768. "enum": ["session.updated"]
  30769. },
  30770. "durable": {
  30771. "type": "object",
  30772. "properties": {
  30773. "aggregateID": {
  30774. "type": "string"
  30775. },
  30776. "seq": {
  30777. "type": "integer"
  30778. },
  30779. "version": {
  30780. "type": "integer"
  30781. }
  30782. },
  30783. "required": ["aggregateID", "seq", "version"],
  30784. "additionalProperties": false
  30785. },
  30786. "location": {
  30787. "$ref": "#/components/schemas/LocationRef"
  30788. },
  30789. "data": {
  30790. "type": "object",
  30791. "properties": {
  30792. "sessionID": {
  30793. "type": "string",
  30794. "pattern": "^ses"
  30795. },
  30796. "info": {
  30797. "$ref": "#/components/schemas/Session"
  30798. }
  30799. },
  30800. "required": ["sessionID", "info"],
  30801. "additionalProperties": false
  30802. }
  30803. },
  30804. "required": ["id", "type", "data"],
  30805. "additionalProperties": false
  30806. },
  30807. "SessionDeleted": {
  30808. "type": "object",
  30809. "properties": {
  30810. "id": {
  30811. "type": "string",
  30812. "pattern": "^evt_"
  30813. },
  30814. "metadata": {
  30815. "type": "object"
  30816. },
  30817. "type": {
  30818. "type": "string",
  30819. "enum": ["session.deleted"]
  30820. },
  30821. "durable": {
  30822. "type": "object",
  30823. "properties": {
  30824. "aggregateID": {
  30825. "type": "string"
  30826. },
  30827. "seq": {
  30828. "type": "integer"
  30829. },
  30830. "version": {
  30831. "type": "integer"
  30832. }
  30833. },
  30834. "required": ["aggregateID", "seq", "version"],
  30835. "additionalProperties": false
  30836. },
  30837. "location": {
  30838. "$ref": "#/components/schemas/LocationRef"
  30839. },
  30840. "data": {
  30841. "type": "object",
  30842. "properties": {
  30843. "sessionID": {
  30844. "type": "string",
  30845. "pattern": "^ses"
  30846. },
  30847. "info": {
  30848. "$ref": "#/components/schemas/Session"
  30849. }
  30850. },
  30851. "required": ["sessionID", "info"],
  30852. "additionalProperties": false
  30853. }
  30854. },
  30855. "required": ["id", "type", "data"],
  30856. "additionalProperties": false
  30857. },
  30858. "MessageUpdated": {
  30859. "type": "object",
  30860. "properties": {
  30861. "id": {
  30862. "type": "string",
  30863. "pattern": "^evt_"
  30864. },
  30865. "metadata": {
  30866. "type": "object"
  30867. },
  30868. "type": {
  30869. "type": "string",
  30870. "enum": ["message.updated"]
  30871. },
  30872. "durable": {
  30873. "type": "object",
  30874. "properties": {
  30875. "aggregateID": {
  30876. "type": "string"
  30877. },
  30878. "seq": {
  30879. "type": "integer"
  30880. },
  30881. "version": {
  30882. "type": "integer"
  30883. }
  30884. },
  30885. "required": ["aggregateID", "seq", "version"],
  30886. "additionalProperties": false
  30887. },
  30888. "location": {
  30889. "$ref": "#/components/schemas/LocationRef"
  30890. },
  30891. "data": {
  30892. "type": "object",
  30893. "properties": {
  30894. "sessionID": {
  30895. "type": "string",
  30896. "pattern": "^ses"
  30897. },
  30898. "info": {
  30899. "$ref": "#/components/schemas/Message"
  30900. }
  30901. },
  30902. "required": ["sessionID", "info"],
  30903. "additionalProperties": false
  30904. }
  30905. },
  30906. "required": ["id", "type", "data"],
  30907. "additionalProperties": false
  30908. },
  30909. "MessageRemoved": {
  30910. "type": "object",
  30911. "properties": {
  30912. "id": {
  30913. "type": "string",
  30914. "pattern": "^evt_"
  30915. },
  30916. "metadata": {
  30917. "type": "object"
  30918. },
  30919. "type": {
  30920. "type": "string",
  30921. "enum": ["message.removed"]
  30922. },
  30923. "durable": {
  30924. "type": "object",
  30925. "properties": {
  30926. "aggregateID": {
  30927. "type": "string"
  30928. },
  30929. "seq": {
  30930. "type": "integer"
  30931. },
  30932. "version": {
  30933. "type": "integer"
  30934. }
  30935. },
  30936. "required": ["aggregateID", "seq", "version"],
  30937. "additionalProperties": false
  30938. },
  30939. "location": {
  30940. "$ref": "#/components/schemas/LocationRef"
  30941. },
  30942. "data": {
  30943. "type": "object",
  30944. "properties": {
  30945. "sessionID": {
  30946. "type": "string",
  30947. "pattern": "^ses"
  30948. },
  30949. "messageID": {
  30950. "type": "string",
  30951. "pattern": "^msg"
  30952. }
  30953. },
  30954. "required": ["sessionID", "messageID"],
  30955. "additionalProperties": false
  30956. }
  30957. },
  30958. "required": ["id", "type", "data"],
  30959. "additionalProperties": false
  30960. },
  30961. "MessagePartUpdated": {
  30962. "type": "object",
  30963. "properties": {
  30964. "id": {
  30965. "type": "string",
  30966. "pattern": "^evt_"
  30967. },
  30968. "metadata": {
  30969. "type": "object"
  30970. },
  30971. "type": {
  30972. "type": "string",
  30973. "enum": ["message.part.updated"]
  30974. },
  30975. "durable": {
  30976. "type": "object",
  30977. "properties": {
  30978. "aggregateID": {
  30979. "type": "string"
  30980. },
  30981. "seq": {
  30982. "type": "integer"
  30983. },
  30984. "version": {
  30985. "type": "integer"
  30986. }
  30987. },
  30988. "required": ["aggregateID", "seq", "version"],
  30989. "additionalProperties": false
  30990. },
  30991. "location": {
  30992. "$ref": "#/components/schemas/LocationRef"
  30993. },
  30994. "data": {
  30995. "type": "object",
  30996. "properties": {
  30997. "sessionID": {
  30998. "type": "string",
  30999. "pattern": "^ses"
  31000. },
  31001. "part": {
  31002. "$ref": "#/components/schemas/Part"
  31003. },
  31004. "time": {
  31005. "type": "number"
  31006. }
  31007. },
  31008. "required": ["sessionID", "part", "time"],
  31009. "additionalProperties": false
  31010. }
  31011. },
  31012. "required": ["id", "type", "data"],
  31013. "additionalProperties": false
  31014. },
  31015. "MessagePartRemoved": {
  31016. "type": "object",
  31017. "properties": {
  31018. "id": {
  31019. "type": "string",
  31020. "pattern": "^evt_"
  31021. },
  31022. "metadata": {
  31023. "type": "object"
  31024. },
  31025. "type": {
  31026. "type": "string",
  31027. "enum": ["message.part.removed"]
  31028. },
  31029. "durable": {
  31030. "type": "object",
  31031. "properties": {
  31032. "aggregateID": {
  31033. "type": "string"
  31034. },
  31035. "seq": {
  31036. "type": "integer"
  31037. },
  31038. "version": {
  31039. "type": "integer"
  31040. }
  31041. },
  31042. "required": ["aggregateID", "seq", "version"],
  31043. "additionalProperties": false
  31044. },
  31045. "location": {
  31046. "$ref": "#/components/schemas/LocationRef"
  31047. },
  31048. "data": {
  31049. "type": "object",
  31050. "properties": {
  31051. "sessionID": {
  31052. "type": "string",
  31053. "pattern": "^ses"
  31054. },
  31055. "messageID": {
  31056. "type": "string",
  31057. "pattern": "^msg"
  31058. },
  31059. "partID": {
  31060. "type": "string",
  31061. "pattern": "^prt"
  31062. }
  31063. },
  31064. "required": ["sessionID", "messageID", "partID"],
  31065. "additionalProperties": false
  31066. }
  31067. },
  31068. "required": ["id", "type", "data"],
  31069. "additionalProperties": false
  31070. },
  31071. "SessionNextTextDelta": {
  31072. "type": "object",
  31073. "properties": {
  31074. "id": {
  31075. "type": "string",
  31076. "pattern": "^evt_"
  31077. },
  31078. "metadata": {
  31079. "type": "object"
  31080. },
  31081. "type": {
  31082. "type": "string",
  31083. "enum": ["session.next.text.delta"]
  31084. },
  31085. "durable": {
  31086. "type": "object",
  31087. "properties": {
  31088. "aggregateID": {
  31089. "type": "string"
  31090. },
  31091. "seq": {
  31092. "type": "integer"
  31093. },
  31094. "version": {
  31095. "type": "integer"
  31096. }
  31097. },
  31098. "required": ["aggregateID", "seq", "version"],
  31099. "additionalProperties": false
  31100. },
  31101. "location": {
  31102. "$ref": "#/components/schemas/LocationRef"
  31103. },
  31104. "data": {
  31105. "type": "object",
  31106. "properties": {
  31107. "timestamp": {
  31108. "type": "number"
  31109. },
  31110. "sessionID": {
  31111. "type": "string",
  31112. "pattern": "^ses"
  31113. },
  31114. "assistantMessageID": {
  31115. "type": "string",
  31116. "pattern": "^msg_"
  31117. },
  31118. "textID": {
  31119. "type": "string"
  31120. },
  31121. "delta": {
  31122. "type": "string"
  31123. }
  31124. },
  31125. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  31126. "additionalProperties": false
  31127. }
  31128. },
  31129. "required": ["id", "type", "data"],
  31130. "additionalProperties": false
  31131. },
  31132. "SessionNextReasoningDelta": {
  31133. "type": "object",
  31134. "properties": {
  31135. "id": {
  31136. "type": "string",
  31137. "pattern": "^evt_"
  31138. },
  31139. "metadata": {
  31140. "type": "object"
  31141. },
  31142. "type": {
  31143. "type": "string",
  31144. "enum": ["session.next.reasoning.delta"]
  31145. },
  31146. "durable": {
  31147. "type": "object",
  31148. "properties": {
  31149. "aggregateID": {
  31150. "type": "string"
  31151. },
  31152. "seq": {
  31153. "type": "integer"
  31154. },
  31155. "version": {
  31156. "type": "integer"
  31157. }
  31158. },
  31159. "required": ["aggregateID", "seq", "version"],
  31160. "additionalProperties": false
  31161. },
  31162. "location": {
  31163. "$ref": "#/components/schemas/LocationRef"
  31164. },
  31165. "data": {
  31166. "type": "object",
  31167. "properties": {
  31168. "timestamp": {
  31169. "type": "number"
  31170. },
  31171. "sessionID": {
  31172. "type": "string",
  31173. "pattern": "^ses"
  31174. },
  31175. "assistantMessageID": {
  31176. "type": "string",
  31177. "pattern": "^msg_"
  31178. },
  31179. "reasoningID": {
  31180. "type": "string"
  31181. },
  31182. "delta": {
  31183. "type": "string"
  31184. }
  31185. },
  31186. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  31187. "additionalProperties": false
  31188. }
  31189. },
  31190. "required": ["id", "type", "data"],
  31191. "additionalProperties": false
  31192. },
  31193. "SessionNextToolInputDelta": {
  31194. "type": "object",
  31195. "properties": {
  31196. "id": {
  31197. "type": "string",
  31198. "pattern": "^evt_"
  31199. },
  31200. "metadata": {
  31201. "type": "object"
  31202. },
  31203. "type": {
  31204. "type": "string",
  31205. "enum": ["session.next.tool.input.delta"]
  31206. },
  31207. "durable": {
  31208. "type": "object",
  31209. "properties": {
  31210. "aggregateID": {
  31211. "type": "string"
  31212. },
  31213. "seq": {
  31214. "type": "integer"
  31215. },
  31216. "version": {
  31217. "type": "integer"
  31218. }
  31219. },
  31220. "required": ["aggregateID", "seq", "version"],
  31221. "additionalProperties": false
  31222. },
  31223. "location": {
  31224. "$ref": "#/components/schemas/LocationRef"
  31225. },
  31226. "data": {
  31227. "type": "object",
  31228. "properties": {
  31229. "timestamp": {
  31230. "type": "number"
  31231. },
  31232. "sessionID": {
  31233. "type": "string",
  31234. "pattern": "^ses"
  31235. },
  31236. "assistantMessageID": {
  31237. "type": "string",
  31238. "pattern": "^msg_"
  31239. },
  31240. "callID": {
  31241. "type": "string"
  31242. },
  31243. "delta": {
  31244. "type": "string"
  31245. }
  31246. },
  31247. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  31248. "additionalProperties": false
  31249. }
  31250. },
  31251. "required": ["id", "type", "data"],
  31252. "additionalProperties": false
  31253. },
  31254. "SessionNextCompactionDelta": {
  31255. "type": "object",
  31256. "properties": {
  31257. "id": {
  31258. "type": "string",
  31259. "pattern": "^evt_"
  31260. },
  31261. "metadata": {
  31262. "type": "object"
  31263. },
  31264. "type": {
  31265. "type": "string",
  31266. "enum": ["session.next.compaction.delta"]
  31267. },
  31268. "durable": {
  31269. "type": "object",
  31270. "properties": {
  31271. "aggregateID": {
  31272. "type": "string"
  31273. },
  31274. "seq": {
  31275. "type": "integer"
  31276. },
  31277. "version": {
  31278. "type": "integer"
  31279. }
  31280. },
  31281. "required": ["aggregateID", "seq", "version"],
  31282. "additionalProperties": false
  31283. },
  31284. "location": {
  31285. "$ref": "#/components/schemas/LocationRef"
  31286. },
  31287. "data": {
  31288. "type": "object",
  31289. "properties": {
  31290. "timestamp": {
  31291. "type": "number"
  31292. },
  31293. "sessionID": {
  31294. "type": "string",
  31295. "pattern": "^ses"
  31296. },
  31297. "messageID": {
  31298. "type": "string",
  31299. "pattern": "^msg_"
  31300. },
  31301. "text": {
  31302. "type": "string"
  31303. }
  31304. },
  31305. "required": ["timestamp", "sessionID", "messageID", "text"],
  31306. "additionalProperties": false
  31307. }
  31308. },
  31309. "required": ["id", "type", "data"],
  31310. "additionalProperties": false
  31311. },
  31312. "MessagePartDelta": {
  31313. "type": "object",
  31314. "properties": {
  31315. "id": {
  31316. "type": "string",
  31317. "pattern": "^evt_"
  31318. },
  31319. "metadata": {
  31320. "type": "object"
  31321. },
  31322. "type": {
  31323. "type": "string",
  31324. "enum": ["message.part.delta"]
  31325. },
  31326. "durable": {
  31327. "type": "object",
  31328. "properties": {
  31329. "aggregateID": {
  31330. "type": "string"
  31331. },
  31332. "seq": {
  31333. "type": "integer"
  31334. },
  31335. "version": {
  31336. "type": "integer"
  31337. }
  31338. },
  31339. "required": ["aggregateID", "seq", "version"],
  31340. "additionalProperties": false
  31341. },
  31342. "location": {
  31343. "$ref": "#/components/schemas/LocationRef"
  31344. },
  31345. "data": {
  31346. "type": "object",
  31347. "properties": {
  31348. "sessionID": {
  31349. "type": "string",
  31350. "pattern": "^ses"
  31351. },
  31352. "messageID": {
  31353. "type": "string",
  31354. "pattern": "^msg"
  31355. },
  31356. "partID": {
  31357. "type": "string",
  31358. "pattern": "^prt"
  31359. },
  31360. "field": {
  31361. "type": "string"
  31362. },
  31363. "delta": {
  31364. "type": "string"
  31365. }
  31366. },
  31367. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  31368. "additionalProperties": false
  31369. }
  31370. },
  31371. "required": ["id", "type", "data"],
  31372. "additionalProperties": false
  31373. },
  31374. "SessionDiff": {
  31375. "type": "object",
  31376. "properties": {
  31377. "id": {
  31378. "type": "string",
  31379. "pattern": "^evt_"
  31380. },
  31381. "metadata": {
  31382. "type": "object"
  31383. },
  31384. "type": {
  31385. "type": "string",
  31386. "enum": ["session.diff"]
  31387. },
  31388. "durable": {
  31389. "type": "object",
  31390. "properties": {
  31391. "aggregateID": {
  31392. "type": "string"
  31393. },
  31394. "seq": {
  31395. "type": "integer"
  31396. },
  31397. "version": {
  31398. "type": "integer"
  31399. }
  31400. },
  31401. "required": ["aggregateID", "seq", "version"],
  31402. "additionalProperties": false
  31403. },
  31404. "location": {
  31405. "$ref": "#/components/schemas/LocationRef"
  31406. },
  31407. "data": {
  31408. "type": "object",
  31409. "properties": {
  31410. "sessionID": {
  31411. "type": "string",
  31412. "pattern": "^ses"
  31413. },
  31414. "diff": {
  31415. "type": "array",
  31416. "items": {
  31417. "$ref": "#/components/schemas/SnapshotFileDiff"
  31418. }
  31419. }
  31420. },
  31421. "required": ["sessionID", "diff"],
  31422. "additionalProperties": false
  31423. }
  31424. },
  31425. "required": ["id", "type", "data"],
  31426. "additionalProperties": false
  31427. },
  31428. "SessionError": {
  31429. "type": "object",
  31430. "properties": {
  31431. "id": {
  31432. "type": "string",
  31433. "pattern": "^evt_"
  31434. },
  31435. "metadata": {
  31436. "type": "object"
  31437. },
  31438. "type": {
  31439. "type": "string",
  31440. "enum": ["session.error"]
  31441. },
  31442. "durable": {
  31443. "type": "object",
  31444. "properties": {
  31445. "aggregateID": {
  31446. "type": "string"
  31447. },
  31448. "seq": {
  31449. "type": "integer"
  31450. },
  31451. "version": {
  31452. "type": "integer"
  31453. }
  31454. },
  31455. "required": ["aggregateID", "seq", "version"],
  31456. "additionalProperties": false
  31457. },
  31458. "location": {
  31459. "$ref": "#/components/schemas/LocationRef"
  31460. },
  31461. "data": {
  31462. "type": "object",
  31463. "properties": {
  31464. "sessionID": {
  31465. "type": "string",
  31466. "pattern": "^ses"
  31467. },
  31468. "error": {
  31469. "anyOf": [
  31470. {
  31471. "$ref": "#/components/schemas/ProviderAuthError"
  31472. },
  31473. {
  31474. "$ref": "#/components/schemas/UnknownError"
  31475. },
  31476. {
  31477. "$ref": "#/components/schemas/MessageOutputLengthError"
  31478. },
  31479. {
  31480. "$ref": "#/components/schemas/MessageAbortedError"
  31481. },
  31482. {
  31483. "$ref": "#/components/schemas/StructuredOutputError"
  31484. },
  31485. {
  31486. "$ref": "#/components/schemas/ContextOverflowError"
  31487. },
  31488. {
  31489. "$ref": "#/components/schemas/ContentFilterError"
  31490. },
  31491. {
  31492. "$ref": "#/components/schemas/APIError"
  31493. }
  31494. ]
  31495. }
  31496. },
  31497. "additionalProperties": false
  31498. }
  31499. },
  31500. "required": ["id", "type", "data"],
  31501. "additionalProperties": false
  31502. },
  31503. "InstallationUpdated": {
  31504. "type": "object",
  31505. "properties": {
  31506. "id": {
  31507. "type": "string",
  31508. "pattern": "^evt_"
  31509. },
  31510. "metadata": {
  31511. "type": "object"
  31512. },
  31513. "type": {
  31514. "type": "string",
  31515. "enum": ["installation.updated"]
  31516. },
  31517. "durable": {
  31518. "type": "object",
  31519. "properties": {
  31520. "aggregateID": {
  31521. "type": "string"
  31522. },
  31523. "seq": {
  31524. "type": "integer"
  31525. },
  31526. "version": {
  31527. "type": "integer"
  31528. }
  31529. },
  31530. "required": ["aggregateID", "seq", "version"],
  31531. "additionalProperties": false
  31532. },
  31533. "location": {
  31534. "$ref": "#/components/schemas/LocationRef"
  31535. },
  31536. "data": {
  31537. "type": "object",
  31538. "properties": {
  31539. "version": {
  31540. "type": "string"
  31541. }
  31542. },
  31543. "required": ["version"],
  31544. "additionalProperties": false
  31545. }
  31546. },
  31547. "required": ["id", "type", "data"],
  31548. "additionalProperties": false
  31549. },
  31550. "InstallationUpdate-available": {
  31551. "type": "object",
  31552. "properties": {
  31553. "id": {
  31554. "type": "string",
  31555. "pattern": "^evt_"
  31556. },
  31557. "metadata": {
  31558. "type": "object"
  31559. },
  31560. "type": {
  31561. "type": "string",
  31562. "enum": ["installation.update-available"]
  31563. },
  31564. "durable": {
  31565. "type": "object",
  31566. "properties": {
  31567. "aggregateID": {
  31568. "type": "string"
  31569. },
  31570. "seq": {
  31571. "type": "integer"
  31572. },
  31573. "version": {
  31574. "type": "integer"
  31575. }
  31576. },
  31577. "required": ["aggregateID", "seq", "version"],
  31578. "additionalProperties": false
  31579. },
  31580. "location": {
  31581. "$ref": "#/components/schemas/LocationRef"
  31582. },
  31583. "data": {
  31584. "type": "object",
  31585. "properties": {
  31586. "version": {
  31587. "type": "string"
  31588. }
  31589. },
  31590. "required": ["version"],
  31591. "additionalProperties": false
  31592. }
  31593. },
  31594. "required": ["id", "type", "data"],
  31595. "additionalProperties": false
  31596. },
  31597. "FileEdited": {
  31598. "type": "object",
  31599. "properties": {
  31600. "id": {
  31601. "type": "string",
  31602. "pattern": "^evt_"
  31603. },
  31604. "metadata": {
  31605. "type": "object"
  31606. },
  31607. "type": {
  31608. "type": "string",
  31609. "enum": ["file.edited"]
  31610. },
  31611. "durable": {
  31612. "type": "object",
  31613. "properties": {
  31614. "aggregateID": {
  31615. "type": "string"
  31616. },
  31617. "seq": {
  31618. "type": "integer"
  31619. },
  31620. "version": {
  31621. "type": "integer"
  31622. }
  31623. },
  31624. "required": ["aggregateID", "seq", "version"],
  31625. "additionalProperties": false
  31626. },
  31627. "location": {
  31628. "$ref": "#/components/schemas/LocationRef"
  31629. },
  31630. "data": {
  31631. "type": "object",
  31632. "properties": {
  31633. "file": {
  31634. "type": "string"
  31635. }
  31636. },
  31637. "required": ["file"],
  31638. "additionalProperties": false
  31639. }
  31640. },
  31641. "required": ["id", "type", "data"],
  31642. "additionalProperties": false
  31643. },
  31644. "ReferenceUpdated": {
  31645. "type": "object",
  31646. "properties": {
  31647. "id": {
  31648. "type": "string",
  31649. "pattern": "^evt_"
  31650. },
  31651. "metadata": {
  31652. "type": "object"
  31653. },
  31654. "type": {
  31655. "type": "string",
  31656. "enum": ["reference.updated"]
  31657. },
  31658. "durable": {
  31659. "type": "object",
  31660. "properties": {
  31661. "aggregateID": {
  31662. "type": "string"
  31663. },
  31664. "seq": {
  31665. "type": "integer"
  31666. },
  31667. "version": {
  31668. "type": "integer"
  31669. }
  31670. },
  31671. "required": ["aggregateID", "seq", "version"],
  31672. "additionalProperties": false
  31673. },
  31674. "location": {
  31675. "$ref": "#/components/schemas/LocationRef"
  31676. },
  31677. "data": {
  31678. "type": "object",
  31679. "properties": {}
  31680. }
  31681. },
  31682. "required": ["id", "type", "data"],
  31683. "additionalProperties": false
  31684. },
  31685. "PermissionV2Asked": {
  31686. "type": "object",
  31687. "properties": {
  31688. "id": {
  31689. "type": "string",
  31690. "pattern": "^evt_"
  31691. },
  31692. "metadata": {
  31693. "type": "object"
  31694. },
  31695. "type": {
  31696. "type": "string",
  31697. "enum": ["permission.v2.asked"]
  31698. },
  31699. "durable": {
  31700. "type": "object",
  31701. "properties": {
  31702. "aggregateID": {
  31703. "type": "string"
  31704. },
  31705. "seq": {
  31706. "type": "integer"
  31707. },
  31708. "version": {
  31709. "type": "integer"
  31710. }
  31711. },
  31712. "required": ["aggregateID", "seq", "version"],
  31713. "additionalProperties": false
  31714. },
  31715. "location": {
  31716. "$ref": "#/components/schemas/LocationRef"
  31717. },
  31718. "data": {
  31719. "type": "object",
  31720. "properties": {
  31721. "id": {
  31722. "type": "string",
  31723. "pattern": "^per"
  31724. },
  31725. "sessionID": {
  31726. "type": "string",
  31727. "pattern": "^ses"
  31728. },
  31729. "action": {
  31730. "type": "string"
  31731. },
  31732. "resources": {
  31733. "type": "array",
  31734. "items": {
  31735. "type": "string"
  31736. }
  31737. },
  31738. "save": {
  31739. "type": "array",
  31740. "items": {
  31741. "type": "string"
  31742. }
  31743. },
  31744. "metadata": {
  31745. "type": "object"
  31746. },
  31747. "source": {
  31748. "$ref": "#/components/schemas/PermissionV2Source"
  31749. }
  31750. },
  31751. "required": ["id", "sessionID", "action", "resources"],
  31752. "additionalProperties": false
  31753. }
  31754. },
  31755. "required": ["id", "type", "data"],
  31756. "additionalProperties": false
  31757. },
  31758. "PermissionV2Replied": {
  31759. "type": "object",
  31760. "properties": {
  31761. "id": {
  31762. "type": "string",
  31763. "pattern": "^evt_"
  31764. },
  31765. "metadata": {
  31766. "type": "object"
  31767. },
  31768. "type": {
  31769. "type": "string",
  31770. "enum": ["permission.v2.replied"]
  31771. },
  31772. "durable": {
  31773. "type": "object",
  31774. "properties": {
  31775. "aggregateID": {
  31776. "type": "string"
  31777. },
  31778. "seq": {
  31779. "type": "integer"
  31780. },
  31781. "version": {
  31782. "type": "integer"
  31783. }
  31784. },
  31785. "required": ["aggregateID", "seq", "version"],
  31786. "additionalProperties": false
  31787. },
  31788. "location": {
  31789. "$ref": "#/components/schemas/LocationRef"
  31790. },
  31791. "data": {
  31792. "type": "object",
  31793. "properties": {
  31794. "sessionID": {
  31795. "type": "string",
  31796. "pattern": "^ses"
  31797. },
  31798. "requestID": {
  31799. "type": "string",
  31800. "pattern": "^per"
  31801. },
  31802. "reply": {
  31803. "$ref": "#/components/schemas/PermissionV2Reply"
  31804. }
  31805. },
  31806. "required": ["sessionID", "requestID", "reply"],
  31807. "additionalProperties": false
  31808. }
  31809. },
  31810. "required": ["id", "type", "data"],
  31811. "additionalProperties": false
  31812. },
  31813. "PluginAdded": {
  31814. "type": "object",
  31815. "properties": {
  31816. "id": {
  31817. "type": "string",
  31818. "pattern": "^evt_"
  31819. },
  31820. "metadata": {
  31821. "type": "object"
  31822. },
  31823. "type": {
  31824. "type": "string",
  31825. "enum": ["plugin.added"]
  31826. },
  31827. "durable": {
  31828. "type": "object",
  31829. "properties": {
  31830. "aggregateID": {
  31831. "type": "string"
  31832. },
  31833. "seq": {
  31834. "type": "integer"
  31835. },
  31836. "version": {
  31837. "type": "integer"
  31838. }
  31839. },
  31840. "required": ["aggregateID", "seq", "version"],
  31841. "additionalProperties": false
  31842. },
  31843. "location": {
  31844. "$ref": "#/components/schemas/LocationRef"
  31845. },
  31846. "data": {
  31847. "type": "object",
  31848. "properties": {
  31849. "id": {
  31850. "type": "string"
  31851. }
  31852. },
  31853. "required": ["id"],
  31854. "additionalProperties": false
  31855. }
  31856. },
  31857. "required": ["id", "type", "data"],
  31858. "additionalProperties": false
  31859. },
  31860. "ProjectDirectoriesUpdated": {
  31861. "type": "object",
  31862. "properties": {
  31863. "id": {
  31864. "type": "string",
  31865. "pattern": "^evt_"
  31866. },
  31867. "metadata": {
  31868. "type": "object"
  31869. },
  31870. "type": {
  31871. "type": "string",
  31872. "enum": ["project.directories.updated"]
  31873. },
  31874. "durable": {
  31875. "type": "object",
  31876. "properties": {
  31877. "aggregateID": {
  31878. "type": "string"
  31879. },
  31880. "seq": {
  31881. "type": "integer"
  31882. },
  31883. "version": {
  31884. "type": "integer"
  31885. }
  31886. },
  31887. "required": ["aggregateID", "seq", "version"],
  31888. "additionalProperties": false
  31889. },
  31890. "location": {
  31891. "$ref": "#/components/schemas/LocationRef"
  31892. },
  31893. "data": {
  31894. "type": "object",
  31895. "properties": {
  31896. "projectID": {
  31897. "type": "string"
  31898. }
  31899. },
  31900. "required": ["projectID"],
  31901. "additionalProperties": false
  31902. }
  31903. },
  31904. "required": ["id", "type", "data"],
  31905. "additionalProperties": false
  31906. },
  31907. "FileWatcherUpdated": {
  31908. "type": "object",
  31909. "properties": {
  31910. "id": {
  31911. "type": "string",
  31912. "pattern": "^evt_"
  31913. },
  31914. "metadata": {
  31915. "type": "object"
  31916. },
  31917. "type": {
  31918. "type": "string",
  31919. "enum": ["file.watcher.updated"]
  31920. },
  31921. "durable": {
  31922. "type": "object",
  31923. "properties": {
  31924. "aggregateID": {
  31925. "type": "string"
  31926. },
  31927. "seq": {
  31928. "type": "integer"
  31929. },
  31930. "version": {
  31931. "type": "integer"
  31932. }
  31933. },
  31934. "required": ["aggregateID", "seq", "version"],
  31935. "additionalProperties": false
  31936. },
  31937. "location": {
  31938. "$ref": "#/components/schemas/LocationRef"
  31939. },
  31940. "data": {
  31941. "type": "object",
  31942. "properties": {
  31943. "file": {
  31944. "type": "string"
  31945. },
  31946. "event": {
  31947. "type": "string",
  31948. "enum": ["add", "change", "unlink"]
  31949. }
  31950. },
  31951. "required": ["file", "event"],
  31952. "additionalProperties": false
  31953. }
  31954. },
  31955. "required": ["id", "type", "data"],
  31956. "additionalProperties": false
  31957. },
  31958. "PtyCreated": {
  31959. "type": "object",
  31960. "properties": {
  31961. "id": {
  31962. "type": "string",
  31963. "pattern": "^evt_"
  31964. },
  31965. "metadata": {
  31966. "type": "object"
  31967. },
  31968. "type": {
  31969. "type": "string",
  31970. "enum": ["pty.created"]
  31971. },
  31972. "durable": {
  31973. "type": "object",
  31974. "properties": {
  31975. "aggregateID": {
  31976. "type": "string"
  31977. },
  31978. "seq": {
  31979. "type": "integer"
  31980. },
  31981. "version": {
  31982. "type": "integer"
  31983. }
  31984. },
  31985. "required": ["aggregateID", "seq", "version"],
  31986. "additionalProperties": false
  31987. },
  31988. "location": {
  31989. "$ref": "#/components/schemas/LocationRef"
  31990. },
  31991. "data": {
  31992. "type": "object",
  31993. "properties": {
  31994. "info": {
  31995. "$ref": "#/components/schemas/Pty"
  31996. }
  31997. },
  31998. "required": ["info"],
  31999. "additionalProperties": false
  32000. }
  32001. },
  32002. "required": ["id", "type", "data"],
  32003. "additionalProperties": false
  32004. },
  32005. "PtyUpdated": {
  32006. "type": "object",
  32007. "properties": {
  32008. "id": {
  32009. "type": "string",
  32010. "pattern": "^evt_"
  32011. },
  32012. "metadata": {
  32013. "type": "object"
  32014. },
  32015. "type": {
  32016. "type": "string",
  32017. "enum": ["pty.updated"]
  32018. },
  32019. "durable": {
  32020. "type": "object",
  32021. "properties": {
  32022. "aggregateID": {
  32023. "type": "string"
  32024. },
  32025. "seq": {
  32026. "type": "integer"
  32027. },
  32028. "version": {
  32029. "type": "integer"
  32030. }
  32031. },
  32032. "required": ["aggregateID", "seq", "version"],
  32033. "additionalProperties": false
  32034. },
  32035. "location": {
  32036. "$ref": "#/components/schemas/LocationRef"
  32037. },
  32038. "data": {
  32039. "type": "object",
  32040. "properties": {
  32041. "info": {
  32042. "$ref": "#/components/schemas/Pty"
  32043. }
  32044. },
  32045. "required": ["info"],
  32046. "additionalProperties": false
  32047. }
  32048. },
  32049. "required": ["id", "type", "data"],
  32050. "additionalProperties": false
  32051. },
  32052. "PtyExited": {
  32053. "type": "object",
  32054. "properties": {
  32055. "id": {
  32056. "type": "string",
  32057. "pattern": "^evt_"
  32058. },
  32059. "metadata": {
  32060. "type": "object"
  32061. },
  32062. "type": {
  32063. "type": "string",
  32064. "enum": ["pty.exited"]
  32065. },
  32066. "durable": {
  32067. "type": "object",
  32068. "properties": {
  32069. "aggregateID": {
  32070. "type": "string"
  32071. },
  32072. "seq": {
  32073. "type": "integer"
  32074. },
  32075. "version": {
  32076. "type": "integer"
  32077. }
  32078. },
  32079. "required": ["aggregateID", "seq", "version"],
  32080. "additionalProperties": false
  32081. },
  32082. "location": {
  32083. "$ref": "#/components/schemas/LocationRef"
  32084. },
  32085. "data": {
  32086. "type": "object",
  32087. "properties": {
  32088. "id": {
  32089. "type": "string",
  32090. "pattern": "^pty"
  32091. },
  32092. "exitCode": {
  32093. "type": "integer",
  32094. "minimum": 0
  32095. }
  32096. },
  32097. "required": ["id", "exitCode"],
  32098. "additionalProperties": false
  32099. }
  32100. },
  32101. "required": ["id", "type", "data"],
  32102. "additionalProperties": false
  32103. },
  32104. "PtyDeleted": {
  32105. "type": "object",
  32106. "properties": {
  32107. "id": {
  32108. "type": "string",
  32109. "pattern": "^evt_"
  32110. },
  32111. "metadata": {
  32112. "type": "object"
  32113. },
  32114. "type": {
  32115. "type": "string",
  32116. "enum": ["pty.deleted"]
  32117. },
  32118. "durable": {
  32119. "type": "object",
  32120. "properties": {
  32121. "aggregateID": {
  32122. "type": "string"
  32123. },
  32124. "seq": {
  32125. "type": "integer"
  32126. },
  32127. "version": {
  32128. "type": "integer"
  32129. }
  32130. },
  32131. "required": ["aggregateID", "seq", "version"],
  32132. "additionalProperties": false
  32133. },
  32134. "location": {
  32135. "$ref": "#/components/schemas/LocationRef"
  32136. },
  32137. "data": {
  32138. "type": "object",
  32139. "properties": {
  32140. "id": {
  32141. "type": "string",
  32142. "pattern": "^pty"
  32143. }
  32144. },
  32145. "required": ["id"],
  32146. "additionalProperties": false
  32147. }
  32148. },
  32149. "required": ["id", "type", "data"],
  32150. "additionalProperties": false
  32151. },
  32152. "QuestionV2Asked": {
  32153. "type": "object",
  32154. "properties": {
  32155. "id": {
  32156. "type": "string",
  32157. "pattern": "^evt_"
  32158. },
  32159. "metadata": {
  32160. "type": "object"
  32161. },
  32162. "type": {
  32163. "type": "string",
  32164. "enum": ["question.v2.asked"]
  32165. },
  32166. "durable": {
  32167. "type": "object",
  32168. "properties": {
  32169. "aggregateID": {
  32170. "type": "string"
  32171. },
  32172. "seq": {
  32173. "type": "integer"
  32174. },
  32175. "version": {
  32176. "type": "integer"
  32177. }
  32178. },
  32179. "required": ["aggregateID", "seq", "version"],
  32180. "additionalProperties": false
  32181. },
  32182. "location": {
  32183. "$ref": "#/components/schemas/LocationRef"
  32184. },
  32185. "data": {
  32186. "type": "object",
  32187. "properties": {
  32188. "id": {
  32189. "type": "string",
  32190. "pattern": "^que"
  32191. },
  32192. "sessionID": {
  32193. "type": "string",
  32194. "pattern": "^ses"
  32195. },
  32196. "questions": {
  32197. "type": "array",
  32198. "items": {
  32199. "$ref": "#/components/schemas/QuestionV2Info"
  32200. },
  32201. "description": "Questions to ask"
  32202. },
  32203. "tool": {
  32204. "$ref": "#/components/schemas/QuestionV2Tool"
  32205. }
  32206. },
  32207. "required": ["id", "sessionID", "questions"],
  32208. "additionalProperties": false
  32209. }
  32210. },
  32211. "required": ["id", "type", "data"],
  32212. "additionalProperties": false
  32213. },
  32214. "QuestionV2Replied": {
  32215. "type": "object",
  32216. "properties": {
  32217. "id": {
  32218. "type": "string",
  32219. "pattern": "^evt_"
  32220. },
  32221. "metadata": {
  32222. "type": "object"
  32223. },
  32224. "type": {
  32225. "type": "string",
  32226. "enum": ["question.v2.replied"]
  32227. },
  32228. "durable": {
  32229. "type": "object",
  32230. "properties": {
  32231. "aggregateID": {
  32232. "type": "string"
  32233. },
  32234. "seq": {
  32235. "type": "integer"
  32236. },
  32237. "version": {
  32238. "type": "integer"
  32239. }
  32240. },
  32241. "required": ["aggregateID", "seq", "version"],
  32242. "additionalProperties": false
  32243. },
  32244. "location": {
  32245. "$ref": "#/components/schemas/LocationRef"
  32246. },
  32247. "data": {
  32248. "type": "object",
  32249. "properties": {
  32250. "sessionID": {
  32251. "type": "string",
  32252. "pattern": "^ses"
  32253. },
  32254. "requestID": {
  32255. "type": "string",
  32256. "pattern": "^que"
  32257. },
  32258. "answers": {
  32259. "type": "array",
  32260. "items": {
  32261. "$ref": "#/components/schemas/QuestionV2Answer"
  32262. }
  32263. }
  32264. },
  32265. "required": ["sessionID", "requestID", "answers"],
  32266. "additionalProperties": false
  32267. }
  32268. },
  32269. "required": ["id", "type", "data"],
  32270. "additionalProperties": false
  32271. },
  32272. "QuestionV2Rejected": {
  32273. "type": "object",
  32274. "properties": {
  32275. "id": {
  32276. "type": "string",
  32277. "pattern": "^evt_"
  32278. },
  32279. "metadata": {
  32280. "type": "object"
  32281. },
  32282. "type": {
  32283. "type": "string",
  32284. "enum": ["question.v2.rejected"]
  32285. },
  32286. "durable": {
  32287. "type": "object",
  32288. "properties": {
  32289. "aggregateID": {
  32290. "type": "string"
  32291. },
  32292. "seq": {
  32293. "type": "integer"
  32294. },
  32295. "version": {
  32296. "type": "integer"
  32297. }
  32298. },
  32299. "required": ["aggregateID", "seq", "version"],
  32300. "additionalProperties": false
  32301. },
  32302. "location": {
  32303. "$ref": "#/components/schemas/LocationRef"
  32304. },
  32305. "data": {
  32306. "type": "object",
  32307. "properties": {
  32308. "sessionID": {
  32309. "type": "string",
  32310. "pattern": "^ses"
  32311. },
  32312. "requestID": {
  32313. "type": "string",
  32314. "pattern": "^que"
  32315. }
  32316. },
  32317. "required": ["sessionID", "requestID"],
  32318. "additionalProperties": false
  32319. }
  32320. },
  32321. "required": ["id", "type", "data"],
  32322. "additionalProperties": false
  32323. },
  32324. "LspUpdated": {
  32325. "type": "object",
  32326. "properties": {
  32327. "id": {
  32328. "type": "string",
  32329. "pattern": "^evt_"
  32330. },
  32331. "metadata": {
  32332. "type": "object"
  32333. },
  32334. "type": {
  32335. "type": "string",
  32336. "enum": ["lsp.updated"]
  32337. },
  32338. "durable": {
  32339. "type": "object",
  32340. "properties": {
  32341. "aggregateID": {
  32342. "type": "string"
  32343. },
  32344. "seq": {
  32345. "type": "integer"
  32346. },
  32347. "version": {
  32348. "type": "integer"
  32349. }
  32350. },
  32351. "required": ["aggregateID", "seq", "version"],
  32352. "additionalProperties": false
  32353. },
  32354. "location": {
  32355. "$ref": "#/components/schemas/LocationRef"
  32356. },
  32357. "data": {
  32358. "type": "object",
  32359. "properties": {}
  32360. }
  32361. },
  32362. "required": ["id", "type", "data"],
  32363. "additionalProperties": false
  32364. },
  32365. "PermissionAsked": {
  32366. "type": "object",
  32367. "properties": {
  32368. "id": {
  32369. "type": "string",
  32370. "pattern": "^evt_"
  32371. },
  32372. "metadata": {
  32373. "type": "object"
  32374. },
  32375. "type": {
  32376. "type": "string",
  32377. "enum": ["permission.asked"]
  32378. },
  32379. "durable": {
  32380. "type": "object",
  32381. "properties": {
  32382. "aggregateID": {
  32383. "type": "string"
  32384. },
  32385. "seq": {
  32386. "type": "integer"
  32387. },
  32388. "version": {
  32389. "type": "integer"
  32390. }
  32391. },
  32392. "required": ["aggregateID", "seq", "version"],
  32393. "additionalProperties": false
  32394. },
  32395. "location": {
  32396. "$ref": "#/components/schemas/LocationRef"
  32397. },
  32398. "data": {
  32399. "type": "object",
  32400. "properties": {
  32401. "id": {
  32402. "type": "string",
  32403. "pattern": "^per"
  32404. },
  32405. "sessionID": {
  32406. "type": "string",
  32407. "pattern": "^ses"
  32408. },
  32409. "permission": {
  32410. "type": "string"
  32411. },
  32412. "patterns": {
  32413. "type": "array",
  32414. "items": {
  32415. "type": "string"
  32416. }
  32417. },
  32418. "metadata": {
  32419. "type": "object"
  32420. },
  32421. "always": {
  32422. "type": "array",
  32423. "items": {
  32424. "type": "string"
  32425. }
  32426. },
  32427. "tool": {
  32428. "type": "object",
  32429. "properties": {
  32430. "messageID": {
  32431. "type": "string"
  32432. },
  32433. "callID": {
  32434. "type": "string"
  32435. }
  32436. },
  32437. "required": ["messageID", "callID"],
  32438. "additionalProperties": false
  32439. }
  32440. },
  32441. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  32442. "additionalProperties": false
  32443. }
  32444. },
  32445. "required": ["id", "type", "data"],
  32446. "additionalProperties": false
  32447. },
  32448. "PermissionReplied": {
  32449. "type": "object",
  32450. "properties": {
  32451. "id": {
  32452. "type": "string",
  32453. "pattern": "^evt_"
  32454. },
  32455. "metadata": {
  32456. "type": "object"
  32457. },
  32458. "type": {
  32459. "type": "string",
  32460. "enum": ["permission.replied"]
  32461. },
  32462. "durable": {
  32463. "type": "object",
  32464. "properties": {
  32465. "aggregateID": {
  32466. "type": "string"
  32467. },
  32468. "seq": {
  32469. "type": "integer"
  32470. },
  32471. "version": {
  32472. "type": "integer"
  32473. }
  32474. },
  32475. "required": ["aggregateID", "seq", "version"],
  32476. "additionalProperties": false
  32477. },
  32478. "location": {
  32479. "$ref": "#/components/schemas/LocationRef"
  32480. },
  32481. "data": {
  32482. "type": "object",
  32483. "properties": {
  32484. "sessionID": {
  32485. "type": "string",
  32486. "pattern": "^ses"
  32487. },
  32488. "requestID": {
  32489. "type": "string",
  32490. "pattern": "^per"
  32491. },
  32492. "reply": {
  32493. "type": "string",
  32494. "enum": ["once", "always", "reject"]
  32495. }
  32496. },
  32497. "required": ["sessionID", "requestID", "reply"],
  32498. "additionalProperties": false
  32499. }
  32500. },
  32501. "required": ["id", "type", "data"],
  32502. "additionalProperties": false
  32503. },
  32504. "TuiPromptAppend": {
  32505. "type": "object",
  32506. "properties": {
  32507. "id": {
  32508. "type": "string",
  32509. "pattern": "^evt_"
  32510. },
  32511. "metadata": {
  32512. "type": "object"
  32513. },
  32514. "type": {
  32515. "type": "string",
  32516. "enum": ["tui.prompt.append"]
  32517. },
  32518. "durable": {
  32519. "type": "object",
  32520. "properties": {
  32521. "aggregateID": {
  32522. "type": "string"
  32523. },
  32524. "seq": {
  32525. "type": "integer"
  32526. },
  32527. "version": {
  32528. "type": "integer"
  32529. }
  32530. },
  32531. "required": ["aggregateID", "seq", "version"],
  32532. "additionalProperties": false
  32533. },
  32534. "location": {
  32535. "$ref": "#/components/schemas/LocationRef"
  32536. },
  32537. "data": {
  32538. "type": "object",
  32539. "properties": {
  32540. "text": {
  32541. "type": "string"
  32542. }
  32543. },
  32544. "required": ["text"],
  32545. "additionalProperties": false
  32546. }
  32547. },
  32548. "required": ["id", "type", "data"],
  32549. "additionalProperties": false
  32550. },
  32551. "TuiCommandExecute": {
  32552. "type": "object",
  32553. "properties": {
  32554. "id": {
  32555. "type": "string",
  32556. "pattern": "^evt_"
  32557. },
  32558. "metadata": {
  32559. "type": "object"
  32560. },
  32561. "type": {
  32562. "type": "string",
  32563. "enum": ["tui.command.execute"]
  32564. },
  32565. "durable": {
  32566. "type": "object",
  32567. "properties": {
  32568. "aggregateID": {
  32569. "type": "string"
  32570. },
  32571. "seq": {
  32572. "type": "integer"
  32573. },
  32574. "version": {
  32575. "type": "integer"
  32576. }
  32577. },
  32578. "required": ["aggregateID", "seq", "version"],
  32579. "additionalProperties": false
  32580. },
  32581. "location": {
  32582. "$ref": "#/components/schemas/LocationRef"
  32583. },
  32584. "data": {
  32585. "type": "object",
  32586. "properties": {
  32587. "command": {
  32588. "anyOf": [
  32589. {
  32590. "type": "string",
  32591. "enum": [
  32592. "session.list",
  32593. "session.new",
  32594. "session.share",
  32595. "session.interrupt",
  32596. "session.compact",
  32597. "session.page.up",
  32598. "session.page.down",
  32599. "session.line.up",
  32600. "session.line.down",
  32601. "session.half.page.up",
  32602. "session.half.page.down",
  32603. "session.first",
  32604. "session.last",
  32605. "prompt.clear",
  32606. "prompt.submit",
  32607. "agent.cycle"
  32608. ]
  32609. },
  32610. {
  32611. "type": "string"
  32612. }
  32613. ]
  32614. }
  32615. },
  32616. "required": ["command"],
  32617. "additionalProperties": false
  32618. }
  32619. },
  32620. "required": ["id", "type", "data"],
  32621. "additionalProperties": false
  32622. },
  32623. "TuiToastShow": {
  32624. "type": "object",
  32625. "properties": {
  32626. "id": {
  32627. "type": "string",
  32628. "pattern": "^evt_"
  32629. },
  32630. "metadata": {
  32631. "type": "object"
  32632. },
  32633. "type": {
  32634. "type": "string",
  32635. "enum": ["tui.toast.show"]
  32636. },
  32637. "durable": {
  32638. "type": "object",
  32639. "properties": {
  32640. "aggregateID": {
  32641. "type": "string"
  32642. },
  32643. "seq": {
  32644. "type": "integer"
  32645. },
  32646. "version": {
  32647. "type": "integer"
  32648. }
  32649. },
  32650. "required": ["aggregateID", "seq", "version"],
  32651. "additionalProperties": false
  32652. },
  32653. "location": {
  32654. "$ref": "#/components/schemas/LocationRef"
  32655. },
  32656. "data": {
  32657. "type": "object",
  32658. "properties": {
  32659. "title": {
  32660. "type": "string"
  32661. },
  32662. "message": {
  32663. "type": "string"
  32664. },
  32665. "variant": {
  32666. "type": "string",
  32667. "enum": ["info", "success", "warning", "error"]
  32668. },
  32669. "duration": {
  32670. "type": "integer",
  32671. "exclusiveMinimum": 0
  32672. }
  32673. },
  32674. "required": ["message", "variant"],
  32675. "additionalProperties": false
  32676. }
  32677. },
  32678. "required": ["id", "type", "data"],
  32679. "additionalProperties": false
  32680. },
  32681. "TuiSessionSelect": {
  32682. "type": "object",
  32683. "properties": {
  32684. "id": {
  32685. "type": "string",
  32686. "pattern": "^evt_"
  32687. },
  32688. "metadata": {
  32689. "type": "object"
  32690. },
  32691. "type": {
  32692. "type": "string",
  32693. "enum": ["tui.session.select"]
  32694. },
  32695. "durable": {
  32696. "type": "object",
  32697. "properties": {
  32698. "aggregateID": {
  32699. "type": "string"
  32700. },
  32701. "seq": {
  32702. "type": "integer"
  32703. },
  32704. "version": {
  32705. "type": "integer"
  32706. }
  32707. },
  32708. "required": ["aggregateID", "seq", "version"],
  32709. "additionalProperties": false
  32710. },
  32711. "location": {
  32712. "$ref": "#/components/schemas/LocationRef"
  32713. },
  32714. "data": {
  32715. "type": "object",
  32716. "properties": {
  32717. "sessionID": {
  32718. "type": "string",
  32719. "pattern": "^ses",
  32720. "description": "Session ID to navigate to"
  32721. }
  32722. },
  32723. "required": ["sessionID"],
  32724. "additionalProperties": false
  32725. }
  32726. },
  32727. "required": ["id", "type", "data"],
  32728. "additionalProperties": false
  32729. },
  32730. "McpToolsChanged": {
  32731. "type": "object",
  32732. "properties": {
  32733. "id": {
  32734. "type": "string",
  32735. "pattern": "^evt_"
  32736. },
  32737. "metadata": {
  32738. "type": "object"
  32739. },
  32740. "type": {
  32741. "type": "string",
  32742. "enum": ["mcp.tools.changed"]
  32743. },
  32744. "durable": {
  32745. "type": "object",
  32746. "properties": {
  32747. "aggregateID": {
  32748. "type": "string"
  32749. },
  32750. "seq": {
  32751. "type": "integer"
  32752. },
  32753. "version": {
  32754. "type": "integer"
  32755. }
  32756. },
  32757. "required": ["aggregateID", "seq", "version"],
  32758. "additionalProperties": false
  32759. },
  32760. "location": {
  32761. "$ref": "#/components/schemas/LocationRef"
  32762. },
  32763. "data": {
  32764. "type": "object",
  32765. "properties": {
  32766. "server": {
  32767. "type": "string"
  32768. }
  32769. },
  32770. "required": ["server"],
  32771. "additionalProperties": false
  32772. }
  32773. },
  32774. "required": ["id", "type", "data"],
  32775. "additionalProperties": false
  32776. },
  32777. "McpBrowserOpenFailed": {
  32778. "type": "object",
  32779. "properties": {
  32780. "id": {
  32781. "type": "string",
  32782. "pattern": "^evt_"
  32783. },
  32784. "metadata": {
  32785. "type": "object"
  32786. },
  32787. "type": {
  32788. "type": "string",
  32789. "enum": ["mcp.browser.open.failed"]
  32790. },
  32791. "durable": {
  32792. "type": "object",
  32793. "properties": {
  32794. "aggregateID": {
  32795. "type": "string"
  32796. },
  32797. "seq": {
  32798. "type": "integer"
  32799. },
  32800. "version": {
  32801. "type": "integer"
  32802. }
  32803. },
  32804. "required": ["aggregateID", "seq", "version"],
  32805. "additionalProperties": false
  32806. },
  32807. "location": {
  32808. "$ref": "#/components/schemas/LocationRef"
  32809. },
  32810. "data": {
  32811. "type": "object",
  32812. "properties": {
  32813. "mcpName": {
  32814. "type": "string"
  32815. },
  32816. "url": {
  32817. "type": "string"
  32818. }
  32819. },
  32820. "required": ["mcpName", "url"],
  32821. "additionalProperties": false
  32822. }
  32823. },
  32824. "required": ["id", "type", "data"],
  32825. "additionalProperties": false
  32826. },
  32827. "CommandExecuted": {
  32828. "type": "object",
  32829. "properties": {
  32830. "id": {
  32831. "type": "string",
  32832. "pattern": "^evt_"
  32833. },
  32834. "metadata": {
  32835. "type": "object"
  32836. },
  32837. "type": {
  32838. "type": "string",
  32839. "enum": ["command.executed"]
  32840. },
  32841. "durable": {
  32842. "type": "object",
  32843. "properties": {
  32844. "aggregateID": {
  32845. "type": "string"
  32846. },
  32847. "seq": {
  32848. "type": "integer"
  32849. },
  32850. "version": {
  32851. "type": "integer"
  32852. }
  32853. },
  32854. "required": ["aggregateID", "seq", "version"],
  32855. "additionalProperties": false
  32856. },
  32857. "location": {
  32858. "$ref": "#/components/schemas/LocationRef"
  32859. },
  32860. "data": {
  32861. "type": "object",
  32862. "properties": {
  32863. "name": {
  32864. "type": "string"
  32865. },
  32866. "sessionID": {
  32867. "type": "string",
  32868. "pattern": "^ses"
  32869. },
  32870. "arguments": {
  32871. "type": "string"
  32872. },
  32873. "messageID": {
  32874. "type": "string",
  32875. "pattern": "^msg"
  32876. }
  32877. },
  32878. "required": ["name", "sessionID", "arguments", "messageID"],
  32879. "additionalProperties": false
  32880. }
  32881. },
  32882. "required": ["id", "type", "data"],
  32883. "additionalProperties": false
  32884. },
  32885. "ProjectUpdated": {
  32886. "type": "object",
  32887. "properties": {
  32888. "id": {
  32889. "type": "string",
  32890. "pattern": "^evt_"
  32891. },
  32892. "metadata": {
  32893. "type": "object"
  32894. },
  32895. "type": {
  32896. "type": "string",
  32897. "enum": ["project.updated"]
  32898. },
  32899. "durable": {
  32900. "type": "object",
  32901. "properties": {
  32902. "aggregateID": {
  32903. "type": "string"
  32904. },
  32905. "seq": {
  32906. "type": "integer"
  32907. },
  32908. "version": {
  32909. "type": "integer"
  32910. }
  32911. },
  32912. "required": ["aggregateID", "seq", "version"],
  32913. "additionalProperties": false
  32914. },
  32915. "location": {
  32916. "$ref": "#/components/schemas/LocationRef"
  32917. },
  32918. "data": {
  32919. "type": "object",
  32920. "properties": {
  32921. "id": {
  32922. "type": "string"
  32923. },
  32924. "worktree": {
  32925. "type": "string"
  32926. },
  32927. "vcs": {
  32928. "$ref": "#/components/schemas/ProjectVcs"
  32929. },
  32930. "name": {
  32931. "type": "string"
  32932. },
  32933. "icon": {
  32934. "$ref": "#/components/schemas/ProjectIcon"
  32935. },
  32936. "commands": {
  32937. "$ref": "#/components/schemas/ProjectCommands"
  32938. },
  32939. "time": {
  32940. "$ref": "#/components/schemas/ProjectTime"
  32941. },
  32942. "sandboxes": {
  32943. "type": "array",
  32944. "items": {
  32945. "type": "string"
  32946. }
  32947. }
  32948. },
  32949. "required": ["id", "worktree", "time", "sandboxes"],
  32950. "additionalProperties": false
  32951. }
  32952. },
  32953. "required": ["id", "type", "data"],
  32954. "additionalProperties": false
  32955. },
  32956. "SessionIdle": {
  32957. "type": "object",
  32958. "properties": {
  32959. "id": {
  32960. "type": "string",
  32961. "pattern": "^evt_"
  32962. },
  32963. "metadata": {
  32964. "type": "object"
  32965. },
  32966. "type": {
  32967. "type": "string",
  32968. "enum": ["session.idle"]
  32969. },
  32970. "durable": {
  32971. "type": "object",
  32972. "properties": {
  32973. "aggregateID": {
  32974. "type": "string"
  32975. },
  32976. "seq": {
  32977. "type": "integer"
  32978. },
  32979. "version": {
  32980. "type": "integer"
  32981. }
  32982. },
  32983. "required": ["aggregateID", "seq", "version"],
  32984. "additionalProperties": false
  32985. },
  32986. "location": {
  32987. "$ref": "#/components/schemas/LocationRef"
  32988. },
  32989. "data": {
  32990. "type": "object",
  32991. "properties": {
  32992. "sessionID": {
  32993. "type": "string",
  32994. "pattern": "^ses"
  32995. }
  32996. },
  32997. "required": ["sessionID"],
  32998. "additionalProperties": false
  32999. }
  33000. },
  33001. "required": ["id", "type", "data"],
  33002. "additionalProperties": false
  33003. },
  33004. "QuestionAsked": {
  33005. "type": "object",
  33006. "properties": {
  33007. "id": {
  33008. "type": "string",
  33009. "pattern": "^evt_"
  33010. },
  33011. "metadata": {
  33012. "type": "object"
  33013. },
  33014. "type": {
  33015. "type": "string",
  33016. "enum": ["question.asked"]
  33017. },
  33018. "durable": {
  33019. "type": "object",
  33020. "properties": {
  33021. "aggregateID": {
  33022. "type": "string"
  33023. },
  33024. "seq": {
  33025. "type": "integer"
  33026. },
  33027. "version": {
  33028. "type": "integer"
  33029. }
  33030. },
  33031. "required": ["aggregateID", "seq", "version"],
  33032. "additionalProperties": false
  33033. },
  33034. "location": {
  33035. "$ref": "#/components/schemas/LocationRef"
  33036. },
  33037. "data": {
  33038. "type": "object",
  33039. "properties": {
  33040. "id": {
  33041. "type": "string",
  33042. "pattern": "^que"
  33043. },
  33044. "sessionID": {
  33045. "type": "string",
  33046. "pattern": "^ses"
  33047. },
  33048. "questions": {
  33049. "type": "array",
  33050. "items": {
  33051. "$ref": "#/components/schemas/QuestionInfo"
  33052. },
  33053. "description": "Questions to ask"
  33054. },
  33055. "tool": {
  33056. "$ref": "#/components/schemas/QuestionTool"
  33057. }
  33058. },
  33059. "required": ["id", "sessionID", "questions"],
  33060. "additionalProperties": false
  33061. }
  33062. },
  33063. "required": ["id", "type", "data"],
  33064. "additionalProperties": false
  33065. },
  33066. "SessionCompacted": {
  33067. "type": "object",
  33068. "properties": {
  33069. "id": {
  33070. "type": "string",
  33071. "pattern": "^evt_"
  33072. },
  33073. "metadata": {
  33074. "type": "object"
  33075. },
  33076. "type": {
  33077. "type": "string",
  33078. "enum": ["session.compacted"]
  33079. },
  33080. "durable": {
  33081. "type": "object",
  33082. "properties": {
  33083. "aggregateID": {
  33084. "type": "string"
  33085. },
  33086. "seq": {
  33087. "type": "integer"
  33088. },
  33089. "version": {
  33090. "type": "integer"
  33091. }
  33092. },
  33093. "required": ["aggregateID", "seq", "version"],
  33094. "additionalProperties": false
  33095. },
  33096. "location": {
  33097. "$ref": "#/components/schemas/LocationRef"
  33098. },
  33099. "data": {
  33100. "type": "object",
  33101. "properties": {
  33102. "sessionID": {
  33103. "type": "string",
  33104. "pattern": "^ses"
  33105. }
  33106. },
  33107. "required": ["sessionID"],
  33108. "additionalProperties": false
  33109. }
  33110. },
  33111. "required": ["id", "type", "data"],
  33112. "additionalProperties": false
  33113. },
  33114. "VcsBranchUpdated": {
  33115. "type": "object",
  33116. "properties": {
  33117. "id": {
  33118. "type": "string",
  33119. "pattern": "^evt_"
  33120. },
  33121. "metadata": {
  33122. "type": "object"
  33123. },
  33124. "type": {
  33125. "type": "string",
  33126. "enum": ["vcs.branch.updated"]
  33127. },
  33128. "durable": {
  33129. "type": "object",
  33130. "properties": {
  33131. "aggregateID": {
  33132. "type": "string"
  33133. },
  33134. "seq": {
  33135. "type": "integer"
  33136. },
  33137. "version": {
  33138. "type": "integer"
  33139. }
  33140. },
  33141. "required": ["aggregateID", "seq", "version"],
  33142. "additionalProperties": false
  33143. },
  33144. "location": {
  33145. "$ref": "#/components/schemas/LocationRef"
  33146. },
  33147. "data": {
  33148. "type": "object",
  33149. "properties": {
  33150. "branch": {
  33151. "type": "string"
  33152. }
  33153. },
  33154. "additionalProperties": false
  33155. }
  33156. },
  33157. "required": ["id", "type", "data"],
  33158. "additionalProperties": false
  33159. },
  33160. "WorkspaceReady": {
  33161. "type": "object",
  33162. "properties": {
  33163. "id": {
  33164. "type": "string",
  33165. "pattern": "^evt_"
  33166. },
  33167. "metadata": {
  33168. "type": "object"
  33169. },
  33170. "type": {
  33171. "type": "string",
  33172. "enum": ["workspace.ready"]
  33173. },
  33174. "durable": {
  33175. "type": "object",
  33176. "properties": {
  33177. "aggregateID": {
  33178. "type": "string"
  33179. },
  33180. "seq": {
  33181. "type": "integer"
  33182. },
  33183. "version": {
  33184. "type": "integer"
  33185. }
  33186. },
  33187. "required": ["aggregateID", "seq", "version"],
  33188. "additionalProperties": false
  33189. },
  33190. "location": {
  33191. "$ref": "#/components/schemas/LocationRef"
  33192. },
  33193. "data": {
  33194. "type": "object",
  33195. "properties": {
  33196. "name": {
  33197. "type": "string"
  33198. }
  33199. },
  33200. "required": ["name"],
  33201. "additionalProperties": false
  33202. }
  33203. },
  33204. "required": ["id", "type", "data"],
  33205. "additionalProperties": false
  33206. },
  33207. "WorkspaceFailed": {
  33208. "type": "object",
  33209. "properties": {
  33210. "id": {
  33211. "type": "string",
  33212. "pattern": "^evt_"
  33213. },
  33214. "metadata": {
  33215. "type": "object"
  33216. },
  33217. "type": {
  33218. "type": "string",
  33219. "enum": ["workspace.failed"]
  33220. },
  33221. "durable": {
  33222. "type": "object",
  33223. "properties": {
  33224. "aggregateID": {
  33225. "type": "string"
  33226. },
  33227. "seq": {
  33228. "type": "integer"
  33229. },
  33230. "version": {
  33231. "type": "integer"
  33232. }
  33233. },
  33234. "required": ["aggregateID", "seq", "version"],
  33235. "additionalProperties": false
  33236. },
  33237. "location": {
  33238. "$ref": "#/components/schemas/LocationRef"
  33239. },
  33240. "data": {
  33241. "type": "object",
  33242. "properties": {
  33243. "message": {
  33244. "type": "string"
  33245. }
  33246. },
  33247. "required": ["message"],
  33248. "additionalProperties": false
  33249. }
  33250. },
  33251. "required": ["id", "type", "data"],
  33252. "additionalProperties": false
  33253. },
  33254. "WorkspaceStatus": {
  33255. "type": "object",
  33256. "properties": {
  33257. "id": {
  33258. "type": "string",
  33259. "pattern": "^evt_"
  33260. },
  33261. "metadata": {
  33262. "type": "object"
  33263. },
  33264. "type": {
  33265. "type": "string",
  33266. "enum": ["workspace.status"]
  33267. },
  33268. "durable": {
  33269. "type": "object",
  33270. "properties": {
  33271. "aggregateID": {
  33272. "type": "string"
  33273. },
  33274. "seq": {
  33275. "type": "integer"
  33276. },
  33277. "version": {
  33278. "type": "integer"
  33279. }
  33280. },
  33281. "required": ["aggregateID", "seq", "version"],
  33282. "additionalProperties": false
  33283. },
  33284. "location": {
  33285. "$ref": "#/components/schemas/LocationRef"
  33286. },
  33287. "data": {
  33288. "type": "object",
  33289. "properties": {
  33290. "workspaceID": {
  33291. "type": "string",
  33292. "pattern": "^wrk"
  33293. },
  33294. "status": {
  33295. "type": "string",
  33296. "enum": ["connected", "connecting", "disconnected", "error"]
  33297. }
  33298. },
  33299. "required": ["workspaceID", "status"],
  33300. "additionalProperties": false
  33301. }
  33302. },
  33303. "required": ["id", "type", "data"],
  33304. "additionalProperties": false
  33305. },
  33306. "WorktreeReady": {
  33307. "type": "object",
  33308. "properties": {
  33309. "id": {
  33310. "type": "string",
  33311. "pattern": "^evt_"
  33312. },
  33313. "metadata": {
  33314. "type": "object"
  33315. },
  33316. "type": {
  33317. "type": "string",
  33318. "enum": ["worktree.ready"]
  33319. },
  33320. "durable": {
  33321. "type": "object",
  33322. "properties": {
  33323. "aggregateID": {
  33324. "type": "string"
  33325. },
  33326. "seq": {
  33327. "type": "integer"
  33328. },
  33329. "version": {
  33330. "type": "integer"
  33331. }
  33332. },
  33333. "required": ["aggregateID", "seq", "version"],
  33334. "additionalProperties": false
  33335. },
  33336. "location": {
  33337. "$ref": "#/components/schemas/LocationRef"
  33338. },
  33339. "data": {
  33340. "type": "object",
  33341. "properties": {
  33342. "name": {
  33343. "type": "string"
  33344. },
  33345. "branch": {
  33346. "type": "string"
  33347. }
  33348. },
  33349. "required": ["name"],
  33350. "additionalProperties": false
  33351. }
  33352. },
  33353. "required": ["id", "type", "data"],
  33354. "additionalProperties": false
  33355. },
  33356. "WorktreeFailed": {
  33357. "type": "object",
  33358. "properties": {
  33359. "id": {
  33360. "type": "string",
  33361. "pattern": "^evt_"
  33362. },
  33363. "metadata": {
  33364. "type": "object"
  33365. },
  33366. "type": {
  33367. "type": "string",
  33368. "enum": ["worktree.failed"]
  33369. },
  33370. "durable": {
  33371. "type": "object",
  33372. "properties": {
  33373. "aggregateID": {
  33374. "type": "string"
  33375. },
  33376. "seq": {
  33377. "type": "integer"
  33378. },
  33379. "version": {
  33380. "type": "integer"
  33381. }
  33382. },
  33383. "required": ["aggregateID", "seq", "version"],
  33384. "additionalProperties": false
  33385. },
  33386. "location": {
  33387. "$ref": "#/components/schemas/LocationRef"
  33388. },
  33389. "data": {
  33390. "type": "object",
  33391. "properties": {
  33392. "message": {
  33393. "type": "string"
  33394. }
  33395. },
  33396. "required": ["message"],
  33397. "additionalProperties": false
  33398. }
  33399. },
  33400. "required": ["id", "type", "data"],
  33401. "additionalProperties": false
  33402. },
  33403. "ServerConnected": {
  33404. "type": "object",
  33405. "properties": {
  33406. "id": {
  33407. "type": "string",
  33408. "pattern": "^evt_"
  33409. },
  33410. "metadata": {
  33411. "type": "object"
  33412. },
  33413. "type": {
  33414. "type": "string",
  33415. "enum": ["server.connected"]
  33416. },
  33417. "durable": {
  33418. "type": "object",
  33419. "properties": {
  33420. "aggregateID": {
  33421. "type": "string"
  33422. },
  33423. "seq": {
  33424. "type": "integer"
  33425. },
  33426. "version": {
  33427. "type": "integer"
  33428. }
  33429. },
  33430. "required": ["aggregateID", "seq", "version"],
  33431. "additionalProperties": false
  33432. },
  33433. "location": {
  33434. "$ref": "#/components/schemas/LocationRef"
  33435. },
  33436. "data": {
  33437. "type": "object",
  33438. "properties": {}
  33439. }
  33440. },
  33441. "required": ["id", "type", "data"],
  33442. "additionalProperties": false
  33443. },
  33444. "GlobalDisposed": {
  33445. "type": "object",
  33446. "properties": {
  33447. "id": {
  33448. "type": "string",
  33449. "pattern": "^evt_"
  33450. },
  33451. "metadata": {
  33452. "type": "object"
  33453. },
  33454. "type": {
  33455. "type": "string",
  33456. "enum": ["global.disposed"]
  33457. },
  33458. "durable": {
  33459. "type": "object",
  33460. "properties": {
  33461. "aggregateID": {
  33462. "type": "string"
  33463. },
  33464. "seq": {
  33465. "type": "integer"
  33466. },
  33467. "version": {
  33468. "type": "integer"
  33469. }
  33470. },
  33471. "required": ["aggregateID", "seq", "version"],
  33472. "additionalProperties": false
  33473. },
  33474. "location": {
  33475. "$ref": "#/components/schemas/LocationRef"
  33476. },
  33477. "data": {
  33478. "type": "object",
  33479. "properties": {}
  33480. }
  33481. },
  33482. "required": ["id", "type", "data"],
  33483. "additionalProperties": false
  33484. },
  33485. "QuestionV2Request": {
  33486. "type": "object",
  33487. "properties": {
  33488. "id": {
  33489. "type": "string",
  33490. "pattern": "^que"
  33491. },
  33492. "sessionID": {
  33493. "type": "string",
  33494. "pattern": "^ses"
  33495. },
  33496. "questions": {
  33497. "type": "array",
  33498. "items": {
  33499. "$ref": "#/components/schemas/QuestionV2Info"
  33500. },
  33501. "description": "Questions to ask"
  33502. },
  33503. "tool": {
  33504. "$ref": "#/components/schemas/QuestionV2Tool"
  33505. }
  33506. },
  33507. "required": ["id", "sessionID", "questions"],
  33508. "additionalProperties": false
  33509. },
  33510. "QuestionV2Reply": {
  33511. "type": "object",
  33512. "properties": {
  33513. "answers": {
  33514. "type": "array",
  33515. "items": {
  33516. "$ref": "#/components/schemas/QuestionV2Answer"
  33517. },
  33518. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33519. }
  33520. },
  33521. "required": ["answers"],
  33522. "additionalProperties": false
  33523. },
  33524. "ReferenceLocalSource": {
  33525. "type": "object",
  33526. "properties": {
  33527. "type": {
  33528. "type": "string",
  33529. "enum": ["local"]
  33530. },
  33531. "path": {
  33532. "type": "string"
  33533. },
  33534. "description": {
  33535. "type": "string"
  33536. },
  33537. "hidden": {
  33538. "type": "boolean"
  33539. }
  33540. },
  33541. "required": ["type", "path"],
  33542. "additionalProperties": false
  33543. },
  33544. "ReferenceGitSource": {
  33545. "type": "object",
  33546. "properties": {
  33547. "type": {
  33548. "type": "string",
  33549. "enum": ["git"]
  33550. },
  33551. "repository": {
  33552. "type": "string"
  33553. },
  33554. "branch": {
  33555. "type": "string"
  33556. },
  33557. "description": {
  33558. "type": "string"
  33559. },
  33560. "hidden": {
  33561. "type": "boolean"
  33562. }
  33563. },
  33564. "required": ["type", "repository"],
  33565. "additionalProperties": false
  33566. },
  33567. "ReferenceSource": {
  33568. "anyOf": [
  33569. {
  33570. "$ref": "#/components/schemas/ReferenceLocalSource"
  33571. },
  33572. {
  33573. "$ref": "#/components/schemas/ReferenceGitSource"
  33574. }
  33575. ]
  33576. },
  33577. "ReferenceInfo": {
  33578. "type": "object",
  33579. "properties": {
  33580. "name": {
  33581. "type": "string"
  33582. },
  33583. "path": {
  33584. "type": "string"
  33585. },
  33586. "description": {
  33587. "type": "string"
  33588. },
  33589. "hidden": {
  33590. "type": "boolean"
  33591. },
  33592. "source": {
  33593. "$ref": "#/components/schemas/ReferenceSource"
  33594. }
  33595. },
  33596. "required": ["name", "path", "source"],
  33597. "additionalProperties": false
  33598. },
  33599. "ProjectCopyCopy": {
  33600. "type": "object",
  33601. "properties": {
  33602. "directory": {
  33603. "type": "string"
  33604. }
  33605. },
  33606. "required": ["directory"],
  33607. "additionalProperties": false
  33608. },
  33609. "EventModels-devRefreshed": {
  33610. "type": "object",
  33611. "properties": {
  33612. "id": {
  33613. "type": "string",
  33614. "pattern": "^evt_"
  33615. },
  33616. "type": {
  33617. "type": "string",
  33618. "enum": ["models-dev.refreshed"]
  33619. },
  33620. "properties": {
  33621. "type": "object",
  33622. "properties": {}
  33623. }
  33624. },
  33625. "required": ["id", "type", "properties"],
  33626. "additionalProperties": false
  33627. },
  33628. "EventIntegrationUpdated": {
  33629. "type": "object",
  33630. "properties": {
  33631. "id": {
  33632. "type": "string",
  33633. "pattern": "^evt_"
  33634. },
  33635. "type": {
  33636. "type": "string",
  33637. "enum": ["integration.updated"]
  33638. },
  33639. "properties": {
  33640. "type": "object",
  33641. "properties": {}
  33642. }
  33643. },
  33644. "required": ["id", "type", "properties"],
  33645. "additionalProperties": false
  33646. },
  33647. "EventIntegrationConnectionUpdated": {
  33648. "type": "object",
  33649. "properties": {
  33650. "id": {
  33651. "type": "string",
  33652. "pattern": "^evt_"
  33653. },
  33654. "type": {
  33655. "type": "string",
  33656. "enum": ["integration.connection.updated"]
  33657. },
  33658. "properties": {
  33659. "type": "object",
  33660. "properties": {
  33661. "integrationID": {
  33662. "type": "string"
  33663. }
  33664. },
  33665. "required": ["integrationID"],
  33666. "additionalProperties": false
  33667. }
  33668. },
  33669. "required": ["id", "type", "properties"],
  33670. "additionalProperties": false
  33671. },
  33672. "EventCatalogUpdated": {
  33673. "type": "object",
  33674. "properties": {
  33675. "id": {
  33676. "type": "string",
  33677. "pattern": "^evt_"
  33678. },
  33679. "type": {
  33680. "type": "string",
  33681. "enum": ["catalog.updated"]
  33682. },
  33683. "properties": {
  33684. "type": "object",
  33685. "properties": {}
  33686. }
  33687. },
  33688. "required": ["id", "type", "properties"],
  33689. "additionalProperties": false
  33690. },
  33691. "EventSessionCreated": {
  33692. "type": "object",
  33693. "properties": {
  33694. "id": {
  33695. "type": "string",
  33696. "pattern": "^evt_"
  33697. },
  33698. "type": {
  33699. "type": "string",
  33700. "enum": ["session.created"]
  33701. },
  33702. "properties": {
  33703. "type": "object",
  33704. "properties": {
  33705. "sessionID": {
  33706. "type": "string",
  33707. "pattern": "^ses"
  33708. },
  33709. "info": {
  33710. "$ref": "#/components/schemas/Session"
  33711. }
  33712. },
  33713. "required": ["sessionID", "info"],
  33714. "additionalProperties": false
  33715. }
  33716. },
  33717. "required": ["id", "type", "properties"],
  33718. "additionalProperties": false
  33719. },
  33720. "EventSessionUpdated": {
  33721. "type": "object",
  33722. "properties": {
  33723. "id": {
  33724. "type": "string",
  33725. "pattern": "^evt_"
  33726. },
  33727. "type": {
  33728. "type": "string",
  33729. "enum": ["session.updated"]
  33730. },
  33731. "properties": {
  33732. "type": "object",
  33733. "properties": {
  33734. "sessionID": {
  33735. "type": "string",
  33736. "pattern": "^ses"
  33737. },
  33738. "info": {
  33739. "$ref": "#/components/schemas/Session"
  33740. }
  33741. },
  33742. "required": ["sessionID", "info"],
  33743. "additionalProperties": false
  33744. }
  33745. },
  33746. "required": ["id", "type", "properties"],
  33747. "additionalProperties": false
  33748. },
  33749. "EventSessionDeleted": {
  33750. "type": "object",
  33751. "properties": {
  33752. "id": {
  33753. "type": "string",
  33754. "pattern": "^evt_"
  33755. },
  33756. "type": {
  33757. "type": "string",
  33758. "enum": ["session.deleted"]
  33759. },
  33760. "properties": {
  33761. "type": "object",
  33762. "properties": {
  33763. "sessionID": {
  33764. "type": "string",
  33765. "pattern": "^ses"
  33766. },
  33767. "info": {
  33768. "$ref": "#/components/schemas/Session"
  33769. }
  33770. },
  33771. "required": ["sessionID", "info"],
  33772. "additionalProperties": false
  33773. }
  33774. },
  33775. "required": ["id", "type", "properties"],
  33776. "additionalProperties": false
  33777. },
  33778. "EventMessageUpdated": {
  33779. "type": "object",
  33780. "properties": {
  33781. "id": {
  33782. "type": "string",
  33783. "pattern": "^evt_"
  33784. },
  33785. "type": {
  33786. "type": "string",
  33787. "enum": ["message.updated"]
  33788. },
  33789. "properties": {
  33790. "type": "object",
  33791. "properties": {
  33792. "sessionID": {
  33793. "type": "string",
  33794. "pattern": "^ses"
  33795. },
  33796. "info": {
  33797. "$ref": "#/components/schemas/Message"
  33798. }
  33799. },
  33800. "required": ["sessionID", "info"],
  33801. "additionalProperties": false
  33802. }
  33803. },
  33804. "required": ["id", "type", "properties"],
  33805. "additionalProperties": false
  33806. },
  33807. "EventMessageRemoved": {
  33808. "type": "object",
  33809. "properties": {
  33810. "id": {
  33811. "type": "string",
  33812. "pattern": "^evt_"
  33813. },
  33814. "type": {
  33815. "type": "string",
  33816. "enum": ["message.removed"]
  33817. },
  33818. "properties": {
  33819. "type": "object",
  33820. "properties": {
  33821. "sessionID": {
  33822. "type": "string",
  33823. "pattern": "^ses"
  33824. },
  33825. "messageID": {
  33826. "type": "string",
  33827. "pattern": "^msg"
  33828. }
  33829. },
  33830. "required": ["sessionID", "messageID"],
  33831. "additionalProperties": false
  33832. }
  33833. },
  33834. "required": ["id", "type", "properties"],
  33835. "additionalProperties": false
  33836. },
  33837. "EventMessagePartUpdated": {
  33838. "type": "object",
  33839. "properties": {
  33840. "id": {
  33841. "type": "string",
  33842. "pattern": "^evt_"
  33843. },
  33844. "type": {
  33845. "type": "string",
  33846. "enum": ["message.part.updated"]
  33847. },
  33848. "properties": {
  33849. "type": "object",
  33850. "properties": {
  33851. "sessionID": {
  33852. "type": "string",
  33853. "pattern": "^ses"
  33854. },
  33855. "part": {
  33856. "$ref": "#/components/schemas/Part"
  33857. },
  33858. "time": {
  33859. "type": "number"
  33860. }
  33861. },
  33862. "required": ["sessionID", "part", "time"],
  33863. "additionalProperties": false
  33864. }
  33865. },
  33866. "required": ["id", "type", "properties"],
  33867. "additionalProperties": false
  33868. },
  33869. "EventMessagePartRemoved": {
  33870. "type": "object",
  33871. "properties": {
  33872. "id": {
  33873. "type": "string",
  33874. "pattern": "^evt_"
  33875. },
  33876. "type": {
  33877. "type": "string",
  33878. "enum": ["message.part.removed"]
  33879. },
  33880. "properties": {
  33881. "type": "object",
  33882. "properties": {
  33883. "sessionID": {
  33884. "type": "string",
  33885. "pattern": "^ses"
  33886. },
  33887. "messageID": {
  33888. "type": "string",
  33889. "pattern": "^msg"
  33890. },
  33891. "partID": {
  33892. "type": "string",
  33893. "pattern": "^prt"
  33894. }
  33895. },
  33896. "required": ["sessionID", "messageID", "partID"],
  33897. "additionalProperties": false
  33898. }
  33899. },
  33900. "required": ["id", "type", "properties"],
  33901. "additionalProperties": false
  33902. },
  33903. "EventSessionNextAgentSwitched": {
  33904. "type": "object",
  33905. "properties": {
  33906. "id": {
  33907. "type": "string",
  33908. "pattern": "^evt_"
  33909. },
  33910. "type": {
  33911. "type": "string",
  33912. "enum": ["session.next.agent.switched"]
  33913. },
  33914. "properties": {
  33915. "type": "object",
  33916. "properties": {
  33917. "timestamp": {
  33918. "type": "number"
  33919. },
  33920. "sessionID": {
  33921. "type": "string",
  33922. "pattern": "^ses"
  33923. },
  33924. "messageID": {
  33925. "type": "string",
  33926. "pattern": "^msg_"
  33927. },
  33928. "agent": {
  33929. "type": "string"
  33930. }
  33931. },
  33932. "required": ["timestamp", "sessionID", "messageID", "agent"],
  33933. "additionalProperties": false
  33934. }
  33935. },
  33936. "required": ["id", "type", "properties"],
  33937. "additionalProperties": false
  33938. },
  33939. "EventSessionNextModelSwitched": {
  33940. "type": "object",
  33941. "properties": {
  33942. "id": {
  33943. "type": "string",
  33944. "pattern": "^evt_"
  33945. },
  33946. "type": {
  33947. "type": "string",
  33948. "enum": ["session.next.model.switched"]
  33949. },
  33950. "properties": {
  33951. "type": "object",
  33952. "properties": {
  33953. "timestamp": {
  33954. "type": "number"
  33955. },
  33956. "sessionID": {
  33957. "type": "string",
  33958. "pattern": "^ses"
  33959. },
  33960. "messageID": {
  33961. "type": "string",
  33962. "pattern": "^msg_"
  33963. },
  33964. "model": {
  33965. "$ref": "#/components/schemas/ModelRef"
  33966. }
  33967. },
  33968. "required": ["timestamp", "sessionID", "messageID", "model"],
  33969. "additionalProperties": false
  33970. }
  33971. },
  33972. "required": ["id", "type", "properties"],
  33973. "additionalProperties": false
  33974. },
  33975. "EventSessionNextMoved": {
  33976. "type": "object",
  33977. "properties": {
  33978. "id": {
  33979. "type": "string",
  33980. "pattern": "^evt_"
  33981. },
  33982. "type": {
  33983. "type": "string",
  33984. "enum": ["session.next.moved"]
  33985. },
  33986. "properties": {
  33987. "type": "object",
  33988. "properties": {
  33989. "timestamp": {
  33990. "type": "number"
  33991. },
  33992. "sessionID": {
  33993. "type": "string",
  33994. "pattern": "^ses"
  33995. },
  33996. "location": {
  33997. "$ref": "#/components/schemas/LocationRef"
  33998. },
  33999. "subdirectory": {
  34000. "type": "string"
  34001. }
  34002. },
  34003. "required": ["timestamp", "sessionID", "location"],
  34004. "additionalProperties": false
  34005. }
  34006. },
  34007. "required": ["id", "type", "properties"],
  34008. "additionalProperties": false
  34009. },
  34010. "EventSessionNextPrompted": {
  34011. "type": "object",
  34012. "properties": {
  34013. "id": {
  34014. "type": "string",
  34015. "pattern": "^evt_"
  34016. },
  34017. "type": {
  34018. "type": "string",
  34019. "enum": ["session.next.prompted"]
  34020. },
  34021. "properties": {
  34022. "type": "object",
  34023. "properties": {
  34024. "timestamp": {
  34025. "type": "number"
  34026. },
  34027. "sessionID": {
  34028. "type": "string",
  34029. "pattern": "^ses"
  34030. },
  34031. "messageID": {
  34032. "type": "string",
  34033. "pattern": "^msg_"
  34034. },
  34035. "prompt": {
  34036. "$ref": "#/components/schemas/Prompt"
  34037. },
  34038. "delivery": {
  34039. "type": "string",
  34040. "enum": ["steer", "queue"]
  34041. }
  34042. },
  34043. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34044. "additionalProperties": false
  34045. }
  34046. },
  34047. "required": ["id", "type", "properties"],
  34048. "additionalProperties": false
  34049. },
  34050. "EventSessionNextPromptAdmitted": {
  34051. "type": "object",
  34052. "properties": {
  34053. "id": {
  34054. "type": "string",
  34055. "pattern": "^evt_"
  34056. },
  34057. "type": {
  34058. "type": "string",
  34059. "enum": ["session.next.prompt.admitted"]
  34060. },
  34061. "properties": {
  34062. "type": "object",
  34063. "properties": {
  34064. "timestamp": {
  34065. "type": "number"
  34066. },
  34067. "sessionID": {
  34068. "type": "string",
  34069. "pattern": "^ses"
  34070. },
  34071. "messageID": {
  34072. "type": "string",
  34073. "pattern": "^msg_"
  34074. },
  34075. "prompt": {
  34076. "$ref": "#/components/schemas/Prompt"
  34077. },
  34078. "delivery": {
  34079. "type": "string",
  34080. "enum": ["steer", "queue"]
  34081. }
  34082. },
  34083. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34084. "additionalProperties": false
  34085. }
  34086. },
  34087. "required": ["id", "type", "properties"],
  34088. "additionalProperties": false
  34089. },
  34090. "EventSessionNextContextUpdated": {
  34091. "type": "object",
  34092. "properties": {
  34093. "id": {
  34094. "type": "string",
  34095. "pattern": "^evt_"
  34096. },
  34097. "type": {
  34098. "type": "string",
  34099. "enum": ["session.next.context.updated"]
  34100. },
  34101. "properties": {
  34102. "type": "object",
  34103. "properties": {
  34104. "timestamp": {
  34105. "type": "number"
  34106. },
  34107. "sessionID": {
  34108. "type": "string",
  34109. "pattern": "^ses"
  34110. },
  34111. "messageID": {
  34112. "type": "string",
  34113. "pattern": "^msg_"
  34114. },
  34115. "text": {
  34116. "type": "string"
  34117. }
  34118. },
  34119. "required": ["timestamp", "sessionID", "messageID", "text"],
  34120. "additionalProperties": false
  34121. }
  34122. },
  34123. "required": ["id", "type", "properties"],
  34124. "additionalProperties": false
  34125. },
  34126. "EventSessionNextSynthetic": {
  34127. "type": "object",
  34128. "properties": {
  34129. "id": {
  34130. "type": "string",
  34131. "pattern": "^evt_"
  34132. },
  34133. "type": {
  34134. "type": "string",
  34135. "enum": ["session.next.synthetic"]
  34136. },
  34137. "properties": {
  34138. "type": "object",
  34139. "properties": {
  34140. "timestamp": {
  34141. "type": "number"
  34142. },
  34143. "sessionID": {
  34144. "type": "string",
  34145. "pattern": "^ses"
  34146. },
  34147. "messageID": {
  34148. "type": "string",
  34149. "pattern": "^msg_"
  34150. },
  34151. "text": {
  34152. "type": "string"
  34153. }
  34154. },
  34155. "required": ["timestamp", "sessionID", "messageID", "text"],
  34156. "additionalProperties": false
  34157. }
  34158. },
  34159. "required": ["id", "type", "properties"],
  34160. "additionalProperties": false
  34161. },
  34162. "EventSessionNextShellStarted": {
  34163. "type": "object",
  34164. "properties": {
  34165. "id": {
  34166. "type": "string",
  34167. "pattern": "^evt_"
  34168. },
  34169. "type": {
  34170. "type": "string",
  34171. "enum": ["session.next.shell.started"]
  34172. },
  34173. "properties": {
  34174. "type": "object",
  34175. "properties": {
  34176. "timestamp": {
  34177. "type": "number"
  34178. },
  34179. "sessionID": {
  34180. "type": "string",
  34181. "pattern": "^ses"
  34182. },
  34183. "messageID": {
  34184. "type": "string",
  34185. "pattern": "^msg_"
  34186. },
  34187. "callID": {
  34188. "type": "string"
  34189. },
  34190. "command": {
  34191. "type": "string"
  34192. }
  34193. },
  34194. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  34195. "additionalProperties": false
  34196. }
  34197. },
  34198. "required": ["id", "type", "properties"],
  34199. "additionalProperties": false
  34200. },
  34201. "EventSessionNextShellEnded": {
  34202. "type": "object",
  34203. "properties": {
  34204. "id": {
  34205. "type": "string",
  34206. "pattern": "^evt_"
  34207. },
  34208. "type": {
  34209. "type": "string",
  34210. "enum": ["session.next.shell.ended"]
  34211. },
  34212. "properties": {
  34213. "type": "object",
  34214. "properties": {
  34215. "timestamp": {
  34216. "type": "number"
  34217. },
  34218. "sessionID": {
  34219. "type": "string",
  34220. "pattern": "^ses"
  34221. },
  34222. "callID": {
  34223. "type": "string"
  34224. },
  34225. "output": {
  34226. "type": "string"
  34227. }
  34228. },
  34229. "required": ["timestamp", "sessionID", "callID", "output"],
  34230. "additionalProperties": false
  34231. }
  34232. },
  34233. "required": ["id", "type", "properties"],
  34234. "additionalProperties": false
  34235. },
  34236. "EventSessionNextStepStarted": {
  34237. "type": "object",
  34238. "properties": {
  34239. "id": {
  34240. "type": "string",
  34241. "pattern": "^evt_"
  34242. },
  34243. "type": {
  34244. "type": "string",
  34245. "enum": ["session.next.step.started"]
  34246. },
  34247. "properties": {
  34248. "type": "object",
  34249. "properties": {
  34250. "timestamp": {
  34251. "type": "number"
  34252. },
  34253. "sessionID": {
  34254. "type": "string",
  34255. "pattern": "^ses"
  34256. },
  34257. "assistantMessageID": {
  34258. "type": "string",
  34259. "pattern": "^msg_"
  34260. },
  34261. "agent": {
  34262. "type": "string"
  34263. },
  34264. "model": {
  34265. "$ref": "#/components/schemas/ModelRef"
  34266. },
  34267. "snapshot": {
  34268. "type": "string"
  34269. }
  34270. },
  34271. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  34272. "additionalProperties": false
  34273. }
  34274. },
  34275. "required": ["id", "type", "properties"],
  34276. "additionalProperties": false
  34277. },
  34278. "EventSessionNextStepEnded": {
  34279. "type": "object",
  34280. "properties": {
  34281. "id": {
  34282. "type": "string",
  34283. "pattern": "^evt_"
  34284. },
  34285. "type": {
  34286. "type": "string",
  34287. "enum": ["session.next.step.ended"]
  34288. },
  34289. "properties": {
  34290. "type": "object",
  34291. "properties": {
  34292. "timestamp": {
  34293. "type": "number"
  34294. },
  34295. "sessionID": {
  34296. "type": "string",
  34297. "pattern": "^ses"
  34298. },
  34299. "assistantMessageID": {
  34300. "type": "string",
  34301. "pattern": "^msg_"
  34302. },
  34303. "finish": {
  34304. "type": "string"
  34305. },
  34306. "cost": {
  34307. "type": "number"
  34308. },
  34309. "tokens": {
  34310. "type": "object",
  34311. "properties": {
  34312. "input": {
  34313. "type": "number"
  34314. },
  34315. "output": {
  34316. "type": "number"
  34317. },
  34318. "reasoning": {
  34319. "type": "number"
  34320. },
  34321. "cache": {
  34322. "type": "object",
  34323. "properties": {
  34324. "read": {
  34325. "type": "number"
  34326. },
  34327. "write": {
  34328. "type": "number"
  34329. }
  34330. },
  34331. "required": ["read", "write"],
  34332. "additionalProperties": false
  34333. }
  34334. },
  34335. "required": ["input", "output", "reasoning", "cache"],
  34336. "additionalProperties": false
  34337. },
  34338. "snapshot": {
  34339. "type": "string"
  34340. },
  34341. "files": {
  34342. "type": "array",
  34343. "items": {
  34344. "type": "string"
  34345. }
  34346. }
  34347. },
  34348. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34349. "additionalProperties": false
  34350. }
  34351. },
  34352. "required": ["id", "type", "properties"],
  34353. "additionalProperties": false
  34354. },
  34355. "EventSessionNextStepFailed": {
  34356. "type": "object",
  34357. "properties": {
  34358. "id": {
  34359. "type": "string",
  34360. "pattern": "^evt_"
  34361. },
  34362. "type": {
  34363. "type": "string",
  34364. "enum": ["session.next.step.failed"]
  34365. },
  34366. "properties": {
  34367. "type": "object",
  34368. "properties": {
  34369. "timestamp": {
  34370. "type": "number"
  34371. },
  34372. "sessionID": {
  34373. "type": "string",
  34374. "pattern": "^ses"
  34375. },
  34376. "assistantMessageID": {
  34377. "type": "string",
  34378. "pattern": "^msg_"
  34379. },
  34380. "error": {
  34381. "$ref": "#/components/schemas/SessionErrorUnknown"
  34382. }
  34383. },
  34384. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34385. "additionalProperties": false
  34386. }
  34387. },
  34388. "required": ["id", "type", "properties"],
  34389. "additionalProperties": false
  34390. },
  34391. "EventSessionNextTextStarted": {
  34392. "type": "object",
  34393. "properties": {
  34394. "id": {
  34395. "type": "string",
  34396. "pattern": "^evt_"
  34397. },
  34398. "type": {
  34399. "type": "string",
  34400. "enum": ["session.next.text.started"]
  34401. },
  34402. "properties": {
  34403. "type": "object",
  34404. "properties": {
  34405. "timestamp": {
  34406. "type": "number"
  34407. },
  34408. "sessionID": {
  34409. "type": "string",
  34410. "pattern": "^ses"
  34411. },
  34412. "assistantMessageID": {
  34413. "type": "string",
  34414. "pattern": "^msg_"
  34415. },
  34416. "textID": {
  34417. "type": "string"
  34418. }
  34419. },
  34420. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34421. "additionalProperties": false
  34422. }
  34423. },
  34424. "required": ["id", "type", "properties"],
  34425. "additionalProperties": false
  34426. },
  34427. "EventSessionNextTextDelta": {
  34428. "type": "object",
  34429. "properties": {
  34430. "id": {
  34431. "type": "string",
  34432. "pattern": "^evt_"
  34433. },
  34434. "type": {
  34435. "type": "string",
  34436. "enum": ["session.next.text.delta"]
  34437. },
  34438. "properties": {
  34439. "type": "object",
  34440. "properties": {
  34441. "timestamp": {
  34442. "type": "number"
  34443. },
  34444. "sessionID": {
  34445. "type": "string",
  34446. "pattern": "^ses"
  34447. },
  34448. "assistantMessageID": {
  34449. "type": "string",
  34450. "pattern": "^msg_"
  34451. },
  34452. "textID": {
  34453. "type": "string"
  34454. },
  34455. "delta": {
  34456. "type": "string"
  34457. }
  34458. },
  34459. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34460. "additionalProperties": false
  34461. }
  34462. },
  34463. "required": ["id", "type", "properties"],
  34464. "additionalProperties": false
  34465. },
  34466. "EventSessionNextTextEnded": {
  34467. "type": "object",
  34468. "properties": {
  34469. "id": {
  34470. "type": "string",
  34471. "pattern": "^evt_"
  34472. },
  34473. "type": {
  34474. "type": "string",
  34475. "enum": ["session.next.text.ended"]
  34476. },
  34477. "properties": {
  34478. "type": "object",
  34479. "properties": {
  34480. "timestamp": {
  34481. "type": "number"
  34482. },
  34483. "sessionID": {
  34484. "type": "string",
  34485. "pattern": "^ses"
  34486. },
  34487. "assistantMessageID": {
  34488. "type": "string",
  34489. "pattern": "^msg_"
  34490. },
  34491. "textID": {
  34492. "type": "string"
  34493. },
  34494. "text": {
  34495. "type": "string"
  34496. }
  34497. },
  34498. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34499. "additionalProperties": false
  34500. }
  34501. },
  34502. "required": ["id", "type", "properties"],
  34503. "additionalProperties": false
  34504. },
  34505. "EventSessionNextReasoningStarted": {
  34506. "type": "object",
  34507. "properties": {
  34508. "id": {
  34509. "type": "string",
  34510. "pattern": "^evt_"
  34511. },
  34512. "type": {
  34513. "type": "string",
  34514. "enum": ["session.next.reasoning.started"]
  34515. },
  34516. "properties": {
  34517. "type": "object",
  34518. "properties": {
  34519. "timestamp": {
  34520. "type": "number"
  34521. },
  34522. "sessionID": {
  34523. "type": "string",
  34524. "pattern": "^ses"
  34525. },
  34526. "assistantMessageID": {
  34527. "type": "string",
  34528. "pattern": "^msg_"
  34529. },
  34530. "reasoningID": {
  34531. "type": "string"
  34532. },
  34533. "providerMetadata": {
  34534. "$ref": "#/components/schemas/LLMProviderMetadata"
  34535. }
  34536. },
  34537. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34538. "additionalProperties": false
  34539. }
  34540. },
  34541. "required": ["id", "type", "properties"],
  34542. "additionalProperties": false
  34543. },
  34544. "EventSessionNextReasoningDelta": {
  34545. "type": "object",
  34546. "properties": {
  34547. "id": {
  34548. "type": "string",
  34549. "pattern": "^evt_"
  34550. },
  34551. "type": {
  34552. "type": "string",
  34553. "enum": ["session.next.reasoning.delta"]
  34554. },
  34555. "properties": {
  34556. "type": "object",
  34557. "properties": {
  34558. "timestamp": {
  34559. "type": "number"
  34560. },
  34561. "sessionID": {
  34562. "type": "string",
  34563. "pattern": "^ses"
  34564. },
  34565. "assistantMessageID": {
  34566. "type": "string",
  34567. "pattern": "^msg_"
  34568. },
  34569. "reasoningID": {
  34570. "type": "string"
  34571. },
  34572. "delta": {
  34573. "type": "string"
  34574. }
  34575. },
  34576. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34577. "additionalProperties": false
  34578. }
  34579. },
  34580. "required": ["id", "type", "properties"],
  34581. "additionalProperties": false
  34582. },
  34583. "EventSessionNextReasoningEnded": {
  34584. "type": "object",
  34585. "properties": {
  34586. "id": {
  34587. "type": "string",
  34588. "pattern": "^evt_"
  34589. },
  34590. "type": {
  34591. "type": "string",
  34592. "enum": ["session.next.reasoning.ended"]
  34593. },
  34594. "properties": {
  34595. "type": "object",
  34596. "properties": {
  34597. "timestamp": {
  34598. "type": "number"
  34599. },
  34600. "sessionID": {
  34601. "type": "string",
  34602. "pattern": "^ses"
  34603. },
  34604. "assistantMessageID": {
  34605. "type": "string",
  34606. "pattern": "^msg_"
  34607. },
  34608. "reasoningID": {
  34609. "type": "string"
  34610. },
  34611. "text": {
  34612. "type": "string"
  34613. },
  34614. "providerMetadata": {
  34615. "$ref": "#/components/schemas/LLMProviderMetadata"
  34616. }
  34617. },
  34618. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34619. "additionalProperties": false
  34620. }
  34621. },
  34622. "required": ["id", "type", "properties"],
  34623. "additionalProperties": false
  34624. },
  34625. "EventSessionNextToolInputStarted": {
  34626. "type": "object",
  34627. "properties": {
  34628. "id": {
  34629. "type": "string",
  34630. "pattern": "^evt_"
  34631. },
  34632. "type": {
  34633. "type": "string",
  34634. "enum": ["session.next.tool.input.started"]
  34635. },
  34636. "properties": {
  34637. "type": "object",
  34638. "properties": {
  34639. "timestamp": {
  34640. "type": "number"
  34641. },
  34642. "sessionID": {
  34643. "type": "string",
  34644. "pattern": "^ses"
  34645. },
  34646. "assistantMessageID": {
  34647. "type": "string",
  34648. "pattern": "^msg_"
  34649. },
  34650. "callID": {
  34651. "type": "string"
  34652. },
  34653. "name": {
  34654. "type": "string"
  34655. }
  34656. },
  34657. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34658. "additionalProperties": false
  34659. }
  34660. },
  34661. "required": ["id", "type", "properties"],
  34662. "additionalProperties": false
  34663. },
  34664. "EventSessionNextToolInputDelta": {
  34665. "type": "object",
  34666. "properties": {
  34667. "id": {
  34668. "type": "string",
  34669. "pattern": "^evt_"
  34670. },
  34671. "type": {
  34672. "type": "string",
  34673. "enum": ["session.next.tool.input.delta"]
  34674. },
  34675. "properties": {
  34676. "type": "object",
  34677. "properties": {
  34678. "timestamp": {
  34679. "type": "number"
  34680. },
  34681. "sessionID": {
  34682. "type": "string",
  34683. "pattern": "^ses"
  34684. },
  34685. "assistantMessageID": {
  34686. "type": "string",
  34687. "pattern": "^msg_"
  34688. },
  34689. "callID": {
  34690. "type": "string"
  34691. },
  34692. "delta": {
  34693. "type": "string"
  34694. }
  34695. },
  34696. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34697. "additionalProperties": false
  34698. }
  34699. },
  34700. "required": ["id", "type", "properties"],
  34701. "additionalProperties": false
  34702. },
  34703. "EventSessionNextToolInputEnded": {
  34704. "type": "object",
  34705. "properties": {
  34706. "id": {
  34707. "type": "string",
  34708. "pattern": "^evt_"
  34709. },
  34710. "type": {
  34711. "type": "string",
  34712. "enum": ["session.next.tool.input.ended"]
  34713. },
  34714. "properties": {
  34715. "type": "object",
  34716. "properties": {
  34717. "timestamp": {
  34718. "type": "number"
  34719. },
  34720. "sessionID": {
  34721. "type": "string",
  34722. "pattern": "^ses"
  34723. },
  34724. "assistantMessageID": {
  34725. "type": "string",
  34726. "pattern": "^msg_"
  34727. },
  34728. "callID": {
  34729. "type": "string"
  34730. },
  34731. "text": {
  34732. "type": "string"
  34733. }
  34734. },
  34735. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34736. "additionalProperties": false
  34737. }
  34738. },
  34739. "required": ["id", "type", "properties"],
  34740. "additionalProperties": false
  34741. },
  34742. "EventSessionNextToolCalled": {
  34743. "type": "object",
  34744. "properties": {
  34745. "id": {
  34746. "type": "string",
  34747. "pattern": "^evt_"
  34748. },
  34749. "type": {
  34750. "type": "string",
  34751. "enum": ["session.next.tool.called"]
  34752. },
  34753. "properties": {
  34754. "type": "object",
  34755. "properties": {
  34756. "timestamp": {
  34757. "type": "number"
  34758. },
  34759. "sessionID": {
  34760. "type": "string",
  34761. "pattern": "^ses"
  34762. },
  34763. "assistantMessageID": {
  34764. "type": "string",
  34765. "pattern": "^msg_"
  34766. },
  34767. "callID": {
  34768. "type": "string"
  34769. },
  34770. "tool": {
  34771. "type": "string"
  34772. },
  34773. "input": {
  34774. "type": "object"
  34775. },
  34776. "provider": {
  34777. "type": "object",
  34778. "properties": {
  34779. "executed": {
  34780. "type": "boolean"
  34781. },
  34782. "metadata": {
  34783. "$ref": "#/components/schemas/LLMProviderMetadata"
  34784. }
  34785. },
  34786. "required": ["executed"],
  34787. "additionalProperties": false
  34788. }
  34789. },
  34790. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34791. "additionalProperties": false
  34792. }
  34793. },
  34794. "required": ["id", "type", "properties"],
  34795. "additionalProperties": false
  34796. },
  34797. "EventSessionNextToolProgress": {
  34798. "type": "object",
  34799. "properties": {
  34800. "id": {
  34801. "type": "string",
  34802. "pattern": "^evt_"
  34803. },
  34804. "type": {
  34805. "type": "string",
  34806. "enum": ["session.next.tool.progress"]
  34807. },
  34808. "properties": {
  34809. "type": "object",
  34810. "properties": {
  34811. "timestamp": {
  34812. "type": "number"
  34813. },
  34814. "sessionID": {
  34815. "type": "string",
  34816. "pattern": "^ses"
  34817. },
  34818. "assistantMessageID": {
  34819. "type": "string",
  34820. "pattern": "^msg_"
  34821. },
  34822. "callID": {
  34823. "type": "string"
  34824. },
  34825. "structured": {
  34826. "type": "object"
  34827. },
  34828. "content": {
  34829. "type": "array",
  34830. "items": {
  34831. "$ref": "#/components/schemas/LLMToolContent"
  34832. }
  34833. }
  34834. },
  34835. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  34836. "additionalProperties": false
  34837. }
  34838. },
  34839. "required": ["id", "type", "properties"],
  34840. "additionalProperties": false
  34841. },
  34842. "EventSessionNextToolSuccess": {
  34843. "type": "object",
  34844. "properties": {
  34845. "id": {
  34846. "type": "string",
  34847. "pattern": "^evt_"
  34848. },
  34849. "type": {
  34850. "type": "string",
  34851. "enum": ["session.next.tool.success"]
  34852. },
  34853. "properties": {
  34854. "type": "object",
  34855. "properties": {
  34856. "timestamp": {
  34857. "type": "number"
  34858. },
  34859. "sessionID": {
  34860. "type": "string",
  34861. "pattern": "^ses"
  34862. },
  34863. "assistantMessageID": {
  34864. "type": "string",
  34865. "pattern": "^msg_"
  34866. },
  34867. "callID": {
  34868. "type": "string"
  34869. },
  34870. "structured": {
  34871. "type": "object"
  34872. },
  34873. "content": {
  34874. "type": "array",
  34875. "items": {
  34876. "$ref": "#/components/schemas/LLMToolContent"
  34877. }
  34878. },
  34879. "outputPaths": {
  34880. "type": "array",
  34881. "items": {
  34882. "type": "string"
  34883. }
  34884. },
  34885. "result": {},
  34886. "provider": {
  34887. "type": "object",
  34888. "properties": {
  34889. "executed": {
  34890. "type": "boolean"
  34891. },
  34892. "metadata": {
  34893. "$ref": "#/components/schemas/LLMProviderMetadata"
  34894. }
  34895. },
  34896. "required": ["executed"],
  34897. "additionalProperties": false
  34898. }
  34899. },
  34900. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  34901. "additionalProperties": false
  34902. }
  34903. },
  34904. "required": ["id", "type", "properties"],
  34905. "additionalProperties": false
  34906. },
  34907. "EventSessionNextToolFailed": {
  34908. "type": "object",
  34909. "properties": {
  34910. "id": {
  34911. "type": "string",
  34912. "pattern": "^evt_"
  34913. },
  34914. "type": {
  34915. "type": "string",
  34916. "enum": ["session.next.tool.failed"]
  34917. },
  34918. "properties": {
  34919. "type": "object",
  34920. "properties": {
  34921. "timestamp": {
  34922. "type": "number"
  34923. },
  34924. "sessionID": {
  34925. "type": "string",
  34926. "pattern": "^ses"
  34927. },
  34928. "assistantMessageID": {
  34929. "type": "string",
  34930. "pattern": "^msg_"
  34931. },
  34932. "callID": {
  34933. "type": "string"
  34934. },
  34935. "error": {
  34936. "$ref": "#/components/schemas/SessionErrorUnknown"
  34937. },
  34938. "result": {},
  34939. "provider": {
  34940. "type": "object",
  34941. "properties": {
  34942. "executed": {
  34943. "type": "boolean"
  34944. },
  34945. "metadata": {
  34946. "$ref": "#/components/schemas/LLMProviderMetadata"
  34947. }
  34948. },
  34949. "required": ["executed"],
  34950. "additionalProperties": false
  34951. }
  34952. },
  34953. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  34954. "additionalProperties": false
  34955. }
  34956. },
  34957. "required": ["id", "type", "properties"],
  34958. "additionalProperties": false
  34959. },
  34960. "EventSessionNextRetried": {
  34961. "type": "object",
  34962. "properties": {
  34963. "id": {
  34964. "type": "string",
  34965. "pattern": "^evt_"
  34966. },
  34967. "type": {
  34968. "type": "string",
  34969. "enum": ["session.next.retried"]
  34970. },
  34971. "properties": {
  34972. "type": "object",
  34973. "properties": {
  34974. "timestamp": {
  34975. "type": "number"
  34976. },
  34977. "sessionID": {
  34978. "type": "string",
  34979. "pattern": "^ses"
  34980. },
  34981. "attempt": {
  34982. "type": "number"
  34983. },
  34984. "error": {
  34985. "$ref": "#/components/schemas/SessionNextRetry_error"
  34986. }
  34987. },
  34988. "required": ["timestamp", "sessionID", "attempt", "error"],
  34989. "additionalProperties": false
  34990. }
  34991. },
  34992. "required": ["id", "type", "properties"],
  34993. "additionalProperties": false
  34994. },
  34995. "EventSessionNextCompactionStarted": {
  34996. "type": "object",
  34997. "properties": {
  34998. "id": {
  34999. "type": "string",
  35000. "pattern": "^evt_"
  35001. },
  35002. "type": {
  35003. "type": "string",
  35004. "enum": ["session.next.compaction.started"]
  35005. },
  35006. "properties": {
  35007. "type": "object",
  35008. "properties": {
  35009. "timestamp": {
  35010. "type": "number"
  35011. },
  35012. "sessionID": {
  35013. "type": "string",
  35014. "pattern": "^ses"
  35015. },
  35016. "messageID": {
  35017. "type": "string",
  35018. "pattern": "^msg_"
  35019. },
  35020. "reason": {
  35021. "type": "string",
  35022. "enum": ["auto", "manual"]
  35023. }
  35024. },
  35025. "required": ["timestamp", "sessionID", "messageID", "reason"],
  35026. "additionalProperties": false
  35027. }
  35028. },
  35029. "required": ["id", "type", "properties"],
  35030. "additionalProperties": false
  35031. },
  35032. "EventSessionNextCompactionDelta": {
  35033. "type": "object",
  35034. "properties": {
  35035. "id": {
  35036. "type": "string",
  35037. "pattern": "^evt_"
  35038. },
  35039. "type": {
  35040. "type": "string",
  35041. "enum": ["session.next.compaction.delta"]
  35042. },
  35043. "properties": {
  35044. "type": "object",
  35045. "properties": {
  35046. "timestamp": {
  35047. "type": "number"
  35048. },
  35049. "sessionID": {
  35050. "type": "string",
  35051. "pattern": "^ses"
  35052. },
  35053. "messageID": {
  35054. "type": "string",
  35055. "pattern": "^msg_"
  35056. },
  35057. "text": {
  35058. "type": "string"
  35059. }
  35060. },
  35061. "required": ["timestamp", "sessionID", "messageID", "text"],
  35062. "additionalProperties": false
  35063. }
  35064. },
  35065. "required": ["id", "type", "properties"],
  35066. "additionalProperties": false
  35067. },
  35068. "EventSessionNextCompactionEnded": {
  35069. "type": "object",
  35070. "properties": {
  35071. "id": {
  35072. "type": "string",
  35073. "pattern": "^evt_"
  35074. },
  35075. "type": {
  35076. "type": "string",
  35077. "enum": ["session.next.compaction.ended"]
  35078. },
  35079. "properties": {
  35080. "type": "object",
  35081. "properties": {
  35082. "timestamp": {
  35083. "type": "number"
  35084. },
  35085. "sessionID": {
  35086. "type": "string",
  35087. "pattern": "^ses"
  35088. },
  35089. "messageID": {
  35090. "type": "string",
  35091. "pattern": "^msg_"
  35092. },
  35093. "reason": {
  35094. "type": "string",
  35095. "enum": ["auto", "manual"]
  35096. },
  35097. "text": {
  35098. "type": "string"
  35099. },
  35100. "recent": {
  35101. "type": "string"
  35102. }
  35103. },
  35104. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  35105. "additionalProperties": false
  35106. }
  35107. },
  35108. "required": ["id", "type", "properties"],
  35109. "additionalProperties": false
  35110. },
  35111. "EventSessionNextRevertStaged": {
  35112. "type": "object",
  35113. "properties": {
  35114. "id": {
  35115. "type": "string",
  35116. "pattern": "^evt_"
  35117. },
  35118. "type": {
  35119. "type": "string",
  35120. "enum": ["session.next.revert.staged"]
  35121. },
  35122. "properties": {
  35123. "type": "object",
  35124. "properties": {
  35125. "timestamp": {
  35126. "type": "number"
  35127. },
  35128. "sessionID": {
  35129. "type": "string",
  35130. "pattern": "^ses"
  35131. },
  35132. "revert": {
  35133. "$ref": "#/components/schemas/RevertState"
  35134. }
  35135. },
  35136. "required": ["timestamp", "sessionID", "revert"],
  35137. "additionalProperties": false
  35138. }
  35139. },
  35140. "required": ["id", "type", "properties"],
  35141. "additionalProperties": false
  35142. },
  35143. "EventSessionNextRevertCleared": {
  35144. "type": "object",
  35145. "properties": {
  35146. "id": {
  35147. "type": "string",
  35148. "pattern": "^evt_"
  35149. },
  35150. "type": {
  35151. "type": "string",
  35152. "enum": ["session.next.revert.cleared"]
  35153. },
  35154. "properties": {
  35155. "type": "object",
  35156. "properties": {
  35157. "timestamp": {
  35158. "type": "number"
  35159. },
  35160. "sessionID": {
  35161. "type": "string",
  35162. "pattern": "^ses"
  35163. }
  35164. },
  35165. "required": ["timestamp", "sessionID"],
  35166. "additionalProperties": false
  35167. }
  35168. },
  35169. "required": ["id", "type", "properties"],
  35170. "additionalProperties": false
  35171. },
  35172. "EventSessionNextRevertCommitted": {
  35173. "type": "object",
  35174. "properties": {
  35175. "id": {
  35176. "type": "string",
  35177. "pattern": "^evt_"
  35178. },
  35179. "type": {
  35180. "type": "string",
  35181. "enum": ["session.next.revert.committed"]
  35182. },
  35183. "properties": {
  35184. "type": "object",
  35185. "properties": {
  35186. "timestamp": {
  35187. "type": "number"
  35188. },
  35189. "sessionID": {
  35190. "type": "string",
  35191. "pattern": "^ses"
  35192. },
  35193. "messageID": {
  35194. "type": "string",
  35195. "pattern": "^msg_"
  35196. }
  35197. },
  35198. "required": ["timestamp", "sessionID", "messageID"],
  35199. "additionalProperties": false
  35200. }
  35201. },
  35202. "required": ["id", "type", "properties"],
  35203. "additionalProperties": false
  35204. },
  35205. "EventMessagePartDelta": {
  35206. "type": "object",
  35207. "properties": {
  35208. "id": {
  35209. "type": "string",
  35210. "pattern": "^evt_"
  35211. },
  35212. "type": {
  35213. "type": "string",
  35214. "enum": ["message.part.delta"]
  35215. },
  35216. "properties": {
  35217. "type": "object",
  35218. "properties": {
  35219. "sessionID": {
  35220. "type": "string",
  35221. "pattern": "^ses"
  35222. },
  35223. "messageID": {
  35224. "type": "string",
  35225. "pattern": "^msg"
  35226. },
  35227. "partID": {
  35228. "type": "string",
  35229. "pattern": "^prt"
  35230. },
  35231. "field": {
  35232. "type": "string"
  35233. },
  35234. "delta": {
  35235. "type": "string"
  35236. }
  35237. },
  35238. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35239. "additionalProperties": false
  35240. }
  35241. },
  35242. "required": ["id", "type", "properties"],
  35243. "additionalProperties": false
  35244. },
  35245. "EventSessionDiff": {
  35246. "type": "object",
  35247. "properties": {
  35248. "id": {
  35249. "type": "string",
  35250. "pattern": "^evt_"
  35251. },
  35252. "type": {
  35253. "type": "string",
  35254. "enum": ["session.diff"]
  35255. },
  35256. "properties": {
  35257. "type": "object",
  35258. "properties": {
  35259. "sessionID": {
  35260. "type": "string",
  35261. "pattern": "^ses"
  35262. },
  35263. "diff": {
  35264. "type": "array",
  35265. "items": {
  35266. "$ref": "#/components/schemas/SnapshotFileDiff"
  35267. }
  35268. }
  35269. },
  35270. "required": ["sessionID", "diff"],
  35271. "additionalProperties": false
  35272. }
  35273. },
  35274. "required": ["id", "type", "properties"],
  35275. "additionalProperties": false
  35276. },
  35277. "EventSessionError": {
  35278. "type": "object",
  35279. "properties": {
  35280. "id": {
  35281. "type": "string",
  35282. "pattern": "^evt_"
  35283. },
  35284. "type": {
  35285. "type": "string",
  35286. "enum": ["session.error"]
  35287. },
  35288. "properties": {
  35289. "type": "object",
  35290. "properties": {
  35291. "sessionID": {
  35292. "type": "string",
  35293. "pattern": "^ses"
  35294. },
  35295. "error": {
  35296. "anyOf": [
  35297. {
  35298. "$ref": "#/components/schemas/ProviderAuthError"
  35299. },
  35300. {
  35301. "$ref": "#/components/schemas/UnknownError"
  35302. },
  35303. {
  35304. "$ref": "#/components/schemas/MessageOutputLengthError"
  35305. },
  35306. {
  35307. "$ref": "#/components/schemas/MessageAbortedError"
  35308. },
  35309. {
  35310. "$ref": "#/components/schemas/StructuredOutputError"
  35311. },
  35312. {
  35313. "$ref": "#/components/schemas/ContextOverflowError"
  35314. },
  35315. {
  35316. "$ref": "#/components/schemas/ContentFilterError"
  35317. },
  35318. {
  35319. "$ref": "#/components/schemas/APIError"
  35320. }
  35321. ]
  35322. }
  35323. },
  35324. "additionalProperties": false
  35325. }
  35326. },
  35327. "required": ["id", "type", "properties"],
  35328. "additionalProperties": false
  35329. },
  35330. "EventInstallationUpdated": {
  35331. "type": "object",
  35332. "properties": {
  35333. "id": {
  35334. "type": "string",
  35335. "pattern": "^evt_"
  35336. },
  35337. "type": {
  35338. "type": "string",
  35339. "enum": ["installation.updated"]
  35340. },
  35341. "properties": {
  35342. "type": "object",
  35343. "properties": {
  35344. "version": {
  35345. "type": "string"
  35346. }
  35347. },
  35348. "required": ["version"],
  35349. "additionalProperties": false
  35350. }
  35351. },
  35352. "required": ["id", "type", "properties"],
  35353. "additionalProperties": false
  35354. },
  35355. "EventInstallationUpdate-available": {
  35356. "type": "object",
  35357. "properties": {
  35358. "id": {
  35359. "type": "string",
  35360. "pattern": "^evt_"
  35361. },
  35362. "type": {
  35363. "type": "string",
  35364. "enum": ["installation.update-available"]
  35365. },
  35366. "properties": {
  35367. "type": "object",
  35368. "properties": {
  35369. "version": {
  35370. "type": "string"
  35371. }
  35372. },
  35373. "required": ["version"],
  35374. "additionalProperties": false
  35375. }
  35376. },
  35377. "required": ["id", "type", "properties"],
  35378. "additionalProperties": false
  35379. },
  35380. "EventFileEdited": {
  35381. "type": "object",
  35382. "properties": {
  35383. "id": {
  35384. "type": "string",
  35385. "pattern": "^evt_"
  35386. },
  35387. "type": {
  35388. "type": "string",
  35389. "enum": ["file.edited"]
  35390. },
  35391. "properties": {
  35392. "type": "object",
  35393. "properties": {
  35394. "file": {
  35395. "type": "string"
  35396. }
  35397. },
  35398. "required": ["file"],
  35399. "additionalProperties": false
  35400. }
  35401. },
  35402. "required": ["id", "type", "properties"],
  35403. "additionalProperties": false
  35404. },
  35405. "EventReferenceUpdated": {
  35406. "type": "object",
  35407. "properties": {
  35408. "id": {
  35409. "type": "string",
  35410. "pattern": "^evt_"
  35411. },
  35412. "type": {
  35413. "type": "string",
  35414. "enum": ["reference.updated"]
  35415. },
  35416. "properties": {
  35417. "type": "object",
  35418. "properties": {}
  35419. }
  35420. },
  35421. "required": ["id", "type", "properties"],
  35422. "additionalProperties": false
  35423. },
  35424. "EventPermissionV2Asked": {
  35425. "type": "object",
  35426. "properties": {
  35427. "id": {
  35428. "type": "string",
  35429. "pattern": "^evt_"
  35430. },
  35431. "type": {
  35432. "type": "string",
  35433. "enum": ["permission.v2.asked"]
  35434. },
  35435. "properties": {
  35436. "type": "object",
  35437. "properties": {
  35438. "id": {
  35439. "type": "string",
  35440. "pattern": "^per"
  35441. },
  35442. "sessionID": {
  35443. "type": "string",
  35444. "pattern": "^ses"
  35445. },
  35446. "action": {
  35447. "type": "string"
  35448. },
  35449. "resources": {
  35450. "type": "array",
  35451. "items": {
  35452. "type": "string"
  35453. }
  35454. },
  35455. "save": {
  35456. "type": "array",
  35457. "items": {
  35458. "type": "string"
  35459. }
  35460. },
  35461. "metadata": {
  35462. "type": "object"
  35463. },
  35464. "source": {
  35465. "$ref": "#/components/schemas/PermissionV2Source"
  35466. }
  35467. },
  35468. "required": ["id", "sessionID", "action", "resources"],
  35469. "additionalProperties": false
  35470. }
  35471. },
  35472. "required": ["id", "type", "properties"],
  35473. "additionalProperties": false
  35474. },
  35475. "EventPermissionV2Replied": {
  35476. "type": "object",
  35477. "properties": {
  35478. "id": {
  35479. "type": "string",
  35480. "pattern": "^evt_"
  35481. },
  35482. "type": {
  35483. "type": "string",
  35484. "enum": ["permission.v2.replied"]
  35485. },
  35486. "properties": {
  35487. "type": "object",
  35488. "properties": {
  35489. "sessionID": {
  35490. "type": "string",
  35491. "pattern": "^ses"
  35492. },
  35493. "requestID": {
  35494. "type": "string",
  35495. "pattern": "^per"
  35496. },
  35497. "reply": {
  35498. "$ref": "#/components/schemas/PermissionV2Reply"
  35499. }
  35500. },
  35501. "required": ["sessionID", "requestID", "reply"],
  35502. "additionalProperties": false
  35503. }
  35504. },
  35505. "required": ["id", "type", "properties"],
  35506. "additionalProperties": false
  35507. },
  35508. "EventPluginAdded": {
  35509. "type": "object",
  35510. "properties": {
  35511. "id": {
  35512. "type": "string",
  35513. "pattern": "^evt_"
  35514. },
  35515. "type": {
  35516. "type": "string",
  35517. "enum": ["plugin.added"]
  35518. },
  35519. "properties": {
  35520. "type": "object",
  35521. "properties": {
  35522. "id": {
  35523. "type": "string"
  35524. }
  35525. },
  35526. "required": ["id"],
  35527. "additionalProperties": false
  35528. }
  35529. },
  35530. "required": ["id", "type", "properties"],
  35531. "additionalProperties": false
  35532. },
  35533. "EventProjectDirectoriesUpdated": {
  35534. "type": "object",
  35535. "properties": {
  35536. "id": {
  35537. "type": "string",
  35538. "pattern": "^evt_"
  35539. },
  35540. "type": {
  35541. "type": "string",
  35542. "enum": ["project.directories.updated"]
  35543. },
  35544. "properties": {
  35545. "type": "object",
  35546. "properties": {
  35547. "projectID": {
  35548. "type": "string"
  35549. }
  35550. },
  35551. "required": ["projectID"],
  35552. "additionalProperties": false
  35553. }
  35554. },
  35555. "required": ["id", "type", "properties"],
  35556. "additionalProperties": false
  35557. },
  35558. "EventFileWatcherUpdated": {
  35559. "type": "object",
  35560. "properties": {
  35561. "id": {
  35562. "type": "string",
  35563. "pattern": "^evt_"
  35564. },
  35565. "type": {
  35566. "type": "string",
  35567. "enum": ["file.watcher.updated"]
  35568. },
  35569. "properties": {
  35570. "type": "object",
  35571. "properties": {
  35572. "file": {
  35573. "type": "string"
  35574. },
  35575. "event": {
  35576. "type": "string",
  35577. "enum": ["add", "change", "unlink"]
  35578. }
  35579. },
  35580. "required": ["file", "event"],
  35581. "additionalProperties": false
  35582. }
  35583. },
  35584. "required": ["id", "type", "properties"],
  35585. "additionalProperties": false
  35586. },
  35587. "EventPtyCreated": {
  35588. "type": "object",
  35589. "properties": {
  35590. "id": {
  35591. "type": "string",
  35592. "pattern": "^evt_"
  35593. },
  35594. "type": {
  35595. "type": "string",
  35596. "enum": ["pty.created"]
  35597. },
  35598. "properties": {
  35599. "type": "object",
  35600. "properties": {
  35601. "info": {
  35602. "$ref": "#/components/schemas/Pty"
  35603. }
  35604. },
  35605. "required": ["info"],
  35606. "additionalProperties": false
  35607. }
  35608. },
  35609. "required": ["id", "type", "properties"],
  35610. "additionalProperties": false
  35611. },
  35612. "EventPtyUpdated": {
  35613. "type": "object",
  35614. "properties": {
  35615. "id": {
  35616. "type": "string",
  35617. "pattern": "^evt_"
  35618. },
  35619. "type": {
  35620. "type": "string",
  35621. "enum": ["pty.updated"]
  35622. },
  35623. "properties": {
  35624. "type": "object",
  35625. "properties": {
  35626. "info": {
  35627. "$ref": "#/components/schemas/Pty"
  35628. }
  35629. },
  35630. "required": ["info"],
  35631. "additionalProperties": false
  35632. }
  35633. },
  35634. "required": ["id", "type", "properties"],
  35635. "additionalProperties": false
  35636. },
  35637. "EventPtyExited": {
  35638. "type": "object",
  35639. "properties": {
  35640. "id": {
  35641. "type": "string",
  35642. "pattern": "^evt_"
  35643. },
  35644. "type": {
  35645. "type": "string",
  35646. "enum": ["pty.exited"]
  35647. },
  35648. "properties": {
  35649. "type": "object",
  35650. "properties": {
  35651. "id": {
  35652. "type": "string",
  35653. "pattern": "^pty"
  35654. },
  35655. "exitCode": {
  35656. "type": "integer",
  35657. "minimum": 0
  35658. }
  35659. },
  35660. "required": ["id", "exitCode"],
  35661. "additionalProperties": false
  35662. }
  35663. },
  35664. "required": ["id", "type", "properties"],
  35665. "additionalProperties": false
  35666. },
  35667. "EventPtyDeleted": {
  35668. "type": "object",
  35669. "properties": {
  35670. "id": {
  35671. "type": "string",
  35672. "pattern": "^evt_"
  35673. },
  35674. "type": {
  35675. "type": "string",
  35676. "enum": ["pty.deleted"]
  35677. },
  35678. "properties": {
  35679. "type": "object",
  35680. "properties": {
  35681. "id": {
  35682. "type": "string",
  35683. "pattern": "^pty"
  35684. }
  35685. },
  35686. "required": ["id"],
  35687. "additionalProperties": false
  35688. }
  35689. },
  35690. "required": ["id", "type", "properties"],
  35691. "additionalProperties": false
  35692. },
  35693. "EventQuestionV2Asked": {
  35694. "type": "object",
  35695. "properties": {
  35696. "id": {
  35697. "type": "string",
  35698. "pattern": "^evt_"
  35699. },
  35700. "type": {
  35701. "type": "string",
  35702. "enum": ["question.v2.asked"]
  35703. },
  35704. "properties": {
  35705. "type": "object",
  35706. "properties": {
  35707. "id": {
  35708. "type": "string",
  35709. "pattern": "^que"
  35710. },
  35711. "sessionID": {
  35712. "type": "string",
  35713. "pattern": "^ses"
  35714. },
  35715. "questions": {
  35716. "type": "array",
  35717. "items": {
  35718. "$ref": "#/components/schemas/QuestionV2Info"
  35719. },
  35720. "description": "Questions to ask"
  35721. },
  35722. "tool": {
  35723. "$ref": "#/components/schemas/QuestionV2Tool"
  35724. }
  35725. },
  35726. "required": ["id", "sessionID", "questions"],
  35727. "additionalProperties": false
  35728. }
  35729. },
  35730. "required": ["id", "type", "properties"],
  35731. "additionalProperties": false
  35732. },
  35733. "EventQuestionV2Replied": {
  35734. "type": "object",
  35735. "properties": {
  35736. "id": {
  35737. "type": "string",
  35738. "pattern": "^evt_"
  35739. },
  35740. "type": {
  35741. "type": "string",
  35742. "enum": ["question.v2.replied"]
  35743. },
  35744. "properties": {
  35745. "type": "object",
  35746. "properties": {
  35747. "sessionID": {
  35748. "type": "string",
  35749. "pattern": "^ses"
  35750. },
  35751. "requestID": {
  35752. "type": "string",
  35753. "pattern": "^que"
  35754. },
  35755. "answers": {
  35756. "type": "array",
  35757. "items": {
  35758. "$ref": "#/components/schemas/QuestionV2Answer"
  35759. }
  35760. }
  35761. },
  35762. "required": ["sessionID", "requestID", "answers"],
  35763. "additionalProperties": false
  35764. }
  35765. },
  35766. "required": ["id", "type", "properties"],
  35767. "additionalProperties": false
  35768. },
  35769. "EventQuestionV2Rejected": {
  35770. "type": "object",
  35771. "properties": {
  35772. "id": {
  35773. "type": "string",
  35774. "pattern": "^evt_"
  35775. },
  35776. "type": {
  35777. "type": "string",
  35778. "enum": ["question.v2.rejected"]
  35779. },
  35780. "properties": {
  35781. "type": "object",
  35782. "properties": {
  35783. "sessionID": {
  35784. "type": "string",
  35785. "pattern": "^ses"
  35786. },
  35787. "requestID": {
  35788. "type": "string",
  35789. "pattern": "^que"
  35790. }
  35791. },
  35792. "required": ["sessionID", "requestID"],
  35793. "additionalProperties": false
  35794. }
  35795. },
  35796. "required": ["id", "type", "properties"],
  35797. "additionalProperties": false
  35798. },
  35799. "EventLspUpdated": {
  35800. "type": "object",
  35801. "properties": {
  35802. "id": {
  35803. "type": "string",
  35804. "pattern": "^evt_"
  35805. },
  35806. "type": {
  35807. "type": "string",
  35808. "enum": ["lsp.updated"]
  35809. },
  35810. "properties": {
  35811. "type": "object",
  35812. "properties": {}
  35813. }
  35814. },
  35815. "required": ["id", "type", "properties"],
  35816. "additionalProperties": false
  35817. },
  35818. "EventPermissionAsked": {
  35819. "type": "object",
  35820. "properties": {
  35821. "id": {
  35822. "type": "string",
  35823. "pattern": "^evt_"
  35824. },
  35825. "type": {
  35826. "type": "string",
  35827. "enum": ["permission.asked"]
  35828. },
  35829. "properties": {
  35830. "type": "object",
  35831. "properties": {
  35832. "id": {
  35833. "type": "string",
  35834. "pattern": "^per"
  35835. },
  35836. "sessionID": {
  35837. "type": "string",
  35838. "pattern": "^ses"
  35839. },
  35840. "permission": {
  35841. "type": "string"
  35842. },
  35843. "patterns": {
  35844. "type": "array",
  35845. "items": {
  35846. "type": "string"
  35847. }
  35848. },
  35849. "metadata": {
  35850. "type": "object"
  35851. },
  35852. "always": {
  35853. "type": "array",
  35854. "items": {
  35855. "type": "string"
  35856. }
  35857. },
  35858. "tool": {
  35859. "type": "object",
  35860. "properties": {
  35861. "messageID": {
  35862. "type": "string"
  35863. },
  35864. "callID": {
  35865. "type": "string"
  35866. }
  35867. },
  35868. "required": ["messageID", "callID"],
  35869. "additionalProperties": false
  35870. }
  35871. },
  35872. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  35873. "additionalProperties": false
  35874. }
  35875. },
  35876. "required": ["id", "type", "properties"],
  35877. "additionalProperties": false
  35878. },
  35879. "EventPermissionReplied": {
  35880. "type": "object",
  35881. "properties": {
  35882. "id": {
  35883. "type": "string",
  35884. "pattern": "^evt_"
  35885. },
  35886. "type": {
  35887. "type": "string",
  35888. "enum": ["permission.replied"]
  35889. },
  35890. "properties": {
  35891. "type": "object",
  35892. "properties": {
  35893. "sessionID": {
  35894. "type": "string",
  35895. "pattern": "^ses"
  35896. },
  35897. "requestID": {
  35898. "type": "string",
  35899. "pattern": "^per"
  35900. },
  35901. "reply": {
  35902. "type": "string",
  35903. "enum": ["once", "always", "reject"]
  35904. }
  35905. },
  35906. "required": ["sessionID", "requestID", "reply"],
  35907. "additionalProperties": false
  35908. }
  35909. },
  35910. "required": ["id", "type", "properties"],
  35911. "additionalProperties": false
  35912. },
  35913. "EventMcpToolsChanged": {
  35914. "type": "object",
  35915. "properties": {
  35916. "id": {
  35917. "type": "string",
  35918. "pattern": "^evt_"
  35919. },
  35920. "type": {
  35921. "type": "string",
  35922. "enum": ["mcp.tools.changed"]
  35923. },
  35924. "properties": {
  35925. "type": "object",
  35926. "properties": {
  35927. "server": {
  35928. "type": "string"
  35929. }
  35930. },
  35931. "required": ["server"],
  35932. "additionalProperties": false
  35933. }
  35934. },
  35935. "required": ["id", "type", "properties"],
  35936. "additionalProperties": false
  35937. },
  35938. "EventMcpBrowserOpenFailed": {
  35939. "type": "object",
  35940. "properties": {
  35941. "id": {
  35942. "type": "string",
  35943. "pattern": "^evt_"
  35944. },
  35945. "type": {
  35946. "type": "string",
  35947. "enum": ["mcp.browser.open.failed"]
  35948. },
  35949. "properties": {
  35950. "type": "object",
  35951. "properties": {
  35952. "mcpName": {
  35953. "type": "string"
  35954. },
  35955. "url": {
  35956. "type": "string"
  35957. }
  35958. },
  35959. "required": ["mcpName", "url"],
  35960. "additionalProperties": false
  35961. }
  35962. },
  35963. "required": ["id", "type", "properties"],
  35964. "additionalProperties": false
  35965. },
  35966. "EventCommandExecuted": {
  35967. "type": "object",
  35968. "properties": {
  35969. "id": {
  35970. "type": "string",
  35971. "pattern": "^evt_"
  35972. },
  35973. "type": {
  35974. "type": "string",
  35975. "enum": ["command.executed"]
  35976. },
  35977. "properties": {
  35978. "type": "object",
  35979. "properties": {
  35980. "name": {
  35981. "type": "string"
  35982. },
  35983. "sessionID": {
  35984. "type": "string",
  35985. "pattern": "^ses"
  35986. },
  35987. "arguments": {
  35988. "type": "string"
  35989. },
  35990. "messageID": {
  35991. "type": "string",
  35992. "pattern": "^msg"
  35993. }
  35994. },
  35995. "required": ["name", "sessionID", "arguments", "messageID"],
  35996. "additionalProperties": false
  35997. }
  35998. },
  35999. "required": ["id", "type", "properties"],
  36000. "additionalProperties": false
  36001. },
  36002. "EventProjectUpdated": {
  36003. "type": "object",
  36004. "properties": {
  36005. "id": {
  36006. "type": "string",
  36007. "pattern": "^evt_"
  36008. },
  36009. "type": {
  36010. "type": "string",
  36011. "enum": ["project.updated"]
  36012. },
  36013. "properties": {
  36014. "type": "object",
  36015. "properties": {
  36016. "id": {
  36017. "type": "string"
  36018. },
  36019. "worktree": {
  36020. "type": "string"
  36021. },
  36022. "vcs": {
  36023. "$ref": "#/components/schemas/ProjectVcs"
  36024. },
  36025. "name": {
  36026. "type": "string"
  36027. },
  36028. "icon": {
  36029. "$ref": "#/components/schemas/ProjectIcon"
  36030. },
  36031. "commands": {
  36032. "$ref": "#/components/schemas/ProjectCommands"
  36033. },
  36034. "time": {
  36035. "$ref": "#/components/schemas/ProjectTime"
  36036. },
  36037. "sandboxes": {
  36038. "type": "array",
  36039. "items": {
  36040. "type": "string"
  36041. }
  36042. }
  36043. },
  36044. "required": ["id", "worktree", "time", "sandboxes"],
  36045. "additionalProperties": false
  36046. }
  36047. },
  36048. "required": ["id", "type", "properties"],
  36049. "additionalProperties": false
  36050. },
  36051. "EventSessionStatus": {
  36052. "type": "object",
  36053. "properties": {
  36054. "id": {
  36055. "type": "string",
  36056. "pattern": "^evt_"
  36057. },
  36058. "type": {
  36059. "type": "string",
  36060. "enum": ["session.status"]
  36061. },
  36062. "properties": {
  36063. "type": "object",
  36064. "properties": {
  36065. "sessionID": {
  36066. "type": "string",
  36067. "pattern": "^ses"
  36068. },
  36069. "status": {
  36070. "$ref": "#/components/schemas/SessionStatus"
  36071. }
  36072. },
  36073. "required": ["sessionID", "status"],
  36074. "additionalProperties": false
  36075. }
  36076. },
  36077. "required": ["id", "type", "properties"],
  36078. "additionalProperties": false
  36079. },
  36080. "EventSessionIdle": {
  36081. "type": "object",
  36082. "properties": {
  36083. "id": {
  36084. "type": "string",
  36085. "pattern": "^evt_"
  36086. },
  36087. "type": {
  36088. "type": "string",
  36089. "enum": ["session.idle"]
  36090. },
  36091. "properties": {
  36092. "type": "object",
  36093. "properties": {
  36094. "sessionID": {
  36095. "type": "string",
  36096. "pattern": "^ses"
  36097. }
  36098. },
  36099. "required": ["sessionID"],
  36100. "additionalProperties": false
  36101. }
  36102. },
  36103. "required": ["id", "type", "properties"],
  36104. "additionalProperties": false
  36105. },
  36106. "EventQuestionAsked": {
  36107. "type": "object",
  36108. "properties": {
  36109. "id": {
  36110. "type": "string",
  36111. "pattern": "^evt_"
  36112. },
  36113. "type": {
  36114. "type": "string",
  36115. "enum": ["question.asked"]
  36116. },
  36117. "properties": {
  36118. "type": "object",
  36119. "properties": {
  36120. "id": {
  36121. "type": "string",
  36122. "pattern": "^que"
  36123. },
  36124. "sessionID": {
  36125. "type": "string",
  36126. "pattern": "^ses"
  36127. },
  36128. "questions": {
  36129. "type": "array",
  36130. "items": {
  36131. "$ref": "#/components/schemas/QuestionInfo"
  36132. },
  36133. "description": "Questions to ask"
  36134. },
  36135. "tool": {
  36136. "$ref": "#/components/schemas/QuestionTool"
  36137. }
  36138. },
  36139. "required": ["id", "sessionID", "questions"],
  36140. "additionalProperties": false
  36141. }
  36142. },
  36143. "required": ["id", "type", "properties"],
  36144. "additionalProperties": false
  36145. },
  36146. "EventQuestionReplied": {
  36147. "type": "object",
  36148. "properties": {
  36149. "id": {
  36150. "type": "string",
  36151. "pattern": "^evt_"
  36152. },
  36153. "type": {
  36154. "type": "string",
  36155. "enum": ["question.replied"]
  36156. },
  36157. "properties": {
  36158. "type": "object",
  36159. "properties": {
  36160. "sessionID": {
  36161. "type": "string",
  36162. "pattern": "^ses"
  36163. },
  36164. "requestID": {
  36165. "type": "string",
  36166. "pattern": "^que"
  36167. },
  36168. "answers": {
  36169. "type": "array",
  36170. "items": {
  36171. "$ref": "#/components/schemas/QuestionAnswer"
  36172. }
  36173. }
  36174. },
  36175. "required": ["sessionID", "requestID", "answers"],
  36176. "additionalProperties": false
  36177. }
  36178. },
  36179. "required": ["id", "type", "properties"],
  36180. "additionalProperties": false
  36181. },
  36182. "EventQuestionRejected": {
  36183. "type": "object",
  36184. "properties": {
  36185. "id": {
  36186. "type": "string",
  36187. "pattern": "^evt_"
  36188. },
  36189. "type": {
  36190. "type": "string",
  36191. "enum": ["question.rejected"]
  36192. },
  36193. "properties": {
  36194. "type": "object",
  36195. "properties": {
  36196. "sessionID": {
  36197. "type": "string",
  36198. "pattern": "^ses"
  36199. },
  36200. "requestID": {
  36201. "type": "string",
  36202. "pattern": "^que"
  36203. }
  36204. },
  36205. "required": ["sessionID", "requestID"],
  36206. "additionalProperties": false
  36207. }
  36208. },
  36209. "required": ["id", "type", "properties"],
  36210. "additionalProperties": false
  36211. },
  36212. "EventSessionCompacted": {
  36213. "type": "object",
  36214. "properties": {
  36215. "id": {
  36216. "type": "string",
  36217. "pattern": "^evt_"
  36218. },
  36219. "type": {
  36220. "type": "string",
  36221. "enum": ["session.compacted"]
  36222. },
  36223. "properties": {
  36224. "type": "object",
  36225. "properties": {
  36226. "sessionID": {
  36227. "type": "string",
  36228. "pattern": "^ses"
  36229. }
  36230. },
  36231. "required": ["sessionID"],
  36232. "additionalProperties": false
  36233. }
  36234. },
  36235. "required": ["id", "type", "properties"],
  36236. "additionalProperties": false
  36237. },
  36238. "EventVcsBranchUpdated": {
  36239. "type": "object",
  36240. "properties": {
  36241. "id": {
  36242. "type": "string",
  36243. "pattern": "^evt_"
  36244. },
  36245. "type": {
  36246. "type": "string",
  36247. "enum": ["vcs.branch.updated"]
  36248. },
  36249. "properties": {
  36250. "type": "object",
  36251. "properties": {
  36252. "branch": {
  36253. "type": "string"
  36254. }
  36255. },
  36256. "additionalProperties": false
  36257. }
  36258. },
  36259. "required": ["id", "type", "properties"],
  36260. "additionalProperties": false
  36261. },
  36262. "EventWorkspaceReady": {
  36263. "type": "object",
  36264. "properties": {
  36265. "id": {
  36266. "type": "string",
  36267. "pattern": "^evt_"
  36268. },
  36269. "type": {
  36270. "type": "string",
  36271. "enum": ["workspace.ready"]
  36272. },
  36273. "properties": {
  36274. "type": "object",
  36275. "properties": {
  36276. "name": {
  36277. "type": "string"
  36278. }
  36279. },
  36280. "required": ["name"],
  36281. "additionalProperties": false
  36282. }
  36283. },
  36284. "required": ["id", "type", "properties"],
  36285. "additionalProperties": false
  36286. },
  36287. "EventWorkspaceFailed": {
  36288. "type": "object",
  36289. "properties": {
  36290. "id": {
  36291. "type": "string",
  36292. "pattern": "^evt_"
  36293. },
  36294. "type": {
  36295. "type": "string",
  36296. "enum": ["workspace.failed"]
  36297. },
  36298. "properties": {
  36299. "type": "object",
  36300. "properties": {
  36301. "message": {
  36302. "type": "string"
  36303. }
  36304. },
  36305. "required": ["message"],
  36306. "additionalProperties": false
  36307. }
  36308. },
  36309. "required": ["id", "type", "properties"],
  36310. "additionalProperties": false
  36311. },
  36312. "EventWorkspaceStatus": {
  36313. "type": "object",
  36314. "properties": {
  36315. "id": {
  36316. "type": "string",
  36317. "pattern": "^evt_"
  36318. },
  36319. "type": {
  36320. "type": "string",
  36321. "enum": ["workspace.status"]
  36322. },
  36323. "properties": {
  36324. "type": "object",
  36325. "properties": {
  36326. "workspaceID": {
  36327. "type": "string",
  36328. "pattern": "^wrk"
  36329. },
  36330. "status": {
  36331. "type": "string",
  36332. "enum": ["connected", "connecting", "disconnected", "error"]
  36333. }
  36334. },
  36335. "required": ["workspaceID", "status"],
  36336. "additionalProperties": false
  36337. }
  36338. },
  36339. "required": ["id", "type", "properties"],
  36340. "additionalProperties": false
  36341. },
  36342. "EventWorktreeReady": {
  36343. "type": "object",
  36344. "properties": {
  36345. "id": {
  36346. "type": "string",
  36347. "pattern": "^evt_"
  36348. },
  36349. "type": {
  36350. "type": "string",
  36351. "enum": ["worktree.ready"]
  36352. },
  36353. "properties": {
  36354. "type": "object",
  36355. "properties": {
  36356. "name": {
  36357. "type": "string"
  36358. },
  36359. "branch": {
  36360. "type": "string"
  36361. }
  36362. },
  36363. "required": ["name"],
  36364. "additionalProperties": false
  36365. }
  36366. },
  36367. "required": ["id", "type", "properties"],
  36368. "additionalProperties": false
  36369. },
  36370. "EventWorktreeFailed": {
  36371. "type": "object",
  36372. "properties": {
  36373. "id": {
  36374. "type": "string",
  36375. "pattern": "^evt_"
  36376. },
  36377. "type": {
  36378. "type": "string",
  36379. "enum": ["worktree.failed"]
  36380. },
  36381. "properties": {
  36382. "type": "object",
  36383. "properties": {
  36384. "message": {
  36385. "type": "string"
  36386. }
  36387. },
  36388. "required": ["message"],
  36389. "additionalProperties": false
  36390. }
  36391. },
  36392. "required": ["id", "type", "properties"],
  36393. "additionalProperties": false
  36394. },
  36395. "EventServerConnected": {
  36396. "type": "object",
  36397. "properties": {
  36398. "id": {
  36399. "type": "string",
  36400. "pattern": "^evt_"
  36401. },
  36402. "type": {
  36403. "type": "string",
  36404. "enum": ["server.connected"]
  36405. },
  36406. "properties": {
  36407. "type": "object",
  36408. "properties": {}
  36409. }
  36410. },
  36411. "required": ["id", "type", "properties"],
  36412. "additionalProperties": false
  36413. },
  36414. "EventGlobalDisposed": {
  36415. "type": "object",
  36416. "properties": {
  36417. "id": {
  36418. "type": "string",
  36419. "pattern": "^evt_"
  36420. },
  36421. "type": {
  36422. "type": "string",
  36423. "enum": ["global.disposed"]
  36424. },
  36425. "properties": {
  36426. "type": "object",
  36427. "properties": {}
  36428. }
  36429. },
  36430. "required": ["id", "type", "properties"],
  36431. "additionalProperties": false
  36432. },
  36433. "CredentialOAuth": {
  36434. "type": "object",
  36435. "properties": {
  36436. "type": {
  36437. "type": "string",
  36438. "enum": ["oauth"]
  36439. },
  36440. "methodID": {
  36441. "type": "string"
  36442. },
  36443. "refresh": {
  36444. "type": "string"
  36445. },
  36446. "access": {
  36447. "type": "string"
  36448. },
  36449. "expires": {
  36450. "type": "integer",
  36451. "minimum": 0
  36452. },
  36453. "metadata": {
  36454. "type": "object"
  36455. }
  36456. },
  36457. "required": ["type", "methodID", "refresh", "access", "expires"],
  36458. "additionalProperties": false
  36459. },
  36460. "CredentialKey": {
  36461. "type": "object",
  36462. "properties": {
  36463. "type": {
  36464. "type": "string",
  36465. "enum": ["key"]
  36466. },
  36467. "key": {
  36468. "type": "string"
  36469. },
  36470. "metadata": {
  36471. "type": "object"
  36472. }
  36473. },
  36474. "required": ["type", "key"],
  36475. "additionalProperties": false
  36476. },
  36477. "SkillV2DirectorySource": {
  36478. "type": "object",
  36479. "properties": {
  36480. "type": {
  36481. "type": "string",
  36482. "enum": ["directory"]
  36483. },
  36484. "path": {
  36485. "type": "string"
  36486. }
  36487. },
  36488. "required": ["type", "path"],
  36489. "additionalProperties": false
  36490. },
  36491. "SkillV2UrlSource": {
  36492. "type": "object",
  36493. "properties": {
  36494. "type": {
  36495. "type": "string",
  36496. "enum": ["url"]
  36497. },
  36498. "url": {
  36499. "type": "string"
  36500. }
  36501. },
  36502. "required": ["type", "url"],
  36503. "additionalProperties": false
  36504. },
  36505. "SkillV2EmbeddedSource": {
  36506. "type": "object",
  36507. "properties": {
  36508. "type": {
  36509. "type": "string",
  36510. "enum": ["embedded"]
  36511. },
  36512. "skill": {
  36513. "$ref": "#/components/schemas/SkillV2Info"
  36514. }
  36515. },
  36516. "required": ["type", "skill"],
  36517. "additionalProperties": false
  36518. },
  36519. "BadRequestError": {
  36520. "type": "object",
  36521. "required": ["name", "data"],
  36522. "properties": {
  36523. "name": {
  36524. "type": "string",
  36525. "enum": ["BadRequest"]
  36526. },
  36527. "data": {
  36528. "type": "object",
  36529. "required": ["message"],
  36530. "properties": {
  36531. "message": {
  36532. "type": "string"
  36533. },
  36534. "kind": {
  36535. "type": "string",
  36536. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36537. }
  36538. }
  36539. }
  36540. }
  36541. }
  36542. }
  36543. },
  36544. "security": [],
  36545. "tags": [
  36546. {
  36547. "name": "control",
  36548. "description": "Control plane routes."
  36549. },
  36550. {
  36551. "name": "controlPlane",
  36552. "description": "Control-plane orchestration routes."
  36553. },
  36554. {
  36555. "name": "global",
  36556. "description": "Global server routes."
  36557. },
  36558. {
  36559. "name": "event",
  36560. "description": "Instance event stream route."
  36561. },
  36562. {
  36563. "name": "config",
  36564. "description": "Experimental HttpApi config routes."
  36565. },
  36566. {
  36567. "name": "experimental",
  36568. "description": "Experimental HttpApi read-only routes."
  36569. },
  36570. {
  36571. "name": "file",
  36572. "description": "Experimental HttpApi file routes."
  36573. },
  36574. {
  36575. "name": "instance",
  36576. "description": "Experimental HttpApi instance read routes."
  36577. },
  36578. {
  36579. "name": "mcp",
  36580. "description": "Experimental HttpApi MCP routes."
  36581. },
  36582. {
  36583. "name": "project",
  36584. "description": "Experimental HttpApi project routes."
  36585. },
  36586. {
  36587. "name": "projectCopy",
  36588. "description": "Project copy naming routes."
  36589. },
  36590. {
  36591. "name": "pty",
  36592. "description": "Experimental HttpApi PTY routes."
  36593. },
  36594. {
  36595. "name": "question",
  36596. "description": "Question routes."
  36597. },
  36598. {
  36599. "name": "permission",
  36600. "description": "Experimental HttpApi permission routes."
  36601. },
  36602. {
  36603. "name": "provider",
  36604. "description": "Experimental HttpApi provider routes."
  36605. },
  36606. {
  36607. "name": "session",
  36608. "description": "Experimental HttpApi session routes."
  36609. },
  36610. {
  36611. "name": "sync",
  36612. "description": "Experimental HttpApi sync routes."
  36613. },
  36614. {
  36615. "name": "tui",
  36616. "description": "Experimental HttpApi TUI routes."
  36617. },
  36618. {
  36619. "name": "workspace",
  36620. "description": "Experimental HttpApi workspace routes."
  36621. },
  36622. {
  36623. "name": "opencode HttpApi",
  36624. "description": "Experimental HttpApi surface for selected instance routes."
  36625. },
  36626. {
  36627. "name": "opencode HttpApi",
  36628. "description": "Experimental HttpApi surface for selected instance routes."
  36629. },
  36630. {
  36631. "name": "opencode HttpApi",
  36632. "description": "Experimental HttpApi surface for selected instance routes."
  36633. },
  36634. {
  36635. "name": "sessions",
  36636. "description": "Experimental session routes."
  36637. },
  36638. {
  36639. "name": "messages",
  36640. "description": "Experimental message routes."
  36641. },
  36642. {
  36643. "name": "models",
  36644. "description": "Experimental model routes."
  36645. },
  36646. {
  36647. "name": "providers",
  36648. "description": "Experimental provider routes."
  36649. },
  36650. {
  36651. "name": "integrations",
  36652. "description": "Integration discovery and authentication routes."
  36653. },
  36654. {
  36655. "name": "opencode HttpApi",
  36656. "description": "Experimental HttpApi surface for selected instance routes."
  36657. },
  36658. {
  36659. "name": "permissions",
  36660. "description": "Experimental permission routes."
  36661. },
  36662. {
  36663. "name": "filesystem",
  36664. "description": "Experimental location-scoped filesystem routes."
  36665. },
  36666. {
  36667. "name": "commands",
  36668. "description": "Experimental command routes."
  36669. },
  36670. {
  36671. "name": "skills",
  36672. "description": "Experimental skill routes."
  36673. },
  36674. {
  36675. "name": "events",
  36676. "description": "Experimental event stream route."
  36677. },
  36678. {
  36679. "name": "pty",
  36680. "description": "Experimental location-scoped PTY routes."
  36681. },
  36682. {
  36683. "name": "session questions",
  36684. "description": "Experimental session question routes."
  36685. },
  36686. {
  36687. "name": "reference",
  36688. "description": "Location-scoped project references."
  36689. },
  36690. {
  36691. "name": "projectCopy",
  36692. "description": "Project copy management routes."
  36693. },
  36694. {
  36695. "name": "pty",
  36696. "description": "PTY websocket route."
  36697. }
  36698. ]
  36699. }