openapi.json 1.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695
  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. "username": {
  21126. "type": "string"
  21127. },
  21128. "mode": {
  21129. "type": "object",
  21130. "properties": {
  21131. "build": {
  21132. "$ref": "#/components/schemas/AgentConfig"
  21133. },
  21134. "plan": {
  21135. "$ref": "#/components/schemas/AgentConfig"
  21136. }
  21137. },
  21138. "additionalProperties": {
  21139. "$ref": "#/components/schemas/AgentConfig"
  21140. }
  21141. },
  21142. "agent": {
  21143. "type": "object",
  21144. "properties": {
  21145. "plan": {
  21146. "$ref": "#/components/schemas/AgentConfig"
  21147. },
  21148. "build": {
  21149. "$ref": "#/components/schemas/AgentConfig"
  21150. },
  21151. "general": {
  21152. "$ref": "#/components/schemas/AgentConfig"
  21153. },
  21154. "explore": {
  21155. "$ref": "#/components/schemas/AgentConfig"
  21156. },
  21157. "title": {
  21158. "$ref": "#/components/schemas/AgentConfig"
  21159. },
  21160. "summary": {
  21161. "$ref": "#/components/schemas/AgentConfig"
  21162. },
  21163. "compaction": {
  21164. "$ref": "#/components/schemas/AgentConfig"
  21165. }
  21166. },
  21167. "additionalProperties": {
  21168. "$ref": "#/components/schemas/AgentConfig"
  21169. }
  21170. },
  21171. "provider": {
  21172. "type": "object",
  21173. "additionalProperties": {
  21174. "$ref": "#/components/schemas/ProviderConfig"
  21175. }
  21176. },
  21177. "mcp": {
  21178. "type": "object",
  21179. "additionalProperties": {
  21180. "anyOf": [
  21181. {
  21182. "$ref": "#/components/schemas/McpLocalConfig"
  21183. },
  21184. {
  21185. "$ref": "#/components/schemas/McpRemoteConfig"
  21186. },
  21187. {
  21188. "type": "object",
  21189. "properties": {
  21190. "enabled": {
  21191. "type": "boolean"
  21192. }
  21193. },
  21194. "required": ["enabled"],
  21195. "additionalProperties": false
  21196. }
  21197. ]
  21198. }
  21199. },
  21200. "formatter": {
  21201. "anyOf": [
  21202. {
  21203. "type": "boolean"
  21204. },
  21205. {
  21206. "type": "object",
  21207. "additionalProperties": {
  21208. "type": "object",
  21209. "properties": {
  21210. "disabled": {
  21211. "type": "boolean"
  21212. },
  21213. "command": {
  21214. "type": "array",
  21215. "items": {
  21216. "type": "string"
  21217. }
  21218. },
  21219. "environment": {
  21220. "type": "object",
  21221. "additionalProperties": {
  21222. "type": "string"
  21223. }
  21224. },
  21225. "extensions": {
  21226. "type": "array",
  21227. "items": {
  21228. "type": "string"
  21229. }
  21230. }
  21231. },
  21232. "additionalProperties": false
  21233. }
  21234. }
  21235. ],
  21236. "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."
  21237. },
  21238. "lsp": {
  21239. "anyOf": [
  21240. {
  21241. "type": "boolean"
  21242. },
  21243. {
  21244. "type": "object",
  21245. "additionalProperties": {
  21246. "anyOf": [
  21247. {
  21248. "type": "object",
  21249. "properties": {
  21250. "disabled": {
  21251. "type": "boolean",
  21252. "enum": [true]
  21253. }
  21254. },
  21255. "required": ["disabled"],
  21256. "additionalProperties": false
  21257. },
  21258. {
  21259. "type": "object",
  21260. "properties": {
  21261. "command": {
  21262. "type": "array",
  21263. "items": {
  21264. "type": "string"
  21265. }
  21266. },
  21267. "extensions": {
  21268. "type": "array",
  21269. "items": {
  21270. "type": "string"
  21271. }
  21272. },
  21273. "disabled": {
  21274. "type": "boolean"
  21275. },
  21276. "env": {
  21277. "type": "object",
  21278. "additionalProperties": {
  21279. "type": "string"
  21280. }
  21281. },
  21282. "initialization": {
  21283. "type": "object"
  21284. }
  21285. },
  21286. "required": ["command"],
  21287. "additionalProperties": false
  21288. }
  21289. ]
  21290. }
  21291. }
  21292. ],
  21293. "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."
  21294. },
  21295. "instructions": {
  21296. "type": "array",
  21297. "items": {
  21298. "type": "string"
  21299. }
  21300. },
  21301. "layout": {
  21302. "$ref": "#/components/schemas/LayoutConfig"
  21303. },
  21304. "permission": {
  21305. "$ref": "#/components/schemas/PermissionConfig"
  21306. },
  21307. "tools": {
  21308. "type": "object",
  21309. "additionalProperties": {
  21310. "type": "boolean"
  21311. }
  21312. },
  21313. "attachment": {
  21314. "$ref": "#/components/schemas/AttachmentConfig"
  21315. },
  21316. "enterprise": {
  21317. "type": "object",
  21318. "properties": {
  21319. "url": {
  21320. "type": "string"
  21321. }
  21322. },
  21323. "additionalProperties": false
  21324. },
  21325. "tool_output": {
  21326. "type": "object",
  21327. "properties": {
  21328. "max_lines": {
  21329. "type": "integer",
  21330. "exclusiveMinimum": 0
  21331. },
  21332. "max_bytes": {
  21333. "type": "integer",
  21334. "exclusiveMinimum": 0
  21335. }
  21336. },
  21337. "additionalProperties": false
  21338. },
  21339. "compaction": {
  21340. "type": "object",
  21341. "properties": {
  21342. "auto": {
  21343. "type": "boolean"
  21344. },
  21345. "prune": {
  21346. "type": "boolean"
  21347. },
  21348. "tail_turns": {
  21349. "type": "integer",
  21350. "minimum": 0
  21351. },
  21352. "preserve_recent_tokens": {
  21353. "type": "integer",
  21354. "minimum": 0
  21355. },
  21356. "reserved": {
  21357. "type": "integer",
  21358. "minimum": 0
  21359. }
  21360. },
  21361. "additionalProperties": false
  21362. },
  21363. "experimental": {
  21364. "type": "object",
  21365. "properties": {
  21366. "disable_paste_summary": {
  21367. "type": "boolean"
  21368. },
  21369. "batch_tool": {
  21370. "type": "boolean"
  21371. },
  21372. "openTelemetry": {
  21373. "type": "boolean"
  21374. },
  21375. "primary_tools": {
  21376. "type": "array",
  21377. "items": {
  21378. "type": "string"
  21379. }
  21380. },
  21381. "continue_loop_on_deny": {
  21382. "type": "boolean"
  21383. },
  21384. "mcp_timeout": {
  21385. "type": "integer",
  21386. "exclusiveMinimum": 0
  21387. },
  21388. "policies": {
  21389. "type": "array",
  21390. "items": {
  21391. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21392. }
  21393. }
  21394. },
  21395. "additionalProperties": false
  21396. }
  21397. },
  21398. "additionalProperties": false
  21399. },
  21400. "Model": {
  21401. "type": "object",
  21402. "properties": {
  21403. "id": {
  21404. "type": "string"
  21405. },
  21406. "providerID": {
  21407. "type": "string"
  21408. },
  21409. "api": {
  21410. "type": "object",
  21411. "properties": {
  21412. "id": {
  21413. "type": "string"
  21414. },
  21415. "url": {
  21416. "type": "string"
  21417. },
  21418. "npm": {
  21419. "type": "string"
  21420. }
  21421. },
  21422. "required": ["id", "url", "npm"],
  21423. "additionalProperties": false
  21424. },
  21425. "name": {
  21426. "type": "string"
  21427. },
  21428. "family": {
  21429. "type": "string"
  21430. },
  21431. "capabilities": {
  21432. "type": "object",
  21433. "properties": {
  21434. "temperature": {
  21435. "type": "boolean"
  21436. },
  21437. "reasoning": {
  21438. "type": "boolean"
  21439. },
  21440. "attachment": {
  21441. "type": "boolean"
  21442. },
  21443. "toolcall": {
  21444. "type": "boolean"
  21445. },
  21446. "input": {
  21447. "type": "object",
  21448. "properties": {
  21449. "text": {
  21450. "type": "boolean"
  21451. },
  21452. "audio": {
  21453. "type": "boolean"
  21454. },
  21455. "image": {
  21456. "type": "boolean"
  21457. },
  21458. "video": {
  21459. "type": "boolean"
  21460. },
  21461. "pdf": {
  21462. "type": "boolean"
  21463. }
  21464. },
  21465. "required": ["text", "audio", "image", "video", "pdf"],
  21466. "additionalProperties": false
  21467. },
  21468. "output": {
  21469. "type": "object",
  21470. "properties": {
  21471. "text": {
  21472. "type": "boolean"
  21473. },
  21474. "audio": {
  21475. "type": "boolean"
  21476. },
  21477. "image": {
  21478. "type": "boolean"
  21479. },
  21480. "video": {
  21481. "type": "boolean"
  21482. },
  21483. "pdf": {
  21484. "type": "boolean"
  21485. }
  21486. },
  21487. "required": ["text", "audio", "image", "video", "pdf"],
  21488. "additionalProperties": false
  21489. },
  21490. "interleaved": {
  21491. "anyOf": [
  21492. {
  21493. "type": "boolean"
  21494. },
  21495. {
  21496. "type": "object",
  21497. "properties": {
  21498. "field": {
  21499. "type": "string",
  21500. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21501. }
  21502. },
  21503. "required": ["field"],
  21504. "additionalProperties": false
  21505. }
  21506. ]
  21507. }
  21508. },
  21509. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21510. "additionalProperties": false
  21511. },
  21512. "cost": {
  21513. "type": "object",
  21514. "properties": {
  21515. "input": {
  21516. "type": "number"
  21517. },
  21518. "output": {
  21519. "type": "number"
  21520. },
  21521. "cache": {
  21522. "type": "object",
  21523. "properties": {
  21524. "read": {
  21525. "type": "number"
  21526. },
  21527. "write": {
  21528. "type": "number"
  21529. }
  21530. },
  21531. "required": ["read", "write"],
  21532. "additionalProperties": false
  21533. },
  21534. "tiers": {
  21535. "type": "array",
  21536. "items": {
  21537. "type": "object",
  21538. "properties": {
  21539. "input": {
  21540. "type": "number"
  21541. },
  21542. "output": {
  21543. "type": "number"
  21544. },
  21545. "cache": {
  21546. "type": "object",
  21547. "properties": {
  21548. "read": {
  21549. "type": "number"
  21550. },
  21551. "write": {
  21552. "type": "number"
  21553. }
  21554. },
  21555. "required": ["read", "write"],
  21556. "additionalProperties": false
  21557. },
  21558. "tier": {
  21559. "type": "object",
  21560. "properties": {
  21561. "type": {
  21562. "type": "string",
  21563. "enum": ["context"]
  21564. },
  21565. "size": {
  21566. "type": "number"
  21567. }
  21568. },
  21569. "required": ["type", "size"],
  21570. "additionalProperties": false
  21571. }
  21572. },
  21573. "required": ["input", "output", "cache", "tier"],
  21574. "additionalProperties": false
  21575. }
  21576. },
  21577. "experimentalOver200K": {
  21578. "type": "object",
  21579. "properties": {
  21580. "input": {
  21581. "type": "number"
  21582. },
  21583. "output": {
  21584. "type": "number"
  21585. },
  21586. "cache": {
  21587. "type": "object",
  21588. "properties": {
  21589. "read": {
  21590. "type": "number"
  21591. },
  21592. "write": {
  21593. "type": "number"
  21594. }
  21595. },
  21596. "required": ["read", "write"],
  21597. "additionalProperties": false
  21598. }
  21599. },
  21600. "required": ["input", "output", "cache"],
  21601. "additionalProperties": false
  21602. }
  21603. },
  21604. "required": ["input", "output", "cache"],
  21605. "additionalProperties": false
  21606. },
  21607. "limit": {
  21608. "type": "object",
  21609. "properties": {
  21610. "context": {
  21611. "type": "number"
  21612. },
  21613. "input": {
  21614. "type": "number"
  21615. },
  21616. "output": {
  21617. "type": "number"
  21618. }
  21619. },
  21620. "required": ["context", "output"],
  21621. "additionalProperties": false
  21622. },
  21623. "status": {
  21624. "type": "string",
  21625. "enum": ["alpha", "beta", "deprecated", "active"]
  21626. },
  21627. "options": {
  21628. "type": "object"
  21629. },
  21630. "headers": {
  21631. "type": "object",
  21632. "additionalProperties": {
  21633. "type": "string"
  21634. }
  21635. },
  21636. "release_date": {
  21637. "type": "string"
  21638. },
  21639. "variants": {
  21640. "type": "object",
  21641. "additionalProperties": {
  21642. "type": "object"
  21643. }
  21644. }
  21645. },
  21646. "required": [
  21647. "id",
  21648. "providerID",
  21649. "api",
  21650. "name",
  21651. "capabilities",
  21652. "cost",
  21653. "limit",
  21654. "status",
  21655. "options",
  21656. "headers",
  21657. "release_date"
  21658. ],
  21659. "additionalProperties": false
  21660. },
  21661. "Provider": {
  21662. "type": "object",
  21663. "properties": {
  21664. "id": {
  21665. "type": "string"
  21666. },
  21667. "name": {
  21668. "type": "string"
  21669. },
  21670. "source": {
  21671. "type": "string",
  21672. "enum": ["env", "config", "custom", "api"]
  21673. },
  21674. "env": {
  21675. "type": "array",
  21676. "items": {
  21677. "type": "string"
  21678. }
  21679. },
  21680. "key": {
  21681. "type": "string"
  21682. },
  21683. "options": {
  21684. "type": "object"
  21685. },
  21686. "models": {
  21687. "type": "object",
  21688. "additionalProperties": {
  21689. "$ref": "#/components/schemas/Model"
  21690. }
  21691. }
  21692. },
  21693. "required": ["id", "name", "source", "env", "options", "models"],
  21694. "additionalProperties": false
  21695. },
  21696. "ExperimentalCapabilities": {
  21697. "type": "object",
  21698. "properties": {
  21699. "backgroundSubagents": {
  21700. "type": "boolean"
  21701. }
  21702. },
  21703. "required": ["backgroundSubagents"],
  21704. "additionalProperties": false
  21705. },
  21706. "ConsoleState": {
  21707. "type": "object",
  21708. "properties": {
  21709. "consoleManagedProviders": {
  21710. "type": "array",
  21711. "items": {
  21712. "type": "string"
  21713. }
  21714. },
  21715. "activeOrgName": {
  21716. "type": "string"
  21717. },
  21718. "switchableOrgCount": {
  21719. "type": "integer",
  21720. "minimum": 0
  21721. }
  21722. },
  21723. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21724. "additionalProperties": false
  21725. },
  21726. "effect_HttpApiError_InternalServerError": {
  21727. "type": "object",
  21728. "properties": {
  21729. "_tag": {
  21730. "type": "string",
  21731. "enum": ["InternalServerError"]
  21732. }
  21733. },
  21734. "required": ["_tag"],
  21735. "additionalProperties": false
  21736. },
  21737. "ToolListItem": {
  21738. "type": "object",
  21739. "properties": {
  21740. "id": {
  21741. "type": "string"
  21742. },
  21743. "description": {
  21744. "type": "string"
  21745. },
  21746. "parameters": {}
  21747. },
  21748. "required": ["id", "description", "parameters"],
  21749. "additionalProperties": false
  21750. },
  21751. "ToolList": {
  21752. "type": "array",
  21753. "items": {
  21754. "$ref": "#/components/schemas/ToolListItem"
  21755. }
  21756. },
  21757. "ToolIDs": {
  21758. "type": "array",
  21759. "items": {
  21760. "type": "string"
  21761. }
  21762. },
  21763. "WorktreeError": {
  21764. "type": "object",
  21765. "properties": {
  21766. "name": {
  21767. "type": "string",
  21768. "enum": [
  21769. "WorktreeNotGitError",
  21770. "WorktreeNameGenerationFailedError",
  21771. "WorktreeCreateFailedError",
  21772. "WorktreeStartCommandFailedError",
  21773. "WorktreeRemoveFailedError",
  21774. "WorktreeResetFailedError",
  21775. "WorktreeListFailedError"
  21776. ]
  21777. },
  21778. "data": {
  21779. "type": "object",
  21780. "properties": {
  21781. "message": {
  21782. "type": "string"
  21783. }
  21784. },
  21785. "required": ["message"],
  21786. "additionalProperties": false
  21787. }
  21788. },
  21789. "required": ["name", "data"],
  21790. "additionalProperties": false
  21791. },
  21792. "WorktreeCreateInput": {
  21793. "type": "object",
  21794. "properties": {
  21795. "name": {
  21796. "type": "string"
  21797. },
  21798. "startCommand": {
  21799. "type": "string",
  21800. "description": "Additional startup script to run after the project's start command"
  21801. }
  21802. },
  21803. "additionalProperties": false
  21804. },
  21805. "Worktree": {
  21806. "type": "object",
  21807. "properties": {
  21808. "name": {
  21809. "type": "string"
  21810. },
  21811. "branch": {
  21812. "type": "string"
  21813. },
  21814. "directory": {
  21815. "type": "string"
  21816. }
  21817. },
  21818. "required": ["name", "directory"],
  21819. "additionalProperties": false
  21820. },
  21821. "WorktreeRemoveInput": {
  21822. "type": "object",
  21823. "properties": {
  21824. "directory": {
  21825. "type": "string"
  21826. }
  21827. },
  21828. "required": ["directory"],
  21829. "additionalProperties": false
  21830. },
  21831. "WorktreeResetInput": {
  21832. "type": "object",
  21833. "properties": {
  21834. "directory": {
  21835. "type": "string"
  21836. }
  21837. },
  21838. "required": ["directory"],
  21839. "additionalProperties": false
  21840. },
  21841. "ProjectSummary": {
  21842. "type": "object",
  21843. "properties": {
  21844. "id": {
  21845. "type": "string"
  21846. },
  21847. "name": {
  21848. "type": "string"
  21849. },
  21850. "worktree": {
  21851. "type": "string"
  21852. }
  21853. },
  21854. "required": ["id", "worktree"],
  21855. "additionalProperties": false
  21856. },
  21857. "GlobalSession": {
  21858. "type": "object",
  21859. "properties": {
  21860. "id": {
  21861. "type": "string",
  21862. "pattern": "^ses"
  21863. },
  21864. "slug": {
  21865. "type": "string"
  21866. },
  21867. "projectID": {
  21868. "type": "string"
  21869. },
  21870. "workspaceID": {
  21871. "type": "string",
  21872. "pattern": "^wrk"
  21873. },
  21874. "directory": {
  21875. "type": "string"
  21876. },
  21877. "path": {
  21878. "type": "string"
  21879. },
  21880. "parentID": {
  21881. "type": "string",
  21882. "pattern": "^ses"
  21883. },
  21884. "summary": {
  21885. "type": "object",
  21886. "properties": {
  21887. "additions": {
  21888. "type": "number"
  21889. },
  21890. "deletions": {
  21891. "type": "number"
  21892. },
  21893. "files": {
  21894. "type": "number"
  21895. },
  21896. "diffs": {
  21897. "type": "array",
  21898. "items": {
  21899. "$ref": "#/components/schemas/SnapshotFileDiff"
  21900. }
  21901. }
  21902. },
  21903. "required": ["additions", "deletions", "files"],
  21904. "additionalProperties": false
  21905. },
  21906. "cost": {
  21907. "type": "number"
  21908. },
  21909. "tokens": {
  21910. "type": "object",
  21911. "properties": {
  21912. "input": {
  21913. "type": "number"
  21914. },
  21915. "output": {
  21916. "type": "number"
  21917. },
  21918. "reasoning": {
  21919. "type": "number"
  21920. },
  21921. "cache": {
  21922. "type": "object",
  21923. "properties": {
  21924. "read": {
  21925. "type": "number"
  21926. },
  21927. "write": {
  21928. "type": "number"
  21929. }
  21930. },
  21931. "required": ["read", "write"],
  21932. "additionalProperties": false
  21933. }
  21934. },
  21935. "required": ["input", "output", "reasoning", "cache"],
  21936. "additionalProperties": false
  21937. },
  21938. "share": {
  21939. "type": "object",
  21940. "properties": {
  21941. "url": {
  21942. "type": "string"
  21943. }
  21944. },
  21945. "required": ["url"],
  21946. "additionalProperties": false
  21947. },
  21948. "title": {
  21949. "type": "string"
  21950. },
  21951. "agent": {
  21952. "type": "string"
  21953. },
  21954. "model": {
  21955. "type": "object",
  21956. "properties": {
  21957. "id": {
  21958. "type": "string"
  21959. },
  21960. "providerID": {
  21961. "type": "string"
  21962. },
  21963. "variant": {
  21964. "type": "string"
  21965. }
  21966. },
  21967. "required": ["id", "providerID"],
  21968. "additionalProperties": false
  21969. },
  21970. "version": {
  21971. "type": "string"
  21972. },
  21973. "metadata": {
  21974. "type": "object"
  21975. },
  21976. "time": {
  21977. "type": "object",
  21978. "properties": {
  21979. "created": {
  21980. "type": "integer",
  21981. "minimum": 0
  21982. },
  21983. "updated": {
  21984. "type": "integer",
  21985. "minimum": 0
  21986. },
  21987. "compacting": {
  21988. "type": "integer",
  21989. "minimum": 0
  21990. },
  21991. "archived": {
  21992. "type": "number"
  21993. }
  21994. },
  21995. "required": ["created", "updated"],
  21996. "additionalProperties": false
  21997. },
  21998. "permission": {
  21999. "$ref": "#/components/schemas/PermissionRuleset"
  22000. },
  22001. "revert": {
  22002. "type": "object",
  22003. "properties": {
  22004. "messageID": {
  22005. "type": "string",
  22006. "pattern": "^msg"
  22007. },
  22008. "partID": {
  22009. "type": "string",
  22010. "pattern": "^prt"
  22011. },
  22012. "snapshot": {
  22013. "type": "string"
  22014. },
  22015. "diff": {
  22016. "type": "string"
  22017. }
  22018. },
  22019. "required": ["messageID"],
  22020. "additionalProperties": false
  22021. },
  22022. "project": {
  22023. "anyOf": [
  22024. {
  22025. "$ref": "#/components/schemas/ProjectSummary"
  22026. },
  22027. {
  22028. "type": "null"
  22029. }
  22030. ]
  22031. }
  22032. },
  22033. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22034. "additionalProperties": false
  22035. },
  22036. "McpResource": {
  22037. "type": "object",
  22038. "properties": {
  22039. "name": {
  22040. "type": "string"
  22041. },
  22042. "uri": {
  22043. "type": "string"
  22044. },
  22045. "description": {
  22046. "type": "string"
  22047. },
  22048. "mimeType": {
  22049. "type": "string"
  22050. },
  22051. "client": {
  22052. "type": "string"
  22053. }
  22054. },
  22055. "required": ["name", "uri", "client"],
  22056. "additionalProperties": false
  22057. },
  22058. "Symbol": {
  22059. "type": "object",
  22060. "properties": {
  22061. "name": {
  22062. "type": "string"
  22063. },
  22064. "kind": {
  22065. "type": "integer",
  22066. "minimum": 0
  22067. },
  22068. "location": {
  22069. "type": "object",
  22070. "properties": {
  22071. "uri": {
  22072. "type": "string"
  22073. },
  22074. "range": {
  22075. "$ref": "#/components/schemas/Range"
  22076. }
  22077. },
  22078. "required": ["uri", "range"],
  22079. "additionalProperties": false
  22080. }
  22081. },
  22082. "required": ["name", "kind", "location"],
  22083. "additionalProperties": false
  22084. },
  22085. "FileNode": {
  22086. "type": "object",
  22087. "properties": {
  22088. "name": {
  22089. "type": "string"
  22090. },
  22091. "path": {
  22092. "type": "string"
  22093. },
  22094. "absolute": {
  22095. "type": "string"
  22096. },
  22097. "type": {
  22098. "type": "string",
  22099. "enum": ["file", "directory"]
  22100. },
  22101. "ignored": {
  22102. "type": "boolean"
  22103. }
  22104. },
  22105. "required": ["name", "path", "absolute", "type", "ignored"],
  22106. "additionalProperties": false
  22107. },
  22108. "FileContent": {
  22109. "type": "object",
  22110. "properties": {
  22111. "type": {
  22112. "type": "string",
  22113. "enum": ["text", "binary"]
  22114. },
  22115. "content": {
  22116. "type": "string"
  22117. },
  22118. "diff": {
  22119. "type": "string"
  22120. },
  22121. "patch": {
  22122. "type": "object",
  22123. "properties": {
  22124. "oldFileName": {
  22125. "type": "string"
  22126. },
  22127. "newFileName": {
  22128. "type": "string"
  22129. },
  22130. "oldHeader": {
  22131. "type": "string"
  22132. },
  22133. "newHeader": {
  22134. "type": "string"
  22135. },
  22136. "hunks": {
  22137. "type": "array",
  22138. "items": {
  22139. "type": "object",
  22140. "properties": {
  22141. "oldStart": {
  22142. "type": "integer",
  22143. "minimum": 0
  22144. },
  22145. "oldLines": {
  22146. "type": "integer",
  22147. "minimum": 0
  22148. },
  22149. "newStart": {
  22150. "type": "integer",
  22151. "minimum": 0
  22152. },
  22153. "newLines": {
  22154. "type": "integer",
  22155. "minimum": 0
  22156. },
  22157. "lines": {
  22158. "type": "array",
  22159. "items": {
  22160. "type": "string"
  22161. }
  22162. }
  22163. },
  22164. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22165. "additionalProperties": false
  22166. }
  22167. },
  22168. "index": {
  22169. "type": "string"
  22170. }
  22171. },
  22172. "required": ["oldFileName", "newFileName", "hunks"],
  22173. "additionalProperties": false
  22174. },
  22175. "encoding": {
  22176. "type": "string",
  22177. "enum": ["base64"]
  22178. },
  22179. "mimeType": {
  22180. "type": "string"
  22181. }
  22182. },
  22183. "required": ["type", "content"],
  22184. "additionalProperties": false
  22185. },
  22186. "File": {
  22187. "type": "object",
  22188. "properties": {
  22189. "path": {
  22190. "type": "string"
  22191. },
  22192. "added": {
  22193. "type": "integer",
  22194. "minimum": 0
  22195. },
  22196. "removed": {
  22197. "type": "integer",
  22198. "minimum": 0
  22199. },
  22200. "status": {
  22201. "type": "string",
  22202. "enum": ["added", "deleted", "modified"]
  22203. }
  22204. },
  22205. "required": ["path", "added", "removed", "status"],
  22206. "additionalProperties": false
  22207. },
  22208. "Path": {
  22209. "type": "object",
  22210. "properties": {
  22211. "home": {
  22212. "type": "string"
  22213. },
  22214. "state": {
  22215. "type": "string"
  22216. },
  22217. "config": {
  22218. "type": "string"
  22219. },
  22220. "worktree": {
  22221. "type": "string"
  22222. },
  22223. "directory": {
  22224. "type": "string"
  22225. }
  22226. },
  22227. "required": ["home", "state", "config", "worktree", "directory"],
  22228. "additionalProperties": false
  22229. },
  22230. "VcsInfo": {
  22231. "type": "object",
  22232. "properties": {
  22233. "branch": {
  22234. "type": "string"
  22235. },
  22236. "default_branch": {
  22237. "type": "string"
  22238. }
  22239. },
  22240. "additionalProperties": false
  22241. },
  22242. "VcsFileStatus": {
  22243. "type": "object",
  22244. "properties": {
  22245. "file": {
  22246. "type": "string"
  22247. },
  22248. "additions": {
  22249. "type": "number"
  22250. },
  22251. "deletions": {
  22252. "type": "number"
  22253. },
  22254. "status": {
  22255. "type": "string",
  22256. "enum": ["added", "deleted", "modified"]
  22257. }
  22258. },
  22259. "required": ["file", "additions", "deletions", "status"],
  22260. "additionalProperties": false
  22261. },
  22262. "VcsFileDiff": {
  22263. "type": "object",
  22264. "properties": {
  22265. "file": {
  22266. "type": "string"
  22267. },
  22268. "patch": {
  22269. "type": "string"
  22270. },
  22271. "additions": {
  22272. "type": "number"
  22273. },
  22274. "deletions": {
  22275. "type": "number"
  22276. },
  22277. "status": {
  22278. "type": "string",
  22279. "enum": ["added", "deleted", "modified"]
  22280. }
  22281. },
  22282. "required": ["file", "additions", "deletions"],
  22283. "additionalProperties": false
  22284. },
  22285. "VcsApplyError": {
  22286. "type": "object",
  22287. "properties": {
  22288. "name": {
  22289. "type": "string",
  22290. "enum": ["VcsApplyError"]
  22291. },
  22292. "data": {
  22293. "type": "object",
  22294. "properties": {
  22295. "message": {
  22296. "type": "string"
  22297. },
  22298. "reason": {
  22299. "type": "string",
  22300. "enum": ["non-git", "not-clean"]
  22301. }
  22302. },
  22303. "required": ["message", "reason"],
  22304. "additionalProperties": false
  22305. }
  22306. },
  22307. "required": ["name", "data"],
  22308. "additionalProperties": false
  22309. },
  22310. "Command": {
  22311. "type": "object",
  22312. "properties": {
  22313. "name": {
  22314. "type": "string"
  22315. },
  22316. "description": {
  22317. "type": "string"
  22318. },
  22319. "agent": {
  22320. "type": "string"
  22321. },
  22322. "model": {
  22323. "type": "string"
  22324. },
  22325. "source": {
  22326. "type": "string",
  22327. "enum": ["command", "mcp", "skill"]
  22328. },
  22329. "template": {
  22330. "type": "string"
  22331. },
  22332. "subtask": {
  22333. "type": "boolean"
  22334. },
  22335. "hints": {
  22336. "type": "array",
  22337. "items": {
  22338. "type": "string"
  22339. }
  22340. }
  22341. },
  22342. "required": ["name", "template", "hints"],
  22343. "additionalProperties": false
  22344. },
  22345. "Agent": {
  22346. "type": "object",
  22347. "properties": {
  22348. "name": {
  22349. "type": "string"
  22350. },
  22351. "description": {
  22352. "type": "string"
  22353. },
  22354. "mode": {
  22355. "type": "string",
  22356. "enum": ["subagent", "primary", "all"]
  22357. },
  22358. "native": {
  22359. "type": "boolean"
  22360. },
  22361. "hidden": {
  22362. "type": "boolean"
  22363. },
  22364. "topP": {
  22365. "type": "number"
  22366. },
  22367. "temperature": {
  22368. "type": "number"
  22369. },
  22370. "color": {
  22371. "type": "string"
  22372. },
  22373. "permission": {
  22374. "$ref": "#/components/schemas/PermissionRuleset"
  22375. },
  22376. "model": {
  22377. "type": "object",
  22378. "properties": {
  22379. "modelID": {
  22380. "type": "string"
  22381. },
  22382. "providerID": {
  22383. "type": "string"
  22384. }
  22385. },
  22386. "required": ["modelID", "providerID"],
  22387. "additionalProperties": false
  22388. },
  22389. "variant": {
  22390. "type": "string"
  22391. },
  22392. "prompt": {
  22393. "type": "string"
  22394. },
  22395. "options": {
  22396. "type": "object"
  22397. },
  22398. "steps": {
  22399. "type": "number"
  22400. }
  22401. },
  22402. "required": ["name", "mode", "permission", "options"],
  22403. "additionalProperties": false
  22404. },
  22405. "LSPStatus": {
  22406. "type": "object",
  22407. "properties": {
  22408. "id": {
  22409. "type": "string"
  22410. },
  22411. "name": {
  22412. "type": "string"
  22413. },
  22414. "root": {
  22415. "type": "string"
  22416. },
  22417. "status": {
  22418. "type": "string",
  22419. "enum": ["connected", "error"]
  22420. }
  22421. },
  22422. "required": ["id", "name", "root", "status"],
  22423. "additionalProperties": false
  22424. },
  22425. "FormatterStatus": {
  22426. "type": "object",
  22427. "properties": {
  22428. "name": {
  22429. "type": "string"
  22430. },
  22431. "extensions": {
  22432. "type": "array",
  22433. "items": {
  22434. "type": "string"
  22435. }
  22436. },
  22437. "enabled": {
  22438. "type": "boolean"
  22439. }
  22440. },
  22441. "required": ["name", "extensions", "enabled"],
  22442. "additionalProperties": false
  22443. },
  22444. "MCPStatusConnected": {
  22445. "type": "object",
  22446. "properties": {
  22447. "status": {
  22448. "type": "string",
  22449. "enum": ["connected"]
  22450. }
  22451. },
  22452. "required": ["status"],
  22453. "additionalProperties": false
  22454. },
  22455. "MCPStatusDisabled": {
  22456. "type": "object",
  22457. "properties": {
  22458. "status": {
  22459. "type": "string",
  22460. "enum": ["disabled"]
  22461. }
  22462. },
  22463. "required": ["status"],
  22464. "additionalProperties": false
  22465. },
  22466. "MCPStatusFailed": {
  22467. "type": "object",
  22468. "properties": {
  22469. "status": {
  22470. "type": "string",
  22471. "enum": ["failed"]
  22472. },
  22473. "error": {
  22474. "type": "string"
  22475. }
  22476. },
  22477. "required": ["status", "error"],
  22478. "additionalProperties": false
  22479. },
  22480. "MCPStatusNeedsAuth": {
  22481. "type": "object",
  22482. "properties": {
  22483. "status": {
  22484. "type": "string",
  22485. "enum": ["needs_auth"]
  22486. }
  22487. },
  22488. "required": ["status"],
  22489. "additionalProperties": false
  22490. },
  22491. "MCPStatusNeedsClientRegistration": {
  22492. "type": "object",
  22493. "properties": {
  22494. "status": {
  22495. "type": "string",
  22496. "enum": ["needs_client_registration"]
  22497. },
  22498. "error": {
  22499. "type": "string"
  22500. }
  22501. },
  22502. "required": ["status", "error"],
  22503. "additionalProperties": false
  22504. },
  22505. "MCPStatus": {
  22506. "anyOf": [
  22507. {
  22508. "$ref": "#/components/schemas/MCPStatusConnected"
  22509. },
  22510. {
  22511. "$ref": "#/components/schemas/MCPStatusDisabled"
  22512. },
  22513. {
  22514. "$ref": "#/components/schemas/MCPStatusFailed"
  22515. },
  22516. {
  22517. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22518. },
  22519. {
  22520. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22521. }
  22522. ]
  22523. },
  22524. "McpUnsupportedOAuthError": {
  22525. "type": "object",
  22526. "properties": {
  22527. "error": {
  22528. "type": "string"
  22529. }
  22530. },
  22531. "required": ["error"],
  22532. "additionalProperties": false
  22533. },
  22534. "McpServerNotFoundError": {
  22535. "type": "object",
  22536. "properties": {
  22537. "_tag": {
  22538. "type": "string",
  22539. "enum": ["McpServerNotFoundError"]
  22540. },
  22541. "name": {
  22542. "type": "string"
  22543. },
  22544. "message": {
  22545. "type": "string"
  22546. }
  22547. },
  22548. "required": ["_tag", "name", "message"],
  22549. "additionalProperties": false
  22550. },
  22551. "Project": {
  22552. "type": "object",
  22553. "properties": {
  22554. "id": {
  22555. "type": "string"
  22556. },
  22557. "worktree": {
  22558. "type": "string"
  22559. },
  22560. "vcs": {
  22561. "$ref": "#/components/schemas/ProjectVcs"
  22562. },
  22563. "name": {
  22564. "type": "string"
  22565. },
  22566. "icon": {
  22567. "$ref": "#/components/schemas/ProjectIcon"
  22568. },
  22569. "commands": {
  22570. "$ref": "#/components/schemas/ProjectCommands"
  22571. },
  22572. "time": {
  22573. "$ref": "#/components/schemas/ProjectTime"
  22574. },
  22575. "sandboxes": {
  22576. "type": "array",
  22577. "items": {
  22578. "type": "string"
  22579. }
  22580. }
  22581. },
  22582. "required": ["id", "worktree", "time", "sandboxes"],
  22583. "additionalProperties": false
  22584. },
  22585. "ProjectNotFoundError": {
  22586. "type": "object",
  22587. "properties": {
  22588. "_tag": {
  22589. "type": "string",
  22590. "enum": ["ProjectNotFoundError"]
  22591. },
  22592. "projectID": {
  22593. "type": "string"
  22594. },
  22595. "message": {
  22596. "type": "string"
  22597. }
  22598. },
  22599. "required": ["_tag", "projectID", "message"],
  22600. "additionalProperties": false
  22601. },
  22602. "PtyNotFoundError": {
  22603. "type": "object",
  22604. "properties": {
  22605. "_tag": {
  22606. "type": "string",
  22607. "enum": ["PtyNotFoundError"]
  22608. },
  22609. "ptyID": {
  22610. "type": "string"
  22611. },
  22612. "message": {
  22613. "type": "string"
  22614. }
  22615. },
  22616. "required": ["_tag", "ptyID", "message"],
  22617. "additionalProperties": false
  22618. },
  22619. "PtyForbiddenError": {
  22620. "type": "object",
  22621. "properties": {
  22622. "_tag": {
  22623. "type": "string",
  22624. "enum": ["PtyForbiddenError"]
  22625. },
  22626. "message": {
  22627. "type": "string"
  22628. }
  22629. },
  22630. "required": ["_tag", "message"],
  22631. "additionalProperties": false
  22632. },
  22633. "QuestionRequest": {
  22634. "type": "object",
  22635. "properties": {
  22636. "id": {
  22637. "type": "string",
  22638. "pattern": "^que"
  22639. },
  22640. "sessionID": {
  22641. "type": "string",
  22642. "pattern": "^ses"
  22643. },
  22644. "questions": {
  22645. "type": "array",
  22646. "items": {
  22647. "$ref": "#/components/schemas/QuestionInfo"
  22648. },
  22649. "description": "Questions to ask"
  22650. },
  22651. "tool": {
  22652. "$ref": "#/components/schemas/QuestionTool"
  22653. }
  22654. },
  22655. "required": ["id", "sessionID", "questions"],
  22656. "additionalProperties": false
  22657. },
  22658. "QuestionNotFoundError": {
  22659. "type": "object",
  22660. "properties": {
  22661. "_tag": {
  22662. "type": "string",
  22663. "enum": ["QuestionNotFoundError"]
  22664. },
  22665. "requestID": {
  22666. "type": "string"
  22667. },
  22668. "message": {
  22669. "type": "string"
  22670. }
  22671. },
  22672. "required": ["_tag", "requestID", "message"],
  22673. "additionalProperties": false
  22674. },
  22675. "PermissionRequest": {
  22676. "type": "object",
  22677. "properties": {
  22678. "id": {
  22679. "type": "string",
  22680. "pattern": "^per"
  22681. },
  22682. "sessionID": {
  22683. "type": "string",
  22684. "pattern": "^ses"
  22685. },
  22686. "permission": {
  22687. "type": "string"
  22688. },
  22689. "patterns": {
  22690. "type": "array",
  22691. "items": {
  22692. "type": "string"
  22693. }
  22694. },
  22695. "metadata": {
  22696. "type": "object"
  22697. },
  22698. "always": {
  22699. "type": "array",
  22700. "items": {
  22701. "type": "string"
  22702. }
  22703. },
  22704. "tool": {
  22705. "type": "object",
  22706. "properties": {
  22707. "messageID": {
  22708. "type": "string"
  22709. },
  22710. "callID": {
  22711. "type": "string"
  22712. }
  22713. },
  22714. "required": ["messageID", "callID"],
  22715. "additionalProperties": false
  22716. }
  22717. },
  22718. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22719. "additionalProperties": false
  22720. },
  22721. "PermissionNotFoundError": {
  22722. "type": "object",
  22723. "properties": {
  22724. "_tag": {
  22725. "type": "string",
  22726. "enum": ["PermissionNotFoundError"]
  22727. },
  22728. "requestID": {
  22729. "type": "string"
  22730. },
  22731. "message": {
  22732. "type": "string"
  22733. }
  22734. },
  22735. "required": ["_tag", "requestID", "message"],
  22736. "additionalProperties": false
  22737. },
  22738. "ProviderAuthMethod": {
  22739. "type": "object",
  22740. "properties": {
  22741. "type": {
  22742. "type": "string",
  22743. "enum": ["oauth", "api"]
  22744. },
  22745. "label": {
  22746. "type": "string"
  22747. },
  22748. "prompts": {
  22749. "type": "array",
  22750. "items": {
  22751. "anyOf": [
  22752. {
  22753. "type": "object",
  22754. "properties": {
  22755. "type": {
  22756. "type": "string",
  22757. "enum": ["text"]
  22758. },
  22759. "key": {
  22760. "type": "string"
  22761. },
  22762. "message": {
  22763. "type": "string"
  22764. },
  22765. "placeholder": {
  22766. "type": "string"
  22767. },
  22768. "when": {
  22769. "type": "object",
  22770. "properties": {
  22771. "key": {
  22772. "type": "string"
  22773. },
  22774. "op": {
  22775. "type": "string",
  22776. "enum": ["eq", "neq"]
  22777. },
  22778. "value": {
  22779. "type": "string"
  22780. }
  22781. },
  22782. "required": ["key", "op", "value"],
  22783. "additionalProperties": false
  22784. }
  22785. },
  22786. "required": ["type", "key", "message"],
  22787. "additionalProperties": false
  22788. },
  22789. {
  22790. "type": "object",
  22791. "properties": {
  22792. "type": {
  22793. "type": "string",
  22794. "enum": ["select"]
  22795. },
  22796. "key": {
  22797. "type": "string"
  22798. },
  22799. "message": {
  22800. "type": "string"
  22801. },
  22802. "options": {
  22803. "type": "array",
  22804. "items": {
  22805. "type": "object",
  22806. "properties": {
  22807. "label": {
  22808. "type": "string"
  22809. },
  22810. "value": {
  22811. "type": "string"
  22812. },
  22813. "hint": {
  22814. "type": "string"
  22815. }
  22816. },
  22817. "required": ["label", "value"],
  22818. "additionalProperties": false
  22819. }
  22820. },
  22821. "when": {
  22822. "type": "object",
  22823. "properties": {
  22824. "key": {
  22825. "type": "string"
  22826. },
  22827. "op": {
  22828. "type": "string",
  22829. "enum": ["eq", "neq"]
  22830. },
  22831. "value": {
  22832. "type": "string"
  22833. }
  22834. },
  22835. "required": ["key", "op", "value"],
  22836. "additionalProperties": false
  22837. }
  22838. },
  22839. "required": ["type", "key", "message", "options"],
  22840. "additionalProperties": false
  22841. }
  22842. ]
  22843. }
  22844. }
  22845. },
  22846. "required": ["type", "label"],
  22847. "additionalProperties": false
  22848. },
  22849. "ProviderAuthAuthorization": {
  22850. "type": "object",
  22851. "properties": {
  22852. "url": {
  22853. "type": "string"
  22854. },
  22855. "method": {
  22856. "type": "string",
  22857. "enum": ["auto", "code"]
  22858. },
  22859. "instructions": {
  22860. "type": "string"
  22861. }
  22862. },
  22863. "required": ["url", "method", "instructions"],
  22864. "additionalProperties": false
  22865. },
  22866. "ProviderAuthError1": {
  22867. "type": "object",
  22868. "properties": {
  22869. "name": {
  22870. "type": "string",
  22871. "enum": [
  22872. "BadRequest",
  22873. "ProviderAuthOauthMissing",
  22874. "ProviderAuthOauthCodeMissing",
  22875. "ProviderAuthOauthCallbackFailed",
  22876. "ProviderAuthValidationFailed"
  22877. ]
  22878. },
  22879. "data": {
  22880. "type": "object",
  22881. "properties": {
  22882. "providerID": {
  22883. "type": "string"
  22884. },
  22885. "field": {
  22886. "type": "string"
  22887. },
  22888. "message": {
  22889. "type": "string"
  22890. },
  22891. "kind": {
  22892. "type": "string"
  22893. }
  22894. },
  22895. "additionalProperties": false
  22896. }
  22897. },
  22898. "required": ["name", "data"],
  22899. "additionalProperties": false
  22900. },
  22901. "NotFoundError": {
  22902. "type": "object",
  22903. "required": ["name", "data"],
  22904. "properties": {
  22905. "name": {
  22906. "type": "string",
  22907. "enum": ["NotFoundError"]
  22908. },
  22909. "data": {
  22910. "type": "object",
  22911. "required": ["message"],
  22912. "properties": {
  22913. "message": {
  22914. "type": "string"
  22915. }
  22916. }
  22917. }
  22918. }
  22919. },
  22920. "TextPartInput": {
  22921. "type": "object",
  22922. "properties": {
  22923. "id": {
  22924. "type": "string",
  22925. "pattern": "^prt"
  22926. },
  22927. "type": {
  22928. "type": "string",
  22929. "enum": ["text"]
  22930. },
  22931. "text": {
  22932. "type": "string"
  22933. },
  22934. "session.synthetic": {
  22935. "type": "boolean"
  22936. },
  22937. "ignored": {
  22938. "type": "boolean"
  22939. },
  22940. "time": {
  22941. "type": "object",
  22942. "properties": {
  22943. "start": {
  22944. "type": "integer",
  22945. "minimum": 0
  22946. },
  22947. "end": {
  22948. "type": "integer",
  22949. "minimum": 0
  22950. }
  22951. },
  22952. "required": ["start"],
  22953. "additionalProperties": false
  22954. },
  22955. "metadata": {
  22956. "type": "object"
  22957. }
  22958. },
  22959. "required": ["type", "text"],
  22960. "additionalProperties": false
  22961. },
  22962. "FilePartInput": {
  22963. "type": "object",
  22964. "properties": {
  22965. "id": {
  22966. "type": "string",
  22967. "pattern": "^prt"
  22968. },
  22969. "type": {
  22970. "type": "string",
  22971. "enum": ["file"]
  22972. },
  22973. "mime": {
  22974. "type": "string"
  22975. },
  22976. "filename": {
  22977. "type": "string"
  22978. },
  22979. "url": {
  22980. "type": "string"
  22981. },
  22982. "source": {
  22983. "$ref": "#/components/schemas/FilePartSource"
  22984. }
  22985. },
  22986. "required": ["type", "mime", "url"],
  22987. "additionalProperties": false
  22988. },
  22989. "AgentPartInput": {
  22990. "type": "object",
  22991. "properties": {
  22992. "id": {
  22993. "type": "string",
  22994. "pattern": "^prt"
  22995. },
  22996. "type": {
  22997. "type": "string",
  22998. "enum": ["agent"]
  22999. },
  23000. "name": {
  23001. "type": "string"
  23002. },
  23003. "source": {
  23004. "type": "object",
  23005. "properties": {
  23006. "value": {
  23007. "type": "string"
  23008. },
  23009. "start": {
  23010. "type": "integer",
  23011. "minimum": 0
  23012. },
  23013. "end": {
  23014. "type": "integer",
  23015. "minimum": 0
  23016. }
  23017. },
  23018. "required": ["value", "start", "end"],
  23019. "additionalProperties": false
  23020. }
  23021. },
  23022. "required": ["type", "name"],
  23023. "additionalProperties": false
  23024. },
  23025. "SubtaskPartInput": {
  23026. "type": "object",
  23027. "properties": {
  23028. "id": {
  23029. "type": "string",
  23030. "pattern": "^prt"
  23031. },
  23032. "type": {
  23033. "type": "string",
  23034. "enum": ["subtask"]
  23035. },
  23036. "prompt": {
  23037. "type": "string"
  23038. },
  23039. "description": {
  23040. "type": "string"
  23041. },
  23042. "agent": {
  23043. "type": "string"
  23044. },
  23045. "model": {
  23046. "type": "object",
  23047. "properties": {
  23048. "providerID": {
  23049. "type": "string"
  23050. },
  23051. "modelID": {
  23052. "type": "string"
  23053. }
  23054. },
  23055. "required": ["providerID", "modelID"],
  23056. "additionalProperties": false
  23057. },
  23058. "command": {
  23059. "type": "string"
  23060. }
  23061. },
  23062. "required": ["type", "prompt", "description", "agent"],
  23063. "additionalProperties": false
  23064. },
  23065. "SessionBusyError": {
  23066. "type": "object",
  23067. "properties": {
  23068. "_tag": {
  23069. "type": "string",
  23070. "enum": ["SessionBusyError"]
  23071. },
  23072. "sessionID": {
  23073. "type": "string"
  23074. },
  23075. "message": {
  23076. "type": "string"
  23077. }
  23078. },
  23079. "required": ["_tag", "sessionID", "message"],
  23080. "additionalProperties": false
  23081. },
  23082. "EventTuiPromptAppend": {
  23083. "type": "object",
  23084. "properties": {
  23085. "type": {
  23086. "type": "string",
  23087. "enum": ["tui.prompt.append"]
  23088. },
  23089. "properties": {
  23090. "type": "object",
  23091. "properties": {
  23092. "text": {
  23093. "type": "string"
  23094. }
  23095. },
  23096. "required": ["text"],
  23097. "additionalProperties": false
  23098. }
  23099. },
  23100. "required": ["type", "properties"],
  23101. "additionalProperties": false
  23102. },
  23103. "EventTuiCommandExecute": {
  23104. "type": "object",
  23105. "properties": {
  23106. "type": {
  23107. "type": "string",
  23108. "enum": ["tui.command.execute"]
  23109. },
  23110. "properties": {
  23111. "type": "object",
  23112. "properties": {
  23113. "command": {
  23114. "anyOf": [
  23115. {
  23116. "type": "string",
  23117. "enum": [
  23118. "session.list",
  23119. "session.new",
  23120. "session.share",
  23121. "session.interrupt",
  23122. "session.compact",
  23123. "session.page.up",
  23124. "session.page.down",
  23125. "session.line.up",
  23126. "session.line.down",
  23127. "session.half.page.up",
  23128. "session.half.page.down",
  23129. "session.first",
  23130. "session.last",
  23131. "prompt.clear",
  23132. "prompt.submit",
  23133. "agent.cycle"
  23134. ]
  23135. },
  23136. {
  23137. "type": "string"
  23138. }
  23139. ]
  23140. }
  23141. },
  23142. "required": ["command"],
  23143. "additionalProperties": false
  23144. }
  23145. },
  23146. "required": ["type", "properties"],
  23147. "additionalProperties": false
  23148. },
  23149. "EventTuiToastShow": {
  23150. "type": "object",
  23151. "properties": {
  23152. "type": {
  23153. "type": "string",
  23154. "enum": ["tui.toast.show"]
  23155. },
  23156. "properties": {
  23157. "type": "object",
  23158. "properties": {
  23159. "title": {
  23160. "type": "string"
  23161. },
  23162. "message": {
  23163. "type": "string"
  23164. },
  23165. "variant": {
  23166. "type": "string",
  23167. "enum": ["info", "success", "warning", "error"]
  23168. },
  23169. "duration": {
  23170. "type": "integer",
  23171. "exclusiveMinimum": 0
  23172. }
  23173. },
  23174. "required": ["message", "variant"],
  23175. "additionalProperties": false
  23176. }
  23177. },
  23178. "required": ["type", "properties"],
  23179. "additionalProperties": false
  23180. },
  23181. "EventTuiSessionSelect": {
  23182. "type": "object",
  23183. "properties": {
  23184. "type": {
  23185. "type": "string",
  23186. "enum": ["tui.session.select"]
  23187. },
  23188. "properties": {
  23189. "type": "object",
  23190. "properties": {
  23191. "sessionID": {
  23192. "type": "string",
  23193. "pattern": "^ses",
  23194. "description": "Session ID to navigate to"
  23195. }
  23196. },
  23197. "required": ["sessionID"],
  23198. "additionalProperties": false
  23199. }
  23200. },
  23201. "required": ["type", "properties"],
  23202. "additionalProperties": false
  23203. },
  23204. "Workspace": {
  23205. "type": "object",
  23206. "properties": {
  23207. "id": {
  23208. "type": "string",
  23209. "pattern": "^wrk"
  23210. },
  23211. "type": {
  23212. "type": "string"
  23213. },
  23214. "name": {
  23215. "type": "string"
  23216. },
  23217. "branch": {
  23218. "anyOf": [
  23219. {
  23220. "type": "string"
  23221. },
  23222. {
  23223. "type": "null"
  23224. }
  23225. ]
  23226. },
  23227. "directory": {
  23228. "anyOf": [
  23229. {
  23230. "type": "string"
  23231. },
  23232. {
  23233. "type": "null"
  23234. }
  23235. ]
  23236. },
  23237. "extra": {
  23238. "anyOf": [
  23239. {},
  23240. {
  23241. "type": "null"
  23242. }
  23243. ]
  23244. },
  23245. "projectID": {
  23246. "type": "string"
  23247. },
  23248. "timeUsed": {
  23249. "anyOf": [
  23250. {
  23251. "type": "number"
  23252. },
  23253. {
  23254. "type": "string",
  23255. "enum": ["NaN"]
  23256. },
  23257. {
  23258. "type": "string",
  23259. "enum": ["Infinity"]
  23260. },
  23261. {
  23262. "type": "string",
  23263. "enum": ["-Infinity"]
  23264. },
  23265. {
  23266. "type": "string",
  23267. "enum": ["Infinity", "-Infinity", "NaN"]
  23268. }
  23269. ]
  23270. }
  23271. },
  23272. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23273. "additionalProperties": false
  23274. },
  23275. "WorkspaceCreateError": {
  23276. "type": "object",
  23277. "properties": {
  23278. "name": {
  23279. "type": "string",
  23280. "enum": ["WorkspaceCreateError"]
  23281. },
  23282. "data": {
  23283. "type": "object",
  23284. "properties": {
  23285. "message": {
  23286. "type": "string"
  23287. }
  23288. },
  23289. "required": ["message"],
  23290. "additionalProperties": false
  23291. }
  23292. },
  23293. "required": ["name", "data"],
  23294. "additionalProperties": false
  23295. },
  23296. "WorkspaceWarpError": {
  23297. "type": "object",
  23298. "properties": {
  23299. "name": {
  23300. "type": "string",
  23301. "enum": ["WorkspaceWarpError"]
  23302. },
  23303. "data": {
  23304. "type": "object",
  23305. "properties": {
  23306. "message": {
  23307. "type": "string"
  23308. }
  23309. },
  23310. "required": ["message"],
  23311. "additionalProperties": false
  23312. }
  23313. },
  23314. "required": ["name", "data"],
  23315. "additionalProperties": false
  23316. },
  23317. "UnauthorizedError": {
  23318. "type": "object",
  23319. "properties": {
  23320. "_tag": {
  23321. "type": "string",
  23322. "enum": ["UnauthorizedError"]
  23323. },
  23324. "message": {
  23325. "type": "string"
  23326. }
  23327. },
  23328. "required": ["_tag", "message"],
  23329. "additionalProperties": false
  23330. },
  23331. "SessionsResponse": {
  23332. "type": "object",
  23333. "properties": {
  23334. "data": {
  23335. "type": "array",
  23336. "items": {
  23337. "$ref": "#/components/schemas/SessionV2Info"
  23338. }
  23339. },
  23340. "cursor": {
  23341. "type": "object",
  23342. "properties": {
  23343. "previous": {
  23344. "type": "string"
  23345. },
  23346. "next": {
  23347. "type": "string"
  23348. }
  23349. },
  23350. "additionalProperties": false
  23351. }
  23352. },
  23353. "required": ["data", "cursor"],
  23354. "additionalProperties": false
  23355. },
  23356. "InvalidCursorError": {
  23357. "type": "object",
  23358. "properties": {
  23359. "_tag": {
  23360. "type": "string",
  23361. "enum": ["InvalidCursorError"]
  23362. },
  23363. "message": {
  23364. "type": "string"
  23365. }
  23366. },
  23367. "required": ["_tag", "message"],
  23368. "additionalProperties": false
  23369. },
  23370. "SessionActive": {
  23371. "type": "object",
  23372. "properties": {
  23373. "type": {
  23374. "type": "string",
  23375. "enum": ["running"]
  23376. }
  23377. },
  23378. "required": ["type"],
  23379. "additionalProperties": false
  23380. },
  23381. "SessionNotFoundError": {
  23382. "type": "object",
  23383. "properties": {
  23384. "_tag": {
  23385. "type": "string",
  23386. "enum": ["SessionNotFoundError"]
  23387. },
  23388. "sessionID": {
  23389. "type": "string"
  23390. },
  23391. "message": {
  23392. "type": "string"
  23393. }
  23394. },
  23395. "required": ["_tag", "sessionID", "message"],
  23396. "additionalProperties": false
  23397. },
  23398. "PromptInput": {
  23399. "type": "object",
  23400. "properties": {
  23401. "text": {
  23402. "type": "string"
  23403. },
  23404. "files": {
  23405. "type": "array",
  23406. "items": {
  23407. "$ref": "#/components/schemas/PromptInputFileAttachment"
  23408. }
  23409. },
  23410. "agents": {
  23411. "type": "array",
  23412. "items": {
  23413. "$ref": "#/components/schemas/PromptAgentAttachment"
  23414. }
  23415. }
  23416. },
  23417. "required": ["text"],
  23418. "additionalProperties": false
  23419. },
  23420. "ConflictError": {
  23421. "type": "object",
  23422. "properties": {
  23423. "_tag": {
  23424. "type": "string",
  23425. "enum": ["ConflictError"]
  23426. },
  23427. "message": {
  23428. "type": "string"
  23429. },
  23430. "resource": {
  23431. "type": "string"
  23432. }
  23433. },
  23434. "required": ["_tag", "message"],
  23435. "additionalProperties": false
  23436. },
  23437. "ServiceUnavailableError": {
  23438. "type": "object",
  23439. "properties": {
  23440. "_tag": {
  23441. "type": "string",
  23442. "enum": ["ServiceUnavailableError"]
  23443. },
  23444. "message": {
  23445. "type": "string"
  23446. },
  23447. "service": {
  23448. "type": "string"
  23449. }
  23450. },
  23451. "required": ["_tag", "message"],
  23452. "additionalProperties": false
  23453. },
  23454. "MessageNotFoundError": {
  23455. "type": "object",
  23456. "properties": {
  23457. "_tag": {
  23458. "type": "string",
  23459. "enum": ["MessageNotFoundError"]
  23460. },
  23461. "sessionID": {
  23462. "type": "string"
  23463. },
  23464. "messageID": {
  23465. "type": "string"
  23466. },
  23467. "message": {
  23468. "type": "string"
  23469. }
  23470. },
  23471. "required": ["_tag", "sessionID", "messageID", "message"],
  23472. "additionalProperties": false
  23473. },
  23474. "UnknownError1": {
  23475. "type": "object",
  23476. "properties": {
  23477. "_tag": {
  23478. "type": "string",
  23479. "enum": ["UnknownError"]
  23480. },
  23481. "message": {
  23482. "type": "string"
  23483. },
  23484. "ref": {
  23485. "type": "string"
  23486. }
  23487. },
  23488. "required": ["_tag", "message"],
  23489. "additionalProperties": false
  23490. },
  23491. "SessionDurableEvent": {
  23492. "oneOf": [
  23493. {
  23494. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23495. },
  23496. {
  23497. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23498. },
  23499. {
  23500. "$ref": "#/components/schemas/SessionNextMoved"
  23501. },
  23502. {
  23503. "$ref": "#/components/schemas/SessionNextPrompted"
  23504. },
  23505. {
  23506. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23507. },
  23508. {
  23509. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23510. },
  23511. {
  23512. "$ref": "#/components/schemas/SessionNextSynthetic"
  23513. },
  23514. {
  23515. "$ref": "#/components/schemas/SessionNextShellStarted"
  23516. },
  23517. {
  23518. "$ref": "#/components/schemas/SessionNextShellEnded"
  23519. },
  23520. {
  23521. "$ref": "#/components/schemas/SessionNextStepStarted"
  23522. },
  23523. {
  23524. "$ref": "#/components/schemas/SessionNextStepEnded"
  23525. },
  23526. {
  23527. "$ref": "#/components/schemas/SessionNextStepFailed"
  23528. },
  23529. {
  23530. "$ref": "#/components/schemas/SessionNextTextStarted"
  23531. },
  23532. {
  23533. "$ref": "#/components/schemas/SessionNextTextEnded"
  23534. },
  23535. {
  23536. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23537. },
  23538. {
  23539. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23540. },
  23541. {
  23542. "$ref": "#/components/schemas/SessionNextToolCalled"
  23543. },
  23544. {
  23545. "$ref": "#/components/schemas/SessionNextToolProgress"
  23546. },
  23547. {
  23548. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23549. },
  23550. {
  23551. "$ref": "#/components/schemas/SessionNextToolFailed"
  23552. },
  23553. {
  23554. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23555. },
  23556. {
  23557. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23558. },
  23559. {
  23560. "$ref": "#/components/schemas/SessionNextRetried"
  23561. },
  23562. {
  23563. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23564. },
  23565. {
  23566. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23567. },
  23568. {
  23569. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23570. },
  23571. {
  23572. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23573. },
  23574. {
  23575. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23576. }
  23577. ]
  23578. },
  23579. "SessionHistory": {
  23580. "type": "object",
  23581. "properties": {
  23582. "data": {
  23583. "type": "array",
  23584. "items": {
  23585. "$ref": "#/components/schemas/SessionDurableEvent"
  23586. }
  23587. },
  23588. "hasMore": {
  23589. "type": "boolean"
  23590. }
  23591. },
  23592. "required": ["data", "hasMore"],
  23593. "additionalProperties": false
  23594. },
  23595. "SessionDurableEventStream": {
  23596. "type": "string",
  23597. "contentSchema": {
  23598. "$ref": "#/components/schemas/SessionDurableEvent"
  23599. },
  23600. "contentMediaType": "application/json"
  23601. },
  23602. "SessionMessagesResponse": {
  23603. "type": "object",
  23604. "properties": {
  23605. "data": {
  23606. "type": "array",
  23607. "items": {
  23608. "$ref": "#/components/schemas/SessionMessage"
  23609. }
  23610. },
  23611. "cursor": {
  23612. "type": "object",
  23613. "properties": {
  23614. "previous": {
  23615. "type": "string"
  23616. },
  23617. "next": {
  23618. "type": "string"
  23619. }
  23620. },
  23621. "additionalProperties": false
  23622. }
  23623. },
  23624. "required": ["data", "cursor"],
  23625. "additionalProperties": false
  23626. },
  23627. "ProviderNotFoundError": {
  23628. "type": "object",
  23629. "properties": {
  23630. "_tag": {
  23631. "type": "string",
  23632. "enum": ["ProviderNotFoundError"]
  23633. },
  23634. "providerID": {
  23635. "type": "string"
  23636. },
  23637. "message": {
  23638. "type": "string"
  23639. }
  23640. },
  23641. "required": ["_tag", "providerID", "message"],
  23642. "additionalProperties": false
  23643. },
  23644. "OutputFormat1": {
  23645. "anyOf": [
  23646. {
  23647. "type": "object",
  23648. "properties": {
  23649. "type": {
  23650. "type": "string",
  23651. "enum": ["text"]
  23652. }
  23653. },
  23654. "required": ["type"],
  23655. "additionalProperties": false
  23656. },
  23657. {
  23658. "type": "object",
  23659. "properties": {
  23660. "type": {
  23661. "type": "string",
  23662. "enum": ["json_schema"]
  23663. },
  23664. "schema": {
  23665. "$ref": "#/components/schemas/JSONSchema"
  23666. },
  23667. "retryCount": {
  23668. "type": "integer",
  23669. "minimum": 0
  23670. }
  23671. },
  23672. "required": ["type", "schema"],
  23673. "additionalProperties": false
  23674. }
  23675. ]
  23676. },
  23677. "session.status": {
  23678. "type": "object",
  23679. "properties": {
  23680. "id": {
  23681. "type": "string",
  23682. "pattern": "^evt_"
  23683. },
  23684. "metadata": {
  23685. "type": "object"
  23686. },
  23687. "type": {
  23688. "type": "string",
  23689. "enum": ["session.status"]
  23690. },
  23691. "durable": {
  23692. "type": "object",
  23693. "properties": {
  23694. "aggregateID": {
  23695. "type": "string"
  23696. },
  23697. "seq": {
  23698. "type": "integer"
  23699. },
  23700. "version": {
  23701. "type": "integer"
  23702. }
  23703. },
  23704. "required": ["aggregateID", "seq", "version"],
  23705. "additionalProperties": false
  23706. },
  23707. "location": {
  23708. "$ref": "#/components/schemas/LocationRef"
  23709. },
  23710. "data": {
  23711. "type": "object",
  23712. "properties": {
  23713. "sessionID": {
  23714. "type": "string",
  23715. "pattern": "^ses"
  23716. },
  23717. "status": {
  23718. "$ref": "#/components/schemas/SessionStatus"
  23719. }
  23720. },
  23721. "required": ["sessionID", "status"],
  23722. "additionalProperties": false
  23723. }
  23724. },
  23725. "required": ["id", "type", "data"],
  23726. "additionalProperties": false
  23727. },
  23728. "question.replied": {
  23729. "type": "object",
  23730. "properties": {
  23731. "id": {
  23732. "type": "string",
  23733. "pattern": "^evt_"
  23734. },
  23735. "metadata": {
  23736. "type": "object"
  23737. },
  23738. "type": {
  23739. "type": "string",
  23740. "enum": ["question.replied"]
  23741. },
  23742. "durable": {
  23743. "type": "object",
  23744. "properties": {
  23745. "aggregateID": {
  23746. "type": "string"
  23747. },
  23748. "seq": {
  23749. "type": "integer"
  23750. },
  23751. "version": {
  23752. "type": "integer"
  23753. }
  23754. },
  23755. "required": ["aggregateID", "seq", "version"],
  23756. "additionalProperties": false
  23757. },
  23758. "location": {
  23759. "$ref": "#/components/schemas/LocationRef"
  23760. },
  23761. "data": {
  23762. "type": "object",
  23763. "properties": {
  23764. "sessionID": {
  23765. "type": "string",
  23766. "pattern": "^ses"
  23767. },
  23768. "requestID": {
  23769. "type": "string",
  23770. "pattern": "^que"
  23771. },
  23772. "answers": {
  23773. "type": "array",
  23774. "items": {
  23775. "$ref": "#/components/schemas/QuestionAnswer"
  23776. }
  23777. }
  23778. },
  23779. "required": ["sessionID", "requestID", "answers"],
  23780. "additionalProperties": false
  23781. }
  23782. },
  23783. "required": ["id", "type", "data"],
  23784. "additionalProperties": false
  23785. },
  23786. "question.rejected": {
  23787. "type": "object",
  23788. "properties": {
  23789. "id": {
  23790. "type": "string",
  23791. "pattern": "^evt_"
  23792. },
  23793. "metadata": {
  23794. "type": "object"
  23795. },
  23796. "type": {
  23797. "type": "string",
  23798. "enum": ["question.rejected"]
  23799. },
  23800. "durable": {
  23801. "type": "object",
  23802. "properties": {
  23803. "aggregateID": {
  23804. "type": "string"
  23805. },
  23806. "seq": {
  23807. "type": "integer"
  23808. },
  23809. "version": {
  23810. "type": "integer"
  23811. }
  23812. },
  23813. "required": ["aggregateID", "seq", "version"],
  23814. "additionalProperties": false
  23815. },
  23816. "location": {
  23817. "$ref": "#/components/schemas/LocationRef"
  23818. },
  23819. "data": {
  23820. "type": "object",
  23821. "properties": {
  23822. "sessionID": {
  23823. "type": "string",
  23824. "pattern": "^ses"
  23825. },
  23826. "requestID": {
  23827. "type": "string",
  23828. "pattern": "^que"
  23829. }
  23830. },
  23831. "required": ["sessionID", "requestID"],
  23832. "additionalProperties": false
  23833. }
  23834. },
  23835. "required": ["id", "type", "data"],
  23836. "additionalProperties": false
  23837. },
  23838. "V2Event": {
  23839. "anyOf": [
  23840. {
  23841. "$ref": "#/components/schemas/Models-devRefreshed"
  23842. },
  23843. {
  23844. "$ref": "#/components/schemas/IntegrationUpdated"
  23845. },
  23846. {
  23847. "$ref": "#/components/schemas/IntegrationConnectionUpdated"
  23848. },
  23849. {
  23850. "$ref": "#/components/schemas/CatalogUpdated"
  23851. },
  23852. {
  23853. "$ref": "#/components/schemas/SessionCreated"
  23854. },
  23855. {
  23856. "$ref": "#/components/schemas/SessionUpdated"
  23857. },
  23858. {
  23859. "$ref": "#/components/schemas/SessionDeleted"
  23860. },
  23861. {
  23862. "$ref": "#/components/schemas/MessageUpdated"
  23863. },
  23864. {
  23865. "$ref": "#/components/schemas/MessageRemoved"
  23866. },
  23867. {
  23868. "$ref": "#/components/schemas/MessagePartUpdated"
  23869. },
  23870. {
  23871. "$ref": "#/components/schemas/MessagePartRemoved"
  23872. },
  23873. {
  23874. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23875. },
  23876. {
  23877. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23878. },
  23879. {
  23880. "$ref": "#/components/schemas/SessionNextMoved"
  23881. },
  23882. {
  23883. "$ref": "#/components/schemas/SessionNextPrompted"
  23884. },
  23885. {
  23886. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23887. },
  23888. {
  23889. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23890. },
  23891. {
  23892. "$ref": "#/components/schemas/SessionNextSynthetic"
  23893. },
  23894. {
  23895. "$ref": "#/components/schemas/SessionNextShellStarted"
  23896. },
  23897. {
  23898. "$ref": "#/components/schemas/SessionNextShellEnded"
  23899. },
  23900. {
  23901. "$ref": "#/components/schemas/SessionNextStepStarted"
  23902. },
  23903. {
  23904. "$ref": "#/components/schemas/SessionNextStepEnded"
  23905. },
  23906. {
  23907. "$ref": "#/components/schemas/SessionNextStepFailed"
  23908. },
  23909. {
  23910. "$ref": "#/components/schemas/SessionNextTextStarted"
  23911. },
  23912. {
  23913. "$ref": "#/components/schemas/SessionNextTextDelta"
  23914. },
  23915. {
  23916. "$ref": "#/components/schemas/SessionNextTextEnded"
  23917. },
  23918. {
  23919. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23920. },
  23921. {
  23922. "$ref": "#/components/schemas/SessionNextReasoningDelta"
  23923. },
  23924. {
  23925. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23926. },
  23927. {
  23928. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23929. },
  23930. {
  23931. "$ref": "#/components/schemas/SessionNextToolInputDelta"
  23932. },
  23933. {
  23934. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23935. },
  23936. {
  23937. "$ref": "#/components/schemas/SessionNextToolCalled"
  23938. },
  23939. {
  23940. "$ref": "#/components/schemas/SessionNextToolProgress"
  23941. },
  23942. {
  23943. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23944. },
  23945. {
  23946. "$ref": "#/components/schemas/SessionNextToolFailed"
  23947. },
  23948. {
  23949. "$ref": "#/components/schemas/SessionNextRetried"
  23950. },
  23951. {
  23952. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23953. },
  23954. {
  23955. "$ref": "#/components/schemas/SessionNextCompactionDelta"
  23956. },
  23957. {
  23958. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23959. },
  23960. {
  23961. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23962. },
  23963. {
  23964. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23965. },
  23966. {
  23967. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23968. },
  23969. {
  23970. "$ref": "#/components/schemas/MessagePartDelta"
  23971. },
  23972. {
  23973. "$ref": "#/components/schemas/SessionDiff"
  23974. },
  23975. {
  23976. "$ref": "#/components/schemas/SessionError"
  23977. },
  23978. {
  23979. "$ref": "#/components/schemas/InstallationUpdated"
  23980. },
  23981. {
  23982. "$ref": "#/components/schemas/InstallationUpdate-available"
  23983. },
  23984. {
  23985. "$ref": "#/components/schemas/FileEdited"
  23986. },
  23987. {
  23988. "$ref": "#/components/schemas/ReferenceUpdated"
  23989. },
  23990. {
  23991. "$ref": "#/components/schemas/PermissionV2Asked"
  23992. },
  23993. {
  23994. "$ref": "#/components/schemas/PermissionV2Replied"
  23995. },
  23996. {
  23997. "$ref": "#/components/schemas/PluginAdded"
  23998. },
  23999. {
  24000. "$ref": "#/components/schemas/ProjectDirectoriesUpdated"
  24001. },
  24002. {
  24003. "$ref": "#/components/schemas/FileWatcherUpdated"
  24004. },
  24005. {
  24006. "$ref": "#/components/schemas/PtyCreated"
  24007. },
  24008. {
  24009. "$ref": "#/components/schemas/PtyUpdated"
  24010. },
  24011. {
  24012. "$ref": "#/components/schemas/PtyExited"
  24013. },
  24014. {
  24015. "$ref": "#/components/schemas/PtyDeleted"
  24016. },
  24017. {
  24018. "$ref": "#/components/schemas/QuestionV2Asked"
  24019. },
  24020. {
  24021. "$ref": "#/components/schemas/QuestionV2Replied"
  24022. },
  24023. {
  24024. "$ref": "#/components/schemas/QuestionV2Rejected"
  24025. },
  24026. {
  24027. "$ref": "#/components/schemas/LspUpdated"
  24028. },
  24029. {
  24030. "$ref": "#/components/schemas/PermissionAsked"
  24031. },
  24032. {
  24033. "$ref": "#/components/schemas/PermissionReplied"
  24034. },
  24035. {
  24036. "$ref": "#/components/schemas/TuiPromptAppend"
  24037. },
  24038. {
  24039. "$ref": "#/components/schemas/TuiCommandExecute"
  24040. },
  24041. {
  24042. "$ref": "#/components/schemas/TuiToastShow"
  24043. },
  24044. {
  24045. "$ref": "#/components/schemas/TuiSessionSelect"
  24046. },
  24047. {
  24048. "$ref": "#/components/schemas/McpToolsChanged"
  24049. },
  24050. {
  24051. "$ref": "#/components/schemas/McpBrowserOpenFailed"
  24052. },
  24053. {
  24054. "$ref": "#/components/schemas/CommandExecuted"
  24055. },
  24056. {
  24057. "$ref": "#/components/schemas/ProjectUpdated"
  24058. },
  24059. {
  24060. "$ref": "#/components/schemas/session.status"
  24061. },
  24062. {
  24063. "$ref": "#/components/schemas/SessionIdle"
  24064. },
  24065. {
  24066. "$ref": "#/components/schemas/QuestionAsked"
  24067. },
  24068. {
  24069. "$ref": "#/components/schemas/question.replied"
  24070. },
  24071. {
  24072. "$ref": "#/components/schemas/question.rejected"
  24073. },
  24074. {
  24075. "$ref": "#/components/schemas/SessionCompacted"
  24076. },
  24077. {
  24078. "$ref": "#/components/schemas/VcsBranchUpdated"
  24079. },
  24080. {
  24081. "$ref": "#/components/schemas/WorkspaceReady"
  24082. },
  24083. {
  24084. "$ref": "#/components/schemas/WorkspaceFailed"
  24085. },
  24086. {
  24087. "$ref": "#/components/schemas/WorkspaceStatus"
  24088. },
  24089. {
  24090. "$ref": "#/components/schemas/WorktreeReady"
  24091. },
  24092. {
  24093. "$ref": "#/components/schemas/WorktreeFailed"
  24094. },
  24095. {
  24096. "$ref": "#/components/schemas/ServerConnected"
  24097. },
  24098. {
  24099. "$ref": "#/components/schemas/GlobalDisposed"
  24100. }
  24101. ]
  24102. },
  24103. "V2EventStream": {
  24104. "type": "string",
  24105. "contentSchema": {
  24106. "$ref": "#/components/schemas/V2Event"
  24107. },
  24108. "contentMediaType": "application/json"
  24109. },
  24110. "ForbiddenError": {
  24111. "type": "object",
  24112. "properties": {
  24113. "_tag": {
  24114. "type": "string",
  24115. "enum": ["ForbiddenError"]
  24116. },
  24117. "message": {
  24118. "type": "string"
  24119. }
  24120. },
  24121. "required": ["_tag", "message"],
  24122. "additionalProperties": false
  24123. },
  24124. "ProjectCopyError": {
  24125. "type": "object",
  24126. "properties": {
  24127. "name": {
  24128. "type": "string",
  24129. "enum": ["ProjectCopyError"]
  24130. },
  24131. "data": {
  24132. "type": "object",
  24133. "properties": {
  24134. "message": {
  24135. "type": "string"
  24136. },
  24137. "forceRequired": {
  24138. "type": "boolean"
  24139. }
  24140. },
  24141. "required": ["message"],
  24142. "additionalProperties": false
  24143. }
  24144. },
  24145. "required": ["name", "data"],
  24146. "additionalProperties": false
  24147. },
  24148. "effect_HttpApiError_Forbidden": {
  24149. "type": "object",
  24150. "properties": {
  24151. "_tag": {
  24152. "type": "string",
  24153. "enum": ["Forbidden"]
  24154. }
  24155. },
  24156. "required": ["_tag"],
  24157. "additionalProperties": false
  24158. },
  24159. "Event.tui.prompt.append": {
  24160. "type": "object",
  24161. "properties": {
  24162. "id": {
  24163. "type": "string",
  24164. "pattern": "^evt_"
  24165. },
  24166. "type": {
  24167. "type": "string",
  24168. "enum": ["tui.prompt.append"]
  24169. },
  24170. "properties": {
  24171. "type": "object",
  24172. "properties": {
  24173. "text": {
  24174. "type": "string"
  24175. }
  24176. },
  24177. "required": ["text"],
  24178. "additionalProperties": false
  24179. }
  24180. },
  24181. "required": ["id", "type", "properties"],
  24182. "additionalProperties": false
  24183. },
  24184. "Event.tui.command.execute": {
  24185. "type": "object",
  24186. "properties": {
  24187. "id": {
  24188. "type": "string",
  24189. "pattern": "^evt_"
  24190. },
  24191. "type": {
  24192. "type": "string",
  24193. "enum": ["tui.command.execute"]
  24194. },
  24195. "properties": {
  24196. "type": "object",
  24197. "properties": {
  24198. "command": {
  24199. "anyOf": [
  24200. {
  24201. "type": "string",
  24202. "enum": [
  24203. "session.list",
  24204. "session.new",
  24205. "session.share",
  24206. "session.interrupt",
  24207. "session.compact",
  24208. "session.page.up",
  24209. "session.page.down",
  24210. "session.line.up",
  24211. "session.line.down",
  24212. "session.half.page.up",
  24213. "session.half.page.down",
  24214. "session.first",
  24215. "session.last",
  24216. "prompt.clear",
  24217. "prompt.submit",
  24218. "agent.cycle"
  24219. ]
  24220. },
  24221. {
  24222. "type": "string"
  24223. }
  24224. ]
  24225. }
  24226. },
  24227. "required": ["command"],
  24228. "additionalProperties": false
  24229. }
  24230. },
  24231. "required": ["id", "type", "properties"],
  24232. "additionalProperties": false
  24233. },
  24234. "Event.tui.toast.show": {
  24235. "type": "object",
  24236. "properties": {
  24237. "id": {
  24238. "type": "string",
  24239. "pattern": "^evt_"
  24240. },
  24241. "type": {
  24242. "type": "string",
  24243. "enum": ["tui.toast.show"]
  24244. },
  24245. "properties": {
  24246. "type": "object",
  24247. "properties": {
  24248. "title": {
  24249. "type": "string"
  24250. },
  24251. "message": {
  24252. "type": "string"
  24253. },
  24254. "variant": {
  24255. "type": "string",
  24256. "enum": ["info", "success", "warning", "error"]
  24257. },
  24258. "duration": {
  24259. "type": "integer",
  24260. "exclusiveMinimum": 0
  24261. }
  24262. },
  24263. "required": ["message", "variant"],
  24264. "additionalProperties": false
  24265. }
  24266. },
  24267. "required": ["id", "type", "properties"],
  24268. "additionalProperties": false
  24269. },
  24270. "Event.tui.session.select": {
  24271. "type": "object",
  24272. "properties": {
  24273. "id": {
  24274. "type": "string",
  24275. "pattern": "^evt_"
  24276. },
  24277. "type": {
  24278. "type": "string",
  24279. "enum": ["tui.session.select"]
  24280. },
  24281. "properties": {
  24282. "type": "object",
  24283. "properties": {
  24284. "sessionID": {
  24285. "type": "string",
  24286. "pattern": "^ses",
  24287. "description": "Session ID to navigate to"
  24288. }
  24289. },
  24290. "required": ["sessionID"],
  24291. "additionalProperties": false
  24292. }
  24293. },
  24294. "required": ["id", "type", "properties"],
  24295. "additionalProperties": false
  24296. },
  24297. "CredentialValue": {
  24298. "anyOf": [
  24299. {
  24300. "$ref": "#/components/schemas/CredentialOAuth"
  24301. },
  24302. {
  24303. "$ref": "#/components/schemas/CredentialKey"
  24304. }
  24305. ]
  24306. },
  24307. "IntegrationInputs": {
  24308. "type": "object",
  24309. "additionalProperties": {
  24310. "type": "string"
  24311. }
  24312. },
  24313. "IntegrationMethod": {
  24314. "anyOf": [
  24315. {
  24316. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24317. },
  24318. {
  24319. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24320. },
  24321. {
  24322. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24323. }
  24324. ]
  24325. },
  24326. "IntegrationRef": {
  24327. "type": "object",
  24328. "properties": {
  24329. "id": {
  24330. "type": "string"
  24331. },
  24332. "name": {
  24333. "type": "string"
  24334. }
  24335. },
  24336. "required": ["id", "name"],
  24337. "additionalProperties": false
  24338. },
  24339. "SkillV2Source": {
  24340. "anyOf": [
  24341. {
  24342. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24343. },
  24344. {
  24345. "$ref": "#/components/schemas/SkillV2UrlSource"
  24346. },
  24347. {
  24348. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24349. }
  24350. ]
  24351. },
  24352. "MoveSessionDestination": {
  24353. "type": "object",
  24354. "properties": {
  24355. "directory": {
  24356. "type": "string"
  24357. }
  24358. },
  24359. "required": ["directory"],
  24360. "additionalProperties": false
  24361. },
  24362. "ModelRef": {
  24363. "type": "object",
  24364. "properties": {
  24365. "id": {
  24366. "type": "string"
  24367. },
  24368. "providerID": {
  24369. "type": "string"
  24370. },
  24371. "variant": {
  24372. "type": "string"
  24373. }
  24374. },
  24375. "required": ["id", "providerID"],
  24376. "additionalProperties": false
  24377. },
  24378. "LocationRef": {
  24379. "type": "object",
  24380. "properties": {
  24381. "directory": {
  24382. "type": "string"
  24383. },
  24384. "workspaceID": {
  24385. "type": "string",
  24386. "pattern": "^wrk"
  24387. }
  24388. },
  24389. "required": ["directory"],
  24390. "additionalProperties": false
  24391. },
  24392. "PromptSource": {
  24393. "type": "object",
  24394. "properties": {
  24395. "start": {
  24396. "type": "number"
  24397. },
  24398. "end": {
  24399. "type": "number"
  24400. },
  24401. "text": {
  24402. "type": "string"
  24403. }
  24404. },
  24405. "required": ["start", "end", "text"],
  24406. "additionalProperties": false
  24407. },
  24408. "PromptFileAttachment": {
  24409. "type": "object",
  24410. "properties": {
  24411. "uri": {
  24412. "type": "string"
  24413. },
  24414. "mime": {
  24415. "type": "string"
  24416. },
  24417. "name": {
  24418. "type": "string"
  24419. },
  24420. "description": {
  24421. "type": "string"
  24422. },
  24423. "source": {
  24424. "$ref": "#/components/schemas/PromptSource"
  24425. }
  24426. },
  24427. "required": ["uri", "mime"],
  24428. "additionalProperties": false
  24429. },
  24430. "PromptAgentAttachment": {
  24431. "type": "object",
  24432. "properties": {
  24433. "name": {
  24434. "type": "string"
  24435. },
  24436. "source": {
  24437. "$ref": "#/components/schemas/PromptSource"
  24438. }
  24439. },
  24440. "required": ["name"],
  24441. "additionalProperties": false
  24442. },
  24443. "SessionErrorUnknown": {
  24444. "type": "object",
  24445. "properties": {
  24446. "type": {
  24447. "type": "string",
  24448. "enum": ["unknown"]
  24449. },
  24450. "message": {
  24451. "type": "string"
  24452. }
  24453. },
  24454. "required": ["type", "message"],
  24455. "additionalProperties": false
  24456. },
  24457. "LLMProviderMetadata": {
  24458. "type": "object",
  24459. "additionalProperties": {
  24460. "type": "object"
  24461. }
  24462. },
  24463. "ToolTextContent": {
  24464. "type": "object",
  24465. "properties": {
  24466. "type": {
  24467. "type": "string",
  24468. "enum": ["text"]
  24469. },
  24470. "text": {
  24471. "type": "string"
  24472. }
  24473. },
  24474. "required": ["type", "text"],
  24475. "additionalProperties": false
  24476. },
  24477. "ToolFileContent": {
  24478. "type": "object",
  24479. "properties": {
  24480. "type": {
  24481. "type": "string",
  24482. "enum": ["file"]
  24483. },
  24484. "uri": {
  24485. "type": "string"
  24486. },
  24487. "mime": {
  24488. "type": "string"
  24489. },
  24490. "name": {
  24491. "type": "string"
  24492. }
  24493. },
  24494. "required": ["type", "uri", "mime"],
  24495. "additionalProperties": false
  24496. },
  24497. "LLMToolContent": {
  24498. "anyOf": [
  24499. {
  24500. "$ref": "#/components/schemas/ToolTextContent"
  24501. },
  24502. {
  24503. "$ref": "#/components/schemas/ToolFileContent"
  24504. }
  24505. ]
  24506. },
  24507. "SessionNextRetry_error": {
  24508. "type": "object",
  24509. "properties": {
  24510. "message": {
  24511. "type": "string"
  24512. },
  24513. "statusCode": {
  24514. "type": "number"
  24515. },
  24516. "isRetryable": {
  24517. "type": "boolean"
  24518. },
  24519. "responseHeaders": {
  24520. "type": "object",
  24521. "additionalProperties": {
  24522. "type": "string"
  24523. }
  24524. },
  24525. "responseBody": {
  24526. "type": "string"
  24527. },
  24528. "metadata": {
  24529. "type": "object",
  24530. "additionalProperties": {
  24531. "type": "string"
  24532. }
  24533. }
  24534. },
  24535. "required": ["message", "isRetryable"],
  24536. "additionalProperties": false
  24537. },
  24538. "FileDiff": {
  24539. "type": "object",
  24540. "properties": {
  24541. "path": {
  24542. "type": "string"
  24543. },
  24544. "status": {
  24545. "type": "string",
  24546. "enum": ["added", "modified", "deleted"]
  24547. },
  24548. "additions": {
  24549. "type": "integer",
  24550. "minimum": 0
  24551. },
  24552. "deletions": {
  24553. "type": "integer",
  24554. "minimum": 0
  24555. },
  24556. "patch": {
  24557. "type": "string"
  24558. }
  24559. },
  24560. "required": ["path", "status", "additions", "deletions", "patch"],
  24561. "additionalProperties": false
  24562. },
  24563. "RevertState": {
  24564. "type": "object",
  24565. "properties": {
  24566. "messageID": {
  24567. "type": "string",
  24568. "pattern": "^msg_"
  24569. },
  24570. "partID": {
  24571. "type": "string"
  24572. },
  24573. "snapshot": {
  24574. "type": "string"
  24575. },
  24576. "diff": {
  24577. "type": "string"
  24578. },
  24579. "files": {
  24580. "type": "array",
  24581. "items": {
  24582. "$ref": "#/components/schemas/FileDiff"
  24583. }
  24584. }
  24585. },
  24586. "required": ["messageID"],
  24587. "additionalProperties": false
  24588. },
  24589. "PermissionV2Source": {
  24590. "type": "object",
  24591. "properties": {
  24592. "type": {
  24593. "type": "string",
  24594. "enum": ["tool"]
  24595. },
  24596. "messageID": {
  24597. "type": "string"
  24598. },
  24599. "callID": {
  24600. "type": "string"
  24601. }
  24602. },
  24603. "required": ["type", "messageID", "callID"],
  24604. "additionalProperties": false
  24605. },
  24606. "PermissionV2Reply": {
  24607. "type": "string",
  24608. "enum": ["once", "always", "reject"]
  24609. },
  24610. "QuestionV2Option": {
  24611. "type": "object",
  24612. "properties": {
  24613. "label": {
  24614. "type": "string",
  24615. "description": "Display text (1-5 words, concise)"
  24616. },
  24617. "description": {
  24618. "type": "string",
  24619. "description": "Explanation of choice"
  24620. }
  24621. },
  24622. "required": ["label", "description"],
  24623. "additionalProperties": false
  24624. },
  24625. "QuestionV2Info": {
  24626. "type": "object",
  24627. "properties": {
  24628. "question": {
  24629. "type": "string",
  24630. "description": "Complete question"
  24631. },
  24632. "header": {
  24633. "type": "string",
  24634. "description": "Very short label (max 30 chars)"
  24635. },
  24636. "options": {
  24637. "type": "array",
  24638. "items": {
  24639. "$ref": "#/components/schemas/QuestionV2Option"
  24640. },
  24641. "description": "Available choices"
  24642. },
  24643. "multiple": {
  24644. "type": "boolean"
  24645. },
  24646. "custom": {
  24647. "type": "boolean"
  24648. }
  24649. },
  24650. "required": ["question", "header", "options"],
  24651. "additionalProperties": false
  24652. },
  24653. "QuestionV2Tool": {
  24654. "type": "object",
  24655. "properties": {
  24656. "messageID": {
  24657. "type": "string"
  24658. },
  24659. "callID": {
  24660. "type": "string"
  24661. }
  24662. },
  24663. "required": ["messageID", "callID"],
  24664. "additionalProperties": false
  24665. },
  24666. "QuestionV2Answer": {
  24667. "type": "array",
  24668. "items": {
  24669. "type": "string"
  24670. }
  24671. },
  24672. "ProjectVcs": {
  24673. "type": "string",
  24674. "enum": ["git"]
  24675. },
  24676. "ProjectIcon": {
  24677. "type": "object",
  24678. "properties": {
  24679. "url": {
  24680. "type": "string"
  24681. },
  24682. "override": {
  24683. "type": "string"
  24684. },
  24685. "color": {
  24686. "type": "string"
  24687. }
  24688. },
  24689. "additionalProperties": false
  24690. },
  24691. "ProjectCommands": {
  24692. "type": "object",
  24693. "properties": {
  24694. "start": {
  24695. "type": "string",
  24696. "description": "Startup script to run when creating a new workspace (worktree)"
  24697. }
  24698. },
  24699. "additionalProperties": false
  24700. },
  24701. "ProjectTime": {
  24702. "type": "object",
  24703. "properties": {
  24704. "created": {
  24705. "type": "integer",
  24706. "minimum": 0
  24707. },
  24708. "updated": {
  24709. "type": "integer",
  24710. "minimum": 0
  24711. },
  24712. "initialized": {
  24713. "type": "integer",
  24714. "minimum": 0
  24715. }
  24716. },
  24717. "required": ["created", "updated"],
  24718. "additionalProperties": false
  24719. },
  24720. "EventServerInstanceDisposed": {
  24721. "type": "object",
  24722. "properties": {
  24723. "id": {
  24724. "type": "string"
  24725. },
  24726. "type": {
  24727. "type": "string",
  24728. "enum": ["server.instance.disposed"]
  24729. },
  24730. "properties": {
  24731. "type": "object",
  24732. "properties": {
  24733. "directory": {
  24734. "type": "string"
  24735. }
  24736. },
  24737. "required": ["directory"],
  24738. "additionalProperties": false
  24739. }
  24740. },
  24741. "required": ["id", "type", "properties"],
  24742. "additionalProperties": false
  24743. },
  24744. "SyncEventSessionCreated": {
  24745. "type": "object",
  24746. "properties": {
  24747. "type": {
  24748. "type": "string",
  24749. "enum": ["sync"]
  24750. },
  24751. "id": {
  24752. "type": "string",
  24753. "pattern": "^evt_"
  24754. },
  24755. "syncEvent": {
  24756. "type": "object",
  24757. "properties": {
  24758. "type": {
  24759. "type": "string",
  24760. "enum": ["session.created.1"]
  24761. },
  24762. "id": {
  24763. "type": "string",
  24764. "pattern": "^evt_"
  24765. },
  24766. "seq": {
  24767. "type": "number"
  24768. },
  24769. "aggregateID": {
  24770. "type": "string"
  24771. },
  24772. "data": {
  24773. "type": "object",
  24774. "properties": {
  24775. "sessionID": {
  24776. "type": "string",
  24777. "pattern": "^ses"
  24778. },
  24779. "info": {
  24780. "$ref": "#/components/schemas/Session"
  24781. }
  24782. },
  24783. "required": ["sessionID", "info"],
  24784. "additionalProperties": false
  24785. }
  24786. },
  24787. "required": ["type", "id", "seq", "aggregateID", "data"],
  24788. "additionalProperties": false
  24789. }
  24790. },
  24791. "required": ["type", "id", "syncEvent"],
  24792. "additionalProperties": false
  24793. },
  24794. "SyncEventSessionUpdated": {
  24795. "type": "object",
  24796. "properties": {
  24797. "type": {
  24798. "type": "string",
  24799. "enum": ["sync"]
  24800. },
  24801. "id": {
  24802. "type": "string",
  24803. "pattern": "^evt_"
  24804. },
  24805. "syncEvent": {
  24806. "type": "object",
  24807. "properties": {
  24808. "type": {
  24809. "type": "string",
  24810. "enum": ["session.updated.1"]
  24811. },
  24812. "id": {
  24813. "type": "string",
  24814. "pattern": "^evt_"
  24815. },
  24816. "seq": {
  24817. "type": "number"
  24818. },
  24819. "aggregateID": {
  24820. "type": "string"
  24821. },
  24822. "data": {
  24823. "type": "object",
  24824. "properties": {
  24825. "sessionID": {
  24826. "type": "string",
  24827. "pattern": "^ses"
  24828. },
  24829. "info": {
  24830. "$ref": "#/components/schemas/Session"
  24831. }
  24832. },
  24833. "required": ["sessionID", "info"],
  24834. "additionalProperties": false
  24835. }
  24836. },
  24837. "required": ["type", "id", "seq", "aggregateID", "data"],
  24838. "additionalProperties": false
  24839. }
  24840. },
  24841. "required": ["type", "id", "syncEvent"],
  24842. "additionalProperties": false
  24843. },
  24844. "SyncEventSessionDeleted": {
  24845. "type": "object",
  24846. "properties": {
  24847. "type": {
  24848. "type": "string",
  24849. "enum": ["sync"]
  24850. },
  24851. "id": {
  24852. "type": "string",
  24853. "pattern": "^evt_"
  24854. },
  24855. "syncEvent": {
  24856. "type": "object",
  24857. "properties": {
  24858. "type": {
  24859. "type": "string",
  24860. "enum": ["session.deleted.1"]
  24861. },
  24862. "id": {
  24863. "type": "string",
  24864. "pattern": "^evt_"
  24865. },
  24866. "seq": {
  24867. "type": "number"
  24868. },
  24869. "aggregateID": {
  24870. "type": "string"
  24871. },
  24872. "data": {
  24873. "type": "object",
  24874. "properties": {
  24875. "sessionID": {
  24876. "type": "string",
  24877. "pattern": "^ses"
  24878. },
  24879. "info": {
  24880. "$ref": "#/components/schemas/Session"
  24881. }
  24882. },
  24883. "required": ["sessionID", "info"],
  24884. "additionalProperties": false
  24885. }
  24886. },
  24887. "required": ["type", "id", "seq", "aggregateID", "data"],
  24888. "additionalProperties": false
  24889. }
  24890. },
  24891. "required": ["type", "id", "syncEvent"],
  24892. "additionalProperties": false
  24893. },
  24894. "SyncEventMessageUpdated": {
  24895. "type": "object",
  24896. "properties": {
  24897. "type": {
  24898. "type": "string",
  24899. "enum": ["sync"]
  24900. },
  24901. "id": {
  24902. "type": "string",
  24903. "pattern": "^evt_"
  24904. },
  24905. "syncEvent": {
  24906. "type": "object",
  24907. "properties": {
  24908. "type": {
  24909. "type": "string",
  24910. "enum": ["message.updated.1"]
  24911. },
  24912. "id": {
  24913. "type": "string",
  24914. "pattern": "^evt_"
  24915. },
  24916. "seq": {
  24917. "type": "number"
  24918. },
  24919. "aggregateID": {
  24920. "type": "string"
  24921. },
  24922. "data": {
  24923. "type": "object",
  24924. "properties": {
  24925. "sessionID": {
  24926. "type": "string",
  24927. "pattern": "^ses"
  24928. },
  24929. "info": {
  24930. "$ref": "#/components/schemas/Message"
  24931. }
  24932. },
  24933. "required": ["sessionID", "info"],
  24934. "additionalProperties": false
  24935. }
  24936. },
  24937. "required": ["type", "id", "seq", "aggregateID", "data"],
  24938. "additionalProperties": false
  24939. }
  24940. },
  24941. "required": ["type", "id", "syncEvent"],
  24942. "additionalProperties": false
  24943. },
  24944. "SyncEventMessageRemoved": {
  24945. "type": "object",
  24946. "properties": {
  24947. "type": {
  24948. "type": "string",
  24949. "enum": ["sync"]
  24950. },
  24951. "id": {
  24952. "type": "string",
  24953. "pattern": "^evt_"
  24954. },
  24955. "syncEvent": {
  24956. "type": "object",
  24957. "properties": {
  24958. "type": {
  24959. "type": "string",
  24960. "enum": ["message.removed.1"]
  24961. },
  24962. "id": {
  24963. "type": "string",
  24964. "pattern": "^evt_"
  24965. },
  24966. "seq": {
  24967. "type": "number"
  24968. },
  24969. "aggregateID": {
  24970. "type": "string"
  24971. },
  24972. "data": {
  24973. "type": "object",
  24974. "properties": {
  24975. "sessionID": {
  24976. "type": "string",
  24977. "pattern": "^ses"
  24978. },
  24979. "messageID": {
  24980. "type": "string",
  24981. "pattern": "^msg"
  24982. }
  24983. },
  24984. "required": ["sessionID", "messageID"],
  24985. "additionalProperties": false
  24986. }
  24987. },
  24988. "required": ["type", "id", "seq", "aggregateID", "data"],
  24989. "additionalProperties": false
  24990. }
  24991. },
  24992. "required": ["type", "id", "syncEvent"],
  24993. "additionalProperties": false
  24994. },
  24995. "SyncEventMessagePartUpdated": {
  24996. "type": "object",
  24997. "properties": {
  24998. "type": {
  24999. "type": "string",
  25000. "enum": ["sync"]
  25001. },
  25002. "id": {
  25003. "type": "string",
  25004. "pattern": "^evt_"
  25005. },
  25006. "syncEvent": {
  25007. "type": "object",
  25008. "properties": {
  25009. "type": {
  25010. "type": "string",
  25011. "enum": ["message.part.updated.1"]
  25012. },
  25013. "id": {
  25014. "type": "string",
  25015. "pattern": "^evt_"
  25016. },
  25017. "seq": {
  25018. "type": "number"
  25019. },
  25020. "aggregateID": {
  25021. "type": "string"
  25022. },
  25023. "data": {
  25024. "type": "object",
  25025. "properties": {
  25026. "sessionID": {
  25027. "type": "string",
  25028. "pattern": "^ses"
  25029. },
  25030. "part": {
  25031. "$ref": "#/components/schemas/Part"
  25032. },
  25033. "time": {
  25034. "type": "number"
  25035. }
  25036. },
  25037. "required": ["sessionID", "part", "time"],
  25038. "additionalProperties": false
  25039. }
  25040. },
  25041. "required": ["type", "id", "seq", "aggregateID", "data"],
  25042. "additionalProperties": false
  25043. }
  25044. },
  25045. "required": ["type", "id", "syncEvent"],
  25046. "additionalProperties": false
  25047. },
  25048. "SyncEventMessagePartRemoved": {
  25049. "type": "object",
  25050. "properties": {
  25051. "type": {
  25052. "type": "string",
  25053. "enum": ["sync"]
  25054. },
  25055. "id": {
  25056. "type": "string",
  25057. "pattern": "^evt_"
  25058. },
  25059. "syncEvent": {
  25060. "type": "object",
  25061. "properties": {
  25062. "type": {
  25063. "type": "string",
  25064. "enum": ["message.part.removed.1"]
  25065. },
  25066. "id": {
  25067. "type": "string",
  25068. "pattern": "^evt_"
  25069. },
  25070. "seq": {
  25071. "type": "number"
  25072. },
  25073. "aggregateID": {
  25074. "type": "string"
  25075. },
  25076. "data": {
  25077. "type": "object",
  25078. "properties": {
  25079. "sessionID": {
  25080. "type": "string",
  25081. "pattern": "^ses"
  25082. },
  25083. "messageID": {
  25084. "type": "string",
  25085. "pattern": "^msg"
  25086. },
  25087. "partID": {
  25088. "type": "string",
  25089. "pattern": "^prt"
  25090. }
  25091. },
  25092. "required": ["sessionID", "messageID", "partID"],
  25093. "additionalProperties": false
  25094. }
  25095. },
  25096. "required": ["type", "id", "seq", "aggregateID", "data"],
  25097. "additionalProperties": false
  25098. }
  25099. },
  25100. "required": ["type", "id", "syncEvent"],
  25101. "additionalProperties": false
  25102. },
  25103. "SyncEventSessionNextAgentSwitched": {
  25104. "type": "object",
  25105. "properties": {
  25106. "type": {
  25107. "type": "string",
  25108. "enum": ["sync"]
  25109. },
  25110. "id": {
  25111. "type": "string",
  25112. "pattern": "^evt_"
  25113. },
  25114. "syncEvent": {
  25115. "type": "object",
  25116. "properties": {
  25117. "type": {
  25118. "type": "string",
  25119. "enum": ["session.next.agent.switched.1"]
  25120. },
  25121. "id": {
  25122. "type": "string",
  25123. "pattern": "^evt_"
  25124. },
  25125. "seq": {
  25126. "type": "number"
  25127. },
  25128. "aggregateID": {
  25129. "type": "string"
  25130. },
  25131. "data": {
  25132. "type": "object",
  25133. "properties": {
  25134. "timestamp": {
  25135. "type": "number"
  25136. },
  25137. "sessionID": {
  25138. "type": "string",
  25139. "pattern": "^ses"
  25140. },
  25141. "messageID": {
  25142. "type": "string",
  25143. "pattern": "^msg_"
  25144. },
  25145. "agent": {
  25146. "type": "string"
  25147. }
  25148. },
  25149. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25150. "additionalProperties": false
  25151. }
  25152. },
  25153. "required": ["type", "id", "seq", "aggregateID", "data"],
  25154. "additionalProperties": false
  25155. }
  25156. },
  25157. "required": ["type", "id", "syncEvent"],
  25158. "additionalProperties": false
  25159. },
  25160. "SyncEventSessionNextModelSwitched": {
  25161. "type": "object",
  25162. "properties": {
  25163. "type": {
  25164. "type": "string",
  25165. "enum": ["sync"]
  25166. },
  25167. "id": {
  25168. "type": "string",
  25169. "pattern": "^evt_"
  25170. },
  25171. "syncEvent": {
  25172. "type": "object",
  25173. "properties": {
  25174. "type": {
  25175. "type": "string",
  25176. "enum": ["session.next.model.switched.1"]
  25177. },
  25178. "id": {
  25179. "type": "string",
  25180. "pattern": "^evt_"
  25181. },
  25182. "seq": {
  25183. "type": "number"
  25184. },
  25185. "aggregateID": {
  25186. "type": "string"
  25187. },
  25188. "data": {
  25189. "type": "object",
  25190. "properties": {
  25191. "timestamp": {
  25192. "type": "number"
  25193. },
  25194. "sessionID": {
  25195. "type": "string",
  25196. "pattern": "^ses"
  25197. },
  25198. "messageID": {
  25199. "type": "string",
  25200. "pattern": "^msg_"
  25201. },
  25202. "model": {
  25203. "$ref": "#/components/schemas/ModelRef"
  25204. }
  25205. },
  25206. "required": ["timestamp", "sessionID", "messageID", "model"],
  25207. "additionalProperties": false
  25208. }
  25209. },
  25210. "required": ["type", "id", "seq", "aggregateID", "data"],
  25211. "additionalProperties": false
  25212. }
  25213. },
  25214. "required": ["type", "id", "syncEvent"],
  25215. "additionalProperties": false
  25216. },
  25217. "SyncEventSessionNextMoved": {
  25218. "type": "object",
  25219. "properties": {
  25220. "type": {
  25221. "type": "string",
  25222. "enum": ["sync"]
  25223. },
  25224. "id": {
  25225. "type": "string",
  25226. "pattern": "^evt_"
  25227. },
  25228. "syncEvent": {
  25229. "type": "object",
  25230. "properties": {
  25231. "type": {
  25232. "type": "string",
  25233. "enum": ["session.next.moved.1"]
  25234. },
  25235. "id": {
  25236. "type": "string",
  25237. "pattern": "^evt_"
  25238. },
  25239. "seq": {
  25240. "type": "number"
  25241. },
  25242. "aggregateID": {
  25243. "type": "string"
  25244. },
  25245. "data": {
  25246. "type": "object",
  25247. "properties": {
  25248. "timestamp": {
  25249. "type": "number"
  25250. },
  25251. "sessionID": {
  25252. "type": "string",
  25253. "pattern": "^ses"
  25254. },
  25255. "location": {
  25256. "$ref": "#/components/schemas/LocationRef"
  25257. },
  25258. "subdirectory": {
  25259. "type": "string"
  25260. }
  25261. },
  25262. "required": ["timestamp", "sessionID", "location"],
  25263. "additionalProperties": false
  25264. }
  25265. },
  25266. "required": ["type", "id", "seq", "aggregateID", "data"],
  25267. "additionalProperties": false
  25268. }
  25269. },
  25270. "required": ["type", "id", "syncEvent"],
  25271. "additionalProperties": false
  25272. },
  25273. "SyncEventSessionNextPrompted": {
  25274. "type": "object",
  25275. "properties": {
  25276. "type": {
  25277. "type": "string",
  25278. "enum": ["sync"]
  25279. },
  25280. "id": {
  25281. "type": "string",
  25282. "pattern": "^evt_"
  25283. },
  25284. "syncEvent": {
  25285. "type": "object",
  25286. "properties": {
  25287. "type": {
  25288. "type": "string",
  25289. "enum": ["session.next.prompted.1"]
  25290. },
  25291. "id": {
  25292. "type": "string",
  25293. "pattern": "^evt_"
  25294. },
  25295. "seq": {
  25296. "type": "number"
  25297. },
  25298. "aggregateID": {
  25299. "type": "string"
  25300. },
  25301. "data": {
  25302. "type": "object",
  25303. "properties": {
  25304. "timestamp": {
  25305. "type": "number"
  25306. },
  25307. "sessionID": {
  25308. "type": "string",
  25309. "pattern": "^ses"
  25310. },
  25311. "messageID": {
  25312. "type": "string",
  25313. "pattern": "^msg_"
  25314. },
  25315. "prompt": {
  25316. "$ref": "#/components/schemas/Prompt"
  25317. },
  25318. "delivery": {
  25319. "type": "string",
  25320. "enum": ["steer", "queue"]
  25321. }
  25322. },
  25323. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25324. "additionalProperties": false
  25325. }
  25326. },
  25327. "required": ["type", "id", "seq", "aggregateID", "data"],
  25328. "additionalProperties": false
  25329. }
  25330. },
  25331. "required": ["type", "id", "syncEvent"],
  25332. "additionalProperties": false
  25333. },
  25334. "SyncEventSessionNextPromptAdmitted": {
  25335. "type": "object",
  25336. "properties": {
  25337. "type": {
  25338. "type": "string",
  25339. "enum": ["sync"]
  25340. },
  25341. "id": {
  25342. "type": "string",
  25343. "pattern": "^evt_"
  25344. },
  25345. "syncEvent": {
  25346. "type": "object",
  25347. "properties": {
  25348. "type": {
  25349. "type": "string",
  25350. "enum": ["session.next.prompt.admitted.1"]
  25351. },
  25352. "id": {
  25353. "type": "string",
  25354. "pattern": "^evt_"
  25355. },
  25356. "seq": {
  25357. "type": "number"
  25358. },
  25359. "aggregateID": {
  25360. "type": "string"
  25361. },
  25362. "data": {
  25363. "type": "object",
  25364. "properties": {
  25365. "timestamp": {
  25366. "type": "number"
  25367. },
  25368. "sessionID": {
  25369. "type": "string",
  25370. "pattern": "^ses"
  25371. },
  25372. "messageID": {
  25373. "type": "string",
  25374. "pattern": "^msg_"
  25375. },
  25376. "prompt": {
  25377. "$ref": "#/components/schemas/Prompt"
  25378. },
  25379. "delivery": {
  25380. "type": "string",
  25381. "enum": ["steer", "queue"]
  25382. }
  25383. },
  25384. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25385. "additionalProperties": false
  25386. }
  25387. },
  25388. "required": ["type", "id", "seq", "aggregateID", "data"],
  25389. "additionalProperties": false
  25390. }
  25391. },
  25392. "required": ["type", "id", "syncEvent"],
  25393. "additionalProperties": false
  25394. },
  25395. "SyncEventSessionNextContextUpdated": {
  25396. "type": "object",
  25397. "properties": {
  25398. "type": {
  25399. "type": "string",
  25400. "enum": ["sync"]
  25401. },
  25402. "id": {
  25403. "type": "string",
  25404. "pattern": "^evt_"
  25405. },
  25406. "syncEvent": {
  25407. "type": "object",
  25408. "properties": {
  25409. "type": {
  25410. "type": "string",
  25411. "enum": ["session.next.context.updated.1"]
  25412. },
  25413. "id": {
  25414. "type": "string",
  25415. "pattern": "^evt_"
  25416. },
  25417. "seq": {
  25418. "type": "number"
  25419. },
  25420. "aggregateID": {
  25421. "type": "string"
  25422. },
  25423. "data": {
  25424. "type": "object",
  25425. "properties": {
  25426. "timestamp": {
  25427. "type": "number"
  25428. },
  25429. "sessionID": {
  25430. "type": "string",
  25431. "pattern": "^ses"
  25432. },
  25433. "messageID": {
  25434. "type": "string",
  25435. "pattern": "^msg_"
  25436. },
  25437. "text": {
  25438. "type": "string"
  25439. }
  25440. },
  25441. "required": ["timestamp", "sessionID", "messageID", "text"],
  25442. "additionalProperties": false
  25443. }
  25444. },
  25445. "required": ["type", "id", "seq", "aggregateID", "data"],
  25446. "additionalProperties": false
  25447. }
  25448. },
  25449. "required": ["type", "id", "syncEvent"],
  25450. "additionalProperties": false
  25451. },
  25452. "SyncEventSessionNextSynthetic": {
  25453. "type": "object",
  25454. "properties": {
  25455. "type": {
  25456. "type": "string",
  25457. "enum": ["sync"]
  25458. },
  25459. "id": {
  25460. "type": "string",
  25461. "pattern": "^evt_"
  25462. },
  25463. "syncEvent": {
  25464. "type": "object",
  25465. "properties": {
  25466. "type": {
  25467. "type": "string",
  25468. "enum": ["session.next.synthetic.1"]
  25469. },
  25470. "id": {
  25471. "type": "string",
  25472. "pattern": "^evt_"
  25473. },
  25474. "seq": {
  25475. "type": "number"
  25476. },
  25477. "aggregateID": {
  25478. "type": "string"
  25479. },
  25480. "data": {
  25481. "type": "object",
  25482. "properties": {
  25483. "timestamp": {
  25484. "type": "number"
  25485. },
  25486. "sessionID": {
  25487. "type": "string",
  25488. "pattern": "^ses"
  25489. },
  25490. "messageID": {
  25491. "type": "string",
  25492. "pattern": "^msg_"
  25493. },
  25494. "text": {
  25495. "type": "string"
  25496. }
  25497. },
  25498. "required": ["timestamp", "sessionID", "messageID", "text"],
  25499. "additionalProperties": false
  25500. }
  25501. },
  25502. "required": ["type", "id", "seq", "aggregateID", "data"],
  25503. "additionalProperties": false
  25504. }
  25505. },
  25506. "required": ["type", "id", "syncEvent"],
  25507. "additionalProperties": false
  25508. },
  25509. "SyncEventSessionNextShellStarted": {
  25510. "type": "object",
  25511. "properties": {
  25512. "type": {
  25513. "type": "string",
  25514. "enum": ["sync"]
  25515. },
  25516. "id": {
  25517. "type": "string",
  25518. "pattern": "^evt_"
  25519. },
  25520. "syncEvent": {
  25521. "type": "object",
  25522. "properties": {
  25523. "type": {
  25524. "type": "string",
  25525. "enum": ["session.next.shell.started.1"]
  25526. },
  25527. "id": {
  25528. "type": "string",
  25529. "pattern": "^evt_"
  25530. },
  25531. "seq": {
  25532. "type": "number"
  25533. },
  25534. "aggregateID": {
  25535. "type": "string"
  25536. },
  25537. "data": {
  25538. "type": "object",
  25539. "properties": {
  25540. "timestamp": {
  25541. "type": "number"
  25542. },
  25543. "sessionID": {
  25544. "type": "string",
  25545. "pattern": "^ses"
  25546. },
  25547. "messageID": {
  25548. "type": "string",
  25549. "pattern": "^msg_"
  25550. },
  25551. "callID": {
  25552. "type": "string"
  25553. },
  25554. "command": {
  25555. "type": "string"
  25556. }
  25557. },
  25558. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25559. "additionalProperties": false
  25560. }
  25561. },
  25562. "required": ["type", "id", "seq", "aggregateID", "data"],
  25563. "additionalProperties": false
  25564. }
  25565. },
  25566. "required": ["type", "id", "syncEvent"],
  25567. "additionalProperties": false
  25568. },
  25569. "SyncEventSessionNextShellEnded": {
  25570. "type": "object",
  25571. "properties": {
  25572. "type": {
  25573. "type": "string",
  25574. "enum": ["sync"]
  25575. },
  25576. "id": {
  25577. "type": "string",
  25578. "pattern": "^evt_"
  25579. },
  25580. "syncEvent": {
  25581. "type": "object",
  25582. "properties": {
  25583. "type": {
  25584. "type": "string",
  25585. "enum": ["session.next.shell.ended.1"]
  25586. },
  25587. "id": {
  25588. "type": "string",
  25589. "pattern": "^evt_"
  25590. },
  25591. "seq": {
  25592. "type": "number"
  25593. },
  25594. "aggregateID": {
  25595. "type": "string"
  25596. },
  25597. "data": {
  25598. "type": "object",
  25599. "properties": {
  25600. "timestamp": {
  25601. "type": "number"
  25602. },
  25603. "sessionID": {
  25604. "type": "string",
  25605. "pattern": "^ses"
  25606. },
  25607. "callID": {
  25608. "type": "string"
  25609. },
  25610. "output": {
  25611. "type": "string"
  25612. }
  25613. },
  25614. "required": ["timestamp", "sessionID", "callID", "output"],
  25615. "additionalProperties": false
  25616. }
  25617. },
  25618. "required": ["type", "id", "seq", "aggregateID", "data"],
  25619. "additionalProperties": false
  25620. }
  25621. },
  25622. "required": ["type", "id", "syncEvent"],
  25623. "additionalProperties": false
  25624. },
  25625. "SyncEventSessionNextStepStarted": {
  25626. "type": "object",
  25627. "properties": {
  25628. "type": {
  25629. "type": "string",
  25630. "enum": ["sync"]
  25631. },
  25632. "id": {
  25633. "type": "string",
  25634. "pattern": "^evt_"
  25635. },
  25636. "syncEvent": {
  25637. "type": "object",
  25638. "properties": {
  25639. "type": {
  25640. "type": "string",
  25641. "enum": ["session.next.step.started.1"]
  25642. },
  25643. "id": {
  25644. "type": "string",
  25645. "pattern": "^evt_"
  25646. },
  25647. "seq": {
  25648. "type": "number"
  25649. },
  25650. "aggregateID": {
  25651. "type": "string"
  25652. },
  25653. "data": {
  25654. "type": "object",
  25655. "properties": {
  25656. "timestamp": {
  25657. "type": "number"
  25658. },
  25659. "sessionID": {
  25660. "type": "string",
  25661. "pattern": "^ses"
  25662. },
  25663. "assistantMessageID": {
  25664. "type": "string",
  25665. "pattern": "^msg_"
  25666. },
  25667. "agent": {
  25668. "type": "string"
  25669. },
  25670. "model": {
  25671. "$ref": "#/components/schemas/ModelRef"
  25672. },
  25673. "snapshot": {
  25674. "type": "string"
  25675. }
  25676. },
  25677. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25678. "additionalProperties": false
  25679. }
  25680. },
  25681. "required": ["type", "id", "seq", "aggregateID", "data"],
  25682. "additionalProperties": false
  25683. }
  25684. },
  25685. "required": ["type", "id", "syncEvent"],
  25686. "additionalProperties": false
  25687. },
  25688. "SyncEventSessionNextStepEnded": {
  25689. "type": "object",
  25690. "properties": {
  25691. "type": {
  25692. "type": "string",
  25693. "enum": ["sync"]
  25694. },
  25695. "id": {
  25696. "type": "string",
  25697. "pattern": "^evt_"
  25698. },
  25699. "syncEvent": {
  25700. "type": "object",
  25701. "properties": {
  25702. "type": {
  25703. "type": "string",
  25704. "enum": ["session.next.step.ended.2"]
  25705. },
  25706. "id": {
  25707. "type": "string",
  25708. "pattern": "^evt_"
  25709. },
  25710. "seq": {
  25711. "type": "number"
  25712. },
  25713. "aggregateID": {
  25714. "type": "string"
  25715. },
  25716. "data": {
  25717. "type": "object",
  25718. "properties": {
  25719. "timestamp": {
  25720. "type": "number"
  25721. },
  25722. "sessionID": {
  25723. "type": "string",
  25724. "pattern": "^ses"
  25725. },
  25726. "assistantMessageID": {
  25727. "type": "string",
  25728. "pattern": "^msg_"
  25729. },
  25730. "finish": {
  25731. "type": "string"
  25732. },
  25733. "cost": {
  25734. "type": "number"
  25735. },
  25736. "tokens": {
  25737. "type": "object",
  25738. "properties": {
  25739. "input": {
  25740. "type": "number"
  25741. },
  25742. "output": {
  25743. "type": "number"
  25744. },
  25745. "reasoning": {
  25746. "type": "number"
  25747. },
  25748. "cache": {
  25749. "type": "object",
  25750. "properties": {
  25751. "read": {
  25752. "type": "number"
  25753. },
  25754. "write": {
  25755. "type": "number"
  25756. }
  25757. },
  25758. "required": ["read", "write"],
  25759. "additionalProperties": false
  25760. }
  25761. },
  25762. "required": ["input", "output", "reasoning", "cache"],
  25763. "additionalProperties": false
  25764. },
  25765. "snapshot": {
  25766. "type": "string"
  25767. },
  25768. "files": {
  25769. "type": "array",
  25770. "items": {
  25771. "type": "string"
  25772. }
  25773. }
  25774. },
  25775. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25776. "additionalProperties": false
  25777. }
  25778. },
  25779. "required": ["type", "id", "seq", "aggregateID", "data"],
  25780. "additionalProperties": false
  25781. }
  25782. },
  25783. "required": ["type", "id", "syncEvent"],
  25784. "additionalProperties": false
  25785. },
  25786. "SyncEventSessionNextStepFailed": {
  25787. "type": "object",
  25788. "properties": {
  25789. "type": {
  25790. "type": "string",
  25791. "enum": ["sync"]
  25792. },
  25793. "id": {
  25794. "type": "string",
  25795. "pattern": "^evt_"
  25796. },
  25797. "syncEvent": {
  25798. "type": "object",
  25799. "properties": {
  25800. "type": {
  25801. "type": "string",
  25802. "enum": ["session.next.step.failed.2"]
  25803. },
  25804. "id": {
  25805. "type": "string",
  25806. "pattern": "^evt_"
  25807. },
  25808. "seq": {
  25809. "type": "number"
  25810. },
  25811. "aggregateID": {
  25812. "type": "string"
  25813. },
  25814. "data": {
  25815. "type": "object",
  25816. "properties": {
  25817. "timestamp": {
  25818. "type": "number"
  25819. },
  25820. "sessionID": {
  25821. "type": "string",
  25822. "pattern": "^ses"
  25823. },
  25824. "assistantMessageID": {
  25825. "type": "string",
  25826. "pattern": "^msg_"
  25827. },
  25828. "error": {
  25829. "$ref": "#/components/schemas/SessionErrorUnknown"
  25830. }
  25831. },
  25832. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25833. "additionalProperties": false
  25834. }
  25835. },
  25836. "required": ["type", "id", "seq", "aggregateID", "data"],
  25837. "additionalProperties": false
  25838. }
  25839. },
  25840. "required": ["type", "id", "syncEvent"],
  25841. "additionalProperties": false
  25842. },
  25843. "SyncEventSessionNextTextStarted": {
  25844. "type": "object",
  25845. "properties": {
  25846. "type": {
  25847. "type": "string",
  25848. "enum": ["sync"]
  25849. },
  25850. "id": {
  25851. "type": "string",
  25852. "pattern": "^evt_"
  25853. },
  25854. "syncEvent": {
  25855. "type": "object",
  25856. "properties": {
  25857. "type": {
  25858. "type": "string",
  25859. "enum": ["session.next.text.started.1"]
  25860. },
  25861. "id": {
  25862. "type": "string",
  25863. "pattern": "^evt_"
  25864. },
  25865. "seq": {
  25866. "type": "number"
  25867. },
  25868. "aggregateID": {
  25869. "type": "string"
  25870. },
  25871. "data": {
  25872. "type": "object",
  25873. "properties": {
  25874. "timestamp": {
  25875. "type": "number"
  25876. },
  25877. "sessionID": {
  25878. "type": "string",
  25879. "pattern": "^ses"
  25880. },
  25881. "assistantMessageID": {
  25882. "type": "string",
  25883. "pattern": "^msg_"
  25884. },
  25885. "textID": {
  25886. "type": "string"
  25887. }
  25888. },
  25889. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25890. "additionalProperties": false
  25891. }
  25892. },
  25893. "required": ["type", "id", "seq", "aggregateID", "data"],
  25894. "additionalProperties": false
  25895. }
  25896. },
  25897. "required": ["type", "id", "syncEvent"],
  25898. "additionalProperties": false
  25899. },
  25900. "SyncEventSessionNextTextEnded": {
  25901. "type": "object",
  25902. "properties": {
  25903. "type": {
  25904. "type": "string",
  25905. "enum": ["sync"]
  25906. },
  25907. "id": {
  25908. "type": "string",
  25909. "pattern": "^evt_"
  25910. },
  25911. "syncEvent": {
  25912. "type": "object",
  25913. "properties": {
  25914. "type": {
  25915. "type": "string",
  25916. "enum": ["session.next.text.ended.1"]
  25917. },
  25918. "id": {
  25919. "type": "string",
  25920. "pattern": "^evt_"
  25921. },
  25922. "seq": {
  25923. "type": "number"
  25924. },
  25925. "aggregateID": {
  25926. "type": "string"
  25927. },
  25928. "data": {
  25929. "type": "object",
  25930. "properties": {
  25931. "timestamp": {
  25932. "type": "number"
  25933. },
  25934. "sessionID": {
  25935. "type": "string",
  25936. "pattern": "^ses"
  25937. },
  25938. "assistantMessageID": {
  25939. "type": "string",
  25940. "pattern": "^msg_"
  25941. },
  25942. "textID": {
  25943. "type": "string"
  25944. },
  25945. "text": {
  25946. "type": "string"
  25947. }
  25948. },
  25949. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25950. "additionalProperties": false
  25951. }
  25952. },
  25953. "required": ["type", "id", "seq", "aggregateID", "data"],
  25954. "additionalProperties": false
  25955. }
  25956. },
  25957. "required": ["type", "id", "syncEvent"],
  25958. "additionalProperties": false
  25959. },
  25960. "SyncEventSessionNextReasoningStarted": {
  25961. "type": "object",
  25962. "properties": {
  25963. "type": {
  25964. "type": "string",
  25965. "enum": ["sync"]
  25966. },
  25967. "id": {
  25968. "type": "string",
  25969. "pattern": "^evt_"
  25970. },
  25971. "syncEvent": {
  25972. "type": "object",
  25973. "properties": {
  25974. "type": {
  25975. "type": "string",
  25976. "enum": ["session.next.reasoning.started.1"]
  25977. },
  25978. "id": {
  25979. "type": "string",
  25980. "pattern": "^evt_"
  25981. },
  25982. "seq": {
  25983. "type": "number"
  25984. },
  25985. "aggregateID": {
  25986. "type": "string"
  25987. },
  25988. "data": {
  25989. "type": "object",
  25990. "properties": {
  25991. "timestamp": {
  25992. "type": "number"
  25993. },
  25994. "sessionID": {
  25995. "type": "string",
  25996. "pattern": "^ses"
  25997. },
  25998. "assistantMessageID": {
  25999. "type": "string",
  26000. "pattern": "^msg_"
  26001. },
  26002. "reasoningID": {
  26003. "type": "string"
  26004. },
  26005. "providerMetadata": {
  26006. "$ref": "#/components/schemas/LLMProviderMetadata"
  26007. }
  26008. },
  26009. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26010. "additionalProperties": false
  26011. }
  26012. },
  26013. "required": ["type", "id", "seq", "aggregateID", "data"],
  26014. "additionalProperties": false
  26015. }
  26016. },
  26017. "required": ["type", "id", "syncEvent"],
  26018. "additionalProperties": false
  26019. },
  26020. "SyncEventSessionNextReasoningEnded": {
  26021. "type": "object",
  26022. "properties": {
  26023. "type": {
  26024. "type": "string",
  26025. "enum": ["sync"]
  26026. },
  26027. "id": {
  26028. "type": "string",
  26029. "pattern": "^evt_"
  26030. },
  26031. "syncEvent": {
  26032. "type": "object",
  26033. "properties": {
  26034. "type": {
  26035. "type": "string",
  26036. "enum": ["session.next.reasoning.ended.1"]
  26037. },
  26038. "id": {
  26039. "type": "string",
  26040. "pattern": "^evt_"
  26041. },
  26042. "seq": {
  26043. "type": "number"
  26044. },
  26045. "aggregateID": {
  26046. "type": "string"
  26047. },
  26048. "data": {
  26049. "type": "object",
  26050. "properties": {
  26051. "timestamp": {
  26052. "type": "number"
  26053. },
  26054. "sessionID": {
  26055. "type": "string",
  26056. "pattern": "^ses"
  26057. },
  26058. "assistantMessageID": {
  26059. "type": "string",
  26060. "pattern": "^msg_"
  26061. },
  26062. "reasoningID": {
  26063. "type": "string"
  26064. },
  26065. "text": {
  26066. "type": "string"
  26067. },
  26068. "providerMetadata": {
  26069. "$ref": "#/components/schemas/LLMProviderMetadata"
  26070. }
  26071. },
  26072. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26073. "additionalProperties": false
  26074. }
  26075. },
  26076. "required": ["type", "id", "seq", "aggregateID", "data"],
  26077. "additionalProperties": false
  26078. }
  26079. },
  26080. "required": ["type", "id", "syncEvent"],
  26081. "additionalProperties": false
  26082. },
  26083. "SyncEventSessionNextToolInputStarted": {
  26084. "type": "object",
  26085. "properties": {
  26086. "type": {
  26087. "type": "string",
  26088. "enum": ["sync"]
  26089. },
  26090. "id": {
  26091. "type": "string",
  26092. "pattern": "^evt_"
  26093. },
  26094. "syncEvent": {
  26095. "type": "object",
  26096. "properties": {
  26097. "type": {
  26098. "type": "string",
  26099. "enum": ["session.next.tool.input.started.1"]
  26100. },
  26101. "id": {
  26102. "type": "string",
  26103. "pattern": "^evt_"
  26104. },
  26105. "seq": {
  26106. "type": "number"
  26107. },
  26108. "aggregateID": {
  26109. "type": "string"
  26110. },
  26111. "data": {
  26112. "type": "object",
  26113. "properties": {
  26114. "timestamp": {
  26115. "type": "number"
  26116. },
  26117. "sessionID": {
  26118. "type": "string",
  26119. "pattern": "^ses"
  26120. },
  26121. "assistantMessageID": {
  26122. "type": "string",
  26123. "pattern": "^msg_"
  26124. },
  26125. "callID": {
  26126. "type": "string"
  26127. },
  26128. "name": {
  26129. "type": "string"
  26130. }
  26131. },
  26132. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26133. "additionalProperties": false
  26134. }
  26135. },
  26136. "required": ["type", "id", "seq", "aggregateID", "data"],
  26137. "additionalProperties": false
  26138. }
  26139. },
  26140. "required": ["type", "id", "syncEvent"],
  26141. "additionalProperties": false
  26142. },
  26143. "SyncEventSessionNextToolInputEnded": {
  26144. "type": "object",
  26145. "properties": {
  26146. "type": {
  26147. "type": "string",
  26148. "enum": ["sync"]
  26149. },
  26150. "id": {
  26151. "type": "string",
  26152. "pattern": "^evt_"
  26153. },
  26154. "syncEvent": {
  26155. "type": "object",
  26156. "properties": {
  26157. "type": {
  26158. "type": "string",
  26159. "enum": ["session.next.tool.input.ended.1"]
  26160. },
  26161. "id": {
  26162. "type": "string",
  26163. "pattern": "^evt_"
  26164. },
  26165. "seq": {
  26166. "type": "number"
  26167. },
  26168. "aggregateID": {
  26169. "type": "string"
  26170. },
  26171. "data": {
  26172. "type": "object",
  26173. "properties": {
  26174. "timestamp": {
  26175. "type": "number"
  26176. },
  26177. "sessionID": {
  26178. "type": "string",
  26179. "pattern": "^ses"
  26180. },
  26181. "assistantMessageID": {
  26182. "type": "string",
  26183. "pattern": "^msg_"
  26184. },
  26185. "callID": {
  26186. "type": "string"
  26187. },
  26188. "text": {
  26189. "type": "string"
  26190. }
  26191. },
  26192. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26193. "additionalProperties": false
  26194. }
  26195. },
  26196. "required": ["type", "id", "seq", "aggregateID", "data"],
  26197. "additionalProperties": false
  26198. }
  26199. },
  26200. "required": ["type", "id", "syncEvent"],
  26201. "additionalProperties": false
  26202. },
  26203. "SyncEventSessionNextToolCalled": {
  26204. "type": "object",
  26205. "properties": {
  26206. "type": {
  26207. "type": "string",
  26208. "enum": ["sync"]
  26209. },
  26210. "id": {
  26211. "type": "string",
  26212. "pattern": "^evt_"
  26213. },
  26214. "syncEvent": {
  26215. "type": "object",
  26216. "properties": {
  26217. "type": {
  26218. "type": "string",
  26219. "enum": ["session.next.tool.called.1"]
  26220. },
  26221. "id": {
  26222. "type": "string",
  26223. "pattern": "^evt_"
  26224. },
  26225. "seq": {
  26226. "type": "number"
  26227. },
  26228. "aggregateID": {
  26229. "type": "string"
  26230. },
  26231. "data": {
  26232. "type": "object",
  26233. "properties": {
  26234. "timestamp": {
  26235. "type": "number"
  26236. },
  26237. "sessionID": {
  26238. "type": "string",
  26239. "pattern": "^ses"
  26240. },
  26241. "assistantMessageID": {
  26242. "type": "string",
  26243. "pattern": "^msg_"
  26244. },
  26245. "callID": {
  26246. "type": "string"
  26247. },
  26248. "tool": {
  26249. "type": "string"
  26250. },
  26251. "input": {
  26252. "type": "object"
  26253. },
  26254. "provider": {
  26255. "type": "object",
  26256. "properties": {
  26257. "executed": {
  26258. "type": "boolean"
  26259. },
  26260. "metadata": {
  26261. "$ref": "#/components/schemas/LLMProviderMetadata"
  26262. }
  26263. },
  26264. "required": ["executed"],
  26265. "additionalProperties": false
  26266. }
  26267. },
  26268. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26269. "additionalProperties": false
  26270. }
  26271. },
  26272. "required": ["type", "id", "seq", "aggregateID", "data"],
  26273. "additionalProperties": false
  26274. }
  26275. },
  26276. "required": ["type", "id", "syncEvent"],
  26277. "additionalProperties": false
  26278. },
  26279. "SyncEventSessionNextToolProgress": {
  26280. "type": "object",
  26281. "properties": {
  26282. "type": {
  26283. "type": "string",
  26284. "enum": ["sync"]
  26285. },
  26286. "id": {
  26287. "type": "string",
  26288. "pattern": "^evt_"
  26289. },
  26290. "syncEvent": {
  26291. "type": "object",
  26292. "properties": {
  26293. "type": {
  26294. "type": "string",
  26295. "enum": ["session.next.tool.progress.1"]
  26296. },
  26297. "id": {
  26298. "type": "string",
  26299. "pattern": "^evt_"
  26300. },
  26301. "seq": {
  26302. "type": "number"
  26303. },
  26304. "aggregateID": {
  26305. "type": "string"
  26306. },
  26307. "data": {
  26308. "type": "object",
  26309. "properties": {
  26310. "timestamp": {
  26311. "type": "number"
  26312. },
  26313. "sessionID": {
  26314. "type": "string",
  26315. "pattern": "^ses"
  26316. },
  26317. "assistantMessageID": {
  26318. "type": "string",
  26319. "pattern": "^msg_"
  26320. },
  26321. "callID": {
  26322. "type": "string"
  26323. },
  26324. "structured": {
  26325. "type": "object"
  26326. },
  26327. "content": {
  26328. "type": "array",
  26329. "items": {
  26330. "$ref": "#/components/schemas/LLMToolContent"
  26331. }
  26332. }
  26333. },
  26334. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26335. "additionalProperties": false
  26336. }
  26337. },
  26338. "required": ["type", "id", "seq", "aggregateID", "data"],
  26339. "additionalProperties": false
  26340. }
  26341. },
  26342. "required": ["type", "id", "syncEvent"],
  26343. "additionalProperties": false
  26344. },
  26345. "SyncEventSessionNextToolSuccess": {
  26346. "type": "object",
  26347. "properties": {
  26348. "type": {
  26349. "type": "string",
  26350. "enum": ["sync"]
  26351. },
  26352. "id": {
  26353. "type": "string",
  26354. "pattern": "^evt_"
  26355. },
  26356. "syncEvent": {
  26357. "type": "object",
  26358. "properties": {
  26359. "type": {
  26360. "type": "string",
  26361. "enum": ["session.next.tool.success.1"]
  26362. },
  26363. "id": {
  26364. "type": "string",
  26365. "pattern": "^evt_"
  26366. },
  26367. "seq": {
  26368. "type": "number"
  26369. },
  26370. "aggregateID": {
  26371. "type": "string"
  26372. },
  26373. "data": {
  26374. "type": "object",
  26375. "properties": {
  26376. "timestamp": {
  26377. "type": "number"
  26378. },
  26379. "sessionID": {
  26380. "type": "string",
  26381. "pattern": "^ses"
  26382. },
  26383. "assistantMessageID": {
  26384. "type": "string",
  26385. "pattern": "^msg_"
  26386. },
  26387. "callID": {
  26388. "type": "string"
  26389. },
  26390. "structured": {
  26391. "type": "object"
  26392. },
  26393. "content": {
  26394. "type": "array",
  26395. "items": {
  26396. "$ref": "#/components/schemas/LLMToolContent"
  26397. }
  26398. },
  26399. "outputPaths": {
  26400. "type": "array",
  26401. "items": {
  26402. "type": "string"
  26403. }
  26404. },
  26405. "result": {},
  26406. "provider": {
  26407. "type": "object",
  26408. "properties": {
  26409. "executed": {
  26410. "type": "boolean"
  26411. },
  26412. "metadata": {
  26413. "$ref": "#/components/schemas/LLMProviderMetadata"
  26414. }
  26415. },
  26416. "required": ["executed"],
  26417. "additionalProperties": false
  26418. }
  26419. },
  26420. "required": [
  26421. "timestamp",
  26422. "sessionID",
  26423. "assistantMessageID",
  26424. "callID",
  26425. "structured",
  26426. "content",
  26427. "provider"
  26428. ],
  26429. "additionalProperties": false
  26430. }
  26431. },
  26432. "required": ["type", "id", "seq", "aggregateID", "data"],
  26433. "additionalProperties": false
  26434. }
  26435. },
  26436. "required": ["type", "id", "syncEvent"],
  26437. "additionalProperties": false
  26438. },
  26439. "SyncEventSessionNextToolFailed": {
  26440. "type": "object",
  26441. "properties": {
  26442. "type": {
  26443. "type": "string",
  26444. "enum": ["sync"]
  26445. },
  26446. "id": {
  26447. "type": "string",
  26448. "pattern": "^evt_"
  26449. },
  26450. "syncEvent": {
  26451. "type": "object",
  26452. "properties": {
  26453. "type": {
  26454. "type": "string",
  26455. "enum": ["session.next.tool.failed.1"]
  26456. },
  26457. "id": {
  26458. "type": "string",
  26459. "pattern": "^evt_"
  26460. },
  26461. "seq": {
  26462. "type": "number"
  26463. },
  26464. "aggregateID": {
  26465. "type": "string"
  26466. },
  26467. "data": {
  26468. "type": "object",
  26469. "properties": {
  26470. "timestamp": {
  26471. "type": "number"
  26472. },
  26473. "sessionID": {
  26474. "type": "string",
  26475. "pattern": "^ses"
  26476. },
  26477. "assistantMessageID": {
  26478. "type": "string",
  26479. "pattern": "^msg_"
  26480. },
  26481. "callID": {
  26482. "type": "string"
  26483. },
  26484. "error": {
  26485. "$ref": "#/components/schemas/SessionErrorUnknown"
  26486. },
  26487. "result": {},
  26488. "provider": {
  26489. "type": "object",
  26490. "properties": {
  26491. "executed": {
  26492. "type": "boolean"
  26493. },
  26494. "metadata": {
  26495. "$ref": "#/components/schemas/LLMProviderMetadata"
  26496. }
  26497. },
  26498. "required": ["executed"],
  26499. "additionalProperties": false
  26500. }
  26501. },
  26502. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26503. "additionalProperties": false
  26504. }
  26505. },
  26506. "required": ["type", "id", "seq", "aggregateID", "data"],
  26507. "additionalProperties": false
  26508. }
  26509. },
  26510. "required": ["type", "id", "syncEvent"],
  26511. "additionalProperties": false
  26512. },
  26513. "SyncEventSessionNextRetried": {
  26514. "type": "object",
  26515. "properties": {
  26516. "type": {
  26517. "type": "string",
  26518. "enum": ["sync"]
  26519. },
  26520. "id": {
  26521. "type": "string",
  26522. "pattern": "^evt_"
  26523. },
  26524. "syncEvent": {
  26525. "type": "object",
  26526. "properties": {
  26527. "type": {
  26528. "type": "string",
  26529. "enum": ["session.next.retried.1"]
  26530. },
  26531. "id": {
  26532. "type": "string",
  26533. "pattern": "^evt_"
  26534. },
  26535. "seq": {
  26536. "type": "number"
  26537. },
  26538. "aggregateID": {
  26539. "type": "string"
  26540. },
  26541. "data": {
  26542. "type": "object",
  26543. "properties": {
  26544. "timestamp": {
  26545. "type": "number"
  26546. },
  26547. "sessionID": {
  26548. "type": "string",
  26549. "pattern": "^ses"
  26550. },
  26551. "attempt": {
  26552. "type": "number"
  26553. },
  26554. "error": {
  26555. "$ref": "#/components/schemas/SessionNextRetry_error"
  26556. }
  26557. },
  26558. "required": ["timestamp", "sessionID", "attempt", "error"],
  26559. "additionalProperties": false
  26560. }
  26561. },
  26562. "required": ["type", "id", "seq", "aggregateID", "data"],
  26563. "additionalProperties": false
  26564. }
  26565. },
  26566. "required": ["type", "id", "syncEvent"],
  26567. "additionalProperties": false
  26568. },
  26569. "SyncEventSessionNextCompactionStarted": {
  26570. "type": "object",
  26571. "properties": {
  26572. "type": {
  26573. "type": "string",
  26574. "enum": ["sync"]
  26575. },
  26576. "id": {
  26577. "type": "string",
  26578. "pattern": "^evt_"
  26579. },
  26580. "syncEvent": {
  26581. "type": "object",
  26582. "properties": {
  26583. "type": {
  26584. "type": "string",
  26585. "enum": ["session.next.compaction.started.1"]
  26586. },
  26587. "id": {
  26588. "type": "string",
  26589. "pattern": "^evt_"
  26590. },
  26591. "seq": {
  26592. "type": "number"
  26593. },
  26594. "aggregateID": {
  26595. "type": "string"
  26596. },
  26597. "data": {
  26598. "type": "object",
  26599. "properties": {
  26600. "timestamp": {
  26601. "type": "number"
  26602. },
  26603. "sessionID": {
  26604. "type": "string",
  26605. "pattern": "^ses"
  26606. },
  26607. "messageID": {
  26608. "type": "string",
  26609. "pattern": "^msg_"
  26610. },
  26611. "reason": {
  26612. "type": "string",
  26613. "enum": ["auto", "manual"]
  26614. }
  26615. },
  26616. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26617. "additionalProperties": false
  26618. }
  26619. },
  26620. "required": ["type", "id", "seq", "aggregateID", "data"],
  26621. "additionalProperties": false
  26622. }
  26623. },
  26624. "required": ["type", "id", "syncEvent"],
  26625. "additionalProperties": false
  26626. },
  26627. "SyncEventSessionNextCompactionEnded": {
  26628. "type": "object",
  26629. "properties": {
  26630. "type": {
  26631. "type": "string",
  26632. "enum": ["sync"]
  26633. },
  26634. "id": {
  26635. "type": "string",
  26636. "pattern": "^evt_"
  26637. },
  26638. "syncEvent": {
  26639. "type": "object",
  26640. "properties": {
  26641. "type": {
  26642. "type": "string",
  26643. "enum": ["session.next.compaction.ended.1"]
  26644. },
  26645. "id": {
  26646. "type": "string",
  26647. "pattern": "^evt_"
  26648. },
  26649. "seq": {
  26650. "type": "number"
  26651. },
  26652. "aggregateID": {
  26653. "type": "string"
  26654. },
  26655. "data": {
  26656. "type": "object",
  26657. "properties": {
  26658. "timestamp": {
  26659. "type": "number"
  26660. },
  26661. "sessionID": {
  26662. "type": "string",
  26663. "pattern": "^ses"
  26664. },
  26665. "messageID": {
  26666. "type": "string",
  26667. "pattern": "^msg_"
  26668. },
  26669. "reason": {
  26670. "type": "string",
  26671. "enum": ["auto", "manual"]
  26672. },
  26673. "text": {
  26674. "type": "string"
  26675. },
  26676. "recent": {
  26677. "type": "string"
  26678. }
  26679. },
  26680. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26681. "additionalProperties": false
  26682. }
  26683. },
  26684. "required": ["type", "id", "seq", "aggregateID", "data"],
  26685. "additionalProperties": false
  26686. }
  26687. },
  26688. "required": ["type", "id", "syncEvent"],
  26689. "additionalProperties": false
  26690. },
  26691. "SyncEventSessionNextRevertStaged": {
  26692. "type": "object",
  26693. "properties": {
  26694. "type": {
  26695. "type": "string",
  26696. "enum": ["sync"]
  26697. },
  26698. "id": {
  26699. "type": "string",
  26700. "pattern": "^evt_"
  26701. },
  26702. "syncEvent": {
  26703. "type": "object",
  26704. "properties": {
  26705. "type": {
  26706. "type": "string",
  26707. "enum": ["session.next.revert.staged.1"]
  26708. },
  26709. "id": {
  26710. "type": "string",
  26711. "pattern": "^evt_"
  26712. },
  26713. "seq": {
  26714. "type": "number"
  26715. },
  26716. "aggregateID": {
  26717. "type": "string"
  26718. },
  26719. "data": {
  26720. "type": "object",
  26721. "properties": {
  26722. "timestamp": {
  26723. "type": "number"
  26724. },
  26725. "sessionID": {
  26726. "type": "string",
  26727. "pattern": "^ses"
  26728. },
  26729. "revert": {
  26730. "$ref": "#/components/schemas/RevertState"
  26731. }
  26732. },
  26733. "required": ["timestamp", "sessionID", "revert"],
  26734. "additionalProperties": false
  26735. }
  26736. },
  26737. "required": ["type", "id", "seq", "aggregateID", "data"],
  26738. "additionalProperties": false
  26739. }
  26740. },
  26741. "required": ["type", "id", "syncEvent"],
  26742. "additionalProperties": false
  26743. },
  26744. "SyncEventSessionNextRevertCleared": {
  26745. "type": "object",
  26746. "properties": {
  26747. "type": {
  26748. "type": "string",
  26749. "enum": ["sync"]
  26750. },
  26751. "id": {
  26752. "type": "string",
  26753. "pattern": "^evt_"
  26754. },
  26755. "syncEvent": {
  26756. "type": "object",
  26757. "properties": {
  26758. "type": {
  26759. "type": "string",
  26760. "enum": ["session.next.revert.cleared.1"]
  26761. },
  26762. "id": {
  26763. "type": "string",
  26764. "pattern": "^evt_"
  26765. },
  26766. "seq": {
  26767. "type": "number"
  26768. },
  26769. "aggregateID": {
  26770. "type": "string"
  26771. },
  26772. "data": {
  26773. "type": "object",
  26774. "properties": {
  26775. "timestamp": {
  26776. "type": "number"
  26777. },
  26778. "sessionID": {
  26779. "type": "string",
  26780. "pattern": "^ses"
  26781. }
  26782. },
  26783. "required": ["timestamp", "sessionID"],
  26784. "additionalProperties": false
  26785. }
  26786. },
  26787. "required": ["type", "id", "seq", "aggregateID", "data"],
  26788. "additionalProperties": false
  26789. }
  26790. },
  26791. "required": ["type", "id", "syncEvent"],
  26792. "additionalProperties": false
  26793. },
  26794. "SyncEventSessionNextRevertCommitted": {
  26795. "type": "object",
  26796. "properties": {
  26797. "type": {
  26798. "type": "string",
  26799. "enum": ["sync"]
  26800. },
  26801. "id": {
  26802. "type": "string",
  26803. "pattern": "^evt_"
  26804. },
  26805. "syncEvent": {
  26806. "type": "object",
  26807. "properties": {
  26808. "type": {
  26809. "type": "string",
  26810. "enum": ["session.next.revert.committed.1"]
  26811. },
  26812. "id": {
  26813. "type": "string",
  26814. "pattern": "^evt_"
  26815. },
  26816. "seq": {
  26817. "type": "number"
  26818. },
  26819. "aggregateID": {
  26820. "type": "string"
  26821. },
  26822. "data": {
  26823. "type": "object",
  26824. "properties": {
  26825. "timestamp": {
  26826. "type": "number"
  26827. },
  26828. "sessionID": {
  26829. "type": "string",
  26830. "pattern": "^ses"
  26831. },
  26832. "messageID": {
  26833. "type": "string",
  26834. "pattern": "^msg_"
  26835. }
  26836. },
  26837. "required": ["timestamp", "sessionID", "messageID"],
  26838. "additionalProperties": false
  26839. }
  26840. },
  26841. "required": ["type", "id", "seq", "aggregateID", "data"],
  26842. "additionalProperties": false
  26843. }
  26844. },
  26845. "required": ["type", "id", "syncEvent"],
  26846. "additionalProperties": false
  26847. },
  26848. "ConfigV2ReferenceGit": {
  26849. "type": "object",
  26850. "properties": {
  26851. "repository": {
  26852. "type": "string"
  26853. },
  26854. "branch": {
  26855. "type": "string"
  26856. },
  26857. "description": {
  26858. "type": "string"
  26859. },
  26860. "hidden": {
  26861. "type": "boolean"
  26862. }
  26863. },
  26864. "required": ["repository"],
  26865. "additionalProperties": false
  26866. },
  26867. "ConfigV2ReferenceLocal": {
  26868. "type": "object",
  26869. "properties": {
  26870. "path": {
  26871. "type": "string"
  26872. },
  26873. "description": {
  26874. "type": "string"
  26875. },
  26876. "hidden": {
  26877. "type": "boolean"
  26878. }
  26879. },
  26880. "required": ["path"],
  26881. "additionalProperties": false
  26882. },
  26883. "PolicyEffect": {
  26884. "type": "string",
  26885. "enum": ["allow", "deny"]
  26886. },
  26887. "ConfigV2ExperimentalPolicy": {
  26888. "type": "object",
  26889. "properties": {
  26890. "action": {
  26891. "type": "string",
  26892. "enum": ["provider.use"]
  26893. },
  26894. "effect": {
  26895. "$ref": "#/components/schemas/PolicyEffect"
  26896. },
  26897. "resource": {
  26898. "type": "string"
  26899. }
  26900. },
  26901. "required": ["action", "effect", "resource"],
  26902. "additionalProperties": false
  26903. },
  26904. "ProjectDirectories": {
  26905. "type": "array",
  26906. "items": {
  26907. "type": "object",
  26908. "properties": {
  26909. "directory": {
  26910. "type": "string"
  26911. },
  26912. "strategy": {
  26913. "type": "string"
  26914. }
  26915. },
  26916. "required": ["directory"],
  26917. "additionalProperties": false
  26918. }
  26919. },
  26920. "PtyTicketConnectToken": {
  26921. "type": "object",
  26922. "properties": {
  26923. "ticket": {
  26924. "type": "string"
  26925. },
  26926. "expires_in": {
  26927. "type": "integer",
  26928. "exclusiveMinimum": 0
  26929. }
  26930. },
  26931. "required": ["ticket", "expires_in"],
  26932. "additionalProperties": false
  26933. },
  26934. "WorkspaceEventConnectionStatus": {
  26935. "type": "object",
  26936. "properties": {
  26937. "workspaceID": {
  26938. "type": "string",
  26939. "pattern": "^wrk"
  26940. },
  26941. "status": {
  26942. "type": "string",
  26943. "enum": ["connected", "connecting", "disconnected", "error"]
  26944. }
  26945. },
  26946. "required": ["workspaceID", "status"],
  26947. "additionalProperties": false
  26948. },
  26949. "LocationInfo": {
  26950. "type": "object",
  26951. "properties": {
  26952. "directory": {
  26953. "type": "string"
  26954. },
  26955. "workspaceID": {
  26956. "type": "string",
  26957. "pattern": "^wrk"
  26958. },
  26959. "project": {
  26960. "type": "object",
  26961. "properties": {
  26962. "id": {
  26963. "type": "string"
  26964. },
  26965. "directory": {
  26966. "type": "string"
  26967. }
  26968. },
  26969. "required": ["id", "directory"],
  26970. "additionalProperties": false
  26971. }
  26972. },
  26973. "required": ["directory", "project"],
  26974. "additionalProperties": false
  26975. },
  26976. "ProviderRequest": {
  26977. "type": "object",
  26978. "properties": {
  26979. "headers": {
  26980. "type": "object",
  26981. "additionalProperties": {
  26982. "type": "string"
  26983. }
  26984. },
  26985. "body": {
  26986. "type": "object"
  26987. }
  26988. },
  26989. "required": ["headers", "body"],
  26990. "additionalProperties": false
  26991. },
  26992. "AgentColor": {
  26993. "anyOf": [
  26994. {
  26995. "type": "string",
  26996. "pattern": "^#[0-9a-fA-F]{6}$"
  26997. },
  26998. {
  26999. "type": "string",
  27000. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  27001. }
  27002. ]
  27003. },
  27004. "PermissionV2Effect": {
  27005. "type": "string",
  27006. "enum": ["allow", "deny", "ask"]
  27007. },
  27008. "PermissionV2Rule": {
  27009. "type": "object",
  27010. "properties": {
  27011. "action": {
  27012. "type": "string"
  27013. },
  27014. "resource": {
  27015. "type": "string"
  27016. },
  27017. "effect": {
  27018. "$ref": "#/components/schemas/PermissionV2Effect"
  27019. }
  27020. },
  27021. "required": ["action", "resource", "effect"],
  27022. "additionalProperties": false
  27023. },
  27024. "PermissionV2Ruleset": {
  27025. "type": "array",
  27026. "items": {
  27027. "$ref": "#/components/schemas/PermissionV2Rule"
  27028. }
  27029. },
  27030. "AgentV2Info": {
  27031. "type": "object",
  27032. "properties": {
  27033. "id": {
  27034. "type": "string"
  27035. },
  27036. "model": {
  27037. "$ref": "#/components/schemas/ModelRef"
  27038. },
  27039. "request": {
  27040. "$ref": "#/components/schemas/ProviderRequest"
  27041. },
  27042. "system": {
  27043. "type": "string"
  27044. },
  27045. "description": {
  27046. "type": "string"
  27047. },
  27048. "mode": {
  27049. "type": "string",
  27050. "enum": ["subagent", "primary", "all"]
  27051. },
  27052. "hidden": {
  27053. "type": "boolean"
  27054. },
  27055. "color": {
  27056. "$ref": "#/components/schemas/AgentColor"
  27057. },
  27058. "steps": {
  27059. "type": "integer",
  27060. "exclusiveMinimum": 0
  27061. },
  27062. "permissions": {
  27063. "$ref": "#/components/schemas/PermissionV2Ruleset"
  27064. }
  27065. },
  27066. "required": ["id", "request", "mode", "hidden", "permissions"],
  27067. "additionalProperties": false
  27068. },
  27069. "SessionV2Info": {
  27070. "type": "object",
  27071. "properties": {
  27072. "id": {
  27073. "type": "string",
  27074. "pattern": "^ses"
  27075. },
  27076. "parentID": {
  27077. "type": "string",
  27078. "pattern": "^ses"
  27079. },
  27080. "projectID": {
  27081. "type": "string"
  27082. },
  27083. "agent": {
  27084. "type": "string"
  27085. },
  27086. "model": {
  27087. "$ref": "#/components/schemas/ModelRef"
  27088. },
  27089. "cost": {
  27090. "type": "number"
  27091. },
  27092. "tokens": {
  27093. "type": "object",
  27094. "properties": {
  27095. "input": {
  27096. "type": "number"
  27097. },
  27098. "output": {
  27099. "type": "number"
  27100. },
  27101. "reasoning": {
  27102. "type": "number"
  27103. },
  27104. "cache": {
  27105. "type": "object",
  27106. "properties": {
  27107. "read": {
  27108. "type": "number"
  27109. },
  27110. "write": {
  27111. "type": "number"
  27112. }
  27113. },
  27114. "required": ["read", "write"],
  27115. "additionalProperties": false
  27116. }
  27117. },
  27118. "required": ["input", "output", "reasoning", "cache"],
  27119. "additionalProperties": false
  27120. },
  27121. "time": {
  27122. "type": "object",
  27123. "properties": {
  27124. "created": {
  27125. "type": "number"
  27126. },
  27127. "updated": {
  27128. "type": "number"
  27129. },
  27130. "archived": {
  27131. "type": "number"
  27132. }
  27133. },
  27134. "required": ["created", "updated"],
  27135. "additionalProperties": false
  27136. },
  27137. "title": {
  27138. "type": "string"
  27139. },
  27140. "location": {
  27141. "$ref": "#/components/schemas/LocationRef"
  27142. },
  27143. "subpath": {
  27144. "type": "string"
  27145. },
  27146. "revert": {
  27147. "$ref": "#/components/schemas/RevertState"
  27148. }
  27149. },
  27150. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  27151. "additionalProperties": false
  27152. },
  27153. "PromptInputFileAttachment": {
  27154. "type": "object",
  27155. "properties": {
  27156. "uri": {
  27157. "type": "string"
  27158. },
  27159. "name": {
  27160. "type": "string"
  27161. },
  27162. "description": {
  27163. "type": "string"
  27164. },
  27165. "source": {
  27166. "$ref": "#/components/schemas/PromptSource"
  27167. }
  27168. },
  27169. "required": ["uri"],
  27170. "additionalProperties": false
  27171. },
  27172. "SessionInputAdmitted": {
  27173. "type": "object",
  27174. "properties": {
  27175. "admittedSeq": {
  27176. "type": "integer",
  27177. "minimum": 0
  27178. },
  27179. "id": {
  27180. "type": "string",
  27181. "pattern": "^msg_"
  27182. },
  27183. "sessionID": {
  27184. "type": "string",
  27185. "pattern": "^ses"
  27186. },
  27187. "prompt": {
  27188. "$ref": "#/components/schemas/Prompt"
  27189. },
  27190. "delivery": {
  27191. "type": "string",
  27192. "enum": ["steer", "queue"]
  27193. },
  27194. "timeCreated": {
  27195. "type": "number"
  27196. },
  27197. "promotedSeq": {
  27198. "type": "integer",
  27199. "minimum": 0
  27200. }
  27201. },
  27202. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27203. "additionalProperties": false
  27204. },
  27205. "SessionMessageAgentSwitched": {
  27206. "type": "object",
  27207. "properties": {
  27208. "id": {
  27209. "type": "string",
  27210. "pattern": "^msg_"
  27211. },
  27212. "metadata": {
  27213. "type": "object"
  27214. },
  27215. "time": {
  27216. "type": "object",
  27217. "properties": {
  27218. "created": {
  27219. "type": "number"
  27220. }
  27221. },
  27222. "required": ["created"],
  27223. "additionalProperties": false
  27224. },
  27225. "type": {
  27226. "type": "string",
  27227. "enum": ["agent-switched"]
  27228. },
  27229. "agent": {
  27230. "type": "string"
  27231. }
  27232. },
  27233. "required": ["id", "time", "type", "agent"],
  27234. "additionalProperties": false
  27235. },
  27236. "SessionMessageModelSwitched": {
  27237. "type": "object",
  27238. "properties": {
  27239. "id": {
  27240. "type": "string",
  27241. "pattern": "^msg_"
  27242. },
  27243. "metadata": {
  27244. "type": "object"
  27245. },
  27246. "time": {
  27247. "type": "object",
  27248. "properties": {
  27249. "created": {
  27250. "type": "number"
  27251. }
  27252. },
  27253. "required": ["created"],
  27254. "additionalProperties": false
  27255. },
  27256. "type": {
  27257. "type": "string",
  27258. "enum": ["model-switched"]
  27259. },
  27260. "model": {
  27261. "$ref": "#/components/schemas/ModelRef"
  27262. }
  27263. },
  27264. "required": ["id", "time", "type", "model"],
  27265. "additionalProperties": false
  27266. },
  27267. "SessionMessageUser": {
  27268. "type": "object",
  27269. "properties": {
  27270. "id": {
  27271. "type": "string",
  27272. "pattern": "^msg_"
  27273. },
  27274. "metadata": {
  27275. "type": "object"
  27276. },
  27277. "time": {
  27278. "type": "object",
  27279. "properties": {
  27280. "created": {
  27281. "type": "number"
  27282. }
  27283. },
  27284. "required": ["created"],
  27285. "additionalProperties": false
  27286. },
  27287. "text": {
  27288. "type": "string"
  27289. },
  27290. "files": {
  27291. "type": "array",
  27292. "items": {
  27293. "$ref": "#/components/schemas/PromptFileAttachment"
  27294. }
  27295. },
  27296. "agents": {
  27297. "type": "array",
  27298. "items": {
  27299. "$ref": "#/components/schemas/PromptAgentAttachment"
  27300. }
  27301. },
  27302. "type": {
  27303. "type": "string",
  27304. "enum": ["user"]
  27305. }
  27306. },
  27307. "required": ["id", "time", "text", "type"],
  27308. "additionalProperties": false
  27309. },
  27310. "SessionMessageSynthetic": {
  27311. "type": "object",
  27312. "properties": {
  27313. "id": {
  27314. "type": "string",
  27315. "pattern": "^msg_"
  27316. },
  27317. "metadata": {
  27318. "type": "object"
  27319. },
  27320. "time": {
  27321. "type": "object",
  27322. "properties": {
  27323. "created": {
  27324. "type": "number"
  27325. }
  27326. },
  27327. "required": ["created"],
  27328. "additionalProperties": false
  27329. },
  27330. "sessionID": {
  27331. "type": "string",
  27332. "pattern": "^ses"
  27333. },
  27334. "text": {
  27335. "type": "string"
  27336. },
  27337. "type": {
  27338. "type": "string",
  27339. "enum": ["session.synthetic"]
  27340. }
  27341. },
  27342. "required": ["id", "time", "sessionID", "text", "type"],
  27343. "additionalProperties": false
  27344. },
  27345. "SessionMessageSystem": {
  27346. "type": "object",
  27347. "properties": {
  27348. "id": {
  27349. "type": "string",
  27350. "pattern": "^msg_"
  27351. },
  27352. "metadata": {
  27353. "type": "object"
  27354. },
  27355. "time": {
  27356. "type": "object",
  27357. "properties": {
  27358. "created": {
  27359. "type": "number"
  27360. }
  27361. },
  27362. "required": ["created"],
  27363. "additionalProperties": false
  27364. },
  27365. "type": {
  27366. "type": "string",
  27367. "enum": ["system"]
  27368. },
  27369. "text": {
  27370. "type": "string"
  27371. }
  27372. },
  27373. "required": ["id", "time", "type", "text"],
  27374. "additionalProperties": false
  27375. },
  27376. "SessionMessageShell": {
  27377. "type": "object",
  27378. "properties": {
  27379. "id": {
  27380. "type": "string",
  27381. "pattern": "^msg_"
  27382. },
  27383. "metadata": {
  27384. "type": "object"
  27385. },
  27386. "time": {
  27387. "type": "object",
  27388. "properties": {
  27389. "created": {
  27390. "type": "number"
  27391. },
  27392. "completed": {
  27393. "type": "number"
  27394. }
  27395. },
  27396. "required": ["created"],
  27397. "additionalProperties": false
  27398. },
  27399. "type": {
  27400. "type": "string",
  27401. "enum": ["shell"]
  27402. },
  27403. "callID": {
  27404. "type": "string"
  27405. },
  27406. "command": {
  27407. "type": "string"
  27408. },
  27409. "output": {
  27410. "type": "string"
  27411. }
  27412. },
  27413. "required": ["id", "time", "type", "callID", "command", "output"],
  27414. "additionalProperties": false
  27415. },
  27416. "SessionMessageAssistantText": {
  27417. "type": "object",
  27418. "properties": {
  27419. "type": {
  27420. "type": "string",
  27421. "enum": ["text"]
  27422. },
  27423. "id": {
  27424. "type": "string"
  27425. },
  27426. "text": {
  27427. "type": "string"
  27428. }
  27429. },
  27430. "required": ["type", "id", "text"],
  27431. "additionalProperties": false
  27432. },
  27433. "SessionMessageAssistantReasoning": {
  27434. "type": "object",
  27435. "properties": {
  27436. "type": {
  27437. "type": "string",
  27438. "enum": ["reasoning"]
  27439. },
  27440. "id": {
  27441. "type": "string"
  27442. },
  27443. "text": {
  27444. "type": "string"
  27445. },
  27446. "providerMetadata": {
  27447. "$ref": "#/components/schemas/LLMProviderMetadata"
  27448. },
  27449. "time": {
  27450. "type": "object",
  27451. "properties": {
  27452. "created": {
  27453. "type": "number"
  27454. },
  27455. "completed": {
  27456. "type": "number"
  27457. }
  27458. },
  27459. "required": ["created"],
  27460. "additionalProperties": false
  27461. }
  27462. },
  27463. "required": ["type", "id", "text"],
  27464. "additionalProperties": false
  27465. },
  27466. "SessionMessageToolStatePending": {
  27467. "type": "object",
  27468. "properties": {
  27469. "status": {
  27470. "type": "string",
  27471. "enum": ["pending"]
  27472. },
  27473. "input": {
  27474. "type": "string"
  27475. }
  27476. },
  27477. "required": ["status", "input"],
  27478. "additionalProperties": false
  27479. },
  27480. "SessionMessageToolStateRunning": {
  27481. "type": "object",
  27482. "properties": {
  27483. "status": {
  27484. "type": "string",
  27485. "enum": ["running"]
  27486. },
  27487. "input": {
  27488. "type": "object"
  27489. },
  27490. "structured": {
  27491. "type": "object"
  27492. },
  27493. "content": {
  27494. "type": "array",
  27495. "items": {
  27496. "$ref": "#/components/schemas/LLMToolContent"
  27497. }
  27498. }
  27499. },
  27500. "required": ["status", "input", "structured", "content"],
  27501. "additionalProperties": false
  27502. },
  27503. "SessionMessageToolStateCompleted": {
  27504. "type": "object",
  27505. "properties": {
  27506. "status": {
  27507. "type": "string",
  27508. "enum": ["completed"]
  27509. },
  27510. "input": {
  27511. "type": "object"
  27512. },
  27513. "attachments": {
  27514. "type": "array",
  27515. "items": {
  27516. "$ref": "#/components/schemas/PromptFileAttachment"
  27517. }
  27518. },
  27519. "content": {
  27520. "type": "array",
  27521. "items": {
  27522. "$ref": "#/components/schemas/LLMToolContent"
  27523. }
  27524. },
  27525. "outputPaths": {
  27526. "type": "array",
  27527. "items": {
  27528. "type": "string"
  27529. }
  27530. },
  27531. "structured": {
  27532. "type": "object"
  27533. },
  27534. "result": {}
  27535. },
  27536. "required": ["status", "input", "content", "structured"],
  27537. "additionalProperties": false
  27538. },
  27539. "SessionMessageToolStateError": {
  27540. "type": "object",
  27541. "properties": {
  27542. "status": {
  27543. "type": "string",
  27544. "enum": ["error"]
  27545. },
  27546. "input": {
  27547. "type": "object"
  27548. },
  27549. "content": {
  27550. "type": "array",
  27551. "items": {
  27552. "$ref": "#/components/schemas/LLMToolContent"
  27553. }
  27554. },
  27555. "structured": {
  27556. "type": "object"
  27557. },
  27558. "error": {
  27559. "$ref": "#/components/schemas/SessionErrorUnknown"
  27560. },
  27561. "result": {}
  27562. },
  27563. "required": ["status", "input", "content", "structured", "error"],
  27564. "additionalProperties": false
  27565. },
  27566. "SessionMessageAssistantTool": {
  27567. "type": "object",
  27568. "properties": {
  27569. "type": {
  27570. "type": "string",
  27571. "enum": ["tool"]
  27572. },
  27573. "id": {
  27574. "type": "string"
  27575. },
  27576. "name": {
  27577. "type": "string"
  27578. },
  27579. "provider": {
  27580. "type": "object",
  27581. "properties": {
  27582. "executed": {
  27583. "type": "boolean"
  27584. },
  27585. "metadata": {
  27586. "$ref": "#/components/schemas/LLMProviderMetadata"
  27587. },
  27588. "resultMetadata": {
  27589. "$ref": "#/components/schemas/LLMProviderMetadata"
  27590. }
  27591. },
  27592. "required": ["executed"],
  27593. "additionalProperties": false
  27594. },
  27595. "state": {
  27596. "anyOf": [
  27597. {
  27598. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27599. },
  27600. {
  27601. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27602. },
  27603. {
  27604. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27605. },
  27606. {
  27607. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27608. }
  27609. ]
  27610. },
  27611. "time": {
  27612. "type": "object",
  27613. "properties": {
  27614. "created": {
  27615. "type": "number"
  27616. },
  27617. "ran": {
  27618. "type": "number"
  27619. },
  27620. "completed": {
  27621. "type": "number"
  27622. },
  27623. "pruned": {
  27624. "type": "number"
  27625. }
  27626. },
  27627. "required": ["created"],
  27628. "additionalProperties": false
  27629. }
  27630. },
  27631. "required": ["type", "id", "name", "state", "time"],
  27632. "additionalProperties": false
  27633. },
  27634. "SessionMessageAssistant": {
  27635. "type": "object",
  27636. "properties": {
  27637. "id": {
  27638. "type": "string",
  27639. "pattern": "^msg_"
  27640. },
  27641. "metadata": {
  27642. "type": "object"
  27643. },
  27644. "time": {
  27645. "type": "object",
  27646. "properties": {
  27647. "created": {
  27648. "type": "number"
  27649. },
  27650. "completed": {
  27651. "type": "number"
  27652. }
  27653. },
  27654. "required": ["created"],
  27655. "additionalProperties": false
  27656. },
  27657. "type": {
  27658. "type": "string",
  27659. "enum": ["assistant"]
  27660. },
  27661. "agent": {
  27662. "type": "string"
  27663. },
  27664. "model": {
  27665. "$ref": "#/components/schemas/ModelRef"
  27666. },
  27667. "content": {
  27668. "type": "array",
  27669. "items": {
  27670. "anyOf": [
  27671. {
  27672. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27673. },
  27674. {
  27675. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27676. },
  27677. {
  27678. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27679. }
  27680. ]
  27681. }
  27682. },
  27683. "snapshot": {
  27684. "type": "object",
  27685. "properties": {
  27686. "start": {
  27687. "type": "string"
  27688. },
  27689. "end": {
  27690. "type": "string"
  27691. },
  27692. "files": {
  27693. "type": "array",
  27694. "items": {
  27695. "type": "string"
  27696. }
  27697. }
  27698. },
  27699. "additionalProperties": false
  27700. },
  27701. "finish": {
  27702. "type": "string"
  27703. },
  27704. "cost": {
  27705. "type": "number"
  27706. },
  27707. "tokens": {
  27708. "type": "object",
  27709. "properties": {
  27710. "input": {
  27711. "type": "number"
  27712. },
  27713. "output": {
  27714. "type": "number"
  27715. },
  27716. "reasoning": {
  27717. "type": "number"
  27718. },
  27719. "cache": {
  27720. "type": "object",
  27721. "properties": {
  27722. "read": {
  27723. "type": "number"
  27724. },
  27725. "write": {
  27726. "type": "number"
  27727. }
  27728. },
  27729. "required": ["read", "write"],
  27730. "additionalProperties": false
  27731. }
  27732. },
  27733. "required": ["input", "output", "reasoning", "cache"],
  27734. "additionalProperties": false
  27735. },
  27736. "error": {
  27737. "$ref": "#/components/schemas/SessionErrorUnknown"
  27738. }
  27739. },
  27740. "required": ["id", "time", "type", "agent", "model", "content"],
  27741. "additionalProperties": false
  27742. },
  27743. "SessionMessageCompaction": {
  27744. "type": "object",
  27745. "properties": {
  27746. "type": {
  27747. "type": "string",
  27748. "enum": ["compaction"]
  27749. },
  27750. "reason": {
  27751. "type": "string",
  27752. "enum": ["auto", "manual"]
  27753. },
  27754. "summary": {
  27755. "type": "string"
  27756. },
  27757. "recent": {
  27758. "type": "string"
  27759. },
  27760. "id": {
  27761. "type": "string",
  27762. "pattern": "^msg_"
  27763. },
  27764. "metadata": {
  27765. "type": "object"
  27766. },
  27767. "time": {
  27768. "type": "object",
  27769. "properties": {
  27770. "created": {
  27771. "type": "number"
  27772. }
  27773. },
  27774. "required": ["created"],
  27775. "additionalProperties": false
  27776. }
  27777. },
  27778. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27779. "additionalProperties": false
  27780. },
  27781. "SessionMessage": {
  27782. "anyOf": [
  27783. {
  27784. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27785. },
  27786. {
  27787. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27788. },
  27789. {
  27790. "$ref": "#/components/schemas/SessionMessageUser"
  27791. },
  27792. {
  27793. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27794. },
  27795. {
  27796. "$ref": "#/components/schemas/SessionMessageSystem"
  27797. },
  27798. {
  27799. "$ref": "#/components/schemas/SessionMessageShell"
  27800. },
  27801. {
  27802. "$ref": "#/components/schemas/SessionMessageAssistant"
  27803. },
  27804. {
  27805. "$ref": "#/components/schemas/SessionMessageCompaction"
  27806. }
  27807. ]
  27808. },
  27809. "SessionNextAgentSwitched": {
  27810. "type": "object",
  27811. "properties": {
  27812. "id": {
  27813. "type": "string",
  27814. "pattern": "^evt_"
  27815. },
  27816. "metadata": {
  27817. "type": "object"
  27818. },
  27819. "type": {
  27820. "type": "string",
  27821. "enum": ["session.next.agent.switched"]
  27822. },
  27823. "durable": {
  27824. "type": "object",
  27825. "properties": {
  27826. "aggregateID": {
  27827. "type": "string"
  27828. },
  27829. "seq": {
  27830. "type": "integer"
  27831. },
  27832. "version": {
  27833. "type": "integer"
  27834. }
  27835. },
  27836. "required": ["aggregateID", "seq", "version"],
  27837. "additionalProperties": false
  27838. },
  27839. "location": {
  27840. "$ref": "#/components/schemas/LocationRef"
  27841. },
  27842. "data": {
  27843. "type": "object",
  27844. "properties": {
  27845. "timestamp": {
  27846. "type": "number"
  27847. },
  27848. "sessionID": {
  27849. "type": "string",
  27850. "pattern": "^ses"
  27851. },
  27852. "messageID": {
  27853. "type": "string",
  27854. "pattern": "^msg_"
  27855. },
  27856. "agent": {
  27857. "type": "string"
  27858. }
  27859. },
  27860. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27861. "additionalProperties": false
  27862. }
  27863. },
  27864. "required": ["id", "type", "data"],
  27865. "additionalProperties": false
  27866. },
  27867. "SessionNextModelSwitched": {
  27868. "type": "object",
  27869. "properties": {
  27870. "id": {
  27871. "type": "string",
  27872. "pattern": "^evt_"
  27873. },
  27874. "metadata": {
  27875. "type": "object"
  27876. },
  27877. "type": {
  27878. "type": "string",
  27879. "enum": ["session.next.model.switched"]
  27880. },
  27881. "durable": {
  27882. "type": "object",
  27883. "properties": {
  27884. "aggregateID": {
  27885. "type": "string"
  27886. },
  27887. "seq": {
  27888. "type": "integer"
  27889. },
  27890. "version": {
  27891. "type": "integer"
  27892. }
  27893. },
  27894. "required": ["aggregateID", "seq", "version"],
  27895. "additionalProperties": false
  27896. },
  27897. "location": {
  27898. "$ref": "#/components/schemas/LocationRef"
  27899. },
  27900. "data": {
  27901. "type": "object",
  27902. "properties": {
  27903. "timestamp": {
  27904. "type": "number"
  27905. },
  27906. "sessionID": {
  27907. "type": "string",
  27908. "pattern": "^ses"
  27909. },
  27910. "messageID": {
  27911. "type": "string",
  27912. "pattern": "^msg_"
  27913. },
  27914. "model": {
  27915. "$ref": "#/components/schemas/ModelRef"
  27916. }
  27917. },
  27918. "required": ["timestamp", "sessionID", "messageID", "model"],
  27919. "additionalProperties": false
  27920. }
  27921. },
  27922. "required": ["id", "type", "data"],
  27923. "additionalProperties": false
  27924. },
  27925. "SessionNextMoved": {
  27926. "type": "object",
  27927. "properties": {
  27928. "id": {
  27929. "type": "string",
  27930. "pattern": "^evt_"
  27931. },
  27932. "metadata": {
  27933. "type": "object"
  27934. },
  27935. "type": {
  27936. "type": "string",
  27937. "enum": ["session.next.moved"]
  27938. },
  27939. "durable": {
  27940. "type": "object",
  27941. "properties": {
  27942. "aggregateID": {
  27943. "type": "string"
  27944. },
  27945. "seq": {
  27946. "type": "integer"
  27947. },
  27948. "version": {
  27949. "type": "integer"
  27950. }
  27951. },
  27952. "required": ["aggregateID", "seq", "version"],
  27953. "additionalProperties": false
  27954. },
  27955. "location": {
  27956. "$ref": "#/components/schemas/LocationRef"
  27957. },
  27958. "data": {
  27959. "type": "object",
  27960. "properties": {
  27961. "timestamp": {
  27962. "type": "number"
  27963. },
  27964. "sessionID": {
  27965. "type": "string",
  27966. "pattern": "^ses"
  27967. },
  27968. "location": {
  27969. "$ref": "#/components/schemas/LocationRef"
  27970. },
  27971. "subdirectory": {
  27972. "type": "string"
  27973. }
  27974. },
  27975. "required": ["timestamp", "sessionID", "location"],
  27976. "additionalProperties": false
  27977. }
  27978. },
  27979. "required": ["id", "type", "data"],
  27980. "additionalProperties": false
  27981. },
  27982. "SessionNextPrompted": {
  27983. "type": "object",
  27984. "properties": {
  27985. "id": {
  27986. "type": "string",
  27987. "pattern": "^evt_"
  27988. },
  27989. "metadata": {
  27990. "type": "object"
  27991. },
  27992. "type": {
  27993. "type": "string",
  27994. "enum": ["session.next.prompted"]
  27995. },
  27996. "durable": {
  27997. "type": "object",
  27998. "properties": {
  27999. "aggregateID": {
  28000. "type": "string"
  28001. },
  28002. "seq": {
  28003. "type": "integer"
  28004. },
  28005. "version": {
  28006. "type": "integer"
  28007. }
  28008. },
  28009. "required": ["aggregateID", "seq", "version"],
  28010. "additionalProperties": false
  28011. },
  28012. "location": {
  28013. "$ref": "#/components/schemas/LocationRef"
  28014. },
  28015. "data": {
  28016. "type": "object",
  28017. "properties": {
  28018. "timestamp": {
  28019. "type": "number"
  28020. },
  28021. "sessionID": {
  28022. "type": "string",
  28023. "pattern": "^ses"
  28024. },
  28025. "messageID": {
  28026. "type": "string",
  28027. "pattern": "^msg_"
  28028. },
  28029. "prompt": {
  28030. "$ref": "#/components/schemas/Prompt"
  28031. },
  28032. "delivery": {
  28033. "type": "string",
  28034. "enum": ["steer", "queue"]
  28035. }
  28036. },
  28037. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28038. "additionalProperties": false
  28039. }
  28040. },
  28041. "required": ["id", "type", "data"],
  28042. "additionalProperties": false
  28043. },
  28044. "SessionNextPromptAdmitted": {
  28045. "type": "object",
  28046. "properties": {
  28047. "id": {
  28048. "type": "string",
  28049. "pattern": "^evt_"
  28050. },
  28051. "metadata": {
  28052. "type": "object"
  28053. },
  28054. "type": {
  28055. "type": "string",
  28056. "enum": ["session.next.prompt.admitted"]
  28057. },
  28058. "durable": {
  28059. "type": "object",
  28060. "properties": {
  28061. "aggregateID": {
  28062. "type": "string"
  28063. },
  28064. "seq": {
  28065. "type": "integer"
  28066. },
  28067. "version": {
  28068. "type": "integer"
  28069. }
  28070. },
  28071. "required": ["aggregateID", "seq", "version"],
  28072. "additionalProperties": false
  28073. },
  28074. "location": {
  28075. "$ref": "#/components/schemas/LocationRef"
  28076. },
  28077. "data": {
  28078. "type": "object",
  28079. "properties": {
  28080. "timestamp": {
  28081. "type": "number"
  28082. },
  28083. "sessionID": {
  28084. "type": "string",
  28085. "pattern": "^ses"
  28086. },
  28087. "messageID": {
  28088. "type": "string",
  28089. "pattern": "^msg_"
  28090. },
  28091. "prompt": {
  28092. "$ref": "#/components/schemas/Prompt"
  28093. },
  28094. "delivery": {
  28095. "type": "string",
  28096. "enum": ["steer", "queue"]
  28097. }
  28098. },
  28099. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28100. "additionalProperties": false
  28101. }
  28102. },
  28103. "required": ["id", "type", "data"],
  28104. "additionalProperties": false
  28105. },
  28106. "SessionNextContextUpdated": {
  28107. "type": "object",
  28108. "properties": {
  28109. "id": {
  28110. "type": "string",
  28111. "pattern": "^evt_"
  28112. },
  28113. "metadata": {
  28114. "type": "object"
  28115. },
  28116. "type": {
  28117. "type": "string",
  28118. "enum": ["session.next.context.updated"]
  28119. },
  28120. "durable": {
  28121. "type": "object",
  28122. "properties": {
  28123. "aggregateID": {
  28124. "type": "string"
  28125. },
  28126. "seq": {
  28127. "type": "integer"
  28128. },
  28129. "version": {
  28130. "type": "integer"
  28131. }
  28132. },
  28133. "required": ["aggregateID", "seq", "version"],
  28134. "additionalProperties": false
  28135. },
  28136. "location": {
  28137. "$ref": "#/components/schemas/LocationRef"
  28138. },
  28139. "data": {
  28140. "type": "object",
  28141. "properties": {
  28142. "timestamp": {
  28143. "type": "number"
  28144. },
  28145. "sessionID": {
  28146. "type": "string",
  28147. "pattern": "^ses"
  28148. },
  28149. "messageID": {
  28150. "type": "string",
  28151. "pattern": "^msg_"
  28152. },
  28153. "text": {
  28154. "type": "string"
  28155. }
  28156. },
  28157. "required": ["timestamp", "sessionID", "messageID", "text"],
  28158. "additionalProperties": false
  28159. }
  28160. },
  28161. "required": ["id", "type", "data"],
  28162. "additionalProperties": false
  28163. },
  28164. "SessionNextSynthetic": {
  28165. "type": "object",
  28166. "properties": {
  28167. "id": {
  28168. "type": "string",
  28169. "pattern": "^evt_"
  28170. },
  28171. "metadata": {
  28172. "type": "object"
  28173. },
  28174. "type": {
  28175. "type": "string",
  28176. "enum": ["session.next.synthetic"]
  28177. },
  28178. "durable": {
  28179. "type": "object",
  28180. "properties": {
  28181. "aggregateID": {
  28182. "type": "string"
  28183. },
  28184. "seq": {
  28185. "type": "integer"
  28186. },
  28187. "version": {
  28188. "type": "integer"
  28189. }
  28190. },
  28191. "required": ["aggregateID", "seq", "version"],
  28192. "additionalProperties": false
  28193. },
  28194. "location": {
  28195. "$ref": "#/components/schemas/LocationRef"
  28196. },
  28197. "data": {
  28198. "type": "object",
  28199. "properties": {
  28200. "timestamp": {
  28201. "type": "number"
  28202. },
  28203. "sessionID": {
  28204. "type": "string",
  28205. "pattern": "^ses"
  28206. },
  28207. "messageID": {
  28208. "type": "string",
  28209. "pattern": "^msg_"
  28210. },
  28211. "text": {
  28212. "type": "string"
  28213. }
  28214. },
  28215. "required": ["timestamp", "sessionID", "messageID", "text"],
  28216. "additionalProperties": false
  28217. }
  28218. },
  28219. "required": ["id", "type", "data"],
  28220. "additionalProperties": false
  28221. },
  28222. "SessionNextShellStarted": {
  28223. "type": "object",
  28224. "properties": {
  28225. "id": {
  28226. "type": "string",
  28227. "pattern": "^evt_"
  28228. },
  28229. "metadata": {
  28230. "type": "object"
  28231. },
  28232. "type": {
  28233. "type": "string",
  28234. "enum": ["session.next.shell.started"]
  28235. },
  28236. "durable": {
  28237. "type": "object",
  28238. "properties": {
  28239. "aggregateID": {
  28240. "type": "string"
  28241. },
  28242. "seq": {
  28243. "type": "integer"
  28244. },
  28245. "version": {
  28246. "type": "integer"
  28247. }
  28248. },
  28249. "required": ["aggregateID", "seq", "version"],
  28250. "additionalProperties": false
  28251. },
  28252. "location": {
  28253. "$ref": "#/components/schemas/LocationRef"
  28254. },
  28255. "data": {
  28256. "type": "object",
  28257. "properties": {
  28258. "timestamp": {
  28259. "type": "number"
  28260. },
  28261. "sessionID": {
  28262. "type": "string",
  28263. "pattern": "^ses"
  28264. },
  28265. "messageID": {
  28266. "type": "string",
  28267. "pattern": "^msg_"
  28268. },
  28269. "callID": {
  28270. "type": "string"
  28271. },
  28272. "command": {
  28273. "type": "string"
  28274. }
  28275. },
  28276. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28277. "additionalProperties": false
  28278. }
  28279. },
  28280. "required": ["id", "type", "data"],
  28281. "additionalProperties": false
  28282. },
  28283. "SessionNextShellEnded": {
  28284. "type": "object",
  28285. "properties": {
  28286. "id": {
  28287. "type": "string",
  28288. "pattern": "^evt_"
  28289. },
  28290. "metadata": {
  28291. "type": "object"
  28292. },
  28293. "type": {
  28294. "type": "string",
  28295. "enum": ["session.next.shell.ended"]
  28296. },
  28297. "durable": {
  28298. "type": "object",
  28299. "properties": {
  28300. "aggregateID": {
  28301. "type": "string"
  28302. },
  28303. "seq": {
  28304. "type": "integer"
  28305. },
  28306. "version": {
  28307. "type": "integer"
  28308. }
  28309. },
  28310. "required": ["aggregateID", "seq", "version"],
  28311. "additionalProperties": false
  28312. },
  28313. "location": {
  28314. "$ref": "#/components/schemas/LocationRef"
  28315. },
  28316. "data": {
  28317. "type": "object",
  28318. "properties": {
  28319. "timestamp": {
  28320. "type": "number"
  28321. },
  28322. "sessionID": {
  28323. "type": "string",
  28324. "pattern": "^ses"
  28325. },
  28326. "callID": {
  28327. "type": "string"
  28328. },
  28329. "output": {
  28330. "type": "string"
  28331. }
  28332. },
  28333. "required": ["timestamp", "sessionID", "callID", "output"],
  28334. "additionalProperties": false
  28335. }
  28336. },
  28337. "required": ["id", "type", "data"],
  28338. "additionalProperties": false
  28339. },
  28340. "SessionNextStepStarted": {
  28341. "type": "object",
  28342. "properties": {
  28343. "id": {
  28344. "type": "string",
  28345. "pattern": "^evt_"
  28346. },
  28347. "metadata": {
  28348. "type": "object"
  28349. },
  28350. "type": {
  28351. "type": "string",
  28352. "enum": ["session.next.step.started"]
  28353. },
  28354. "durable": {
  28355. "type": "object",
  28356. "properties": {
  28357. "aggregateID": {
  28358. "type": "string"
  28359. },
  28360. "seq": {
  28361. "type": "integer"
  28362. },
  28363. "version": {
  28364. "type": "integer"
  28365. }
  28366. },
  28367. "required": ["aggregateID", "seq", "version"],
  28368. "additionalProperties": false
  28369. },
  28370. "location": {
  28371. "$ref": "#/components/schemas/LocationRef"
  28372. },
  28373. "data": {
  28374. "type": "object",
  28375. "properties": {
  28376. "timestamp": {
  28377. "type": "number"
  28378. },
  28379. "sessionID": {
  28380. "type": "string",
  28381. "pattern": "^ses"
  28382. },
  28383. "assistantMessageID": {
  28384. "type": "string",
  28385. "pattern": "^msg_"
  28386. },
  28387. "agent": {
  28388. "type": "string"
  28389. },
  28390. "model": {
  28391. "$ref": "#/components/schemas/ModelRef"
  28392. },
  28393. "snapshot": {
  28394. "type": "string"
  28395. }
  28396. },
  28397. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28398. "additionalProperties": false
  28399. }
  28400. },
  28401. "required": ["id", "type", "data"],
  28402. "additionalProperties": false
  28403. },
  28404. "SessionNextStepEnded": {
  28405. "type": "object",
  28406. "properties": {
  28407. "id": {
  28408. "type": "string",
  28409. "pattern": "^evt_"
  28410. },
  28411. "metadata": {
  28412. "type": "object"
  28413. },
  28414. "type": {
  28415. "type": "string",
  28416. "enum": ["session.next.step.ended"]
  28417. },
  28418. "durable": {
  28419. "type": "object",
  28420. "properties": {
  28421. "aggregateID": {
  28422. "type": "string"
  28423. },
  28424. "seq": {
  28425. "type": "integer"
  28426. },
  28427. "version": {
  28428. "type": "integer"
  28429. }
  28430. },
  28431. "required": ["aggregateID", "seq", "version"],
  28432. "additionalProperties": false
  28433. },
  28434. "location": {
  28435. "$ref": "#/components/schemas/LocationRef"
  28436. },
  28437. "data": {
  28438. "type": "object",
  28439. "properties": {
  28440. "timestamp": {
  28441. "type": "number"
  28442. },
  28443. "sessionID": {
  28444. "type": "string",
  28445. "pattern": "^ses"
  28446. },
  28447. "assistantMessageID": {
  28448. "type": "string",
  28449. "pattern": "^msg_"
  28450. },
  28451. "finish": {
  28452. "type": "string"
  28453. },
  28454. "cost": {
  28455. "type": "number"
  28456. },
  28457. "tokens": {
  28458. "type": "object",
  28459. "properties": {
  28460. "input": {
  28461. "type": "number"
  28462. },
  28463. "output": {
  28464. "type": "number"
  28465. },
  28466. "reasoning": {
  28467. "type": "number"
  28468. },
  28469. "cache": {
  28470. "type": "object",
  28471. "properties": {
  28472. "read": {
  28473. "type": "number"
  28474. },
  28475. "write": {
  28476. "type": "number"
  28477. }
  28478. },
  28479. "required": ["read", "write"],
  28480. "additionalProperties": false
  28481. }
  28482. },
  28483. "required": ["input", "output", "reasoning", "cache"],
  28484. "additionalProperties": false
  28485. },
  28486. "snapshot": {
  28487. "type": "string"
  28488. },
  28489. "files": {
  28490. "type": "array",
  28491. "items": {
  28492. "type": "string"
  28493. }
  28494. }
  28495. },
  28496. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28497. "additionalProperties": false
  28498. }
  28499. },
  28500. "required": ["id", "type", "data"],
  28501. "additionalProperties": false
  28502. },
  28503. "SessionNextStepFailed": {
  28504. "type": "object",
  28505. "properties": {
  28506. "id": {
  28507. "type": "string",
  28508. "pattern": "^evt_"
  28509. },
  28510. "metadata": {
  28511. "type": "object"
  28512. },
  28513. "type": {
  28514. "type": "string",
  28515. "enum": ["session.next.step.failed"]
  28516. },
  28517. "durable": {
  28518. "type": "object",
  28519. "properties": {
  28520. "aggregateID": {
  28521. "type": "string"
  28522. },
  28523. "seq": {
  28524. "type": "integer"
  28525. },
  28526. "version": {
  28527. "type": "integer"
  28528. }
  28529. },
  28530. "required": ["aggregateID", "seq", "version"],
  28531. "additionalProperties": false
  28532. },
  28533. "location": {
  28534. "$ref": "#/components/schemas/LocationRef"
  28535. },
  28536. "data": {
  28537. "type": "object",
  28538. "properties": {
  28539. "timestamp": {
  28540. "type": "number"
  28541. },
  28542. "sessionID": {
  28543. "type": "string",
  28544. "pattern": "^ses"
  28545. },
  28546. "assistantMessageID": {
  28547. "type": "string",
  28548. "pattern": "^msg_"
  28549. },
  28550. "error": {
  28551. "$ref": "#/components/schemas/SessionErrorUnknown"
  28552. }
  28553. },
  28554. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28555. "additionalProperties": false
  28556. }
  28557. },
  28558. "required": ["id", "type", "data"],
  28559. "additionalProperties": false
  28560. },
  28561. "SessionNextTextStarted": {
  28562. "type": "object",
  28563. "properties": {
  28564. "id": {
  28565. "type": "string",
  28566. "pattern": "^evt_"
  28567. },
  28568. "metadata": {
  28569. "type": "object"
  28570. },
  28571. "type": {
  28572. "type": "string",
  28573. "enum": ["session.next.text.started"]
  28574. },
  28575. "durable": {
  28576. "type": "object",
  28577. "properties": {
  28578. "aggregateID": {
  28579. "type": "string"
  28580. },
  28581. "seq": {
  28582. "type": "integer"
  28583. },
  28584. "version": {
  28585. "type": "integer"
  28586. }
  28587. },
  28588. "required": ["aggregateID", "seq", "version"],
  28589. "additionalProperties": false
  28590. },
  28591. "location": {
  28592. "$ref": "#/components/schemas/LocationRef"
  28593. },
  28594. "data": {
  28595. "type": "object",
  28596. "properties": {
  28597. "timestamp": {
  28598. "type": "number"
  28599. },
  28600. "sessionID": {
  28601. "type": "string",
  28602. "pattern": "^ses"
  28603. },
  28604. "assistantMessageID": {
  28605. "type": "string",
  28606. "pattern": "^msg_"
  28607. },
  28608. "textID": {
  28609. "type": "string"
  28610. }
  28611. },
  28612. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28613. "additionalProperties": false
  28614. }
  28615. },
  28616. "required": ["id", "type", "data"],
  28617. "additionalProperties": false
  28618. },
  28619. "SessionNextTextEnded": {
  28620. "type": "object",
  28621. "properties": {
  28622. "id": {
  28623. "type": "string",
  28624. "pattern": "^evt_"
  28625. },
  28626. "metadata": {
  28627. "type": "object"
  28628. },
  28629. "type": {
  28630. "type": "string",
  28631. "enum": ["session.next.text.ended"]
  28632. },
  28633. "durable": {
  28634. "type": "object",
  28635. "properties": {
  28636. "aggregateID": {
  28637. "type": "string"
  28638. },
  28639. "seq": {
  28640. "type": "integer"
  28641. },
  28642. "version": {
  28643. "type": "integer"
  28644. }
  28645. },
  28646. "required": ["aggregateID", "seq", "version"],
  28647. "additionalProperties": false
  28648. },
  28649. "location": {
  28650. "$ref": "#/components/schemas/LocationRef"
  28651. },
  28652. "data": {
  28653. "type": "object",
  28654. "properties": {
  28655. "timestamp": {
  28656. "type": "number"
  28657. },
  28658. "sessionID": {
  28659. "type": "string",
  28660. "pattern": "^ses"
  28661. },
  28662. "assistantMessageID": {
  28663. "type": "string",
  28664. "pattern": "^msg_"
  28665. },
  28666. "textID": {
  28667. "type": "string"
  28668. },
  28669. "text": {
  28670. "type": "string"
  28671. }
  28672. },
  28673. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28674. "additionalProperties": false
  28675. }
  28676. },
  28677. "required": ["id", "type", "data"],
  28678. "additionalProperties": false
  28679. },
  28680. "SessionNextToolInputStarted": {
  28681. "type": "object",
  28682. "properties": {
  28683. "id": {
  28684. "type": "string",
  28685. "pattern": "^evt_"
  28686. },
  28687. "metadata": {
  28688. "type": "object"
  28689. },
  28690. "type": {
  28691. "type": "string",
  28692. "enum": ["session.next.tool.input.started"]
  28693. },
  28694. "durable": {
  28695. "type": "object",
  28696. "properties": {
  28697. "aggregateID": {
  28698. "type": "string"
  28699. },
  28700. "seq": {
  28701. "type": "integer"
  28702. },
  28703. "version": {
  28704. "type": "integer"
  28705. }
  28706. },
  28707. "required": ["aggregateID", "seq", "version"],
  28708. "additionalProperties": false
  28709. },
  28710. "location": {
  28711. "$ref": "#/components/schemas/LocationRef"
  28712. },
  28713. "data": {
  28714. "type": "object",
  28715. "properties": {
  28716. "timestamp": {
  28717. "type": "number"
  28718. },
  28719. "sessionID": {
  28720. "type": "string",
  28721. "pattern": "^ses"
  28722. },
  28723. "assistantMessageID": {
  28724. "type": "string",
  28725. "pattern": "^msg_"
  28726. },
  28727. "callID": {
  28728. "type": "string"
  28729. },
  28730. "name": {
  28731. "type": "string"
  28732. }
  28733. },
  28734. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28735. "additionalProperties": false
  28736. }
  28737. },
  28738. "required": ["id", "type", "data"],
  28739. "additionalProperties": false
  28740. },
  28741. "SessionNextToolInputEnded": {
  28742. "type": "object",
  28743. "properties": {
  28744. "id": {
  28745. "type": "string",
  28746. "pattern": "^evt_"
  28747. },
  28748. "metadata": {
  28749. "type": "object"
  28750. },
  28751. "type": {
  28752. "type": "string",
  28753. "enum": ["session.next.tool.input.ended"]
  28754. },
  28755. "durable": {
  28756. "type": "object",
  28757. "properties": {
  28758. "aggregateID": {
  28759. "type": "string"
  28760. },
  28761. "seq": {
  28762. "type": "integer"
  28763. },
  28764. "version": {
  28765. "type": "integer"
  28766. }
  28767. },
  28768. "required": ["aggregateID", "seq", "version"],
  28769. "additionalProperties": false
  28770. },
  28771. "location": {
  28772. "$ref": "#/components/schemas/LocationRef"
  28773. },
  28774. "data": {
  28775. "type": "object",
  28776. "properties": {
  28777. "timestamp": {
  28778. "type": "number"
  28779. },
  28780. "sessionID": {
  28781. "type": "string",
  28782. "pattern": "^ses"
  28783. },
  28784. "assistantMessageID": {
  28785. "type": "string",
  28786. "pattern": "^msg_"
  28787. },
  28788. "callID": {
  28789. "type": "string"
  28790. },
  28791. "text": {
  28792. "type": "string"
  28793. }
  28794. },
  28795. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28796. "additionalProperties": false
  28797. }
  28798. },
  28799. "required": ["id", "type", "data"],
  28800. "additionalProperties": false
  28801. },
  28802. "SessionNextToolCalled": {
  28803. "type": "object",
  28804. "properties": {
  28805. "id": {
  28806. "type": "string",
  28807. "pattern": "^evt_"
  28808. },
  28809. "metadata": {
  28810. "type": "object"
  28811. },
  28812. "type": {
  28813. "type": "string",
  28814. "enum": ["session.next.tool.called"]
  28815. },
  28816. "durable": {
  28817. "type": "object",
  28818. "properties": {
  28819. "aggregateID": {
  28820. "type": "string"
  28821. },
  28822. "seq": {
  28823. "type": "integer"
  28824. },
  28825. "version": {
  28826. "type": "integer"
  28827. }
  28828. },
  28829. "required": ["aggregateID", "seq", "version"],
  28830. "additionalProperties": false
  28831. },
  28832. "location": {
  28833. "$ref": "#/components/schemas/LocationRef"
  28834. },
  28835. "data": {
  28836. "type": "object",
  28837. "properties": {
  28838. "timestamp": {
  28839. "type": "number"
  28840. },
  28841. "sessionID": {
  28842. "type": "string",
  28843. "pattern": "^ses"
  28844. },
  28845. "assistantMessageID": {
  28846. "type": "string",
  28847. "pattern": "^msg_"
  28848. },
  28849. "callID": {
  28850. "type": "string"
  28851. },
  28852. "tool": {
  28853. "type": "string"
  28854. },
  28855. "input": {
  28856. "type": "object"
  28857. },
  28858. "provider": {
  28859. "type": "object",
  28860. "properties": {
  28861. "executed": {
  28862. "type": "boolean"
  28863. },
  28864. "metadata": {
  28865. "$ref": "#/components/schemas/LLMProviderMetadata"
  28866. }
  28867. },
  28868. "required": ["executed"],
  28869. "additionalProperties": false
  28870. }
  28871. },
  28872. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  28873. "additionalProperties": false
  28874. }
  28875. },
  28876. "required": ["id", "type", "data"],
  28877. "additionalProperties": false
  28878. },
  28879. "SessionNextToolProgress": {
  28880. "type": "object",
  28881. "properties": {
  28882. "id": {
  28883. "type": "string",
  28884. "pattern": "^evt_"
  28885. },
  28886. "metadata": {
  28887. "type": "object"
  28888. },
  28889. "type": {
  28890. "type": "string",
  28891. "enum": ["session.next.tool.progress"]
  28892. },
  28893. "durable": {
  28894. "type": "object",
  28895. "properties": {
  28896. "aggregateID": {
  28897. "type": "string"
  28898. },
  28899. "seq": {
  28900. "type": "integer"
  28901. },
  28902. "version": {
  28903. "type": "integer"
  28904. }
  28905. },
  28906. "required": ["aggregateID", "seq", "version"],
  28907. "additionalProperties": false
  28908. },
  28909. "location": {
  28910. "$ref": "#/components/schemas/LocationRef"
  28911. },
  28912. "data": {
  28913. "type": "object",
  28914. "properties": {
  28915. "timestamp": {
  28916. "type": "number"
  28917. },
  28918. "sessionID": {
  28919. "type": "string",
  28920. "pattern": "^ses"
  28921. },
  28922. "assistantMessageID": {
  28923. "type": "string",
  28924. "pattern": "^msg_"
  28925. },
  28926. "callID": {
  28927. "type": "string"
  28928. },
  28929. "structured": {
  28930. "type": "object"
  28931. },
  28932. "content": {
  28933. "type": "array",
  28934. "items": {
  28935. "$ref": "#/components/schemas/LLMToolContent"
  28936. }
  28937. }
  28938. },
  28939. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  28940. "additionalProperties": false
  28941. }
  28942. },
  28943. "required": ["id", "type", "data"],
  28944. "additionalProperties": false
  28945. },
  28946. "SessionNextToolSuccess": {
  28947. "type": "object",
  28948. "properties": {
  28949. "id": {
  28950. "type": "string",
  28951. "pattern": "^evt_"
  28952. },
  28953. "metadata": {
  28954. "type": "object"
  28955. },
  28956. "type": {
  28957. "type": "string",
  28958. "enum": ["session.next.tool.success"]
  28959. },
  28960. "durable": {
  28961. "type": "object",
  28962. "properties": {
  28963. "aggregateID": {
  28964. "type": "string"
  28965. },
  28966. "seq": {
  28967. "type": "integer"
  28968. },
  28969. "version": {
  28970. "type": "integer"
  28971. }
  28972. },
  28973. "required": ["aggregateID", "seq", "version"],
  28974. "additionalProperties": false
  28975. },
  28976. "location": {
  28977. "$ref": "#/components/schemas/LocationRef"
  28978. },
  28979. "data": {
  28980. "type": "object",
  28981. "properties": {
  28982. "timestamp": {
  28983. "type": "number"
  28984. },
  28985. "sessionID": {
  28986. "type": "string",
  28987. "pattern": "^ses"
  28988. },
  28989. "assistantMessageID": {
  28990. "type": "string",
  28991. "pattern": "^msg_"
  28992. },
  28993. "callID": {
  28994. "type": "string"
  28995. },
  28996. "structured": {
  28997. "type": "object"
  28998. },
  28999. "content": {
  29000. "type": "array",
  29001. "items": {
  29002. "$ref": "#/components/schemas/LLMToolContent"
  29003. }
  29004. },
  29005. "outputPaths": {
  29006. "type": "array",
  29007. "items": {
  29008. "type": "string"
  29009. }
  29010. },
  29011. "result": {},
  29012. "provider": {
  29013. "type": "object",
  29014. "properties": {
  29015. "executed": {
  29016. "type": "boolean"
  29017. },
  29018. "metadata": {
  29019. "$ref": "#/components/schemas/LLMProviderMetadata"
  29020. }
  29021. },
  29022. "required": ["executed"],
  29023. "additionalProperties": false
  29024. }
  29025. },
  29026. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29027. "additionalProperties": false
  29028. }
  29029. },
  29030. "required": ["id", "type", "data"],
  29031. "additionalProperties": false
  29032. },
  29033. "SessionNextToolFailed": {
  29034. "type": "object",
  29035. "properties": {
  29036. "id": {
  29037. "type": "string",
  29038. "pattern": "^evt_"
  29039. },
  29040. "metadata": {
  29041. "type": "object"
  29042. },
  29043. "type": {
  29044. "type": "string",
  29045. "enum": ["session.next.tool.failed"]
  29046. },
  29047. "durable": {
  29048. "type": "object",
  29049. "properties": {
  29050. "aggregateID": {
  29051. "type": "string"
  29052. },
  29053. "seq": {
  29054. "type": "integer"
  29055. },
  29056. "version": {
  29057. "type": "integer"
  29058. }
  29059. },
  29060. "required": ["aggregateID", "seq", "version"],
  29061. "additionalProperties": false
  29062. },
  29063. "location": {
  29064. "$ref": "#/components/schemas/LocationRef"
  29065. },
  29066. "data": {
  29067. "type": "object",
  29068. "properties": {
  29069. "timestamp": {
  29070. "type": "number"
  29071. },
  29072. "sessionID": {
  29073. "type": "string",
  29074. "pattern": "^ses"
  29075. },
  29076. "assistantMessageID": {
  29077. "type": "string",
  29078. "pattern": "^msg_"
  29079. },
  29080. "callID": {
  29081. "type": "string"
  29082. },
  29083. "error": {
  29084. "$ref": "#/components/schemas/SessionErrorUnknown"
  29085. },
  29086. "result": {},
  29087. "provider": {
  29088. "type": "object",
  29089. "properties": {
  29090. "executed": {
  29091. "type": "boolean"
  29092. },
  29093. "metadata": {
  29094. "$ref": "#/components/schemas/LLMProviderMetadata"
  29095. }
  29096. },
  29097. "required": ["executed"],
  29098. "additionalProperties": false
  29099. }
  29100. },
  29101. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29102. "additionalProperties": false
  29103. }
  29104. },
  29105. "required": ["id", "type", "data"],
  29106. "additionalProperties": false
  29107. },
  29108. "SessionNextReasoningStarted": {
  29109. "type": "object",
  29110. "properties": {
  29111. "id": {
  29112. "type": "string",
  29113. "pattern": "^evt_"
  29114. },
  29115. "metadata": {
  29116. "type": "object"
  29117. },
  29118. "type": {
  29119. "type": "string",
  29120. "enum": ["session.next.reasoning.started"]
  29121. },
  29122. "durable": {
  29123. "type": "object",
  29124. "properties": {
  29125. "aggregateID": {
  29126. "type": "string"
  29127. },
  29128. "seq": {
  29129. "type": "integer"
  29130. },
  29131. "version": {
  29132. "type": "integer"
  29133. }
  29134. },
  29135. "required": ["aggregateID", "seq", "version"],
  29136. "additionalProperties": false
  29137. },
  29138. "location": {
  29139. "$ref": "#/components/schemas/LocationRef"
  29140. },
  29141. "data": {
  29142. "type": "object",
  29143. "properties": {
  29144. "timestamp": {
  29145. "type": "number"
  29146. },
  29147. "sessionID": {
  29148. "type": "string",
  29149. "pattern": "^ses"
  29150. },
  29151. "assistantMessageID": {
  29152. "type": "string",
  29153. "pattern": "^msg_"
  29154. },
  29155. "reasoningID": {
  29156. "type": "string"
  29157. },
  29158. "providerMetadata": {
  29159. "$ref": "#/components/schemas/LLMProviderMetadata"
  29160. }
  29161. },
  29162. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29163. "additionalProperties": false
  29164. }
  29165. },
  29166. "required": ["id", "type", "data"],
  29167. "additionalProperties": false
  29168. },
  29169. "SessionNextReasoningEnded": {
  29170. "type": "object",
  29171. "properties": {
  29172. "id": {
  29173. "type": "string",
  29174. "pattern": "^evt_"
  29175. },
  29176. "metadata": {
  29177. "type": "object"
  29178. },
  29179. "type": {
  29180. "type": "string",
  29181. "enum": ["session.next.reasoning.ended"]
  29182. },
  29183. "durable": {
  29184. "type": "object",
  29185. "properties": {
  29186. "aggregateID": {
  29187. "type": "string"
  29188. },
  29189. "seq": {
  29190. "type": "integer"
  29191. },
  29192. "version": {
  29193. "type": "integer"
  29194. }
  29195. },
  29196. "required": ["aggregateID", "seq", "version"],
  29197. "additionalProperties": false
  29198. },
  29199. "location": {
  29200. "$ref": "#/components/schemas/LocationRef"
  29201. },
  29202. "data": {
  29203. "type": "object",
  29204. "properties": {
  29205. "timestamp": {
  29206. "type": "number"
  29207. },
  29208. "sessionID": {
  29209. "type": "string",
  29210. "pattern": "^ses"
  29211. },
  29212. "assistantMessageID": {
  29213. "type": "string",
  29214. "pattern": "^msg_"
  29215. },
  29216. "reasoningID": {
  29217. "type": "string"
  29218. },
  29219. "text": {
  29220. "type": "string"
  29221. },
  29222. "providerMetadata": {
  29223. "$ref": "#/components/schemas/LLMProviderMetadata"
  29224. }
  29225. },
  29226. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29227. "additionalProperties": false
  29228. }
  29229. },
  29230. "required": ["id", "type", "data"],
  29231. "additionalProperties": false
  29232. },
  29233. "SessionNextRetried": {
  29234. "type": "object",
  29235. "properties": {
  29236. "id": {
  29237. "type": "string",
  29238. "pattern": "^evt_"
  29239. },
  29240. "metadata": {
  29241. "type": "object"
  29242. },
  29243. "type": {
  29244. "type": "string",
  29245. "enum": ["session.next.retried"]
  29246. },
  29247. "durable": {
  29248. "type": "object",
  29249. "properties": {
  29250. "aggregateID": {
  29251. "type": "string"
  29252. },
  29253. "seq": {
  29254. "type": "integer"
  29255. },
  29256. "version": {
  29257. "type": "integer"
  29258. }
  29259. },
  29260. "required": ["aggregateID", "seq", "version"],
  29261. "additionalProperties": false
  29262. },
  29263. "location": {
  29264. "$ref": "#/components/schemas/LocationRef"
  29265. },
  29266. "data": {
  29267. "type": "object",
  29268. "properties": {
  29269. "timestamp": {
  29270. "type": "number"
  29271. },
  29272. "sessionID": {
  29273. "type": "string",
  29274. "pattern": "^ses"
  29275. },
  29276. "attempt": {
  29277. "type": "number"
  29278. },
  29279. "error": {
  29280. "$ref": "#/components/schemas/SessionNextRetry_error"
  29281. }
  29282. },
  29283. "required": ["timestamp", "sessionID", "attempt", "error"],
  29284. "additionalProperties": false
  29285. }
  29286. },
  29287. "required": ["id", "type", "data"],
  29288. "additionalProperties": false
  29289. },
  29290. "SessionNextCompactionStarted": {
  29291. "type": "object",
  29292. "properties": {
  29293. "id": {
  29294. "type": "string",
  29295. "pattern": "^evt_"
  29296. },
  29297. "metadata": {
  29298. "type": "object"
  29299. },
  29300. "type": {
  29301. "type": "string",
  29302. "enum": ["session.next.compaction.started"]
  29303. },
  29304. "durable": {
  29305. "type": "object",
  29306. "properties": {
  29307. "aggregateID": {
  29308. "type": "string"
  29309. },
  29310. "seq": {
  29311. "type": "integer"
  29312. },
  29313. "version": {
  29314. "type": "integer"
  29315. }
  29316. },
  29317. "required": ["aggregateID", "seq", "version"],
  29318. "additionalProperties": false
  29319. },
  29320. "location": {
  29321. "$ref": "#/components/schemas/LocationRef"
  29322. },
  29323. "data": {
  29324. "type": "object",
  29325. "properties": {
  29326. "timestamp": {
  29327. "type": "number"
  29328. },
  29329. "sessionID": {
  29330. "type": "string",
  29331. "pattern": "^ses"
  29332. },
  29333. "messageID": {
  29334. "type": "string",
  29335. "pattern": "^msg_"
  29336. },
  29337. "reason": {
  29338. "type": "string",
  29339. "enum": ["auto", "manual"]
  29340. }
  29341. },
  29342. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29343. "additionalProperties": false
  29344. }
  29345. },
  29346. "required": ["id", "type", "data"],
  29347. "additionalProperties": false
  29348. },
  29349. "SessionNextCompactionEnded": {
  29350. "type": "object",
  29351. "properties": {
  29352. "id": {
  29353. "type": "string",
  29354. "pattern": "^evt_"
  29355. },
  29356. "metadata": {
  29357. "type": "object"
  29358. },
  29359. "type": {
  29360. "type": "string",
  29361. "enum": ["session.next.compaction.ended"]
  29362. },
  29363. "durable": {
  29364. "type": "object",
  29365. "properties": {
  29366. "aggregateID": {
  29367. "type": "string"
  29368. },
  29369. "seq": {
  29370. "type": "integer"
  29371. },
  29372. "version": {
  29373. "type": "integer"
  29374. }
  29375. },
  29376. "required": ["aggregateID", "seq", "version"],
  29377. "additionalProperties": false
  29378. },
  29379. "location": {
  29380. "$ref": "#/components/schemas/LocationRef"
  29381. },
  29382. "data": {
  29383. "type": "object",
  29384. "properties": {
  29385. "timestamp": {
  29386. "type": "number"
  29387. },
  29388. "sessionID": {
  29389. "type": "string",
  29390. "pattern": "^ses"
  29391. },
  29392. "messageID": {
  29393. "type": "string",
  29394. "pattern": "^msg_"
  29395. },
  29396. "reason": {
  29397. "type": "string",
  29398. "enum": ["auto", "manual"]
  29399. },
  29400. "text": {
  29401. "type": "string"
  29402. },
  29403. "recent": {
  29404. "type": "string"
  29405. }
  29406. },
  29407. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29408. "additionalProperties": false
  29409. }
  29410. },
  29411. "required": ["id", "type", "data"],
  29412. "additionalProperties": false
  29413. },
  29414. "SessionNextRevertStaged": {
  29415. "type": "object",
  29416. "properties": {
  29417. "id": {
  29418. "type": "string",
  29419. "pattern": "^evt_"
  29420. },
  29421. "metadata": {
  29422. "type": "object"
  29423. },
  29424. "type": {
  29425. "type": "string",
  29426. "enum": ["session.next.revert.staged"]
  29427. },
  29428. "durable": {
  29429. "type": "object",
  29430. "properties": {
  29431. "aggregateID": {
  29432. "type": "string"
  29433. },
  29434. "seq": {
  29435. "type": "integer"
  29436. },
  29437. "version": {
  29438. "type": "integer"
  29439. }
  29440. },
  29441. "required": ["aggregateID", "seq", "version"],
  29442. "additionalProperties": false
  29443. },
  29444. "location": {
  29445. "$ref": "#/components/schemas/LocationRef"
  29446. },
  29447. "data": {
  29448. "type": "object",
  29449. "properties": {
  29450. "timestamp": {
  29451. "type": "number"
  29452. },
  29453. "sessionID": {
  29454. "type": "string",
  29455. "pattern": "^ses"
  29456. },
  29457. "revert": {
  29458. "$ref": "#/components/schemas/RevertState"
  29459. }
  29460. },
  29461. "required": ["timestamp", "sessionID", "revert"],
  29462. "additionalProperties": false
  29463. }
  29464. },
  29465. "required": ["id", "type", "data"],
  29466. "additionalProperties": false
  29467. },
  29468. "SessionNextRevertCleared": {
  29469. "type": "object",
  29470. "properties": {
  29471. "id": {
  29472. "type": "string",
  29473. "pattern": "^evt_"
  29474. },
  29475. "metadata": {
  29476. "type": "object"
  29477. },
  29478. "type": {
  29479. "type": "string",
  29480. "enum": ["session.next.revert.cleared"]
  29481. },
  29482. "durable": {
  29483. "type": "object",
  29484. "properties": {
  29485. "aggregateID": {
  29486. "type": "string"
  29487. },
  29488. "seq": {
  29489. "type": "integer"
  29490. },
  29491. "version": {
  29492. "type": "integer"
  29493. }
  29494. },
  29495. "required": ["aggregateID", "seq", "version"],
  29496. "additionalProperties": false
  29497. },
  29498. "location": {
  29499. "$ref": "#/components/schemas/LocationRef"
  29500. },
  29501. "data": {
  29502. "type": "object",
  29503. "properties": {
  29504. "timestamp": {
  29505. "type": "number"
  29506. },
  29507. "sessionID": {
  29508. "type": "string",
  29509. "pattern": "^ses"
  29510. }
  29511. },
  29512. "required": ["timestamp", "sessionID"],
  29513. "additionalProperties": false
  29514. }
  29515. },
  29516. "required": ["id", "type", "data"],
  29517. "additionalProperties": false
  29518. },
  29519. "SessionNextRevertCommitted": {
  29520. "type": "object",
  29521. "properties": {
  29522. "id": {
  29523. "type": "string",
  29524. "pattern": "^evt_"
  29525. },
  29526. "metadata": {
  29527. "type": "object"
  29528. },
  29529. "type": {
  29530. "type": "string",
  29531. "enum": ["session.next.revert.committed"]
  29532. },
  29533. "durable": {
  29534. "type": "object",
  29535. "properties": {
  29536. "aggregateID": {
  29537. "type": "string"
  29538. },
  29539. "seq": {
  29540. "type": "integer"
  29541. },
  29542. "version": {
  29543. "type": "integer"
  29544. }
  29545. },
  29546. "required": ["aggregateID", "seq", "version"],
  29547. "additionalProperties": false
  29548. },
  29549. "location": {
  29550. "$ref": "#/components/schemas/LocationRef"
  29551. },
  29552. "data": {
  29553. "type": "object",
  29554. "properties": {
  29555. "timestamp": {
  29556. "type": "number"
  29557. },
  29558. "sessionID": {
  29559. "type": "string",
  29560. "pattern": "^ses"
  29561. },
  29562. "messageID": {
  29563. "type": "string",
  29564. "pattern": "^msg_"
  29565. }
  29566. },
  29567. "required": ["timestamp", "sessionID", "messageID"],
  29568. "additionalProperties": false
  29569. }
  29570. },
  29571. "required": ["id", "type", "data"],
  29572. "additionalProperties": false
  29573. },
  29574. "ModelApi": {
  29575. "anyOf": [
  29576. {
  29577. "type": "object",
  29578. "properties": {
  29579. "id": {
  29580. "type": "string"
  29581. },
  29582. "type": {
  29583. "type": "string",
  29584. "enum": ["aisdk"]
  29585. },
  29586. "package": {
  29587. "type": "string"
  29588. },
  29589. "url": {
  29590. "type": "string"
  29591. },
  29592. "settings": {
  29593. "type": "object"
  29594. }
  29595. },
  29596. "required": ["id", "type", "package"],
  29597. "additionalProperties": false
  29598. },
  29599. {
  29600. "type": "object",
  29601. "properties": {
  29602. "id": {
  29603. "type": "string"
  29604. },
  29605. "type": {
  29606. "type": "string",
  29607. "enum": ["native"]
  29608. },
  29609. "url": {
  29610. "type": "string"
  29611. },
  29612. "settings": {
  29613. "type": "object"
  29614. }
  29615. },
  29616. "required": ["id", "type", "settings"],
  29617. "additionalProperties": false
  29618. }
  29619. ]
  29620. },
  29621. "ModelCapabilities": {
  29622. "type": "object",
  29623. "properties": {
  29624. "tools": {
  29625. "type": "boolean"
  29626. },
  29627. "input": {
  29628. "type": "array",
  29629. "items": {
  29630. "type": "string"
  29631. }
  29632. },
  29633. "output": {
  29634. "type": "array",
  29635. "items": {
  29636. "type": "string"
  29637. }
  29638. }
  29639. },
  29640. "required": ["tools", "input", "output"],
  29641. "additionalProperties": false
  29642. },
  29643. "ModelCost": {
  29644. "type": "object",
  29645. "properties": {
  29646. "tier": {
  29647. "type": "object",
  29648. "properties": {
  29649. "type": {
  29650. "type": "string",
  29651. "enum": ["context"]
  29652. },
  29653. "size": {
  29654. "type": "integer"
  29655. }
  29656. },
  29657. "required": ["type", "size"],
  29658. "additionalProperties": false
  29659. },
  29660. "input": {
  29661. "type": "number"
  29662. },
  29663. "output": {
  29664. "type": "number"
  29665. },
  29666. "cache": {
  29667. "type": "object",
  29668. "properties": {
  29669. "read": {
  29670. "type": "number"
  29671. },
  29672. "write": {
  29673. "type": "number"
  29674. }
  29675. },
  29676. "required": ["read", "write"],
  29677. "additionalProperties": false
  29678. }
  29679. },
  29680. "required": ["input", "output", "cache"],
  29681. "additionalProperties": false
  29682. },
  29683. "ModelV2Info": {
  29684. "type": "object",
  29685. "properties": {
  29686. "id": {
  29687. "type": "string"
  29688. },
  29689. "providerID": {
  29690. "type": "string"
  29691. },
  29692. "family": {
  29693. "type": "string"
  29694. },
  29695. "name": {
  29696. "type": "string"
  29697. },
  29698. "api": {
  29699. "$ref": "#/components/schemas/ModelApi"
  29700. },
  29701. "capabilities": {
  29702. "$ref": "#/components/schemas/ModelCapabilities"
  29703. },
  29704. "request": {
  29705. "type": "object",
  29706. "properties": {
  29707. "headers": {
  29708. "type": "object",
  29709. "additionalProperties": {
  29710. "type": "string"
  29711. }
  29712. },
  29713. "body": {
  29714. "type": "object"
  29715. },
  29716. "variant": {
  29717. "type": "string"
  29718. }
  29719. },
  29720. "required": ["headers", "body"],
  29721. "additionalProperties": false
  29722. },
  29723. "variants": {
  29724. "type": "array",
  29725. "items": {
  29726. "type": "object",
  29727. "properties": {
  29728. "id": {
  29729. "type": "string"
  29730. },
  29731. "headers": {
  29732. "type": "object",
  29733. "additionalProperties": {
  29734. "type": "string"
  29735. }
  29736. },
  29737. "body": {
  29738. "type": "object"
  29739. }
  29740. },
  29741. "required": ["id", "headers", "body"],
  29742. "additionalProperties": false
  29743. }
  29744. },
  29745. "time": {
  29746. "type": "object",
  29747. "properties": {
  29748. "released": {
  29749. "type": "number"
  29750. }
  29751. },
  29752. "required": ["released"],
  29753. "additionalProperties": false
  29754. },
  29755. "cost": {
  29756. "type": "array",
  29757. "items": {
  29758. "$ref": "#/components/schemas/ModelCost"
  29759. }
  29760. },
  29761. "status": {
  29762. "type": "string",
  29763. "enum": ["alpha", "beta", "deprecated", "active"]
  29764. },
  29765. "enabled": {
  29766. "type": "boolean"
  29767. },
  29768. "limit": {
  29769. "type": "object",
  29770. "properties": {
  29771. "context": {
  29772. "type": "integer"
  29773. },
  29774. "input": {
  29775. "type": "integer"
  29776. },
  29777. "output": {
  29778. "type": "integer"
  29779. }
  29780. },
  29781. "required": ["context", "output"],
  29782. "additionalProperties": false
  29783. }
  29784. },
  29785. "required": [
  29786. "id",
  29787. "providerID",
  29788. "name",
  29789. "api",
  29790. "capabilities",
  29791. "request",
  29792. "variants",
  29793. "time",
  29794. "cost",
  29795. "status",
  29796. "enabled",
  29797. "limit"
  29798. ],
  29799. "additionalProperties": false
  29800. },
  29801. "ProviderAISDK": {
  29802. "type": "object",
  29803. "properties": {
  29804. "type": {
  29805. "type": "string",
  29806. "enum": ["aisdk"]
  29807. },
  29808. "package": {
  29809. "type": "string"
  29810. },
  29811. "url": {
  29812. "type": "string"
  29813. },
  29814. "settings": {
  29815. "type": "object"
  29816. }
  29817. },
  29818. "required": ["type", "package"],
  29819. "additionalProperties": false
  29820. },
  29821. "ProviderNative": {
  29822. "type": "object",
  29823. "properties": {
  29824. "type": {
  29825. "type": "string",
  29826. "enum": ["native"]
  29827. },
  29828. "url": {
  29829. "type": "string"
  29830. },
  29831. "settings": {
  29832. "type": "object"
  29833. }
  29834. },
  29835. "required": ["type", "settings"],
  29836. "additionalProperties": false
  29837. },
  29838. "ProviderApi": {
  29839. "anyOf": [
  29840. {
  29841. "$ref": "#/components/schemas/ProviderAISDK"
  29842. },
  29843. {
  29844. "$ref": "#/components/schemas/ProviderNative"
  29845. }
  29846. ]
  29847. },
  29848. "ProviderV2Info": {
  29849. "type": "object",
  29850. "properties": {
  29851. "id": {
  29852. "type": "string"
  29853. },
  29854. "integrationID": {
  29855. "type": "string"
  29856. },
  29857. "name": {
  29858. "type": "string"
  29859. },
  29860. "disabled": {
  29861. "type": "boolean"
  29862. },
  29863. "api": {
  29864. "$ref": "#/components/schemas/ProviderApi"
  29865. },
  29866. "request": {
  29867. "$ref": "#/components/schemas/ProviderRequest"
  29868. }
  29869. },
  29870. "required": ["id", "name", "api", "request"],
  29871. "additionalProperties": false
  29872. },
  29873. "IntegrationWhen": {
  29874. "type": "object",
  29875. "properties": {
  29876. "key": {
  29877. "type": "string"
  29878. },
  29879. "op": {
  29880. "type": "string",
  29881. "enum": ["eq", "neq"]
  29882. },
  29883. "value": {
  29884. "type": "string"
  29885. }
  29886. },
  29887. "required": ["key", "op", "value"],
  29888. "additionalProperties": false
  29889. },
  29890. "IntegrationTextPrompt": {
  29891. "type": "object",
  29892. "properties": {
  29893. "type": {
  29894. "type": "string",
  29895. "enum": ["text"]
  29896. },
  29897. "key": {
  29898. "type": "string"
  29899. },
  29900. "message": {
  29901. "type": "string"
  29902. },
  29903. "placeholder": {
  29904. "type": "string"
  29905. },
  29906. "when": {
  29907. "$ref": "#/components/schemas/IntegrationWhen"
  29908. }
  29909. },
  29910. "required": ["type", "key", "message"],
  29911. "additionalProperties": false
  29912. },
  29913. "IntegrationSelectPrompt": {
  29914. "type": "object",
  29915. "properties": {
  29916. "type": {
  29917. "type": "string",
  29918. "enum": ["select"]
  29919. },
  29920. "key": {
  29921. "type": "string"
  29922. },
  29923. "message": {
  29924. "type": "string"
  29925. },
  29926. "options": {
  29927. "type": "array",
  29928. "items": {
  29929. "type": "object",
  29930. "properties": {
  29931. "label": {
  29932. "type": "string"
  29933. },
  29934. "value": {
  29935. "type": "string"
  29936. },
  29937. "hint": {
  29938. "type": "string"
  29939. }
  29940. },
  29941. "required": ["label", "value"],
  29942. "additionalProperties": false
  29943. }
  29944. },
  29945. "when": {
  29946. "$ref": "#/components/schemas/IntegrationWhen"
  29947. }
  29948. },
  29949. "required": ["type", "key", "message", "options"],
  29950. "additionalProperties": false
  29951. },
  29952. "IntegrationOAuthMethod": {
  29953. "type": "object",
  29954. "properties": {
  29955. "id": {
  29956. "type": "string"
  29957. },
  29958. "type": {
  29959. "type": "string",
  29960. "enum": ["oauth"]
  29961. },
  29962. "label": {
  29963. "type": "string"
  29964. },
  29965. "prompts": {
  29966. "type": "array",
  29967. "items": {
  29968. "anyOf": [
  29969. {
  29970. "$ref": "#/components/schemas/IntegrationTextPrompt"
  29971. },
  29972. {
  29973. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  29974. }
  29975. ]
  29976. }
  29977. }
  29978. },
  29979. "required": ["id", "type", "label"],
  29980. "additionalProperties": false
  29981. },
  29982. "IntegrationKeyMethod": {
  29983. "type": "object",
  29984. "properties": {
  29985. "type": {
  29986. "type": "string",
  29987. "enum": ["key"]
  29988. },
  29989. "label": {
  29990. "type": "string"
  29991. }
  29992. },
  29993. "required": ["type"],
  29994. "additionalProperties": false
  29995. },
  29996. "IntegrationEnvMethod": {
  29997. "type": "object",
  29998. "properties": {
  29999. "type": {
  30000. "type": "string",
  30001. "enum": ["env"]
  30002. },
  30003. "names": {
  30004. "type": "array",
  30005. "items": {
  30006. "type": "string"
  30007. }
  30008. }
  30009. },
  30010. "required": ["type", "names"],
  30011. "additionalProperties": false
  30012. },
  30013. "ConnectionCredentialInfo": {
  30014. "type": "object",
  30015. "properties": {
  30016. "type": {
  30017. "type": "string",
  30018. "enum": ["credential"]
  30019. },
  30020. "id": {
  30021. "type": "string"
  30022. },
  30023. "label": {
  30024. "type": "string"
  30025. }
  30026. },
  30027. "required": ["type", "id", "label"],
  30028. "additionalProperties": false
  30029. },
  30030. "ConnectionEnvInfo": {
  30031. "type": "object",
  30032. "properties": {
  30033. "type": {
  30034. "type": "string",
  30035. "enum": ["env"]
  30036. },
  30037. "name": {
  30038. "type": "string"
  30039. }
  30040. },
  30041. "required": ["type", "name"],
  30042. "additionalProperties": false
  30043. },
  30044. "ConnectionInfo": {
  30045. "anyOf": [
  30046. {
  30047. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30048. },
  30049. {
  30050. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30051. }
  30052. ]
  30053. },
  30054. "IntegrationInfo": {
  30055. "type": "object",
  30056. "properties": {
  30057. "id": {
  30058. "type": "string"
  30059. },
  30060. "name": {
  30061. "type": "string"
  30062. },
  30063. "methods": {
  30064. "type": "array",
  30065. "items": {
  30066. "$ref": "#/components/schemas/IntegrationMethod"
  30067. }
  30068. },
  30069. "connections": {
  30070. "type": "array",
  30071. "items": {
  30072. "$ref": "#/components/schemas/ConnectionInfo"
  30073. }
  30074. }
  30075. },
  30076. "required": ["id", "name", "methods", "connections"],
  30077. "additionalProperties": false
  30078. },
  30079. "IntegrationAttempt": {
  30080. "type": "object",
  30081. "properties": {
  30082. "attemptID": {
  30083. "type": "string"
  30084. },
  30085. "url": {
  30086. "type": "string"
  30087. },
  30088. "instructions": {
  30089. "type": "string"
  30090. },
  30091. "mode": {
  30092. "type": "string",
  30093. "enum": ["auto", "code"]
  30094. },
  30095. "time": {
  30096. "type": "object",
  30097. "properties": {
  30098. "created": {
  30099. "anyOf": [
  30100. {
  30101. "type": "number"
  30102. },
  30103. {
  30104. "type": "string",
  30105. "enum": ["NaN"]
  30106. },
  30107. {
  30108. "type": "string",
  30109. "enum": ["Infinity"]
  30110. },
  30111. {
  30112. "type": "string",
  30113. "enum": ["-Infinity"]
  30114. },
  30115. {
  30116. "type": "string",
  30117. "enum": ["Infinity", "-Infinity", "NaN"]
  30118. }
  30119. ]
  30120. },
  30121. "expires": {
  30122. "anyOf": [
  30123. {
  30124. "type": "number"
  30125. },
  30126. {
  30127. "type": "string",
  30128. "enum": ["NaN"]
  30129. },
  30130. {
  30131. "type": "string",
  30132. "enum": ["Infinity"]
  30133. },
  30134. {
  30135. "type": "string",
  30136. "enum": ["-Infinity"]
  30137. },
  30138. {
  30139. "type": "string",
  30140. "enum": ["Infinity", "-Infinity", "NaN"]
  30141. }
  30142. ]
  30143. }
  30144. },
  30145. "required": ["created", "expires"],
  30146. "additionalProperties": false
  30147. }
  30148. },
  30149. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30150. "additionalProperties": false
  30151. },
  30152. "IntegrationAttemptStatus": {
  30153. "anyOf": [
  30154. {
  30155. "type": "object",
  30156. "properties": {
  30157. "status": {
  30158. "type": "string",
  30159. "enum": ["pending"]
  30160. },
  30161. "time": {
  30162. "type": "object",
  30163. "properties": {
  30164. "created": {
  30165. "anyOf": [
  30166. {
  30167. "type": "number"
  30168. },
  30169. {
  30170. "type": "string",
  30171. "enum": ["NaN"]
  30172. },
  30173. {
  30174. "type": "string",
  30175. "enum": ["Infinity"]
  30176. },
  30177. {
  30178. "type": "string",
  30179. "enum": ["-Infinity"]
  30180. },
  30181. {
  30182. "type": "string",
  30183. "enum": ["Infinity", "-Infinity", "NaN"]
  30184. }
  30185. ]
  30186. },
  30187. "expires": {
  30188. "anyOf": [
  30189. {
  30190. "type": "number"
  30191. },
  30192. {
  30193. "type": "string",
  30194. "enum": ["NaN"]
  30195. },
  30196. {
  30197. "type": "string",
  30198. "enum": ["Infinity"]
  30199. },
  30200. {
  30201. "type": "string",
  30202. "enum": ["-Infinity"]
  30203. },
  30204. {
  30205. "type": "string",
  30206. "enum": ["Infinity", "-Infinity", "NaN"]
  30207. }
  30208. ]
  30209. }
  30210. },
  30211. "required": ["created", "expires"],
  30212. "additionalProperties": false
  30213. }
  30214. },
  30215. "required": ["status", "time"],
  30216. "additionalProperties": false
  30217. },
  30218. {
  30219. "type": "object",
  30220. "properties": {
  30221. "status": {
  30222. "type": "string",
  30223. "enum": ["complete"]
  30224. },
  30225. "time": {
  30226. "type": "object",
  30227. "properties": {
  30228. "created": {
  30229. "anyOf": [
  30230. {
  30231. "type": "number"
  30232. },
  30233. {
  30234. "type": "string",
  30235. "enum": ["NaN"]
  30236. },
  30237. {
  30238. "type": "string",
  30239. "enum": ["Infinity"]
  30240. },
  30241. {
  30242. "type": "string",
  30243. "enum": ["-Infinity"]
  30244. },
  30245. {
  30246. "type": "string",
  30247. "enum": ["Infinity", "-Infinity", "NaN"]
  30248. }
  30249. ]
  30250. },
  30251. "expires": {
  30252. "anyOf": [
  30253. {
  30254. "type": "number"
  30255. },
  30256. {
  30257. "type": "string",
  30258. "enum": ["NaN"]
  30259. },
  30260. {
  30261. "type": "string",
  30262. "enum": ["Infinity"]
  30263. },
  30264. {
  30265. "type": "string",
  30266. "enum": ["-Infinity"]
  30267. },
  30268. {
  30269. "type": "string",
  30270. "enum": ["Infinity", "-Infinity", "NaN"]
  30271. }
  30272. ]
  30273. }
  30274. },
  30275. "required": ["created", "expires"],
  30276. "additionalProperties": false
  30277. }
  30278. },
  30279. "required": ["status", "time"],
  30280. "additionalProperties": false
  30281. },
  30282. {
  30283. "type": "object",
  30284. "properties": {
  30285. "status": {
  30286. "type": "string",
  30287. "enum": ["failed"]
  30288. },
  30289. "message": {
  30290. "type": "string"
  30291. },
  30292. "time": {
  30293. "type": "object",
  30294. "properties": {
  30295. "created": {
  30296. "anyOf": [
  30297. {
  30298. "type": "number"
  30299. },
  30300. {
  30301. "type": "string",
  30302. "enum": ["NaN"]
  30303. },
  30304. {
  30305. "type": "string",
  30306. "enum": ["Infinity"]
  30307. },
  30308. {
  30309. "type": "string",
  30310. "enum": ["-Infinity"]
  30311. },
  30312. {
  30313. "type": "string",
  30314. "enum": ["Infinity", "-Infinity", "NaN"]
  30315. }
  30316. ]
  30317. },
  30318. "expires": {
  30319. "anyOf": [
  30320. {
  30321. "type": "number"
  30322. },
  30323. {
  30324. "type": "string",
  30325. "enum": ["NaN"]
  30326. },
  30327. {
  30328. "type": "string",
  30329. "enum": ["Infinity"]
  30330. },
  30331. {
  30332. "type": "string",
  30333. "enum": ["-Infinity"]
  30334. },
  30335. {
  30336. "type": "string",
  30337. "enum": ["Infinity", "-Infinity", "NaN"]
  30338. }
  30339. ]
  30340. }
  30341. },
  30342. "required": ["created", "expires"],
  30343. "additionalProperties": false
  30344. }
  30345. },
  30346. "required": ["status", "message", "time"],
  30347. "additionalProperties": false
  30348. },
  30349. {
  30350. "type": "object",
  30351. "properties": {
  30352. "status": {
  30353. "type": "string",
  30354. "enum": ["expired"]
  30355. },
  30356. "time": {
  30357. "type": "object",
  30358. "properties": {
  30359. "created": {
  30360. "anyOf": [
  30361. {
  30362. "type": "number"
  30363. },
  30364. {
  30365. "type": "string",
  30366. "enum": ["NaN"]
  30367. },
  30368. {
  30369. "type": "string",
  30370. "enum": ["Infinity"]
  30371. },
  30372. {
  30373. "type": "string",
  30374. "enum": ["-Infinity"]
  30375. },
  30376. {
  30377. "type": "string",
  30378. "enum": ["Infinity", "-Infinity", "NaN"]
  30379. }
  30380. ]
  30381. },
  30382. "expires": {
  30383. "anyOf": [
  30384. {
  30385. "type": "number"
  30386. },
  30387. {
  30388. "type": "string",
  30389. "enum": ["NaN"]
  30390. },
  30391. {
  30392. "type": "string",
  30393. "enum": ["Infinity"]
  30394. },
  30395. {
  30396. "type": "string",
  30397. "enum": ["-Infinity"]
  30398. },
  30399. {
  30400. "type": "string",
  30401. "enum": ["Infinity", "-Infinity", "NaN"]
  30402. }
  30403. ]
  30404. }
  30405. },
  30406. "required": ["created", "expires"],
  30407. "additionalProperties": false
  30408. }
  30409. },
  30410. "required": ["status", "time"],
  30411. "additionalProperties": false
  30412. }
  30413. ]
  30414. },
  30415. "PermissionV2Request": {
  30416. "type": "object",
  30417. "properties": {
  30418. "id": {
  30419. "type": "string",
  30420. "pattern": "^per"
  30421. },
  30422. "sessionID": {
  30423. "type": "string",
  30424. "pattern": "^ses"
  30425. },
  30426. "action": {
  30427. "type": "string"
  30428. },
  30429. "resources": {
  30430. "type": "array",
  30431. "items": {
  30432. "type": "string"
  30433. }
  30434. },
  30435. "save": {
  30436. "type": "array",
  30437. "items": {
  30438. "type": "string"
  30439. }
  30440. },
  30441. "metadata": {
  30442. "type": "object"
  30443. },
  30444. "source": {
  30445. "$ref": "#/components/schemas/PermissionV2Source"
  30446. }
  30447. },
  30448. "required": ["id", "sessionID", "action", "resources"],
  30449. "additionalProperties": false
  30450. },
  30451. "PermissionSavedInfo": {
  30452. "type": "object",
  30453. "properties": {
  30454. "id": {
  30455. "type": "string"
  30456. },
  30457. "projectID": {
  30458. "type": "string"
  30459. },
  30460. "action": {
  30461. "type": "string"
  30462. },
  30463. "resource": {
  30464. "type": "string"
  30465. }
  30466. },
  30467. "required": ["id", "projectID", "action", "resource"],
  30468. "additionalProperties": false
  30469. },
  30470. "FileSystemEntry": {
  30471. "type": "object",
  30472. "properties": {
  30473. "path": {
  30474. "type": "string"
  30475. },
  30476. "type": {
  30477. "type": "string",
  30478. "enum": ["file", "directory"]
  30479. }
  30480. },
  30481. "required": ["path", "type"],
  30482. "additionalProperties": false
  30483. },
  30484. "CommandV2Info": {
  30485. "type": "object",
  30486. "properties": {
  30487. "name": {
  30488. "type": "string"
  30489. },
  30490. "template": {
  30491. "type": "string"
  30492. },
  30493. "description": {
  30494. "type": "string"
  30495. },
  30496. "agent": {
  30497. "type": "string"
  30498. },
  30499. "model": {
  30500. "$ref": "#/components/schemas/ModelRef"
  30501. },
  30502. "subtask": {
  30503. "type": "boolean"
  30504. }
  30505. },
  30506. "required": ["name", "template"],
  30507. "additionalProperties": false
  30508. },
  30509. "SkillV2Info": {
  30510. "type": "object",
  30511. "properties": {
  30512. "name": {
  30513. "type": "string"
  30514. },
  30515. "description": {
  30516. "type": "string"
  30517. },
  30518. "slash": {
  30519. "type": "boolean"
  30520. },
  30521. "location": {
  30522. "type": "string"
  30523. },
  30524. "content": {
  30525. "type": "string"
  30526. }
  30527. },
  30528. "required": ["name", "location", "content"],
  30529. "additionalProperties": false
  30530. },
  30531. "Models-devRefreshed": {
  30532. "type": "object",
  30533. "properties": {
  30534. "id": {
  30535. "type": "string",
  30536. "pattern": "^evt_"
  30537. },
  30538. "metadata": {
  30539. "type": "object"
  30540. },
  30541. "type": {
  30542. "type": "string",
  30543. "enum": ["models-dev.refreshed"]
  30544. },
  30545. "durable": {
  30546. "type": "object",
  30547. "properties": {
  30548. "aggregateID": {
  30549. "type": "string"
  30550. },
  30551. "seq": {
  30552. "type": "integer"
  30553. },
  30554. "version": {
  30555. "type": "integer"
  30556. }
  30557. },
  30558. "required": ["aggregateID", "seq", "version"],
  30559. "additionalProperties": false
  30560. },
  30561. "location": {
  30562. "$ref": "#/components/schemas/LocationRef"
  30563. },
  30564. "data": {
  30565. "type": "object",
  30566. "properties": {}
  30567. }
  30568. },
  30569. "required": ["id", "type", "data"],
  30570. "additionalProperties": false
  30571. },
  30572. "IntegrationUpdated": {
  30573. "type": "object",
  30574. "properties": {
  30575. "id": {
  30576. "type": "string",
  30577. "pattern": "^evt_"
  30578. },
  30579. "metadata": {
  30580. "type": "object"
  30581. },
  30582. "type": {
  30583. "type": "string",
  30584. "enum": ["integration.updated"]
  30585. },
  30586. "durable": {
  30587. "type": "object",
  30588. "properties": {
  30589. "aggregateID": {
  30590. "type": "string"
  30591. },
  30592. "seq": {
  30593. "type": "integer"
  30594. },
  30595. "version": {
  30596. "type": "integer"
  30597. }
  30598. },
  30599. "required": ["aggregateID", "seq", "version"],
  30600. "additionalProperties": false
  30601. },
  30602. "location": {
  30603. "$ref": "#/components/schemas/LocationRef"
  30604. },
  30605. "data": {
  30606. "type": "object",
  30607. "properties": {}
  30608. }
  30609. },
  30610. "required": ["id", "type", "data"],
  30611. "additionalProperties": false
  30612. },
  30613. "IntegrationConnectionUpdated": {
  30614. "type": "object",
  30615. "properties": {
  30616. "id": {
  30617. "type": "string",
  30618. "pattern": "^evt_"
  30619. },
  30620. "metadata": {
  30621. "type": "object"
  30622. },
  30623. "type": {
  30624. "type": "string",
  30625. "enum": ["integration.connection.updated"]
  30626. },
  30627. "durable": {
  30628. "type": "object",
  30629. "properties": {
  30630. "aggregateID": {
  30631. "type": "string"
  30632. },
  30633. "seq": {
  30634. "type": "integer"
  30635. },
  30636. "version": {
  30637. "type": "integer"
  30638. }
  30639. },
  30640. "required": ["aggregateID", "seq", "version"],
  30641. "additionalProperties": false
  30642. },
  30643. "location": {
  30644. "$ref": "#/components/schemas/LocationRef"
  30645. },
  30646. "data": {
  30647. "type": "object",
  30648. "properties": {
  30649. "integrationID": {
  30650. "type": "string"
  30651. }
  30652. },
  30653. "required": ["integrationID"],
  30654. "additionalProperties": false
  30655. }
  30656. },
  30657. "required": ["id", "type", "data"],
  30658. "additionalProperties": false
  30659. },
  30660. "CatalogUpdated": {
  30661. "type": "object",
  30662. "properties": {
  30663. "id": {
  30664. "type": "string",
  30665. "pattern": "^evt_"
  30666. },
  30667. "metadata": {
  30668. "type": "object"
  30669. },
  30670. "type": {
  30671. "type": "string",
  30672. "enum": ["catalog.updated"]
  30673. },
  30674. "durable": {
  30675. "type": "object",
  30676. "properties": {
  30677. "aggregateID": {
  30678. "type": "string"
  30679. },
  30680. "seq": {
  30681. "type": "integer"
  30682. },
  30683. "version": {
  30684. "type": "integer"
  30685. }
  30686. },
  30687. "required": ["aggregateID", "seq", "version"],
  30688. "additionalProperties": false
  30689. },
  30690. "location": {
  30691. "$ref": "#/components/schemas/LocationRef"
  30692. },
  30693. "data": {
  30694. "type": "object",
  30695. "properties": {}
  30696. }
  30697. },
  30698. "required": ["id", "type", "data"],
  30699. "additionalProperties": false
  30700. },
  30701. "SessionCreated": {
  30702. "type": "object",
  30703. "properties": {
  30704. "id": {
  30705. "type": "string",
  30706. "pattern": "^evt_"
  30707. },
  30708. "metadata": {
  30709. "type": "object"
  30710. },
  30711. "type": {
  30712. "type": "string",
  30713. "enum": ["session.created"]
  30714. },
  30715. "durable": {
  30716. "type": "object",
  30717. "properties": {
  30718. "aggregateID": {
  30719. "type": "string"
  30720. },
  30721. "seq": {
  30722. "type": "integer"
  30723. },
  30724. "version": {
  30725. "type": "integer"
  30726. }
  30727. },
  30728. "required": ["aggregateID", "seq", "version"],
  30729. "additionalProperties": false
  30730. },
  30731. "location": {
  30732. "$ref": "#/components/schemas/LocationRef"
  30733. },
  30734. "data": {
  30735. "type": "object",
  30736. "properties": {
  30737. "sessionID": {
  30738. "type": "string",
  30739. "pattern": "^ses"
  30740. },
  30741. "info": {
  30742. "$ref": "#/components/schemas/Session"
  30743. }
  30744. },
  30745. "required": ["sessionID", "info"],
  30746. "additionalProperties": false
  30747. }
  30748. },
  30749. "required": ["id", "type", "data"],
  30750. "additionalProperties": false
  30751. },
  30752. "SessionUpdated": {
  30753. "type": "object",
  30754. "properties": {
  30755. "id": {
  30756. "type": "string",
  30757. "pattern": "^evt_"
  30758. },
  30759. "metadata": {
  30760. "type": "object"
  30761. },
  30762. "type": {
  30763. "type": "string",
  30764. "enum": ["session.updated"]
  30765. },
  30766. "durable": {
  30767. "type": "object",
  30768. "properties": {
  30769. "aggregateID": {
  30770. "type": "string"
  30771. },
  30772. "seq": {
  30773. "type": "integer"
  30774. },
  30775. "version": {
  30776. "type": "integer"
  30777. }
  30778. },
  30779. "required": ["aggregateID", "seq", "version"],
  30780. "additionalProperties": false
  30781. },
  30782. "location": {
  30783. "$ref": "#/components/schemas/LocationRef"
  30784. },
  30785. "data": {
  30786. "type": "object",
  30787. "properties": {
  30788. "sessionID": {
  30789. "type": "string",
  30790. "pattern": "^ses"
  30791. },
  30792. "info": {
  30793. "$ref": "#/components/schemas/Session"
  30794. }
  30795. },
  30796. "required": ["sessionID", "info"],
  30797. "additionalProperties": false
  30798. }
  30799. },
  30800. "required": ["id", "type", "data"],
  30801. "additionalProperties": false
  30802. },
  30803. "SessionDeleted": {
  30804. "type": "object",
  30805. "properties": {
  30806. "id": {
  30807. "type": "string",
  30808. "pattern": "^evt_"
  30809. },
  30810. "metadata": {
  30811. "type": "object"
  30812. },
  30813. "type": {
  30814. "type": "string",
  30815. "enum": ["session.deleted"]
  30816. },
  30817. "durable": {
  30818. "type": "object",
  30819. "properties": {
  30820. "aggregateID": {
  30821. "type": "string"
  30822. },
  30823. "seq": {
  30824. "type": "integer"
  30825. },
  30826. "version": {
  30827. "type": "integer"
  30828. }
  30829. },
  30830. "required": ["aggregateID", "seq", "version"],
  30831. "additionalProperties": false
  30832. },
  30833. "location": {
  30834. "$ref": "#/components/schemas/LocationRef"
  30835. },
  30836. "data": {
  30837. "type": "object",
  30838. "properties": {
  30839. "sessionID": {
  30840. "type": "string",
  30841. "pattern": "^ses"
  30842. },
  30843. "info": {
  30844. "$ref": "#/components/schemas/Session"
  30845. }
  30846. },
  30847. "required": ["sessionID", "info"],
  30848. "additionalProperties": false
  30849. }
  30850. },
  30851. "required": ["id", "type", "data"],
  30852. "additionalProperties": false
  30853. },
  30854. "MessageUpdated": {
  30855. "type": "object",
  30856. "properties": {
  30857. "id": {
  30858. "type": "string",
  30859. "pattern": "^evt_"
  30860. },
  30861. "metadata": {
  30862. "type": "object"
  30863. },
  30864. "type": {
  30865. "type": "string",
  30866. "enum": ["message.updated"]
  30867. },
  30868. "durable": {
  30869. "type": "object",
  30870. "properties": {
  30871. "aggregateID": {
  30872. "type": "string"
  30873. },
  30874. "seq": {
  30875. "type": "integer"
  30876. },
  30877. "version": {
  30878. "type": "integer"
  30879. }
  30880. },
  30881. "required": ["aggregateID", "seq", "version"],
  30882. "additionalProperties": false
  30883. },
  30884. "location": {
  30885. "$ref": "#/components/schemas/LocationRef"
  30886. },
  30887. "data": {
  30888. "type": "object",
  30889. "properties": {
  30890. "sessionID": {
  30891. "type": "string",
  30892. "pattern": "^ses"
  30893. },
  30894. "info": {
  30895. "$ref": "#/components/schemas/Message"
  30896. }
  30897. },
  30898. "required": ["sessionID", "info"],
  30899. "additionalProperties": false
  30900. }
  30901. },
  30902. "required": ["id", "type", "data"],
  30903. "additionalProperties": false
  30904. },
  30905. "MessageRemoved": {
  30906. "type": "object",
  30907. "properties": {
  30908. "id": {
  30909. "type": "string",
  30910. "pattern": "^evt_"
  30911. },
  30912. "metadata": {
  30913. "type": "object"
  30914. },
  30915. "type": {
  30916. "type": "string",
  30917. "enum": ["message.removed"]
  30918. },
  30919. "durable": {
  30920. "type": "object",
  30921. "properties": {
  30922. "aggregateID": {
  30923. "type": "string"
  30924. },
  30925. "seq": {
  30926. "type": "integer"
  30927. },
  30928. "version": {
  30929. "type": "integer"
  30930. }
  30931. },
  30932. "required": ["aggregateID", "seq", "version"],
  30933. "additionalProperties": false
  30934. },
  30935. "location": {
  30936. "$ref": "#/components/schemas/LocationRef"
  30937. },
  30938. "data": {
  30939. "type": "object",
  30940. "properties": {
  30941. "sessionID": {
  30942. "type": "string",
  30943. "pattern": "^ses"
  30944. },
  30945. "messageID": {
  30946. "type": "string",
  30947. "pattern": "^msg"
  30948. }
  30949. },
  30950. "required": ["sessionID", "messageID"],
  30951. "additionalProperties": false
  30952. }
  30953. },
  30954. "required": ["id", "type", "data"],
  30955. "additionalProperties": false
  30956. },
  30957. "MessagePartUpdated": {
  30958. "type": "object",
  30959. "properties": {
  30960. "id": {
  30961. "type": "string",
  30962. "pattern": "^evt_"
  30963. },
  30964. "metadata": {
  30965. "type": "object"
  30966. },
  30967. "type": {
  30968. "type": "string",
  30969. "enum": ["message.part.updated"]
  30970. },
  30971. "durable": {
  30972. "type": "object",
  30973. "properties": {
  30974. "aggregateID": {
  30975. "type": "string"
  30976. },
  30977. "seq": {
  30978. "type": "integer"
  30979. },
  30980. "version": {
  30981. "type": "integer"
  30982. }
  30983. },
  30984. "required": ["aggregateID", "seq", "version"],
  30985. "additionalProperties": false
  30986. },
  30987. "location": {
  30988. "$ref": "#/components/schemas/LocationRef"
  30989. },
  30990. "data": {
  30991. "type": "object",
  30992. "properties": {
  30993. "sessionID": {
  30994. "type": "string",
  30995. "pattern": "^ses"
  30996. },
  30997. "part": {
  30998. "$ref": "#/components/schemas/Part"
  30999. },
  31000. "time": {
  31001. "type": "number"
  31002. }
  31003. },
  31004. "required": ["sessionID", "part", "time"],
  31005. "additionalProperties": false
  31006. }
  31007. },
  31008. "required": ["id", "type", "data"],
  31009. "additionalProperties": false
  31010. },
  31011. "MessagePartRemoved": {
  31012. "type": "object",
  31013. "properties": {
  31014. "id": {
  31015. "type": "string",
  31016. "pattern": "^evt_"
  31017. },
  31018. "metadata": {
  31019. "type": "object"
  31020. },
  31021. "type": {
  31022. "type": "string",
  31023. "enum": ["message.part.removed"]
  31024. },
  31025. "durable": {
  31026. "type": "object",
  31027. "properties": {
  31028. "aggregateID": {
  31029. "type": "string"
  31030. },
  31031. "seq": {
  31032. "type": "integer"
  31033. },
  31034. "version": {
  31035. "type": "integer"
  31036. }
  31037. },
  31038. "required": ["aggregateID", "seq", "version"],
  31039. "additionalProperties": false
  31040. },
  31041. "location": {
  31042. "$ref": "#/components/schemas/LocationRef"
  31043. },
  31044. "data": {
  31045. "type": "object",
  31046. "properties": {
  31047. "sessionID": {
  31048. "type": "string",
  31049. "pattern": "^ses"
  31050. },
  31051. "messageID": {
  31052. "type": "string",
  31053. "pattern": "^msg"
  31054. },
  31055. "partID": {
  31056. "type": "string",
  31057. "pattern": "^prt"
  31058. }
  31059. },
  31060. "required": ["sessionID", "messageID", "partID"],
  31061. "additionalProperties": false
  31062. }
  31063. },
  31064. "required": ["id", "type", "data"],
  31065. "additionalProperties": false
  31066. },
  31067. "SessionNextTextDelta": {
  31068. "type": "object",
  31069. "properties": {
  31070. "id": {
  31071. "type": "string",
  31072. "pattern": "^evt_"
  31073. },
  31074. "metadata": {
  31075. "type": "object"
  31076. },
  31077. "type": {
  31078. "type": "string",
  31079. "enum": ["session.next.text.delta"]
  31080. },
  31081. "durable": {
  31082. "type": "object",
  31083. "properties": {
  31084. "aggregateID": {
  31085. "type": "string"
  31086. },
  31087. "seq": {
  31088. "type": "integer"
  31089. },
  31090. "version": {
  31091. "type": "integer"
  31092. }
  31093. },
  31094. "required": ["aggregateID", "seq", "version"],
  31095. "additionalProperties": false
  31096. },
  31097. "location": {
  31098. "$ref": "#/components/schemas/LocationRef"
  31099. },
  31100. "data": {
  31101. "type": "object",
  31102. "properties": {
  31103. "timestamp": {
  31104. "type": "number"
  31105. },
  31106. "sessionID": {
  31107. "type": "string",
  31108. "pattern": "^ses"
  31109. },
  31110. "assistantMessageID": {
  31111. "type": "string",
  31112. "pattern": "^msg_"
  31113. },
  31114. "textID": {
  31115. "type": "string"
  31116. },
  31117. "delta": {
  31118. "type": "string"
  31119. }
  31120. },
  31121. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  31122. "additionalProperties": false
  31123. }
  31124. },
  31125. "required": ["id", "type", "data"],
  31126. "additionalProperties": false
  31127. },
  31128. "SessionNextReasoningDelta": {
  31129. "type": "object",
  31130. "properties": {
  31131. "id": {
  31132. "type": "string",
  31133. "pattern": "^evt_"
  31134. },
  31135. "metadata": {
  31136. "type": "object"
  31137. },
  31138. "type": {
  31139. "type": "string",
  31140. "enum": ["session.next.reasoning.delta"]
  31141. },
  31142. "durable": {
  31143. "type": "object",
  31144. "properties": {
  31145. "aggregateID": {
  31146. "type": "string"
  31147. },
  31148. "seq": {
  31149. "type": "integer"
  31150. },
  31151. "version": {
  31152. "type": "integer"
  31153. }
  31154. },
  31155. "required": ["aggregateID", "seq", "version"],
  31156. "additionalProperties": false
  31157. },
  31158. "location": {
  31159. "$ref": "#/components/schemas/LocationRef"
  31160. },
  31161. "data": {
  31162. "type": "object",
  31163. "properties": {
  31164. "timestamp": {
  31165. "type": "number"
  31166. },
  31167. "sessionID": {
  31168. "type": "string",
  31169. "pattern": "^ses"
  31170. },
  31171. "assistantMessageID": {
  31172. "type": "string",
  31173. "pattern": "^msg_"
  31174. },
  31175. "reasoningID": {
  31176. "type": "string"
  31177. },
  31178. "delta": {
  31179. "type": "string"
  31180. }
  31181. },
  31182. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  31183. "additionalProperties": false
  31184. }
  31185. },
  31186. "required": ["id", "type", "data"],
  31187. "additionalProperties": false
  31188. },
  31189. "SessionNextToolInputDelta": {
  31190. "type": "object",
  31191. "properties": {
  31192. "id": {
  31193. "type": "string",
  31194. "pattern": "^evt_"
  31195. },
  31196. "metadata": {
  31197. "type": "object"
  31198. },
  31199. "type": {
  31200. "type": "string",
  31201. "enum": ["session.next.tool.input.delta"]
  31202. },
  31203. "durable": {
  31204. "type": "object",
  31205. "properties": {
  31206. "aggregateID": {
  31207. "type": "string"
  31208. },
  31209. "seq": {
  31210. "type": "integer"
  31211. },
  31212. "version": {
  31213. "type": "integer"
  31214. }
  31215. },
  31216. "required": ["aggregateID", "seq", "version"],
  31217. "additionalProperties": false
  31218. },
  31219. "location": {
  31220. "$ref": "#/components/schemas/LocationRef"
  31221. },
  31222. "data": {
  31223. "type": "object",
  31224. "properties": {
  31225. "timestamp": {
  31226. "type": "number"
  31227. },
  31228. "sessionID": {
  31229. "type": "string",
  31230. "pattern": "^ses"
  31231. },
  31232. "assistantMessageID": {
  31233. "type": "string",
  31234. "pattern": "^msg_"
  31235. },
  31236. "callID": {
  31237. "type": "string"
  31238. },
  31239. "delta": {
  31240. "type": "string"
  31241. }
  31242. },
  31243. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  31244. "additionalProperties": false
  31245. }
  31246. },
  31247. "required": ["id", "type", "data"],
  31248. "additionalProperties": false
  31249. },
  31250. "SessionNextCompactionDelta": {
  31251. "type": "object",
  31252. "properties": {
  31253. "id": {
  31254. "type": "string",
  31255. "pattern": "^evt_"
  31256. },
  31257. "metadata": {
  31258. "type": "object"
  31259. },
  31260. "type": {
  31261. "type": "string",
  31262. "enum": ["session.next.compaction.delta"]
  31263. },
  31264. "durable": {
  31265. "type": "object",
  31266. "properties": {
  31267. "aggregateID": {
  31268. "type": "string"
  31269. },
  31270. "seq": {
  31271. "type": "integer"
  31272. },
  31273. "version": {
  31274. "type": "integer"
  31275. }
  31276. },
  31277. "required": ["aggregateID", "seq", "version"],
  31278. "additionalProperties": false
  31279. },
  31280. "location": {
  31281. "$ref": "#/components/schemas/LocationRef"
  31282. },
  31283. "data": {
  31284. "type": "object",
  31285. "properties": {
  31286. "timestamp": {
  31287. "type": "number"
  31288. },
  31289. "sessionID": {
  31290. "type": "string",
  31291. "pattern": "^ses"
  31292. },
  31293. "messageID": {
  31294. "type": "string",
  31295. "pattern": "^msg_"
  31296. },
  31297. "text": {
  31298. "type": "string"
  31299. }
  31300. },
  31301. "required": ["timestamp", "sessionID", "messageID", "text"],
  31302. "additionalProperties": false
  31303. }
  31304. },
  31305. "required": ["id", "type", "data"],
  31306. "additionalProperties": false
  31307. },
  31308. "MessagePartDelta": {
  31309. "type": "object",
  31310. "properties": {
  31311. "id": {
  31312. "type": "string",
  31313. "pattern": "^evt_"
  31314. },
  31315. "metadata": {
  31316. "type": "object"
  31317. },
  31318. "type": {
  31319. "type": "string",
  31320. "enum": ["message.part.delta"]
  31321. },
  31322. "durable": {
  31323. "type": "object",
  31324. "properties": {
  31325. "aggregateID": {
  31326. "type": "string"
  31327. },
  31328. "seq": {
  31329. "type": "integer"
  31330. },
  31331. "version": {
  31332. "type": "integer"
  31333. }
  31334. },
  31335. "required": ["aggregateID", "seq", "version"],
  31336. "additionalProperties": false
  31337. },
  31338. "location": {
  31339. "$ref": "#/components/schemas/LocationRef"
  31340. },
  31341. "data": {
  31342. "type": "object",
  31343. "properties": {
  31344. "sessionID": {
  31345. "type": "string",
  31346. "pattern": "^ses"
  31347. },
  31348. "messageID": {
  31349. "type": "string",
  31350. "pattern": "^msg"
  31351. },
  31352. "partID": {
  31353. "type": "string",
  31354. "pattern": "^prt"
  31355. },
  31356. "field": {
  31357. "type": "string"
  31358. },
  31359. "delta": {
  31360. "type": "string"
  31361. }
  31362. },
  31363. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  31364. "additionalProperties": false
  31365. }
  31366. },
  31367. "required": ["id", "type", "data"],
  31368. "additionalProperties": false
  31369. },
  31370. "SessionDiff": {
  31371. "type": "object",
  31372. "properties": {
  31373. "id": {
  31374. "type": "string",
  31375. "pattern": "^evt_"
  31376. },
  31377. "metadata": {
  31378. "type": "object"
  31379. },
  31380. "type": {
  31381. "type": "string",
  31382. "enum": ["session.diff"]
  31383. },
  31384. "durable": {
  31385. "type": "object",
  31386. "properties": {
  31387. "aggregateID": {
  31388. "type": "string"
  31389. },
  31390. "seq": {
  31391. "type": "integer"
  31392. },
  31393. "version": {
  31394. "type": "integer"
  31395. }
  31396. },
  31397. "required": ["aggregateID", "seq", "version"],
  31398. "additionalProperties": false
  31399. },
  31400. "location": {
  31401. "$ref": "#/components/schemas/LocationRef"
  31402. },
  31403. "data": {
  31404. "type": "object",
  31405. "properties": {
  31406. "sessionID": {
  31407. "type": "string",
  31408. "pattern": "^ses"
  31409. },
  31410. "diff": {
  31411. "type": "array",
  31412. "items": {
  31413. "$ref": "#/components/schemas/SnapshotFileDiff"
  31414. }
  31415. }
  31416. },
  31417. "required": ["sessionID", "diff"],
  31418. "additionalProperties": false
  31419. }
  31420. },
  31421. "required": ["id", "type", "data"],
  31422. "additionalProperties": false
  31423. },
  31424. "SessionError": {
  31425. "type": "object",
  31426. "properties": {
  31427. "id": {
  31428. "type": "string",
  31429. "pattern": "^evt_"
  31430. },
  31431. "metadata": {
  31432. "type": "object"
  31433. },
  31434. "type": {
  31435. "type": "string",
  31436. "enum": ["session.error"]
  31437. },
  31438. "durable": {
  31439. "type": "object",
  31440. "properties": {
  31441. "aggregateID": {
  31442. "type": "string"
  31443. },
  31444. "seq": {
  31445. "type": "integer"
  31446. },
  31447. "version": {
  31448. "type": "integer"
  31449. }
  31450. },
  31451. "required": ["aggregateID", "seq", "version"],
  31452. "additionalProperties": false
  31453. },
  31454. "location": {
  31455. "$ref": "#/components/schemas/LocationRef"
  31456. },
  31457. "data": {
  31458. "type": "object",
  31459. "properties": {
  31460. "sessionID": {
  31461. "type": "string",
  31462. "pattern": "^ses"
  31463. },
  31464. "error": {
  31465. "anyOf": [
  31466. {
  31467. "$ref": "#/components/schemas/ProviderAuthError"
  31468. },
  31469. {
  31470. "$ref": "#/components/schemas/UnknownError"
  31471. },
  31472. {
  31473. "$ref": "#/components/schemas/MessageOutputLengthError"
  31474. },
  31475. {
  31476. "$ref": "#/components/schemas/MessageAbortedError"
  31477. },
  31478. {
  31479. "$ref": "#/components/schemas/StructuredOutputError"
  31480. },
  31481. {
  31482. "$ref": "#/components/schemas/ContextOverflowError"
  31483. },
  31484. {
  31485. "$ref": "#/components/schemas/ContentFilterError"
  31486. },
  31487. {
  31488. "$ref": "#/components/schemas/APIError"
  31489. }
  31490. ]
  31491. }
  31492. },
  31493. "additionalProperties": false
  31494. }
  31495. },
  31496. "required": ["id", "type", "data"],
  31497. "additionalProperties": false
  31498. },
  31499. "InstallationUpdated": {
  31500. "type": "object",
  31501. "properties": {
  31502. "id": {
  31503. "type": "string",
  31504. "pattern": "^evt_"
  31505. },
  31506. "metadata": {
  31507. "type": "object"
  31508. },
  31509. "type": {
  31510. "type": "string",
  31511. "enum": ["installation.updated"]
  31512. },
  31513. "durable": {
  31514. "type": "object",
  31515. "properties": {
  31516. "aggregateID": {
  31517. "type": "string"
  31518. },
  31519. "seq": {
  31520. "type": "integer"
  31521. },
  31522. "version": {
  31523. "type": "integer"
  31524. }
  31525. },
  31526. "required": ["aggregateID", "seq", "version"],
  31527. "additionalProperties": false
  31528. },
  31529. "location": {
  31530. "$ref": "#/components/schemas/LocationRef"
  31531. },
  31532. "data": {
  31533. "type": "object",
  31534. "properties": {
  31535. "version": {
  31536. "type": "string"
  31537. }
  31538. },
  31539. "required": ["version"],
  31540. "additionalProperties": false
  31541. }
  31542. },
  31543. "required": ["id", "type", "data"],
  31544. "additionalProperties": false
  31545. },
  31546. "InstallationUpdate-available": {
  31547. "type": "object",
  31548. "properties": {
  31549. "id": {
  31550. "type": "string",
  31551. "pattern": "^evt_"
  31552. },
  31553. "metadata": {
  31554. "type": "object"
  31555. },
  31556. "type": {
  31557. "type": "string",
  31558. "enum": ["installation.update-available"]
  31559. },
  31560. "durable": {
  31561. "type": "object",
  31562. "properties": {
  31563. "aggregateID": {
  31564. "type": "string"
  31565. },
  31566. "seq": {
  31567. "type": "integer"
  31568. },
  31569. "version": {
  31570. "type": "integer"
  31571. }
  31572. },
  31573. "required": ["aggregateID", "seq", "version"],
  31574. "additionalProperties": false
  31575. },
  31576. "location": {
  31577. "$ref": "#/components/schemas/LocationRef"
  31578. },
  31579. "data": {
  31580. "type": "object",
  31581. "properties": {
  31582. "version": {
  31583. "type": "string"
  31584. }
  31585. },
  31586. "required": ["version"],
  31587. "additionalProperties": false
  31588. }
  31589. },
  31590. "required": ["id", "type", "data"],
  31591. "additionalProperties": false
  31592. },
  31593. "FileEdited": {
  31594. "type": "object",
  31595. "properties": {
  31596. "id": {
  31597. "type": "string",
  31598. "pattern": "^evt_"
  31599. },
  31600. "metadata": {
  31601. "type": "object"
  31602. },
  31603. "type": {
  31604. "type": "string",
  31605. "enum": ["file.edited"]
  31606. },
  31607. "durable": {
  31608. "type": "object",
  31609. "properties": {
  31610. "aggregateID": {
  31611. "type": "string"
  31612. },
  31613. "seq": {
  31614. "type": "integer"
  31615. },
  31616. "version": {
  31617. "type": "integer"
  31618. }
  31619. },
  31620. "required": ["aggregateID", "seq", "version"],
  31621. "additionalProperties": false
  31622. },
  31623. "location": {
  31624. "$ref": "#/components/schemas/LocationRef"
  31625. },
  31626. "data": {
  31627. "type": "object",
  31628. "properties": {
  31629. "file": {
  31630. "type": "string"
  31631. }
  31632. },
  31633. "required": ["file"],
  31634. "additionalProperties": false
  31635. }
  31636. },
  31637. "required": ["id", "type", "data"],
  31638. "additionalProperties": false
  31639. },
  31640. "ReferenceUpdated": {
  31641. "type": "object",
  31642. "properties": {
  31643. "id": {
  31644. "type": "string",
  31645. "pattern": "^evt_"
  31646. },
  31647. "metadata": {
  31648. "type": "object"
  31649. },
  31650. "type": {
  31651. "type": "string",
  31652. "enum": ["reference.updated"]
  31653. },
  31654. "durable": {
  31655. "type": "object",
  31656. "properties": {
  31657. "aggregateID": {
  31658. "type": "string"
  31659. },
  31660. "seq": {
  31661. "type": "integer"
  31662. },
  31663. "version": {
  31664. "type": "integer"
  31665. }
  31666. },
  31667. "required": ["aggregateID", "seq", "version"],
  31668. "additionalProperties": false
  31669. },
  31670. "location": {
  31671. "$ref": "#/components/schemas/LocationRef"
  31672. },
  31673. "data": {
  31674. "type": "object",
  31675. "properties": {}
  31676. }
  31677. },
  31678. "required": ["id", "type", "data"],
  31679. "additionalProperties": false
  31680. },
  31681. "PermissionV2Asked": {
  31682. "type": "object",
  31683. "properties": {
  31684. "id": {
  31685. "type": "string",
  31686. "pattern": "^evt_"
  31687. },
  31688. "metadata": {
  31689. "type": "object"
  31690. },
  31691. "type": {
  31692. "type": "string",
  31693. "enum": ["permission.v2.asked"]
  31694. },
  31695. "durable": {
  31696. "type": "object",
  31697. "properties": {
  31698. "aggregateID": {
  31699. "type": "string"
  31700. },
  31701. "seq": {
  31702. "type": "integer"
  31703. },
  31704. "version": {
  31705. "type": "integer"
  31706. }
  31707. },
  31708. "required": ["aggregateID", "seq", "version"],
  31709. "additionalProperties": false
  31710. },
  31711. "location": {
  31712. "$ref": "#/components/schemas/LocationRef"
  31713. },
  31714. "data": {
  31715. "type": "object",
  31716. "properties": {
  31717. "id": {
  31718. "type": "string",
  31719. "pattern": "^per"
  31720. },
  31721. "sessionID": {
  31722. "type": "string",
  31723. "pattern": "^ses"
  31724. },
  31725. "action": {
  31726. "type": "string"
  31727. },
  31728. "resources": {
  31729. "type": "array",
  31730. "items": {
  31731. "type": "string"
  31732. }
  31733. },
  31734. "save": {
  31735. "type": "array",
  31736. "items": {
  31737. "type": "string"
  31738. }
  31739. },
  31740. "metadata": {
  31741. "type": "object"
  31742. },
  31743. "source": {
  31744. "$ref": "#/components/schemas/PermissionV2Source"
  31745. }
  31746. },
  31747. "required": ["id", "sessionID", "action", "resources"],
  31748. "additionalProperties": false
  31749. }
  31750. },
  31751. "required": ["id", "type", "data"],
  31752. "additionalProperties": false
  31753. },
  31754. "PermissionV2Replied": {
  31755. "type": "object",
  31756. "properties": {
  31757. "id": {
  31758. "type": "string",
  31759. "pattern": "^evt_"
  31760. },
  31761. "metadata": {
  31762. "type": "object"
  31763. },
  31764. "type": {
  31765. "type": "string",
  31766. "enum": ["permission.v2.replied"]
  31767. },
  31768. "durable": {
  31769. "type": "object",
  31770. "properties": {
  31771. "aggregateID": {
  31772. "type": "string"
  31773. },
  31774. "seq": {
  31775. "type": "integer"
  31776. },
  31777. "version": {
  31778. "type": "integer"
  31779. }
  31780. },
  31781. "required": ["aggregateID", "seq", "version"],
  31782. "additionalProperties": false
  31783. },
  31784. "location": {
  31785. "$ref": "#/components/schemas/LocationRef"
  31786. },
  31787. "data": {
  31788. "type": "object",
  31789. "properties": {
  31790. "sessionID": {
  31791. "type": "string",
  31792. "pattern": "^ses"
  31793. },
  31794. "requestID": {
  31795. "type": "string",
  31796. "pattern": "^per"
  31797. },
  31798. "reply": {
  31799. "$ref": "#/components/schemas/PermissionV2Reply"
  31800. }
  31801. },
  31802. "required": ["sessionID", "requestID", "reply"],
  31803. "additionalProperties": false
  31804. }
  31805. },
  31806. "required": ["id", "type", "data"],
  31807. "additionalProperties": false
  31808. },
  31809. "PluginAdded": {
  31810. "type": "object",
  31811. "properties": {
  31812. "id": {
  31813. "type": "string",
  31814. "pattern": "^evt_"
  31815. },
  31816. "metadata": {
  31817. "type": "object"
  31818. },
  31819. "type": {
  31820. "type": "string",
  31821. "enum": ["plugin.added"]
  31822. },
  31823. "durable": {
  31824. "type": "object",
  31825. "properties": {
  31826. "aggregateID": {
  31827. "type": "string"
  31828. },
  31829. "seq": {
  31830. "type": "integer"
  31831. },
  31832. "version": {
  31833. "type": "integer"
  31834. }
  31835. },
  31836. "required": ["aggregateID", "seq", "version"],
  31837. "additionalProperties": false
  31838. },
  31839. "location": {
  31840. "$ref": "#/components/schemas/LocationRef"
  31841. },
  31842. "data": {
  31843. "type": "object",
  31844. "properties": {
  31845. "id": {
  31846. "type": "string"
  31847. }
  31848. },
  31849. "required": ["id"],
  31850. "additionalProperties": false
  31851. }
  31852. },
  31853. "required": ["id", "type", "data"],
  31854. "additionalProperties": false
  31855. },
  31856. "ProjectDirectoriesUpdated": {
  31857. "type": "object",
  31858. "properties": {
  31859. "id": {
  31860. "type": "string",
  31861. "pattern": "^evt_"
  31862. },
  31863. "metadata": {
  31864. "type": "object"
  31865. },
  31866. "type": {
  31867. "type": "string",
  31868. "enum": ["project.directories.updated"]
  31869. },
  31870. "durable": {
  31871. "type": "object",
  31872. "properties": {
  31873. "aggregateID": {
  31874. "type": "string"
  31875. },
  31876. "seq": {
  31877. "type": "integer"
  31878. },
  31879. "version": {
  31880. "type": "integer"
  31881. }
  31882. },
  31883. "required": ["aggregateID", "seq", "version"],
  31884. "additionalProperties": false
  31885. },
  31886. "location": {
  31887. "$ref": "#/components/schemas/LocationRef"
  31888. },
  31889. "data": {
  31890. "type": "object",
  31891. "properties": {
  31892. "projectID": {
  31893. "type": "string"
  31894. }
  31895. },
  31896. "required": ["projectID"],
  31897. "additionalProperties": false
  31898. }
  31899. },
  31900. "required": ["id", "type", "data"],
  31901. "additionalProperties": false
  31902. },
  31903. "FileWatcherUpdated": {
  31904. "type": "object",
  31905. "properties": {
  31906. "id": {
  31907. "type": "string",
  31908. "pattern": "^evt_"
  31909. },
  31910. "metadata": {
  31911. "type": "object"
  31912. },
  31913. "type": {
  31914. "type": "string",
  31915. "enum": ["file.watcher.updated"]
  31916. },
  31917. "durable": {
  31918. "type": "object",
  31919. "properties": {
  31920. "aggregateID": {
  31921. "type": "string"
  31922. },
  31923. "seq": {
  31924. "type": "integer"
  31925. },
  31926. "version": {
  31927. "type": "integer"
  31928. }
  31929. },
  31930. "required": ["aggregateID", "seq", "version"],
  31931. "additionalProperties": false
  31932. },
  31933. "location": {
  31934. "$ref": "#/components/schemas/LocationRef"
  31935. },
  31936. "data": {
  31937. "type": "object",
  31938. "properties": {
  31939. "file": {
  31940. "type": "string"
  31941. },
  31942. "event": {
  31943. "type": "string",
  31944. "enum": ["add", "change", "unlink"]
  31945. }
  31946. },
  31947. "required": ["file", "event"],
  31948. "additionalProperties": false
  31949. }
  31950. },
  31951. "required": ["id", "type", "data"],
  31952. "additionalProperties": false
  31953. },
  31954. "PtyCreated": {
  31955. "type": "object",
  31956. "properties": {
  31957. "id": {
  31958. "type": "string",
  31959. "pattern": "^evt_"
  31960. },
  31961. "metadata": {
  31962. "type": "object"
  31963. },
  31964. "type": {
  31965. "type": "string",
  31966. "enum": ["pty.created"]
  31967. },
  31968. "durable": {
  31969. "type": "object",
  31970. "properties": {
  31971. "aggregateID": {
  31972. "type": "string"
  31973. },
  31974. "seq": {
  31975. "type": "integer"
  31976. },
  31977. "version": {
  31978. "type": "integer"
  31979. }
  31980. },
  31981. "required": ["aggregateID", "seq", "version"],
  31982. "additionalProperties": false
  31983. },
  31984. "location": {
  31985. "$ref": "#/components/schemas/LocationRef"
  31986. },
  31987. "data": {
  31988. "type": "object",
  31989. "properties": {
  31990. "info": {
  31991. "$ref": "#/components/schemas/Pty"
  31992. }
  31993. },
  31994. "required": ["info"],
  31995. "additionalProperties": false
  31996. }
  31997. },
  31998. "required": ["id", "type", "data"],
  31999. "additionalProperties": false
  32000. },
  32001. "PtyUpdated": {
  32002. "type": "object",
  32003. "properties": {
  32004. "id": {
  32005. "type": "string",
  32006. "pattern": "^evt_"
  32007. },
  32008. "metadata": {
  32009. "type": "object"
  32010. },
  32011. "type": {
  32012. "type": "string",
  32013. "enum": ["pty.updated"]
  32014. },
  32015. "durable": {
  32016. "type": "object",
  32017. "properties": {
  32018. "aggregateID": {
  32019. "type": "string"
  32020. },
  32021. "seq": {
  32022. "type": "integer"
  32023. },
  32024. "version": {
  32025. "type": "integer"
  32026. }
  32027. },
  32028. "required": ["aggregateID", "seq", "version"],
  32029. "additionalProperties": false
  32030. },
  32031. "location": {
  32032. "$ref": "#/components/schemas/LocationRef"
  32033. },
  32034. "data": {
  32035. "type": "object",
  32036. "properties": {
  32037. "info": {
  32038. "$ref": "#/components/schemas/Pty"
  32039. }
  32040. },
  32041. "required": ["info"],
  32042. "additionalProperties": false
  32043. }
  32044. },
  32045. "required": ["id", "type", "data"],
  32046. "additionalProperties": false
  32047. },
  32048. "PtyExited": {
  32049. "type": "object",
  32050. "properties": {
  32051. "id": {
  32052. "type": "string",
  32053. "pattern": "^evt_"
  32054. },
  32055. "metadata": {
  32056. "type": "object"
  32057. },
  32058. "type": {
  32059. "type": "string",
  32060. "enum": ["pty.exited"]
  32061. },
  32062. "durable": {
  32063. "type": "object",
  32064. "properties": {
  32065. "aggregateID": {
  32066. "type": "string"
  32067. },
  32068. "seq": {
  32069. "type": "integer"
  32070. },
  32071. "version": {
  32072. "type": "integer"
  32073. }
  32074. },
  32075. "required": ["aggregateID", "seq", "version"],
  32076. "additionalProperties": false
  32077. },
  32078. "location": {
  32079. "$ref": "#/components/schemas/LocationRef"
  32080. },
  32081. "data": {
  32082. "type": "object",
  32083. "properties": {
  32084. "id": {
  32085. "type": "string",
  32086. "pattern": "^pty"
  32087. },
  32088. "exitCode": {
  32089. "type": "integer",
  32090. "minimum": 0
  32091. }
  32092. },
  32093. "required": ["id", "exitCode"],
  32094. "additionalProperties": false
  32095. }
  32096. },
  32097. "required": ["id", "type", "data"],
  32098. "additionalProperties": false
  32099. },
  32100. "PtyDeleted": {
  32101. "type": "object",
  32102. "properties": {
  32103. "id": {
  32104. "type": "string",
  32105. "pattern": "^evt_"
  32106. },
  32107. "metadata": {
  32108. "type": "object"
  32109. },
  32110. "type": {
  32111. "type": "string",
  32112. "enum": ["pty.deleted"]
  32113. },
  32114. "durable": {
  32115. "type": "object",
  32116. "properties": {
  32117. "aggregateID": {
  32118. "type": "string"
  32119. },
  32120. "seq": {
  32121. "type": "integer"
  32122. },
  32123. "version": {
  32124. "type": "integer"
  32125. }
  32126. },
  32127. "required": ["aggregateID", "seq", "version"],
  32128. "additionalProperties": false
  32129. },
  32130. "location": {
  32131. "$ref": "#/components/schemas/LocationRef"
  32132. },
  32133. "data": {
  32134. "type": "object",
  32135. "properties": {
  32136. "id": {
  32137. "type": "string",
  32138. "pattern": "^pty"
  32139. }
  32140. },
  32141. "required": ["id"],
  32142. "additionalProperties": false
  32143. }
  32144. },
  32145. "required": ["id", "type", "data"],
  32146. "additionalProperties": false
  32147. },
  32148. "QuestionV2Asked": {
  32149. "type": "object",
  32150. "properties": {
  32151. "id": {
  32152. "type": "string",
  32153. "pattern": "^evt_"
  32154. },
  32155. "metadata": {
  32156. "type": "object"
  32157. },
  32158. "type": {
  32159. "type": "string",
  32160. "enum": ["question.v2.asked"]
  32161. },
  32162. "durable": {
  32163. "type": "object",
  32164. "properties": {
  32165. "aggregateID": {
  32166. "type": "string"
  32167. },
  32168. "seq": {
  32169. "type": "integer"
  32170. },
  32171. "version": {
  32172. "type": "integer"
  32173. }
  32174. },
  32175. "required": ["aggregateID", "seq", "version"],
  32176. "additionalProperties": false
  32177. },
  32178. "location": {
  32179. "$ref": "#/components/schemas/LocationRef"
  32180. },
  32181. "data": {
  32182. "type": "object",
  32183. "properties": {
  32184. "id": {
  32185. "type": "string",
  32186. "pattern": "^que"
  32187. },
  32188. "sessionID": {
  32189. "type": "string",
  32190. "pattern": "^ses"
  32191. },
  32192. "questions": {
  32193. "type": "array",
  32194. "items": {
  32195. "$ref": "#/components/schemas/QuestionV2Info"
  32196. },
  32197. "description": "Questions to ask"
  32198. },
  32199. "tool": {
  32200. "$ref": "#/components/schemas/QuestionV2Tool"
  32201. }
  32202. },
  32203. "required": ["id", "sessionID", "questions"],
  32204. "additionalProperties": false
  32205. }
  32206. },
  32207. "required": ["id", "type", "data"],
  32208. "additionalProperties": false
  32209. },
  32210. "QuestionV2Replied": {
  32211. "type": "object",
  32212. "properties": {
  32213. "id": {
  32214. "type": "string",
  32215. "pattern": "^evt_"
  32216. },
  32217. "metadata": {
  32218. "type": "object"
  32219. },
  32220. "type": {
  32221. "type": "string",
  32222. "enum": ["question.v2.replied"]
  32223. },
  32224. "durable": {
  32225. "type": "object",
  32226. "properties": {
  32227. "aggregateID": {
  32228. "type": "string"
  32229. },
  32230. "seq": {
  32231. "type": "integer"
  32232. },
  32233. "version": {
  32234. "type": "integer"
  32235. }
  32236. },
  32237. "required": ["aggregateID", "seq", "version"],
  32238. "additionalProperties": false
  32239. },
  32240. "location": {
  32241. "$ref": "#/components/schemas/LocationRef"
  32242. },
  32243. "data": {
  32244. "type": "object",
  32245. "properties": {
  32246. "sessionID": {
  32247. "type": "string",
  32248. "pattern": "^ses"
  32249. },
  32250. "requestID": {
  32251. "type": "string",
  32252. "pattern": "^que"
  32253. },
  32254. "answers": {
  32255. "type": "array",
  32256. "items": {
  32257. "$ref": "#/components/schemas/QuestionV2Answer"
  32258. }
  32259. }
  32260. },
  32261. "required": ["sessionID", "requestID", "answers"],
  32262. "additionalProperties": false
  32263. }
  32264. },
  32265. "required": ["id", "type", "data"],
  32266. "additionalProperties": false
  32267. },
  32268. "QuestionV2Rejected": {
  32269. "type": "object",
  32270. "properties": {
  32271. "id": {
  32272. "type": "string",
  32273. "pattern": "^evt_"
  32274. },
  32275. "metadata": {
  32276. "type": "object"
  32277. },
  32278. "type": {
  32279. "type": "string",
  32280. "enum": ["question.v2.rejected"]
  32281. },
  32282. "durable": {
  32283. "type": "object",
  32284. "properties": {
  32285. "aggregateID": {
  32286. "type": "string"
  32287. },
  32288. "seq": {
  32289. "type": "integer"
  32290. },
  32291. "version": {
  32292. "type": "integer"
  32293. }
  32294. },
  32295. "required": ["aggregateID", "seq", "version"],
  32296. "additionalProperties": false
  32297. },
  32298. "location": {
  32299. "$ref": "#/components/schemas/LocationRef"
  32300. },
  32301. "data": {
  32302. "type": "object",
  32303. "properties": {
  32304. "sessionID": {
  32305. "type": "string",
  32306. "pattern": "^ses"
  32307. },
  32308. "requestID": {
  32309. "type": "string",
  32310. "pattern": "^que"
  32311. }
  32312. },
  32313. "required": ["sessionID", "requestID"],
  32314. "additionalProperties": false
  32315. }
  32316. },
  32317. "required": ["id", "type", "data"],
  32318. "additionalProperties": false
  32319. },
  32320. "LspUpdated": {
  32321. "type": "object",
  32322. "properties": {
  32323. "id": {
  32324. "type": "string",
  32325. "pattern": "^evt_"
  32326. },
  32327. "metadata": {
  32328. "type": "object"
  32329. },
  32330. "type": {
  32331. "type": "string",
  32332. "enum": ["lsp.updated"]
  32333. },
  32334. "durable": {
  32335. "type": "object",
  32336. "properties": {
  32337. "aggregateID": {
  32338. "type": "string"
  32339. },
  32340. "seq": {
  32341. "type": "integer"
  32342. },
  32343. "version": {
  32344. "type": "integer"
  32345. }
  32346. },
  32347. "required": ["aggregateID", "seq", "version"],
  32348. "additionalProperties": false
  32349. },
  32350. "location": {
  32351. "$ref": "#/components/schemas/LocationRef"
  32352. },
  32353. "data": {
  32354. "type": "object",
  32355. "properties": {}
  32356. }
  32357. },
  32358. "required": ["id", "type", "data"],
  32359. "additionalProperties": false
  32360. },
  32361. "PermissionAsked": {
  32362. "type": "object",
  32363. "properties": {
  32364. "id": {
  32365. "type": "string",
  32366. "pattern": "^evt_"
  32367. },
  32368. "metadata": {
  32369. "type": "object"
  32370. },
  32371. "type": {
  32372. "type": "string",
  32373. "enum": ["permission.asked"]
  32374. },
  32375. "durable": {
  32376. "type": "object",
  32377. "properties": {
  32378. "aggregateID": {
  32379. "type": "string"
  32380. },
  32381. "seq": {
  32382. "type": "integer"
  32383. },
  32384. "version": {
  32385. "type": "integer"
  32386. }
  32387. },
  32388. "required": ["aggregateID", "seq", "version"],
  32389. "additionalProperties": false
  32390. },
  32391. "location": {
  32392. "$ref": "#/components/schemas/LocationRef"
  32393. },
  32394. "data": {
  32395. "type": "object",
  32396. "properties": {
  32397. "id": {
  32398. "type": "string",
  32399. "pattern": "^per"
  32400. },
  32401. "sessionID": {
  32402. "type": "string",
  32403. "pattern": "^ses"
  32404. },
  32405. "permission": {
  32406. "type": "string"
  32407. },
  32408. "patterns": {
  32409. "type": "array",
  32410. "items": {
  32411. "type": "string"
  32412. }
  32413. },
  32414. "metadata": {
  32415. "type": "object"
  32416. },
  32417. "always": {
  32418. "type": "array",
  32419. "items": {
  32420. "type": "string"
  32421. }
  32422. },
  32423. "tool": {
  32424. "type": "object",
  32425. "properties": {
  32426. "messageID": {
  32427. "type": "string"
  32428. },
  32429. "callID": {
  32430. "type": "string"
  32431. }
  32432. },
  32433. "required": ["messageID", "callID"],
  32434. "additionalProperties": false
  32435. }
  32436. },
  32437. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  32438. "additionalProperties": false
  32439. }
  32440. },
  32441. "required": ["id", "type", "data"],
  32442. "additionalProperties": false
  32443. },
  32444. "PermissionReplied": {
  32445. "type": "object",
  32446. "properties": {
  32447. "id": {
  32448. "type": "string",
  32449. "pattern": "^evt_"
  32450. },
  32451. "metadata": {
  32452. "type": "object"
  32453. },
  32454. "type": {
  32455. "type": "string",
  32456. "enum": ["permission.replied"]
  32457. },
  32458. "durable": {
  32459. "type": "object",
  32460. "properties": {
  32461. "aggregateID": {
  32462. "type": "string"
  32463. },
  32464. "seq": {
  32465. "type": "integer"
  32466. },
  32467. "version": {
  32468. "type": "integer"
  32469. }
  32470. },
  32471. "required": ["aggregateID", "seq", "version"],
  32472. "additionalProperties": false
  32473. },
  32474. "location": {
  32475. "$ref": "#/components/schemas/LocationRef"
  32476. },
  32477. "data": {
  32478. "type": "object",
  32479. "properties": {
  32480. "sessionID": {
  32481. "type": "string",
  32482. "pattern": "^ses"
  32483. },
  32484. "requestID": {
  32485. "type": "string",
  32486. "pattern": "^per"
  32487. },
  32488. "reply": {
  32489. "type": "string",
  32490. "enum": ["once", "always", "reject"]
  32491. }
  32492. },
  32493. "required": ["sessionID", "requestID", "reply"],
  32494. "additionalProperties": false
  32495. }
  32496. },
  32497. "required": ["id", "type", "data"],
  32498. "additionalProperties": false
  32499. },
  32500. "TuiPromptAppend": {
  32501. "type": "object",
  32502. "properties": {
  32503. "id": {
  32504. "type": "string",
  32505. "pattern": "^evt_"
  32506. },
  32507. "metadata": {
  32508. "type": "object"
  32509. },
  32510. "type": {
  32511. "type": "string",
  32512. "enum": ["tui.prompt.append"]
  32513. },
  32514. "durable": {
  32515. "type": "object",
  32516. "properties": {
  32517. "aggregateID": {
  32518. "type": "string"
  32519. },
  32520. "seq": {
  32521. "type": "integer"
  32522. },
  32523. "version": {
  32524. "type": "integer"
  32525. }
  32526. },
  32527. "required": ["aggregateID", "seq", "version"],
  32528. "additionalProperties": false
  32529. },
  32530. "location": {
  32531. "$ref": "#/components/schemas/LocationRef"
  32532. },
  32533. "data": {
  32534. "type": "object",
  32535. "properties": {
  32536. "text": {
  32537. "type": "string"
  32538. }
  32539. },
  32540. "required": ["text"],
  32541. "additionalProperties": false
  32542. }
  32543. },
  32544. "required": ["id", "type", "data"],
  32545. "additionalProperties": false
  32546. },
  32547. "TuiCommandExecute": {
  32548. "type": "object",
  32549. "properties": {
  32550. "id": {
  32551. "type": "string",
  32552. "pattern": "^evt_"
  32553. },
  32554. "metadata": {
  32555. "type": "object"
  32556. },
  32557. "type": {
  32558. "type": "string",
  32559. "enum": ["tui.command.execute"]
  32560. },
  32561. "durable": {
  32562. "type": "object",
  32563. "properties": {
  32564. "aggregateID": {
  32565. "type": "string"
  32566. },
  32567. "seq": {
  32568. "type": "integer"
  32569. },
  32570. "version": {
  32571. "type": "integer"
  32572. }
  32573. },
  32574. "required": ["aggregateID", "seq", "version"],
  32575. "additionalProperties": false
  32576. },
  32577. "location": {
  32578. "$ref": "#/components/schemas/LocationRef"
  32579. },
  32580. "data": {
  32581. "type": "object",
  32582. "properties": {
  32583. "command": {
  32584. "anyOf": [
  32585. {
  32586. "type": "string",
  32587. "enum": [
  32588. "session.list",
  32589. "session.new",
  32590. "session.share",
  32591. "session.interrupt",
  32592. "session.compact",
  32593. "session.page.up",
  32594. "session.page.down",
  32595. "session.line.up",
  32596. "session.line.down",
  32597. "session.half.page.up",
  32598. "session.half.page.down",
  32599. "session.first",
  32600. "session.last",
  32601. "prompt.clear",
  32602. "prompt.submit",
  32603. "agent.cycle"
  32604. ]
  32605. },
  32606. {
  32607. "type": "string"
  32608. }
  32609. ]
  32610. }
  32611. },
  32612. "required": ["command"],
  32613. "additionalProperties": false
  32614. }
  32615. },
  32616. "required": ["id", "type", "data"],
  32617. "additionalProperties": false
  32618. },
  32619. "TuiToastShow": {
  32620. "type": "object",
  32621. "properties": {
  32622. "id": {
  32623. "type": "string",
  32624. "pattern": "^evt_"
  32625. },
  32626. "metadata": {
  32627. "type": "object"
  32628. },
  32629. "type": {
  32630. "type": "string",
  32631. "enum": ["tui.toast.show"]
  32632. },
  32633. "durable": {
  32634. "type": "object",
  32635. "properties": {
  32636. "aggregateID": {
  32637. "type": "string"
  32638. },
  32639. "seq": {
  32640. "type": "integer"
  32641. },
  32642. "version": {
  32643. "type": "integer"
  32644. }
  32645. },
  32646. "required": ["aggregateID", "seq", "version"],
  32647. "additionalProperties": false
  32648. },
  32649. "location": {
  32650. "$ref": "#/components/schemas/LocationRef"
  32651. },
  32652. "data": {
  32653. "type": "object",
  32654. "properties": {
  32655. "title": {
  32656. "type": "string"
  32657. },
  32658. "message": {
  32659. "type": "string"
  32660. },
  32661. "variant": {
  32662. "type": "string",
  32663. "enum": ["info", "success", "warning", "error"]
  32664. },
  32665. "duration": {
  32666. "type": "integer",
  32667. "exclusiveMinimum": 0
  32668. }
  32669. },
  32670. "required": ["message", "variant"],
  32671. "additionalProperties": false
  32672. }
  32673. },
  32674. "required": ["id", "type", "data"],
  32675. "additionalProperties": false
  32676. },
  32677. "TuiSessionSelect": {
  32678. "type": "object",
  32679. "properties": {
  32680. "id": {
  32681. "type": "string",
  32682. "pattern": "^evt_"
  32683. },
  32684. "metadata": {
  32685. "type": "object"
  32686. },
  32687. "type": {
  32688. "type": "string",
  32689. "enum": ["tui.session.select"]
  32690. },
  32691. "durable": {
  32692. "type": "object",
  32693. "properties": {
  32694. "aggregateID": {
  32695. "type": "string"
  32696. },
  32697. "seq": {
  32698. "type": "integer"
  32699. },
  32700. "version": {
  32701. "type": "integer"
  32702. }
  32703. },
  32704. "required": ["aggregateID", "seq", "version"],
  32705. "additionalProperties": false
  32706. },
  32707. "location": {
  32708. "$ref": "#/components/schemas/LocationRef"
  32709. },
  32710. "data": {
  32711. "type": "object",
  32712. "properties": {
  32713. "sessionID": {
  32714. "type": "string",
  32715. "pattern": "^ses",
  32716. "description": "Session ID to navigate to"
  32717. }
  32718. },
  32719. "required": ["sessionID"],
  32720. "additionalProperties": false
  32721. }
  32722. },
  32723. "required": ["id", "type", "data"],
  32724. "additionalProperties": false
  32725. },
  32726. "McpToolsChanged": {
  32727. "type": "object",
  32728. "properties": {
  32729. "id": {
  32730. "type": "string",
  32731. "pattern": "^evt_"
  32732. },
  32733. "metadata": {
  32734. "type": "object"
  32735. },
  32736. "type": {
  32737. "type": "string",
  32738. "enum": ["mcp.tools.changed"]
  32739. },
  32740. "durable": {
  32741. "type": "object",
  32742. "properties": {
  32743. "aggregateID": {
  32744. "type": "string"
  32745. },
  32746. "seq": {
  32747. "type": "integer"
  32748. },
  32749. "version": {
  32750. "type": "integer"
  32751. }
  32752. },
  32753. "required": ["aggregateID", "seq", "version"],
  32754. "additionalProperties": false
  32755. },
  32756. "location": {
  32757. "$ref": "#/components/schemas/LocationRef"
  32758. },
  32759. "data": {
  32760. "type": "object",
  32761. "properties": {
  32762. "server": {
  32763. "type": "string"
  32764. }
  32765. },
  32766. "required": ["server"],
  32767. "additionalProperties": false
  32768. }
  32769. },
  32770. "required": ["id", "type", "data"],
  32771. "additionalProperties": false
  32772. },
  32773. "McpBrowserOpenFailed": {
  32774. "type": "object",
  32775. "properties": {
  32776. "id": {
  32777. "type": "string",
  32778. "pattern": "^evt_"
  32779. },
  32780. "metadata": {
  32781. "type": "object"
  32782. },
  32783. "type": {
  32784. "type": "string",
  32785. "enum": ["mcp.browser.open.failed"]
  32786. },
  32787. "durable": {
  32788. "type": "object",
  32789. "properties": {
  32790. "aggregateID": {
  32791. "type": "string"
  32792. },
  32793. "seq": {
  32794. "type": "integer"
  32795. },
  32796. "version": {
  32797. "type": "integer"
  32798. }
  32799. },
  32800. "required": ["aggregateID", "seq", "version"],
  32801. "additionalProperties": false
  32802. },
  32803. "location": {
  32804. "$ref": "#/components/schemas/LocationRef"
  32805. },
  32806. "data": {
  32807. "type": "object",
  32808. "properties": {
  32809. "mcpName": {
  32810. "type": "string"
  32811. },
  32812. "url": {
  32813. "type": "string"
  32814. }
  32815. },
  32816. "required": ["mcpName", "url"],
  32817. "additionalProperties": false
  32818. }
  32819. },
  32820. "required": ["id", "type", "data"],
  32821. "additionalProperties": false
  32822. },
  32823. "CommandExecuted": {
  32824. "type": "object",
  32825. "properties": {
  32826. "id": {
  32827. "type": "string",
  32828. "pattern": "^evt_"
  32829. },
  32830. "metadata": {
  32831. "type": "object"
  32832. },
  32833. "type": {
  32834. "type": "string",
  32835. "enum": ["command.executed"]
  32836. },
  32837. "durable": {
  32838. "type": "object",
  32839. "properties": {
  32840. "aggregateID": {
  32841. "type": "string"
  32842. },
  32843. "seq": {
  32844. "type": "integer"
  32845. },
  32846. "version": {
  32847. "type": "integer"
  32848. }
  32849. },
  32850. "required": ["aggregateID", "seq", "version"],
  32851. "additionalProperties": false
  32852. },
  32853. "location": {
  32854. "$ref": "#/components/schemas/LocationRef"
  32855. },
  32856. "data": {
  32857. "type": "object",
  32858. "properties": {
  32859. "name": {
  32860. "type": "string"
  32861. },
  32862. "sessionID": {
  32863. "type": "string",
  32864. "pattern": "^ses"
  32865. },
  32866. "arguments": {
  32867. "type": "string"
  32868. },
  32869. "messageID": {
  32870. "type": "string",
  32871. "pattern": "^msg"
  32872. }
  32873. },
  32874. "required": ["name", "sessionID", "arguments", "messageID"],
  32875. "additionalProperties": false
  32876. }
  32877. },
  32878. "required": ["id", "type", "data"],
  32879. "additionalProperties": false
  32880. },
  32881. "ProjectUpdated": {
  32882. "type": "object",
  32883. "properties": {
  32884. "id": {
  32885. "type": "string",
  32886. "pattern": "^evt_"
  32887. },
  32888. "metadata": {
  32889. "type": "object"
  32890. },
  32891. "type": {
  32892. "type": "string",
  32893. "enum": ["project.updated"]
  32894. },
  32895. "durable": {
  32896. "type": "object",
  32897. "properties": {
  32898. "aggregateID": {
  32899. "type": "string"
  32900. },
  32901. "seq": {
  32902. "type": "integer"
  32903. },
  32904. "version": {
  32905. "type": "integer"
  32906. }
  32907. },
  32908. "required": ["aggregateID", "seq", "version"],
  32909. "additionalProperties": false
  32910. },
  32911. "location": {
  32912. "$ref": "#/components/schemas/LocationRef"
  32913. },
  32914. "data": {
  32915. "type": "object",
  32916. "properties": {
  32917. "id": {
  32918. "type": "string"
  32919. },
  32920. "worktree": {
  32921. "type": "string"
  32922. },
  32923. "vcs": {
  32924. "$ref": "#/components/schemas/ProjectVcs"
  32925. },
  32926. "name": {
  32927. "type": "string"
  32928. },
  32929. "icon": {
  32930. "$ref": "#/components/schemas/ProjectIcon"
  32931. },
  32932. "commands": {
  32933. "$ref": "#/components/schemas/ProjectCommands"
  32934. },
  32935. "time": {
  32936. "$ref": "#/components/schemas/ProjectTime"
  32937. },
  32938. "sandboxes": {
  32939. "type": "array",
  32940. "items": {
  32941. "type": "string"
  32942. }
  32943. }
  32944. },
  32945. "required": ["id", "worktree", "time", "sandboxes"],
  32946. "additionalProperties": false
  32947. }
  32948. },
  32949. "required": ["id", "type", "data"],
  32950. "additionalProperties": false
  32951. },
  32952. "SessionIdle": {
  32953. "type": "object",
  32954. "properties": {
  32955. "id": {
  32956. "type": "string",
  32957. "pattern": "^evt_"
  32958. },
  32959. "metadata": {
  32960. "type": "object"
  32961. },
  32962. "type": {
  32963. "type": "string",
  32964. "enum": ["session.idle"]
  32965. },
  32966. "durable": {
  32967. "type": "object",
  32968. "properties": {
  32969. "aggregateID": {
  32970. "type": "string"
  32971. },
  32972. "seq": {
  32973. "type": "integer"
  32974. },
  32975. "version": {
  32976. "type": "integer"
  32977. }
  32978. },
  32979. "required": ["aggregateID", "seq", "version"],
  32980. "additionalProperties": false
  32981. },
  32982. "location": {
  32983. "$ref": "#/components/schemas/LocationRef"
  32984. },
  32985. "data": {
  32986. "type": "object",
  32987. "properties": {
  32988. "sessionID": {
  32989. "type": "string",
  32990. "pattern": "^ses"
  32991. }
  32992. },
  32993. "required": ["sessionID"],
  32994. "additionalProperties": false
  32995. }
  32996. },
  32997. "required": ["id", "type", "data"],
  32998. "additionalProperties": false
  32999. },
  33000. "QuestionAsked": {
  33001. "type": "object",
  33002. "properties": {
  33003. "id": {
  33004. "type": "string",
  33005. "pattern": "^evt_"
  33006. },
  33007. "metadata": {
  33008. "type": "object"
  33009. },
  33010. "type": {
  33011. "type": "string",
  33012. "enum": ["question.asked"]
  33013. },
  33014. "durable": {
  33015. "type": "object",
  33016. "properties": {
  33017. "aggregateID": {
  33018. "type": "string"
  33019. },
  33020. "seq": {
  33021. "type": "integer"
  33022. },
  33023. "version": {
  33024. "type": "integer"
  33025. }
  33026. },
  33027. "required": ["aggregateID", "seq", "version"],
  33028. "additionalProperties": false
  33029. },
  33030. "location": {
  33031. "$ref": "#/components/schemas/LocationRef"
  33032. },
  33033. "data": {
  33034. "type": "object",
  33035. "properties": {
  33036. "id": {
  33037. "type": "string",
  33038. "pattern": "^que"
  33039. },
  33040. "sessionID": {
  33041. "type": "string",
  33042. "pattern": "^ses"
  33043. },
  33044. "questions": {
  33045. "type": "array",
  33046. "items": {
  33047. "$ref": "#/components/schemas/QuestionInfo"
  33048. },
  33049. "description": "Questions to ask"
  33050. },
  33051. "tool": {
  33052. "$ref": "#/components/schemas/QuestionTool"
  33053. }
  33054. },
  33055. "required": ["id", "sessionID", "questions"],
  33056. "additionalProperties": false
  33057. }
  33058. },
  33059. "required": ["id", "type", "data"],
  33060. "additionalProperties": false
  33061. },
  33062. "SessionCompacted": {
  33063. "type": "object",
  33064. "properties": {
  33065. "id": {
  33066. "type": "string",
  33067. "pattern": "^evt_"
  33068. },
  33069. "metadata": {
  33070. "type": "object"
  33071. },
  33072. "type": {
  33073. "type": "string",
  33074. "enum": ["session.compacted"]
  33075. },
  33076. "durable": {
  33077. "type": "object",
  33078. "properties": {
  33079. "aggregateID": {
  33080. "type": "string"
  33081. },
  33082. "seq": {
  33083. "type": "integer"
  33084. },
  33085. "version": {
  33086. "type": "integer"
  33087. }
  33088. },
  33089. "required": ["aggregateID", "seq", "version"],
  33090. "additionalProperties": false
  33091. },
  33092. "location": {
  33093. "$ref": "#/components/schemas/LocationRef"
  33094. },
  33095. "data": {
  33096. "type": "object",
  33097. "properties": {
  33098. "sessionID": {
  33099. "type": "string",
  33100. "pattern": "^ses"
  33101. }
  33102. },
  33103. "required": ["sessionID"],
  33104. "additionalProperties": false
  33105. }
  33106. },
  33107. "required": ["id", "type", "data"],
  33108. "additionalProperties": false
  33109. },
  33110. "VcsBranchUpdated": {
  33111. "type": "object",
  33112. "properties": {
  33113. "id": {
  33114. "type": "string",
  33115. "pattern": "^evt_"
  33116. },
  33117. "metadata": {
  33118. "type": "object"
  33119. },
  33120. "type": {
  33121. "type": "string",
  33122. "enum": ["vcs.branch.updated"]
  33123. },
  33124. "durable": {
  33125. "type": "object",
  33126. "properties": {
  33127. "aggregateID": {
  33128. "type": "string"
  33129. },
  33130. "seq": {
  33131. "type": "integer"
  33132. },
  33133. "version": {
  33134. "type": "integer"
  33135. }
  33136. },
  33137. "required": ["aggregateID", "seq", "version"],
  33138. "additionalProperties": false
  33139. },
  33140. "location": {
  33141. "$ref": "#/components/schemas/LocationRef"
  33142. },
  33143. "data": {
  33144. "type": "object",
  33145. "properties": {
  33146. "branch": {
  33147. "type": "string"
  33148. }
  33149. },
  33150. "additionalProperties": false
  33151. }
  33152. },
  33153. "required": ["id", "type", "data"],
  33154. "additionalProperties": false
  33155. },
  33156. "WorkspaceReady": {
  33157. "type": "object",
  33158. "properties": {
  33159. "id": {
  33160. "type": "string",
  33161. "pattern": "^evt_"
  33162. },
  33163. "metadata": {
  33164. "type": "object"
  33165. },
  33166. "type": {
  33167. "type": "string",
  33168. "enum": ["workspace.ready"]
  33169. },
  33170. "durable": {
  33171. "type": "object",
  33172. "properties": {
  33173. "aggregateID": {
  33174. "type": "string"
  33175. },
  33176. "seq": {
  33177. "type": "integer"
  33178. },
  33179. "version": {
  33180. "type": "integer"
  33181. }
  33182. },
  33183. "required": ["aggregateID", "seq", "version"],
  33184. "additionalProperties": false
  33185. },
  33186. "location": {
  33187. "$ref": "#/components/schemas/LocationRef"
  33188. },
  33189. "data": {
  33190. "type": "object",
  33191. "properties": {
  33192. "name": {
  33193. "type": "string"
  33194. }
  33195. },
  33196. "required": ["name"],
  33197. "additionalProperties": false
  33198. }
  33199. },
  33200. "required": ["id", "type", "data"],
  33201. "additionalProperties": false
  33202. },
  33203. "WorkspaceFailed": {
  33204. "type": "object",
  33205. "properties": {
  33206. "id": {
  33207. "type": "string",
  33208. "pattern": "^evt_"
  33209. },
  33210. "metadata": {
  33211. "type": "object"
  33212. },
  33213. "type": {
  33214. "type": "string",
  33215. "enum": ["workspace.failed"]
  33216. },
  33217. "durable": {
  33218. "type": "object",
  33219. "properties": {
  33220. "aggregateID": {
  33221. "type": "string"
  33222. },
  33223. "seq": {
  33224. "type": "integer"
  33225. },
  33226. "version": {
  33227. "type": "integer"
  33228. }
  33229. },
  33230. "required": ["aggregateID", "seq", "version"],
  33231. "additionalProperties": false
  33232. },
  33233. "location": {
  33234. "$ref": "#/components/schemas/LocationRef"
  33235. },
  33236. "data": {
  33237. "type": "object",
  33238. "properties": {
  33239. "message": {
  33240. "type": "string"
  33241. }
  33242. },
  33243. "required": ["message"],
  33244. "additionalProperties": false
  33245. }
  33246. },
  33247. "required": ["id", "type", "data"],
  33248. "additionalProperties": false
  33249. },
  33250. "WorkspaceStatus": {
  33251. "type": "object",
  33252. "properties": {
  33253. "id": {
  33254. "type": "string",
  33255. "pattern": "^evt_"
  33256. },
  33257. "metadata": {
  33258. "type": "object"
  33259. },
  33260. "type": {
  33261. "type": "string",
  33262. "enum": ["workspace.status"]
  33263. },
  33264. "durable": {
  33265. "type": "object",
  33266. "properties": {
  33267. "aggregateID": {
  33268. "type": "string"
  33269. },
  33270. "seq": {
  33271. "type": "integer"
  33272. },
  33273. "version": {
  33274. "type": "integer"
  33275. }
  33276. },
  33277. "required": ["aggregateID", "seq", "version"],
  33278. "additionalProperties": false
  33279. },
  33280. "location": {
  33281. "$ref": "#/components/schemas/LocationRef"
  33282. },
  33283. "data": {
  33284. "type": "object",
  33285. "properties": {
  33286. "workspaceID": {
  33287. "type": "string",
  33288. "pattern": "^wrk"
  33289. },
  33290. "status": {
  33291. "type": "string",
  33292. "enum": ["connected", "connecting", "disconnected", "error"]
  33293. }
  33294. },
  33295. "required": ["workspaceID", "status"],
  33296. "additionalProperties": false
  33297. }
  33298. },
  33299. "required": ["id", "type", "data"],
  33300. "additionalProperties": false
  33301. },
  33302. "WorktreeReady": {
  33303. "type": "object",
  33304. "properties": {
  33305. "id": {
  33306. "type": "string",
  33307. "pattern": "^evt_"
  33308. },
  33309. "metadata": {
  33310. "type": "object"
  33311. },
  33312. "type": {
  33313. "type": "string",
  33314. "enum": ["worktree.ready"]
  33315. },
  33316. "durable": {
  33317. "type": "object",
  33318. "properties": {
  33319. "aggregateID": {
  33320. "type": "string"
  33321. },
  33322. "seq": {
  33323. "type": "integer"
  33324. },
  33325. "version": {
  33326. "type": "integer"
  33327. }
  33328. },
  33329. "required": ["aggregateID", "seq", "version"],
  33330. "additionalProperties": false
  33331. },
  33332. "location": {
  33333. "$ref": "#/components/schemas/LocationRef"
  33334. },
  33335. "data": {
  33336. "type": "object",
  33337. "properties": {
  33338. "name": {
  33339. "type": "string"
  33340. },
  33341. "branch": {
  33342. "type": "string"
  33343. }
  33344. },
  33345. "required": ["name"],
  33346. "additionalProperties": false
  33347. }
  33348. },
  33349. "required": ["id", "type", "data"],
  33350. "additionalProperties": false
  33351. },
  33352. "WorktreeFailed": {
  33353. "type": "object",
  33354. "properties": {
  33355. "id": {
  33356. "type": "string",
  33357. "pattern": "^evt_"
  33358. },
  33359. "metadata": {
  33360. "type": "object"
  33361. },
  33362. "type": {
  33363. "type": "string",
  33364. "enum": ["worktree.failed"]
  33365. },
  33366. "durable": {
  33367. "type": "object",
  33368. "properties": {
  33369. "aggregateID": {
  33370. "type": "string"
  33371. },
  33372. "seq": {
  33373. "type": "integer"
  33374. },
  33375. "version": {
  33376. "type": "integer"
  33377. }
  33378. },
  33379. "required": ["aggregateID", "seq", "version"],
  33380. "additionalProperties": false
  33381. },
  33382. "location": {
  33383. "$ref": "#/components/schemas/LocationRef"
  33384. },
  33385. "data": {
  33386. "type": "object",
  33387. "properties": {
  33388. "message": {
  33389. "type": "string"
  33390. }
  33391. },
  33392. "required": ["message"],
  33393. "additionalProperties": false
  33394. }
  33395. },
  33396. "required": ["id", "type", "data"],
  33397. "additionalProperties": false
  33398. },
  33399. "ServerConnected": {
  33400. "type": "object",
  33401. "properties": {
  33402. "id": {
  33403. "type": "string",
  33404. "pattern": "^evt_"
  33405. },
  33406. "metadata": {
  33407. "type": "object"
  33408. },
  33409. "type": {
  33410. "type": "string",
  33411. "enum": ["server.connected"]
  33412. },
  33413. "durable": {
  33414. "type": "object",
  33415. "properties": {
  33416. "aggregateID": {
  33417. "type": "string"
  33418. },
  33419. "seq": {
  33420. "type": "integer"
  33421. },
  33422. "version": {
  33423. "type": "integer"
  33424. }
  33425. },
  33426. "required": ["aggregateID", "seq", "version"],
  33427. "additionalProperties": false
  33428. },
  33429. "location": {
  33430. "$ref": "#/components/schemas/LocationRef"
  33431. },
  33432. "data": {
  33433. "type": "object",
  33434. "properties": {}
  33435. }
  33436. },
  33437. "required": ["id", "type", "data"],
  33438. "additionalProperties": false
  33439. },
  33440. "GlobalDisposed": {
  33441. "type": "object",
  33442. "properties": {
  33443. "id": {
  33444. "type": "string",
  33445. "pattern": "^evt_"
  33446. },
  33447. "metadata": {
  33448. "type": "object"
  33449. },
  33450. "type": {
  33451. "type": "string",
  33452. "enum": ["global.disposed"]
  33453. },
  33454. "durable": {
  33455. "type": "object",
  33456. "properties": {
  33457. "aggregateID": {
  33458. "type": "string"
  33459. },
  33460. "seq": {
  33461. "type": "integer"
  33462. },
  33463. "version": {
  33464. "type": "integer"
  33465. }
  33466. },
  33467. "required": ["aggregateID", "seq", "version"],
  33468. "additionalProperties": false
  33469. },
  33470. "location": {
  33471. "$ref": "#/components/schemas/LocationRef"
  33472. },
  33473. "data": {
  33474. "type": "object",
  33475. "properties": {}
  33476. }
  33477. },
  33478. "required": ["id", "type", "data"],
  33479. "additionalProperties": false
  33480. },
  33481. "QuestionV2Request": {
  33482. "type": "object",
  33483. "properties": {
  33484. "id": {
  33485. "type": "string",
  33486. "pattern": "^que"
  33487. },
  33488. "sessionID": {
  33489. "type": "string",
  33490. "pattern": "^ses"
  33491. },
  33492. "questions": {
  33493. "type": "array",
  33494. "items": {
  33495. "$ref": "#/components/schemas/QuestionV2Info"
  33496. },
  33497. "description": "Questions to ask"
  33498. },
  33499. "tool": {
  33500. "$ref": "#/components/schemas/QuestionV2Tool"
  33501. }
  33502. },
  33503. "required": ["id", "sessionID", "questions"],
  33504. "additionalProperties": false
  33505. },
  33506. "QuestionV2Reply": {
  33507. "type": "object",
  33508. "properties": {
  33509. "answers": {
  33510. "type": "array",
  33511. "items": {
  33512. "$ref": "#/components/schemas/QuestionV2Answer"
  33513. },
  33514. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33515. }
  33516. },
  33517. "required": ["answers"],
  33518. "additionalProperties": false
  33519. },
  33520. "ReferenceLocalSource": {
  33521. "type": "object",
  33522. "properties": {
  33523. "type": {
  33524. "type": "string",
  33525. "enum": ["local"]
  33526. },
  33527. "path": {
  33528. "type": "string"
  33529. },
  33530. "description": {
  33531. "type": "string"
  33532. },
  33533. "hidden": {
  33534. "type": "boolean"
  33535. }
  33536. },
  33537. "required": ["type", "path"],
  33538. "additionalProperties": false
  33539. },
  33540. "ReferenceGitSource": {
  33541. "type": "object",
  33542. "properties": {
  33543. "type": {
  33544. "type": "string",
  33545. "enum": ["git"]
  33546. },
  33547. "repository": {
  33548. "type": "string"
  33549. },
  33550. "branch": {
  33551. "type": "string"
  33552. },
  33553. "description": {
  33554. "type": "string"
  33555. },
  33556. "hidden": {
  33557. "type": "boolean"
  33558. }
  33559. },
  33560. "required": ["type", "repository"],
  33561. "additionalProperties": false
  33562. },
  33563. "ReferenceSource": {
  33564. "anyOf": [
  33565. {
  33566. "$ref": "#/components/schemas/ReferenceLocalSource"
  33567. },
  33568. {
  33569. "$ref": "#/components/schemas/ReferenceGitSource"
  33570. }
  33571. ]
  33572. },
  33573. "ReferenceInfo": {
  33574. "type": "object",
  33575. "properties": {
  33576. "name": {
  33577. "type": "string"
  33578. },
  33579. "path": {
  33580. "type": "string"
  33581. },
  33582. "description": {
  33583. "type": "string"
  33584. },
  33585. "hidden": {
  33586. "type": "boolean"
  33587. },
  33588. "source": {
  33589. "$ref": "#/components/schemas/ReferenceSource"
  33590. }
  33591. },
  33592. "required": ["name", "path", "source"],
  33593. "additionalProperties": false
  33594. },
  33595. "ProjectCopyCopy": {
  33596. "type": "object",
  33597. "properties": {
  33598. "directory": {
  33599. "type": "string"
  33600. }
  33601. },
  33602. "required": ["directory"],
  33603. "additionalProperties": false
  33604. },
  33605. "EventModels-devRefreshed": {
  33606. "type": "object",
  33607. "properties": {
  33608. "id": {
  33609. "type": "string",
  33610. "pattern": "^evt_"
  33611. },
  33612. "type": {
  33613. "type": "string",
  33614. "enum": ["models-dev.refreshed"]
  33615. },
  33616. "properties": {
  33617. "type": "object",
  33618. "properties": {}
  33619. }
  33620. },
  33621. "required": ["id", "type", "properties"],
  33622. "additionalProperties": false
  33623. },
  33624. "EventIntegrationUpdated": {
  33625. "type": "object",
  33626. "properties": {
  33627. "id": {
  33628. "type": "string",
  33629. "pattern": "^evt_"
  33630. },
  33631. "type": {
  33632. "type": "string",
  33633. "enum": ["integration.updated"]
  33634. },
  33635. "properties": {
  33636. "type": "object",
  33637. "properties": {}
  33638. }
  33639. },
  33640. "required": ["id", "type", "properties"],
  33641. "additionalProperties": false
  33642. },
  33643. "EventIntegrationConnectionUpdated": {
  33644. "type": "object",
  33645. "properties": {
  33646. "id": {
  33647. "type": "string",
  33648. "pattern": "^evt_"
  33649. },
  33650. "type": {
  33651. "type": "string",
  33652. "enum": ["integration.connection.updated"]
  33653. },
  33654. "properties": {
  33655. "type": "object",
  33656. "properties": {
  33657. "integrationID": {
  33658. "type": "string"
  33659. }
  33660. },
  33661. "required": ["integrationID"],
  33662. "additionalProperties": false
  33663. }
  33664. },
  33665. "required": ["id", "type", "properties"],
  33666. "additionalProperties": false
  33667. },
  33668. "EventCatalogUpdated": {
  33669. "type": "object",
  33670. "properties": {
  33671. "id": {
  33672. "type": "string",
  33673. "pattern": "^evt_"
  33674. },
  33675. "type": {
  33676. "type": "string",
  33677. "enum": ["catalog.updated"]
  33678. },
  33679. "properties": {
  33680. "type": "object",
  33681. "properties": {}
  33682. }
  33683. },
  33684. "required": ["id", "type", "properties"],
  33685. "additionalProperties": false
  33686. },
  33687. "EventSessionCreated": {
  33688. "type": "object",
  33689. "properties": {
  33690. "id": {
  33691. "type": "string",
  33692. "pattern": "^evt_"
  33693. },
  33694. "type": {
  33695. "type": "string",
  33696. "enum": ["session.created"]
  33697. },
  33698. "properties": {
  33699. "type": "object",
  33700. "properties": {
  33701. "sessionID": {
  33702. "type": "string",
  33703. "pattern": "^ses"
  33704. },
  33705. "info": {
  33706. "$ref": "#/components/schemas/Session"
  33707. }
  33708. },
  33709. "required": ["sessionID", "info"],
  33710. "additionalProperties": false
  33711. }
  33712. },
  33713. "required": ["id", "type", "properties"],
  33714. "additionalProperties": false
  33715. },
  33716. "EventSessionUpdated": {
  33717. "type": "object",
  33718. "properties": {
  33719. "id": {
  33720. "type": "string",
  33721. "pattern": "^evt_"
  33722. },
  33723. "type": {
  33724. "type": "string",
  33725. "enum": ["session.updated"]
  33726. },
  33727. "properties": {
  33728. "type": "object",
  33729. "properties": {
  33730. "sessionID": {
  33731. "type": "string",
  33732. "pattern": "^ses"
  33733. },
  33734. "info": {
  33735. "$ref": "#/components/schemas/Session"
  33736. }
  33737. },
  33738. "required": ["sessionID", "info"],
  33739. "additionalProperties": false
  33740. }
  33741. },
  33742. "required": ["id", "type", "properties"],
  33743. "additionalProperties": false
  33744. },
  33745. "EventSessionDeleted": {
  33746. "type": "object",
  33747. "properties": {
  33748. "id": {
  33749. "type": "string",
  33750. "pattern": "^evt_"
  33751. },
  33752. "type": {
  33753. "type": "string",
  33754. "enum": ["session.deleted"]
  33755. },
  33756. "properties": {
  33757. "type": "object",
  33758. "properties": {
  33759. "sessionID": {
  33760. "type": "string",
  33761. "pattern": "^ses"
  33762. },
  33763. "info": {
  33764. "$ref": "#/components/schemas/Session"
  33765. }
  33766. },
  33767. "required": ["sessionID", "info"],
  33768. "additionalProperties": false
  33769. }
  33770. },
  33771. "required": ["id", "type", "properties"],
  33772. "additionalProperties": false
  33773. },
  33774. "EventMessageUpdated": {
  33775. "type": "object",
  33776. "properties": {
  33777. "id": {
  33778. "type": "string",
  33779. "pattern": "^evt_"
  33780. },
  33781. "type": {
  33782. "type": "string",
  33783. "enum": ["message.updated"]
  33784. },
  33785. "properties": {
  33786. "type": "object",
  33787. "properties": {
  33788. "sessionID": {
  33789. "type": "string",
  33790. "pattern": "^ses"
  33791. },
  33792. "info": {
  33793. "$ref": "#/components/schemas/Message"
  33794. }
  33795. },
  33796. "required": ["sessionID", "info"],
  33797. "additionalProperties": false
  33798. }
  33799. },
  33800. "required": ["id", "type", "properties"],
  33801. "additionalProperties": false
  33802. },
  33803. "EventMessageRemoved": {
  33804. "type": "object",
  33805. "properties": {
  33806. "id": {
  33807. "type": "string",
  33808. "pattern": "^evt_"
  33809. },
  33810. "type": {
  33811. "type": "string",
  33812. "enum": ["message.removed"]
  33813. },
  33814. "properties": {
  33815. "type": "object",
  33816. "properties": {
  33817. "sessionID": {
  33818. "type": "string",
  33819. "pattern": "^ses"
  33820. },
  33821. "messageID": {
  33822. "type": "string",
  33823. "pattern": "^msg"
  33824. }
  33825. },
  33826. "required": ["sessionID", "messageID"],
  33827. "additionalProperties": false
  33828. }
  33829. },
  33830. "required": ["id", "type", "properties"],
  33831. "additionalProperties": false
  33832. },
  33833. "EventMessagePartUpdated": {
  33834. "type": "object",
  33835. "properties": {
  33836. "id": {
  33837. "type": "string",
  33838. "pattern": "^evt_"
  33839. },
  33840. "type": {
  33841. "type": "string",
  33842. "enum": ["message.part.updated"]
  33843. },
  33844. "properties": {
  33845. "type": "object",
  33846. "properties": {
  33847. "sessionID": {
  33848. "type": "string",
  33849. "pattern": "^ses"
  33850. },
  33851. "part": {
  33852. "$ref": "#/components/schemas/Part"
  33853. },
  33854. "time": {
  33855. "type": "number"
  33856. }
  33857. },
  33858. "required": ["sessionID", "part", "time"],
  33859. "additionalProperties": false
  33860. }
  33861. },
  33862. "required": ["id", "type", "properties"],
  33863. "additionalProperties": false
  33864. },
  33865. "EventMessagePartRemoved": {
  33866. "type": "object",
  33867. "properties": {
  33868. "id": {
  33869. "type": "string",
  33870. "pattern": "^evt_"
  33871. },
  33872. "type": {
  33873. "type": "string",
  33874. "enum": ["message.part.removed"]
  33875. },
  33876. "properties": {
  33877. "type": "object",
  33878. "properties": {
  33879. "sessionID": {
  33880. "type": "string",
  33881. "pattern": "^ses"
  33882. },
  33883. "messageID": {
  33884. "type": "string",
  33885. "pattern": "^msg"
  33886. },
  33887. "partID": {
  33888. "type": "string",
  33889. "pattern": "^prt"
  33890. }
  33891. },
  33892. "required": ["sessionID", "messageID", "partID"],
  33893. "additionalProperties": false
  33894. }
  33895. },
  33896. "required": ["id", "type", "properties"],
  33897. "additionalProperties": false
  33898. },
  33899. "EventSessionNextAgentSwitched": {
  33900. "type": "object",
  33901. "properties": {
  33902. "id": {
  33903. "type": "string",
  33904. "pattern": "^evt_"
  33905. },
  33906. "type": {
  33907. "type": "string",
  33908. "enum": ["session.next.agent.switched"]
  33909. },
  33910. "properties": {
  33911. "type": "object",
  33912. "properties": {
  33913. "timestamp": {
  33914. "type": "number"
  33915. },
  33916. "sessionID": {
  33917. "type": "string",
  33918. "pattern": "^ses"
  33919. },
  33920. "messageID": {
  33921. "type": "string",
  33922. "pattern": "^msg_"
  33923. },
  33924. "agent": {
  33925. "type": "string"
  33926. }
  33927. },
  33928. "required": ["timestamp", "sessionID", "messageID", "agent"],
  33929. "additionalProperties": false
  33930. }
  33931. },
  33932. "required": ["id", "type", "properties"],
  33933. "additionalProperties": false
  33934. },
  33935. "EventSessionNextModelSwitched": {
  33936. "type": "object",
  33937. "properties": {
  33938. "id": {
  33939. "type": "string",
  33940. "pattern": "^evt_"
  33941. },
  33942. "type": {
  33943. "type": "string",
  33944. "enum": ["session.next.model.switched"]
  33945. },
  33946. "properties": {
  33947. "type": "object",
  33948. "properties": {
  33949. "timestamp": {
  33950. "type": "number"
  33951. },
  33952. "sessionID": {
  33953. "type": "string",
  33954. "pattern": "^ses"
  33955. },
  33956. "messageID": {
  33957. "type": "string",
  33958. "pattern": "^msg_"
  33959. },
  33960. "model": {
  33961. "$ref": "#/components/schemas/ModelRef"
  33962. }
  33963. },
  33964. "required": ["timestamp", "sessionID", "messageID", "model"],
  33965. "additionalProperties": false
  33966. }
  33967. },
  33968. "required": ["id", "type", "properties"],
  33969. "additionalProperties": false
  33970. },
  33971. "EventSessionNextMoved": {
  33972. "type": "object",
  33973. "properties": {
  33974. "id": {
  33975. "type": "string",
  33976. "pattern": "^evt_"
  33977. },
  33978. "type": {
  33979. "type": "string",
  33980. "enum": ["session.next.moved"]
  33981. },
  33982. "properties": {
  33983. "type": "object",
  33984. "properties": {
  33985. "timestamp": {
  33986. "type": "number"
  33987. },
  33988. "sessionID": {
  33989. "type": "string",
  33990. "pattern": "^ses"
  33991. },
  33992. "location": {
  33993. "$ref": "#/components/schemas/LocationRef"
  33994. },
  33995. "subdirectory": {
  33996. "type": "string"
  33997. }
  33998. },
  33999. "required": ["timestamp", "sessionID", "location"],
  34000. "additionalProperties": false
  34001. }
  34002. },
  34003. "required": ["id", "type", "properties"],
  34004. "additionalProperties": false
  34005. },
  34006. "EventSessionNextPrompted": {
  34007. "type": "object",
  34008. "properties": {
  34009. "id": {
  34010. "type": "string",
  34011. "pattern": "^evt_"
  34012. },
  34013. "type": {
  34014. "type": "string",
  34015. "enum": ["session.next.prompted"]
  34016. },
  34017. "properties": {
  34018. "type": "object",
  34019. "properties": {
  34020. "timestamp": {
  34021. "type": "number"
  34022. },
  34023. "sessionID": {
  34024. "type": "string",
  34025. "pattern": "^ses"
  34026. },
  34027. "messageID": {
  34028. "type": "string",
  34029. "pattern": "^msg_"
  34030. },
  34031. "prompt": {
  34032. "$ref": "#/components/schemas/Prompt"
  34033. },
  34034. "delivery": {
  34035. "type": "string",
  34036. "enum": ["steer", "queue"]
  34037. }
  34038. },
  34039. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34040. "additionalProperties": false
  34041. }
  34042. },
  34043. "required": ["id", "type", "properties"],
  34044. "additionalProperties": false
  34045. },
  34046. "EventSessionNextPromptAdmitted": {
  34047. "type": "object",
  34048. "properties": {
  34049. "id": {
  34050. "type": "string",
  34051. "pattern": "^evt_"
  34052. },
  34053. "type": {
  34054. "type": "string",
  34055. "enum": ["session.next.prompt.admitted"]
  34056. },
  34057. "properties": {
  34058. "type": "object",
  34059. "properties": {
  34060. "timestamp": {
  34061. "type": "number"
  34062. },
  34063. "sessionID": {
  34064. "type": "string",
  34065. "pattern": "^ses"
  34066. },
  34067. "messageID": {
  34068. "type": "string",
  34069. "pattern": "^msg_"
  34070. },
  34071. "prompt": {
  34072. "$ref": "#/components/schemas/Prompt"
  34073. },
  34074. "delivery": {
  34075. "type": "string",
  34076. "enum": ["steer", "queue"]
  34077. }
  34078. },
  34079. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34080. "additionalProperties": false
  34081. }
  34082. },
  34083. "required": ["id", "type", "properties"],
  34084. "additionalProperties": false
  34085. },
  34086. "EventSessionNextContextUpdated": {
  34087. "type": "object",
  34088. "properties": {
  34089. "id": {
  34090. "type": "string",
  34091. "pattern": "^evt_"
  34092. },
  34093. "type": {
  34094. "type": "string",
  34095. "enum": ["session.next.context.updated"]
  34096. },
  34097. "properties": {
  34098. "type": "object",
  34099. "properties": {
  34100. "timestamp": {
  34101. "type": "number"
  34102. },
  34103. "sessionID": {
  34104. "type": "string",
  34105. "pattern": "^ses"
  34106. },
  34107. "messageID": {
  34108. "type": "string",
  34109. "pattern": "^msg_"
  34110. },
  34111. "text": {
  34112. "type": "string"
  34113. }
  34114. },
  34115. "required": ["timestamp", "sessionID", "messageID", "text"],
  34116. "additionalProperties": false
  34117. }
  34118. },
  34119. "required": ["id", "type", "properties"],
  34120. "additionalProperties": false
  34121. },
  34122. "EventSessionNextSynthetic": {
  34123. "type": "object",
  34124. "properties": {
  34125. "id": {
  34126. "type": "string",
  34127. "pattern": "^evt_"
  34128. },
  34129. "type": {
  34130. "type": "string",
  34131. "enum": ["session.next.synthetic"]
  34132. },
  34133. "properties": {
  34134. "type": "object",
  34135. "properties": {
  34136. "timestamp": {
  34137. "type": "number"
  34138. },
  34139. "sessionID": {
  34140. "type": "string",
  34141. "pattern": "^ses"
  34142. },
  34143. "messageID": {
  34144. "type": "string",
  34145. "pattern": "^msg_"
  34146. },
  34147. "text": {
  34148. "type": "string"
  34149. }
  34150. },
  34151. "required": ["timestamp", "sessionID", "messageID", "text"],
  34152. "additionalProperties": false
  34153. }
  34154. },
  34155. "required": ["id", "type", "properties"],
  34156. "additionalProperties": false
  34157. },
  34158. "EventSessionNextShellStarted": {
  34159. "type": "object",
  34160. "properties": {
  34161. "id": {
  34162. "type": "string",
  34163. "pattern": "^evt_"
  34164. },
  34165. "type": {
  34166. "type": "string",
  34167. "enum": ["session.next.shell.started"]
  34168. },
  34169. "properties": {
  34170. "type": "object",
  34171. "properties": {
  34172. "timestamp": {
  34173. "type": "number"
  34174. },
  34175. "sessionID": {
  34176. "type": "string",
  34177. "pattern": "^ses"
  34178. },
  34179. "messageID": {
  34180. "type": "string",
  34181. "pattern": "^msg_"
  34182. },
  34183. "callID": {
  34184. "type": "string"
  34185. },
  34186. "command": {
  34187. "type": "string"
  34188. }
  34189. },
  34190. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  34191. "additionalProperties": false
  34192. }
  34193. },
  34194. "required": ["id", "type", "properties"],
  34195. "additionalProperties": false
  34196. },
  34197. "EventSessionNextShellEnded": {
  34198. "type": "object",
  34199. "properties": {
  34200. "id": {
  34201. "type": "string",
  34202. "pattern": "^evt_"
  34203. },
  34204. "type": {
  34205. "type": "string",
  34206. "enum": ["session.next.shell.ended"]
  34207. },
  34208. "properties": {
  34209. "type": "object",
  34210. "properties": {
  34211. "timestamp": {
  34212. "type": "number"
  34213. },
  34214. "sessionID": {
  34215. "type": "string",
  34216. "pattern": "^ses"
  34217. },
  34218. "callID": {
  34219. "type": "string"
  34220. },
  34221. "output": {
  34222. "type": "string"
  34223. }
  34224. },
  34225. "required": ["timestamp", "sessionID", "callID", "output"],
  34226. "additionalProperties": false
  34227. }
  34228. },
  34229. "required": ["id", "type", "properties"],
  34230. "additionalProperties": false
  34231. },
  34232. "EventSessionNextStepStarted": {
  34233. "type": "object",
  34234. "properties": {
  34235. "id": {
  34236. "type": "string",
  34237. "pattern": "^evt_"
  34238. },
  34239. "type": {
  34240. "type": "string",
  34241. "enum": ["session.next.step.started"]
  34242. },
  34243. "properties": {
  34244. "type": "object",
  34245. "properties": {
  34246. "timestamp": {
  34247. "type": "number"
  34248. },
  34249. "sessionID": {
  34250. "type": "string",
  34251. "pattern": "^ses"
  34252. },
  34253. "assistantMessageID": {
  34254. "type": "string",
  34255. "pattern": "^msg_"
  34256. },
  34257. "agent": {
  34258. "type": "string"
  34259. },
  34260. "model": {
  34261. "$ref": "#/components/schemas/ModelRef"
  34262. },
  34263. "snapshot": {
  34264. "type": "string"
  34265. }
  34266. },
  34267. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  34268. "additionalProperties": false
  34269. }
  34270. },
  34271. "required": ["id", "type", "properties"],
  34272. "additionalProperties": false
  34273. },
  34274. "EventSessionNextStepEnded": {
  34275. "type": "object",
  34276. "properties": {
  34277. "id": {
  34278. "type": "string",
  34279. "pattern": "^evt_"
  34280. },
  34281. "type": {
  34282. "type": "string",
  34283. "enum": ["session.next.step.ended"]
  34284. },
  34285. "properties": {
  34286. "type": "object",
  34287. "properties": {
  34288. "timestamp": {
  34289. "type": "number"
  34290. },
  34291. "sessionID": {
  34292. "type": "string",
  34293. "pattern": "^ses"
  34294. },
  34295. "assistantMessageID": {
  34296. "type": "string",
  34297. "pattern": "^msg_"
  34298. },
  34299. "finish": {
  34300. "type": "string"
  34301. },
  34302. "cost": {
  34303. "type": "number"
  34304. },
  34305. "tokens": {
  34306. "type": "object",
  34307. "properties": {
  34308. "input": {
  34309. "type": "number"
  34310. },
  34311. "output": {
  34312. "type": "number"
  34313. },
  34314. "reasoning": {
  34315. "type": "number"
  34316. },
  34317. "cache": {
  34318. "type": "object",
  34319. "properties": {
  34320. "read": {
  34321. "type": "number"
  34322. },
  34323. "write": {
  34324. "type": "number"
  34325. }
  34326. },
  34327. "required": ["read", "write"],
  34328. "additionalProperties": false
  34329. }
  34330. },
  34331. "required": ["input", "output", "reasoning", "cache"],
  34332. "additionalProperties": false
  34333. },
  34334. "snapshot": {
  34335. "type": "string"
  34336. },
  34337. "files": {
  34338. "type": "array",
  34339. "items": {
  34340. "type": "string"
  34341. }
  34342. }
  34343. },
  34344. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34345. "additionalProperties": false
  34346. }
  34347. },
  34348. "required": ["id", "type", "properties"],
  34349. "additionalProperties": false
  34350. },
  34351. "EventSessionNextStepFailed": {
  34352. "type": "object",
  34353. "properties": {
  34354. "id": {
  34355. "type": "string",
  34356. "pattern": "^evt_"
  34357. },
  34358. "type": {
  34359. "type": "string",
  34360. "enum": ["session.next.step.failed"]
  34361. },
  34362. "properties": {
  34363. "type": "object",
  34364. "properties": {
  34365. "timestamp": {
  34366. "type": "number"
  34367. },
  34368. "sessionID": {
  34369. "type": "string",
  34370. "pattern": "^ses"
  34371. },
  34372. "assistantMessageID": {
  34373. "type": "string",
  34374. "pattern": "^msg_"
  34375. },
  34376. "error": {
  34377. "$ref": "#/components/schemas/SessionErrorUnknown"
  34378. }
  34379. },
  34380. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34381. "additionalProperties": false
  34382. }
  34383. },
  34384. "required": ["id", "type", "properties"],
  34385. "additionalProperties": false
  34386. },
  34387. "EventSessionNextTextStarted": {
  34388. "type": "object",
  34389. "properties": {
  34390. "id": {
  34391. "type": "string",
  34392. "pattern": "^evt_"
  34393. },
  34394. "type": {
  34395. "type": "string",
  34396. "enum": ["session.next.text.started"]
  34397. },
  34398. "properties": {
  34399. "type": "object",
  34400. "properties": {
  34401. "timestamp": {
  34402. "type": "number"
  34403. },
  34404. "sessionID": {
  34405. "type": "string",
  34406. "pattern": "^ses"
  34407. },
  34408. "assistantMessageID": {
  34409. "type": "string",
  34410. "pattern": "^msg_"
  34411. },
  34412. "textID": {
  34413. "type": "string"
  34414. }
  34415. },
  34416. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34417. "additionalProperties": false
  34418. }
  34419. },
  34420. "required": ["id", "type", "properties"],
  34421. "additionalProperties": false
  34422. },
  34423. "EventSessionNextTextDelta": {
  34424. "type": "object",
  34425. "properties": {
  34426. "id": {
  34427. "type": "string",
  34428. "pattern": "^evt_"
  34429. },
  34430. "type": {
  34431. "type": "string",
  34432. "enum": ["session.next.text.delta"]
  34433. },
  34434. "properties": {
  34435. "type": "object",
  34436. "properties": {
  34437. "timestamp": {
  34438. "type": "number"
  34439. },
  34440. "sessionID": {
  34441. "type": "string",
  34442. "pattern": "^ses"
  34443. },
  34444. "assistantMessageID": {
  34445. "type": "string",
  34446. "pattern": "^msg_"
  34447. },
  34448. "textID": {
  34449. "type": "string"
  34450. },
  34451. "delta": {
  34452. "type": "string"
  34453. }
  34454. },
  34455. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34456. "additionalProperties": false
  34457. }
  34458. },
  34459. "required": ["id", "type", "properties"],
  34460. "additionalProperties": false
  34461. },
  34462. "EventSessionNextTextEnded": {
  34463. "type": "object",
  34464. "properties": {
  34465. "id": {
  34466. "type": "string",
  34467. "pattern": "^evt_"
  34468. },
  34469. "type": {
  34470. "type": "string",
  34471. "enum": ["session.next.text.ended"]
  34472. },
  34473. "properties": {
  34474. "type": "object",
  34475. "properties": {
  34476. "timestamp": {
  34477. "type": "number"
  34478. },
  34479. "sessionID": {
  34480. "type": "string",
  34481. "pattern": "^ses"
  34482. },
  34483. "assistantMessageID": {
  34484. "type": "string",
  34485. "pattern": "^msg_"
  34486. },
  34487. "textID": {
  34488. "type": "string"
  34489. },
  34490. "text": {
  34491. "type": "string"
  34492. }
  34493. },
  34494. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34495. "additionalProperties": false
  34496. }
  34497. },
  34498. "required": ["id", "type", "properties"],
  34499. "additionalProperties": false
  34500. },
  34501. "EventSessionNextReasoningStarted": {
  34502. "type": "object",
  34503. "properties": {
  34504. "id": {
  34505. "type": "string",
  34506. "pattern": "^evt_"
  34507. },
  34508. "type": {
  34509. "type": "string",
  34510. "enum": ["session.next.reasoning.started"]
  34511. },
  34512. "properties": {
  34513. "type": "object",
  34514. "properties": {
  34515. "timestamp": {
  34516. "type": "number"
  34517. },
  34518. "sessionID": {
  34519. "type": "string",
  34520. "pattern": "^ses"
  34521. },
  34522. "assistantMessageID": {
  34523. "type": "string",
  34524. "pattern": "^msg_"
  34525. },
  34526. "reasoningID": {
  34527. "type": "string"
  34528. },
  34529. "providerMetadata": {
  34530. "$ref": "#/components/schemas/LLMProviderMetadata"
  34531. }
  34532. },
  34533. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34534. "additionalProperties": false
  34535. }
  34536. },
  34537. "required": ["id", "type", "properties"],
  34538. "additionalProperties": false
  34539. },
  34540. "EventSessionNextReasoningDelta": {
  34541. "type": "object",
  34542. "properties": {
  34543. "id": {
  34544. "type": "string",
  34545. "pattern": "^evt_"
  34546. },
  34547. "type": {
  34548. "type": "string",
  34549. "enum": ["session.next.reasoning.delta"]
  34550. },
  34551. "properties": {
  34552. "type": "object",
  34553. "properties": {
  34554. "timestamp": {
  34555. "type": "number"
  34556. },
  34557. "sessionID": {
  34558. "type": "string",
  34559. "pattern": "^ses"
  34560. },
  34561. "assistantMessageID": {
  34562. "type": "string",
  34563. "pattern": "^msg_"
  34564. },
  34565. "reasoningID": {
  34566. "type": "string"
  34567. },
  34568. "delta": {
  34569. "type": "string"
  34570. }
  34571. },
  34572. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34573. "additionalProperties": false
  34574. }
  34575. },
  34576. "required": ["id", "type", "properties"],
  34577. "additionalProperties": false
  34578. },
  34579. "EventSessionNextReasoningEnded": {
  34580. "type": "object",
  34581. "properties": {
  34582. "id": {
  34583. "type": "string",
  34584. "pattern": "^evt_"
  34585. },
  34586. "type": {
  34587. "type": "string",
  34588. "enum": ["session.next.reasoning.ended"]
  34589. },
  34590. "properties": {
  34591. "type": "object",
  34592. "properties": {
  34593. "timestamp": {
  34594. "type": "number"
  34595. },
  34596. "sessionID": {
  34597. "type": "string",
  34598. "pattern": "^ses"
  34599. },
  34600. "assistantMessageID": {
  34601. "type": "string",
  34602. "pattern": "^msg_"
  34603. },
  34604. "reasoningID": {
  34605. "type": "string"
  34606. },
  34607. "text": {
  34608. "type": "string"
  34609. },
  34610. "providerMetadata": {
  34611. "$ref": "#/components/schemas/LLMProviderMetadata"
  34612. }
  34613. },
  34614. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34615. "additionalProperties": false
  34616. }
  34617. },
  34618. "required": ["id", "type", "properties"],
  34619. "additionalProperties": false
  34620. },
  34621. "EventSessionNextToolInputStarted": {
  34622. "type": "object",
  34623. "properties": {
  34624. "id": {
  34625. "type": "string",
  34626. "pattern": "^evt_"
  34627. },
  34628. "type": {
  34629. "type": "string",
  34630. "enum": ["session.next.tool.input.started"]
  34631. },
  34632. "properties": {
  34633. "type": "object",
  34634. "properties": {
  34635. "timestamp": {
  34636. "type": "number"
  34637. },
  34638. "sessionID": {
  34639. "type": "string",
  34640. "pattern": "^ses"
  34641. },
  34642. "assistantMessageID": {
  34643. "type": "string",
  34644. "pattern": "^msg_"
  34645. },
  34646. "callID": {
  34647. "type": "string"
  34648. },
  34649. "name": {
  34650. "type": "string"
  34651. }
  34652. },
  34653. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34654. "additionalProperties": false
  34655. }
  34656. },
  34657. "required": ["id", "type", "properties"],
  34658. "additionalProperties": false
  34659. },
  34660. "EventSessionNextToolInputDelta": {
  34661. "type": "object",
  34662. "properties": {
  34663. "id": {
  34664. "type": "string",
  34665. "pattern": "^evt_"
  34666. },
  34667. "type": {
  34668. "type": "string",
  34669. "enum": ["session.next.tool.input.delta"]
  34670. },
  34671. "properties": {
  34672. "type": "object",
  34673. "properties": {
  34674. "timestamp": {
  34675. "type": "number"
  34676. },
  34677. "sessionID": {
  34678. "type": "string",
  34679. "pattern": "^ses"
  34680. },
  34681. "assistantMessageID": {
  34682. "type": "string",
  34683. "pattern": "^msg_"
  34684. },
  34685. "callID": {
  34686. "type": "string"
  34687. },
  34688. "delta": {
  34689. "type": "string"
  34690. }
  34691. },
  34692. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34693. "additionalProperties": false
  34694. }
  34695. },
  34696. "required": ["id", "type", "properties"],
  34697. "additionalProperties": false
  34698. },
  34699. "EventSessionNextToolInputEnded": {
  34700. "type": "object",
  34701. "properties": {
  34702. "id": {
  34703. "type": "string",
  34704. "pattern": "^evt_"
  34705. },
  34706. "type": {
  34707. "type": "string",
  34708. "enum": ["session.next.tool.input.ended"]
  34709. },
  34710. "properties": {
  34711. "type": "object",
  34712. "properties": {
  34713. "timestamp": {
  34714. "type": "number"
  34715. },
  34716. "sessionID": {
  34717. "type": "string",
  34718. "pattern": "^ses"
  34719. },
  34720. "assistantMessageID": {
  34721. "type": "string",
  34722. "pattern": "^msg_"
  34723. },
  34724. "callID": {
  34725. "type": "string"
  34726. },
  34727. "text": {
  34728. "type": "string"
  34729. }
  34730. },
  34731. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34732. "additionalProperties": false
  34733. }
  34734. },
  34735. "required": ["id", "type", "properties"],
  34736. "additionalProperties": false
  34737. },
  34738. "EventSessionNextToolCalled": {
  34739. "type": "object",
  34740. "properties": {
  34741. "id": {
  34742. "type": "string",
  34743. "pattern": "^evt_"
  34744. },
  34745. "type": {
  34746. "type": "string",
  34747. "enum": ["session.next.tool.called"]
  34748. },
  34749. "properties": {
  34750. "type": "object",
  34751. "properties": {
  34752. "timestamp": {
  34753. "type": "number"
  34754. },
  34755. "sessionID": {
  34756. "type": "string",
  34757. "pattern": "^ses"
  34758. },
  34759. "assistantMessageID": {
  34760. "type": "string",
  34761. "pattern": "^msg_"
  34762. },
  34763. "callID": {
  34764. "type": "string"
  34765. },
  34766. "tool": {
  34767. "type": "string"
  34768. },
  34769. "input": {
  34770. "type": "object"
  34771. },
  34772. "provider": {
  34773. "type": "object",
  34774. "properties": {
  34775. "executed": {
  34776. "type": "boolean"
  34777. },
  34778. "metadata": {
  34779. "$ref": "#/components/schemas/LLMProviderMetadata"
  34780. }
  34781. },
  34782. "required": ["executed"],
  34783. "additionalProperties": false
  34784. }
  34785. },
  34786. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34787. "additionalProperties": false
  34788. }
  34789. },
  34790. "required": ["id", "type", "properties"],
  34791. "additionalProperties": false
  34792. },
  34793. "EventSessionNextToolProgress": {
  34794. "type": "object",
  34795. "properties": {
  34796. "id": {
  34797. "type": "string",
  34798. "pattern": "^evt_"
  34799. },
  34800. "type": {
  34801. "type": "string",
  34802. "enum": ["session.next.tool.progress"]
  34803. },
  34804. "properties": {
  34805. "type": "object",
  34806. "properties": {
  34807. "timestamp": {
  34808. "type": "number"
  34809. },
  34810. "sessionID": {
  34811. "type": "string",
  34812. "pattern": "^ses"
  34813. },
  34814. "assistantMessageID": {
  34815. "type": "string",
  34816. "pattern": "^msg_"
  34817. },
  34818. "callID": {
  34819. "type": "string"
  34820. },
  34821. "structured": {
  34822. "type": "object"
  34823. },
  34824. "content": {
  34825. "type": "array",
  34826. "items": {
  34827. "$ref": "#/components/schemas/LLMToolContent"
  34828. }
  34829. }
  34830. },
  34831. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  34832. "additionalProperties": false
  34833. }
  34834. },
  34835. "required": ["id", "type", "properties"],
  34836. "additionalProperties": false
  34837. },
  34838. "EventSessionNextToolSuccess": {
  34839. "type": "object",
  34840. "properties": {
  34841. "id": {
  34842. "type": "string",
  34843. "pattern": "^evt_"
  34844. },
  34845. "type": {
  34846. "type": "string",
  34847. "enum": ["session.next.tool.success"]
  34848. },
  34849. "properties": {
  34850. "type": "object",
  34851. "properties": {
  34852. "timestamp": {
  34853. "type": "number"
  34854. },
  34855. "sessionID": {
  34856. "type": "string",
  34857. "pattern": "^ses"
  34858. },
  34859. "assistantMessageID": {
  34860. "type": "string",
  34861. "pattern": "^msg_"
  34862. },
  34863. "callID": {
  34864. "type": "string"
  34865. },
  34866. "structured": {
  34867. "type": "object"
  34868. },
  34869. "content": {
  34870. "type": "array",
  34871. "items": {
  34872. "$ref": "#/components/schemas/LLMToolContent"
  34873. }
  34874. },
  34875. "outputPaths": {
  34876. "type": "array",
  34877. "items": {
  34878. "type": "string"
  34879. }
  34880. },
  34881. "result": {},
  34882. "provider": {
  34883. "type": "object",
  34884. "properties": {
  34885. "executed": {
  34886. "type": "boolean"
  34887. },
  34888. "metadata": {
  34889. "$ref": "#/components/schemas/LLMProviderMetadata"
  34890. }
  34891. },
  34892. "required": ["executed"],
  34893. "additionalProperties": false
  34894. }
  34895. },
  34896. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  34897. "additionalProperties": false
  34898. }
  34899. },
  34900. "required": ["id", "type", "properties"],
  34901. "additionalProperties": false
  34902. },
  34903. "EventSessionNextToolFailed": {
  34904. "type": "object",
  34905. "properties": {
  34906. "id": {
  34907. "type": "string",
  34908. "pattern": "^evt_"
  34909. },
  34910. "type": {
  34911. "type": "string",
  34912. "enum": ["session.next.tool.failed"]
  34913. },
  34914. "properties": {
  34915. "type": "object",
  34916. "properties": {
  34917. "timestamp": {
  34918. "type": "number"
  34919. },
  34920. "sessionID": {
  34921. "type": "string",
  34922. "pattern": "^ses"
  34923. },
  34924. "assistantMessageID": {
  34925. "type": "string",
  34926. "pattern": "^msg_"
  34927. },
  34928. "callID": {
  34929. "type": "string"
  34930. },
  34931. "error": {
  34932. "$ref": "#/components/schemas/SessionErrorUnknown"
  34933. },
  34934. "result": {},
  34935. "provider": {
  34936. "type": "object",
  34937. "properties": {
  34938. "executed": {
  34939. "type": "boolean"
  34940. },
  34941. "metadata": {
  34942. "$ref": "#/components/schemas/LLMProviderMetadata"
  34943. }
  34944. },
  34945. "required": ["executed"],
  34946. "additionalProperties": false
  34947. }
  34948. },
  34949. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  34950. "additionalProperties": false
  34951. }
  34952. },
  34953. "required": ["id", "type", "properties"],
  34954. "additionalProperties": false
  34955. },
  34956. "EventSessionNextRetried": {
  34957. "type": "object",
  34958. "properties": {
  34959. "id": {
  34960. "type": "string",
  34961. "pattern": "^evt_"
  34962. },
  34963. "type": {
  34964. "type": "string",
  34965. "enum": ["session.next.retried"]
  34966. },
  34967. "properties": {
  34968. "type": "object",
  34969. "properties": {
  34970. "timestamp": {
  34971. "type": "number"
  34972. },
  34973. "sessionID": {
  34974. "type": "string",
  34975. "pattern": "^ses"
  34976. },
  34977. "attempt": {
  34978. "type": "number"
  34979. },
  34980. "error": {
  34981. "$ref": "#/components/schemas/SessionNextRetry_error"
  34982. }
  34983. },
  34984. "required": ["timestamp", "sessionID", "attempt", "error"],
  34985. "additionalProperties": false
  34986. }
  34987. },
  34988. "required": ["id", "type", "properties"],
  34989. "additionalProperties": false
  34990. },
  34991. "EventSessionNextCompactionStarted": {
  34992. "type": "object",
  34993. "properties": {
  34994. "id": {
  34995. "type": "string",
  34996. "pattern": "^evt_"
  34997. },
  34998. "type": {
  34999. "type": "string",
  35000. "enum": ["session.next.compaction.started"]
  35001. },
  35002. "properties": {
  35003. "type": "object",
  35004. "properties": {
  35005. "timestamp": {
  35006. "type": "number"
  35007. },
  35008. "sessionID": {
  35009. "type": "string",
  35010. "pattern": "^ses"
  35011. },
  35012. "messageID": {
  35013. "type": "string",
  35014. "pattern": "^msg_"
  35015. },
  35016. "reason": {
  35017. "type": "string",
  35018. "enum": ["auto", "manual"]
  35019. }
  35020. },
  35021. "required": ["timestamp", "sessionID", "messageID", "reason"],
  35022. "additionalProperties": false
  35023. }
  35024. },
  35025. "required": ["id", "type", "properties"],
  35026. "additionalProperties": false
  35027. },
  35028. "EventSessionNextCompactionDelta": {
  35029. "type": "object",
  35030. "properties": {
  35031. "id": {
  35032. "type": "string",
  35033. "pattern": "^evt_"
  35034. },
  35035. "type": {
  35036. "type": "string",
  35037. "enum": ["session.next.compaction.delta"]
  35038. },
  35039. "properties": {
  35040. "type": "object",
  35041. "properties": {
  35042. "timestamp": {
  35043. "type": "number"
  35044. },
  35045. "sessionID": {
  35046. "type": "string",
  35047. "pattern": "^ses"
  35048. },
  35049. "messageID": {
  35050. "type": "string",
  35051. "pattern": "^msg_"
  35052. },
  35053. "text": {
  35054. "type": "string"
  35055. }
  35056. },
  35057. "required": ["timestamp", "sessionID", "messageID", "text"],
  35058. "additionalProperties": false
  35059. }
  35060. },
  35061. "required": ["id", "type", "properties"],
  35062. "additionalProperties": false
  35063. },
  35064. "EventSessionNextCompactionEnded": {
  35065. "type": "object",
  35066. "properties": {
  35067. "id": {
  35068. "type": "string",
  35069. "pattern": "^evt_"
  35070. },
  35071. "type": {
  35072. "type": "string",
  35073. "enum": ["session.next.compaction.ended"]
  35074. },
  35075. "properties": {
  35076. "type": "object",
  35077. "properties": {
  35078. "timestamp": {
  35079. "type": "number"
  35080. },
  35081. "sessionID": {
  35082. "type": "string",
  35083. "pattern": "^ses"
  35084. },
  35085. "messageID": {
  35086. "type": "string",
  35087. "pattern": "^msg_"
  35088. },
  35089. "reason": {
  35090. "type": "string",
  35091. "enum": ["auto", "manual"]
  35092. },
  35093. "text": {
  35094. "type": "string"
  35095. },
  35096. "recent": {
  35097. "type": "string"
  35098. }
  35099. },
  35100. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  35101. "additionalProperties": false
  35102. }
  35103. },
  35104. "required": ["id", "type", "properties"],
  35105. "additionalProperties": false
  35106. },
  35107. "EventSessionNextRevertStaged": {
  35108. "type": "object",
  35109. "properties": {
  35110. "id": {
  35111. "type": "string",
  35112. "pattern": "^evt_"
  35113. },
  35114. "type": {
  35115. "type": "string",
  35116. "enum": ["session.next.revert.staged"]
  35117. },
  35118. "properties": {
  35119. "type": "object",
  35120. "properties": {
  35121. "timestamp": {
  35122. "type": "number"
  35123. },
  35124. "sessionID": {
  35125. "type": "string",
  35126. "pattern": "^ses"
  35127. },
  35128. "revert": {
  35129. "$ref": "#/components/schemas/RevertState"
  35130. }
  35131. },
  35132. "required": ["timestamp", "sessionID", "revert"],
  35133. "additionalProperties": false
  35134. }
  35135. },
  35136. "required": ["id", "type", "properties"],
  35137. "additionalProperties": false
  35138. },
  35139. "EventSessionNextRevertCleared": {
  35140. "type": "object",
  35141. "properties": {
  35142. "id": {
  35143. "type": "string",
  35144. "pattern": "^evt_"
  35145. },
  35146. "type": {
  35147. "type": "string",
  35148. "enum": ["session.next.revert.cleared"]
  35149. },
  35150. "properties": {
  35151. "type": "object",
  35152. "properties": {
  35153. "timestamp": {
  35154. "type": "number"
  35155. },
  35156. "sessionID": {
  35157. "type": "string",
  35158. "pattern": "^ses"
  35159. }
  35160. },
  35161. "required": ["timestamp", "sessionID"],
  35162. "additionalProperties": false
  35163. }
  35164. },
  35165. "required": ["id", "type", "properties"],
  35166. "additionalProperties": false
  35167. },
  35168. "EventSessionNextRevertCommitted": {
  35169. "type": "object",
  35170. "properties": {
  35171. "id": {
  35172. "type": "string",
  35173. "pattern": "^evt_"
  35174. },
  35175. "type": {
  35176. "type": "string",
  35177. "enum": ["session.next.revert.committed"]
  35178. },
  35179. "properties": {
  35180. "type": "object",
  35181. "properties": {
  35182. "timestamp": {
  35183. "type": "number"
  35184. },
  35185. "sessionID": {
  35186. "type": "string",
  35187. "pattern": "^ses"
  35188. },
  35189. "messageID": {
  35190. "type": "string",
  35191. "pattern": "^msg_"
  35192. }
  35193. },
  35194. "required": ["timestamp", "sessionID", "messageID"],
  35195. "additionalProperties": false
  35196. }
  35197. },
  35198. "required": ["id", "type", "properties"],
  35199. "additionalProperties": false
  35200. },
  35201. "EventMessagePartDelta": {
  35202. "type": "object",
  35203. "properties": {
  35204. "id": {
  35205. "type": "string",
  35206. "pattern": "^evt_"
  35207. },
  35208. "type": {
  35209. "type": "string",
  35210. "enum": ["message.part.delta"]
  35211. },
  35212. "properties": {
  35213. "type": "object",
  35214. "properties": {
  35215. "sessionID": {
  35216. "type": "string",
  35217. "pattern": "^ses"
  35218. },
  35219. "messageID": {
  35220. "type": "string",
  35221. "pattern": "^msg"
  35222. },
  35223. "partID": {
  35224. "type": "string",
  35225. "pattern": "^prt"
  35226. },
  35227. "field": {
  35228. "type": "string"
  35229. },
  35230. "delta": {
  35231. "type": "string"
  35232. }
  35233. },
  35234. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35235. "additionalProperties": false
  35236. }
  35237. },
  35238. "required": ["id", "type", "properties"],
  35239. "additionalProperties": false
  35240. },
  35241. "EventSessionDiff": {
  35242. "type": "object",
  35243. "properties": {
  35244. "id": {
  35245. "type": "string",
  35246. "pattern": "^evt_"
  35247. },
  35248. "type": {
  35249. "type": "string",
  35250. "enum": ["session.diff"]
  35251. },
  35252. "properties": {
  35253. "type": "object",
  35254. "properties": {
  35255. "sessionID": {
  35256. "type": "string",
  35257. "pattern": "^ses"
  35258. },
  35259. "diff": {
  35260. "type": "array",
  35261. "items": {
  35262. "$ref": "#/components/schemas/SnapshotFileDiff"
  35263. }
  35264. }
  35265. },
  35266. "required": ["sessionID", "diff"],
  35267. "additionalProperties": false
  35268. }
  35269. },
  35270. "required": ["id", "type", "properties"],
  35271. "additionalProperties": false
  35272. },
  35273. "EventSessionError": {
  35274. "type": "object",
  35275. "properties": {
  35276. "id": {
  35277. "type": "string",
  35278. "pattern": "^evt_"
  35279. },
  35280. "type": {
  35281. "type": "string",
  35282. "enum": ["session.error"]
  35283. },
  35284. "properties": {
  35285. "type": "object",
  35286. "properties": {
  35287. "sessionID": {
  35288. "type": "string",
  35289. "pattern": "^ses"
  35290. },
  35291. "error": {
  35292. "anyOf": [
  35293. {
  35294. "$ref": "#/components/schemas/ProviderAuthError"
  35295. },
  35296. {
  35297. "$ref": "#/components/schemas/UnknownError"
  35298. },
  35299. {
  35300. "$ref": "#/components/schemas/MessageOutputLengthError"
  35301. },
  35302. {
  35303. "$ref": "#/components/schemas/MessageAbortedError"
  35304. },
  35305. {
  35306. "$ref": "#/components/schemas/StructuredOutputError"
  35307. },
  35308. {
  35309. "$ref": "#/components/schemas/ContextOverflowError"
  35310. },
  35311. {
  35312. "$ref": "#/components/schemas/ContentFilterError"
  35313. },
  35314. {
  35315. "$ref": "#/components/schemas/APIError"
  35316. }
  35317. ]
  35318. }
  35319. },
  35320. "additionalProperties": false
  35321. }
  35322. },
  35323. "required": ["id", "type", "properties"],
  35324. "additionalProperties": false
  35325. },
  35326. "EventInstallationUpdated": {
  35327. "type": "object",
  35328. "properties": {
  35329. "id": {
  35330. "type": "string",
  35331. "pattern": "^evt_"
  35332. },
  35333. "type": {
  35334. "type": "string",
  35335. "enum": ["installation.updated"]
  35336. },
  35337. "properties": {
  35338. "type": "object",
  35339. "properties": {
  35340. "version": {
  35341. "type": "string"
  35342. }
  35343. },
  35344. "required": ["version"],
  35345. "additionalProperties": false
  35346. }
  35347. },
  35348. "required": ["id", "type", "properties"],
  35349. "additionalProperties": false
  35350. },
  35351. "EventInstallationUpdate-available": {
  35352. "type": "object",
  35353. "properties": {
  35354. "id": {
  35355. "type": "string",
  35356. "pattern": "^evt_"
  35357. },
  35358. "type": {
  35359. "type": "string",
  35360. "enum": ["installation.update-available"]
  35361. },
  35362. "properties": {
  35363. "type": "object",
  35364. "properties": {
  35365. "version": {
  35366. "type": "string"
  35367. }
  35368. },
  35369. "required": ["version"],
  35370. "additionalProperties": false
  35371. }
  35372. },
  35373. "required": ["id", "type", "properties"],
  35374. "additionalProperties": false
  35375. },
  35376. "EventFileEdited": {
  35377. "type": "object",
  35378. "properties": {
  35379. "id": {
  35380. "type": "string",
  35381. "pattern": "^evt_"
  35382. },
  35383. "type": {
  35384. "type": "string",
  35385. "enum": ["file.edited"]
  35386. },
  35387. "properties": {
  35388. "type": "object",
  35389. "properties": {
  35390. "file": {
  35391. "type": "string"
  35392. }
  35393. },
  35394. "required": ["file"],
  35395. "additionalProperties": false
  35396. }
  35397. },
  35398. "required": ["id", "type", "properties"],
  35399. "additionalProperties": false
  35400. },
  35401. "EventReferenceUpdated": {
  35402. "type": "object",
  35403. "properties": {
  35404. "id": {
  35405. "type": "string",
  35406. "pattern": "^evt_"
  35407. },
  35408. "type": {
  35409. "type": "string",
  35410. "enum": ["reference.updated"]
  35411. },
  35412. "properties": {
  35413. "type": "object",
  35414. "properties": {}
  35415. }
  35416. },
  35417. "required": ["id", "type", "properties"],
  35418. "additionalProperties": false
  35419. },
  35420. "EventPermissionV2Asked": {
  35421. "type": "object",
  35422. "properties": {
  35423. "id": {
  35424. "type": "string",
  35425. "pattern": "^evt_"
  35426. },
  35427. "type": {
  35428. "type": "string",
  35429. "enum": ["permission.v2.asked"]
  35430. },
  35431. "properties": {
  35432. "type": "object",
  35433. "properties": {
  35434. "id": {
  35435. "type": "string",
  35436. "pattern": "^per"
  35437. },
  35438. "sessionID": {
  35439. "type": "string",
  35440. "pattern": "^ses"
  35441. },
  35442. "action": {
  35443. "type": "string"
  35444. },
  35445. "resources": {
  35446. "type": "array",
  35447. "items": {
  35448. "type": "string"
  35449. }
  35450. },
  35451. "save": {
  35452. "type": "array",
  35453. "items": {
  35454. "type": "string"
  35455. }
  35456. },
  35457. "metadata": {
  35458. "type": "object"
  35459. },
  35460. "source": {
  35461. "$ref": "#/components/schemas/PermissionV2Source"
  35462. }
  35463. },
  35464. "required": ["id", "sessionID", "action", "resources"],
  35465. "additionalProperties": false
  35466. }
  35467. },
  35468. "required": ["id", "type", "properties"],
  35469. "additionalProperties": false
  35470. },
  35471. "EventPermissionV2Replied": {
  35472. "type": "object",
  35473. "properties": {
  35474. "id": {
  35475. "type": "string",
  35476. "pattern": "^evt_"
  35477. },
  35478. "type": {
  35479. "type": "string",
  35480. "enum": ["permission.v2.replied"]
  35481. },
  35482. "properties": {
  35483. "type": "object",
  35484. "properties": {
  35485. "sessionID": {
  35486. "type": "string",
  35487. "pattern": "^ses"
  35488. },
  35489. "requestID": {
  35490. "type": "string",
  35491. "pattern": "^per"
  35492. },
  35493. "reply": {
  35494. "$ref": "#/components/schemas/PermissionV2Reply"
  35495. }
  35496. },
  35497. "required": ["sessionID", "requestID", "reply"],
  35498. "additionalProperties": false
  35499. }
  35500. },
  35501. "required": ["id", "type", "properties"],
  35502. "additionalProperties": false
  35503. },
  35504. "EventPluginAdded": {
  35505. "type": "object",
  35506. "properties": {
  35507. "id": {
  35508. "type": "string",
  35509. "pattern": "^evt_"
  35510. },
  35511. "type": {
  35512. "type": "string",
  35513. "enum": ["plugin.added"]
  35514. },
  35515. "properties": {
  35516. "type": "object",
  35517. "properties": {
  35518. "id": {
  35519. "type": "string"
  35520. }
  35521. },
  35522. "required": ["id"],
  35523. "additionalProperties": false
  35524. }
  35525. },
  35526. "required": ["id", "type", "properties"],
  35527. "additionalProperties": false
  35528. },
  35529. "EventProjectDirectoriesUpdated": {
  35530. "type": "object",
  35531. "properties": {
  35532. "id": {
  35533. "type": "string",
  35534. "pattern": "^evt_"
  35535. },
  35536. "type": {
  35537. "type": "string",
  35538. "enum": ["project.directories.updated"]
  35539. },
  35540. "properties": {
  35541. "type": "object",
  35542. "properties": {
  35543. "projectID": {
  35544. "type": "string"
  35545. }
  35546. },
  35547. "required": ["projectID"],
  35548. "additionalProperties": false
  35549. }
  35550. },
  35551. "required": ["id", "type", "properties"],
  35552. "additionalProperties": false
  35553. },
  35554. "EventFileWatcherUpdated": {
  35555. "type": "object",
  35556. "properties": {
  35557. "id": {
  35558. "type": "string",
  35559. "pattern": "^evt_"
  35560. },
  35561. "type": {
  35562. "type": "string",
  35563. "enum": ["file.watcher.updated"]
  35564. },
  35565. "properties": {
  35566. "type": "object",
  35567. "properties": {
  35568. "file": {
  35569. "type": "string"
  35570. },
  35571. "event": {
  35572. "type": "string",
  35573. "enum": ["add", "change", "unlink"]
  35574. }
  35575. },
  35576. "required": ["file", "event"],
  35577. "additionalProperties": false
  35578. }
  35579. },
  35580. "required": ["id", "type", "properties"],
  35581. "additionalProperties": false
  35582. },
  35583. "EventPtyCreated": {
  35584. "type": "object",
  35585. "properties": {
  35586. "id": {
  35587. "type": "string",
  35588. "pattern": "^evt_"
  35589. },
  35590. "type": {
  35591. "type": "string",
  35592. "enum": ["pty.created"]
  35593. },
  35594. "properties": {
  35595. "type": "object",
  35596. "properties": {
  35597. "info": {
  35598. "$ref": "#/components/schemas/Pty"
  35599. }
  35600. },
  35601. "required": ["info"],
  35602. "additionalProperties": false
  35603. }
  35604. },
  35605. "required": ["id", "type", "properties"],
  35606. "additionalProperties": false
  35607. },
  35608. "EventPtyUpdated": {
  35609. "type": "object",
  35610. "properties": {
  35611. "id": {
  35612. "type": "string",
  35613. "pattern": "^evt_"
  35614. },
  35615. "type": {
  35616. "type": "string",
  35617. "enum": ["pty.updated"]
  35618. },
  35619. "properties": {
  35620. "type": "object",
  35621. "properties": {
  35622. "info": {
  35623. "$ref": "#/components/schemas/Pty"
  35624. }
  35625. },
  35626. "required": ["info"],
  35627. "additionalProperties": false
  35628. }
  35629. },
  35630. "required": ["id", "type", "properties"],
  35631. "additionalProperties": false
  35632. },
  35633. "EventPtyExited": {
  35634. "type": "object",
  35635. "properties": {
  35636. "id": {
  35637. "type": "string",
  35638. "pattern": "^evt_"
  35639. },
  35640. "type": {
  35641. "type": "string",
  35642. "enum": ["pty.exited"]
  35643. },
  35644. "properties": {
  35645. "type": "object",
  35646. "properties": {
  35647. "id": {
  35648. "type": "string",
  35649. "pattern": "^pty"
  35650. },
  35651. "exitCode": {
  35652. "type": "integer",
  35653. "minimum": 0
  35654. }
  35655. },
  35656. "required": ["id", "exitCode"],
  35657. "additionalProperties": false
  35658. }
  35659. },
  35660. "required": ["id", "type", "properties"],
  35661. "additionalProperties": false
  35662. },
  35663. "EventPtyDeleted": {
  35664. "type": "object",
  35665. "properties": {
  35666. "id": {
  35667. "type": "string",
  35668. "pattern": "^evt_"
  35669. },
  35670. "type": {
  35671. "type": "string",
  35672. "enum": ["pty.deleted"]
  35673. },
  35674. "properties": {
  35675. "type": "object",
  35676. "properties": {
  35677. "id": {
  35678. "type": "string",
  35679. "pattern": "^pty"
  35680. }
  35681. },
  35682. "required": ["id"],
  35683. "additionalProperties": false
  35684. }
  35685. },
  35686. "required": ["id", "type", "properties"],
  35687. "additionalProperties": false
  35688. },
  35689. "EventQuestionV2Asked": {
  35690. "type": "object",
  35691. "properties": {
  35692. "id": {
  35693. "type": "string",
  35694. "pattern": "^evt_"
  35695. },
  35696. "type": {
  35697. "type": "string",
  35698. "enum": ["question.v2.asked"]
  35699. },
  35700. "properties": {
  35701. "type": "object",
  35702. "properties": {
  35703. "id": {
  35704. "type": "string",
  35705. "pattern": "^que"
  35706. },
  35707. "sessionID": {
  35708. "type": "string",
  35709. "pattern": "^ses"
  35710. },
  35711. "questions": {
  35712. "type": "array",
  35713. "items": {
  35714. "$ref": "#/components/schemas/QuestionV2Info"
  35715. },
  35716. "description": "Questions to ask"
  35717. },
  35718. "tool": {
  35719. "$ref": "#/components/schemas/QuestionV2Tool"
  35720. }
  35721. },
  35722. "required": ["id", "sessionID", "questions"],
  35723. "additionalProperties": false
  35724. }
  35725. },
  35726. "required": ["id", "type", "properties"],
  35727. "additionalProperties": false
  35728. },
  35729. "EventQuestionV2Replied": {
  35730. "type": "object",
  35731. "properties": {
  35732. "id": {
  35733. "type": "string",
  35734. "pattern": "^evt_"
  35735. },
  35736. "type": {
  35737. "type": "string",
  35738. "enum": ["question.v2.replied"]
  35739. },
  35740. "properties": {
  35741. "type": "object",
  35742. "properties": {
  35743. "sessionID": {
  35744. "type": "string",
  35745. "pattern": "^ses"
  35746. },
  35747. "requestID": {
  35748. "type": "string",
  35749. "pattern": "^que"
  35750. },
  35751. "answers": {
  35752. "type": "array",
  35753. "items": {
  35754. "$ref": "#/components/schemas/QuestionV2Answer"
  35755. }
  35756. }
  35757. },
  35758. "required": ["sessionID", "requestID", "answers"],
  35759. "additionalProperties": false
  35760. }
  35761. },
  35762. "required": ["id", "type", "properties"],
  35763. "additionalProperties": false
  35764. },
  35765. "EventQuestionV2Rejected": {
  35766. "type": "object",
  35767. "properties": {
  35768. "id": {
  35769. "type": "string",
  35770. "pattern": "^evt_"
  35771. },
  35772. "type": {
  35773. "type": "string",
  35774. "enum": ["question.v2.rejected"]
  35775. },
  35776. "properties": {
  35777. "type": "object",
  35778. "properties": {
  35779. "sessionID": {
  35780. "type": "string",
  35781. "pattern": "^ses"
  35782. },
  35783. "requestID": {
  35784. "type": "string",
  35785. "pattern": "^que"
  35786. }
  35787. },
  35788. "required": ["sessionID", "requestID"],
  35789. "additionalProperties": false
  35790. }
  35791. },
  35792. "required": ["id", "type", "properties"],
  35793. "additionalProperties": false
  35794. },
  35795. "EventLspUpdated": {
  35796. "type": "object",
  35797. "properties": {
  35798. "id": {
  35799. "type": "string",
  35800. "pattern": "^evt_"
  35801. },
  35802. "type": {
  35803. "type": "string",
  35804. "enum": ["lsp.updated"]
  35805. },
  35806. "properties": {
  35807. "type": "object",
  35808. "properties": {}
  35809. }
  35810. },
  35811. "required": ["id", "type", "properties"],
  35812. "additionalProperties": false
  35813. },
  35814. "EventPermissionAsked": {
  35815. "type": "object",
  35816. "properties": {
  35817. "id": {
  35818. "type": "string",
  35819. "pattern": "^evt_"
  35820. },
  35821. "type": {
  35822. "type": "string",
  35823. "enum": ["permission.asked"]
  35824. },
  35825. "properties": {
  35826. "type": "object",
  35827. "properties": {
  35828. "id": {
  35829. "type": "string",
  35830. "pattern": "^per"
  35831. },
  35832. "sessionID": {
  35833. "type": "string",
  35834. "pattern": "^ses"
  35835. },
  35836. "permission": {
  35837. "type": "string"
  35838. },
  35839. "patterns": {
  35840. "type": "array",
  35841. "items": {
  35842. "type": "string"
  35843. }
  35844. },
  35845. "metadata": {
  35846. "type": "object"
  35847. },
  35848. "always": {
  35849. "type": "array",
  35850. "items": {
  35851. "type": "string"
  35852. }
  35853. },
  35854. "tool": {
  35855. "type": "object",
  35856. "properties": {
  35857. "messageID": {
  35858. "type": "string"
  35859. },
  35860. "callID": {
  35861. "type": "string"
  35862. }
  35863. },
  35864. "required": ["messageID", "callID"],
  35865. "additionalProperties": false
  35866. }
  35867. },
  35868. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  35869. "additionalProperties": false
  35870. }
  35871. },
  35872. "required": ["id", "type", "properties"],
  35873. "additionalProperties": false
  35874. },
  35875. "EventPermissionReplied": {
  35876. "type": "object",
  35877. "properties": {
  35878. "id": {
  35879. "type": "string",
  35880. "pattern": "^evt_"
  35881. },
  35882. "type": {
  35883. "type": "string",
  35884. "enum": ["permission.replied"]
  35885. },
  35886. "properties": {
  35887. "type": "object",
  35888. "properties": {
  35889. "sessionID": {
  35890. "type": "string",
  35891. "pattern": "^ses"
  35892. },
  35893. "requestID": {
  35894. "type": "string",
  35895. "pattern": "^per"
  35896. },
  35897. "reply": {
  35898. "type": "string",
  35899. "enum": ["once", "always", "reject"]
  35900. }
  35901. },
  35902. "required": ["sessionID", "requestID", "reply"],
  35903. "additionalProperties": false
  35904. }
  35905. },
  35906. "required": ["id", "type", "properties"],
  35907. "additionalProperties": false
  35908. },
  35909. "EventMcpToolsChanged": {
  35910. "type": "object",
  35911. "properties": {
  35912. "id": {
  35913. "type": "string",
  35914. "pattern": "^evt_"
  35915. },
  35916. "type": {
  35917. "type": "string",
  35918. "enum": ["mcp.tools.changed"]
  35919. },
  35920. "properties": {
  35921. "type": "object",
  35922. "properties": {
  35923. "server": {
  35924. "type": "string"
  35925. }
  35926. },
  35927. "required": ["server"],
  35928. "additionalProperties": false
  35929. }
  35930. },
  35931. "required": ["id", "type", "properties"],
  35932. "additionalProperties": false
  35933. },
  35934. "EventMcpBrowserOpenFailed": {
  35935. "type": "object",
  35936. "properties": {
  35937. "id": {
  35938. "type": "string",
  35939. "pattern": "^evt_"
  35940. },
  35941. "type": {
  35942. "type": "string",
  35943. "enum": ["mcp.browser.open.failed"]
  35944. },
  35945. "properties": {
  35946. "type": "object",
  35947. "properties": {
  35948. "mcpName": {
  35949. "type": "string"
  35950. },
  35951. "url": {
  35952. "type": "string"
  35953. }
  35954. },
  35955. "required": ["mcpName", "url"],
  35956. "additionalProperties": false
  35957. }
  35958. },
  35959. "required": ["id", "type", "properties"],
  35960. "additionalProperties": false
  35961. },
  35962. "EventCommandExecuted": {
  35963. "type": "object",
  35964. "properties": {
  35965. "id": {
  35966. "type": "string",
  35967. "pattern": "^evt_"
  35968. },
  35969. "type": {
  35970. "type": "string",
  35971. "enum": ["command.executed"]
  35972. },
  35973. "properties": {
  35974. "type": "object",
  35975. "properties": {
  35976. "name": {
  35977. "type": "string"
  35978. },
  35979. "sessionID": {
  35980. "type": "string",
  35981. "pattern": "^ses"
  35982. },
  35983. "arguments": {
  35984. "type": "string"
  35985. },
  35986. "messageID": {
  35987. "type": "string",
  35988. "pattern": "^msg"
  35989. }
  35990. },
  35991. "required": ["name", "sessionID", "arguments", "messageID"],
  35992. "additionalProperties": false
  35993. }
  35994. },
  35995. "required": ["id", "type", "properties"],
  35996. "additionalProperties": false
  35997. },
  35998. "EventProjectUpdated": {
  35999. "type": "object",
  36000. "properties": {
  36001. "id": {
  36002. "type": "string",
  36003. "pattern": "^evt_"
  36004. },
  36005. "type": {
  36006. "type": "string",
  36007. "enum": ["project.updated"]
  36008. },
  36009. "properties": {
  36010. "type": "object",
  36011. "properties": {
  36012. "id": {
  36013. "type": "string"
  36014. },
  36015. "worktree": {
  36016. "type": "string"
  36017. },
  36018. "vcs": {
  36019. "$ref": "#/components/schemas/ProjectVcs"
  36020. },
  36021. "name": {
  36022. "type": "string"
  36023. },
  36024. "icon": {
  36025. "$ref": "#/components/schemas/ProjectIcon"
  36026. },
  36027. "commands": {
  36028. "$ref": "#/components/schemas/ProjectCommands"
  36029. },
  36030. "time": {
  36031. "$ref": "#/components/schemas/ProjectTime"
  36032. },
  36033. "sandboxes": {
  36034. "type": "array",
  36035. "items": {
  36036. "type": "string"
  36037. }
  36038. }
  36039. },
  36040. "required": ["id", "worktree", "time", "sandboxes"],
  36041. "additionalProperties": false
  36042. }
  36043. },
  36044. "required": ["id", "type", "properties"],
  36045. "additionalProperties": false
  36046. },
  36047. "EventSessionStatus": {
  36048. "type": "object",
  36049. "properties": {
  36050. "id": {
  36051. "type": "string",
  36052. "pattern": "^evt_"
  36053. },
  36054. "type": {
  36055. "type": "string",
  36056. "enum": ["session.status"]
  36057. },
  36058. "properties": {
  36059. "type": "object",
  36060. "properties": {
  36061. "sessionID": {
  36062. "type": "string",
  36063. "pattern": "^ses"
  36064. },
  36065. "status": {
  36066. "$ref": "#/components/schemas/SessionStatus"
  36067. }
  36068. },
  36069. "required": ["sessionID", "status"],
  36070. "additionalProperties": false
  36071. }
  36072. },
  36073. "required": ["id", "type", "properties"],
  36074. "additionalProperties": false
  36075. },
  36076. "EventSessionIdle": {
  36077. "type": "object",
  36078. "properties": {
  36079. "id": {
  36080. "type": "string",
  36081. "pattern": "^evt_"
  36082. },
  36083. "type": {
  36084. "type": "string",
  36085. "enum": ["session.idle"]
  36086. },
  36087. "properties": {
  36088. "type": "object",
  36089. "properties": {
  36090. "sessionID": {
  36091. "type": "string",
  36092. "pattern": "^ses"
  36093. }
  36094. },
  36095. "required": ["sessionID"],
  36096. "additionalProperties": false
  36097. }
  36098. },
  36099. "required": ["id", "type", "properties"],
  36100. "additionalProperties": false
  36101. },
  36102. "EventQuestionAsked": {
  36103. "type": "object",
  36104. "properties": {
  36105. "id": {
  36106. "type": "string",
  36107. "pattern": "^evt_"
  36108. },
  36109. "type": {
  36110. "type": "string",
  36111. "enum": ["question.asked"]
  36112. },
  36113. "properties": {
  36114. "type": "object",
  36115. "properties": {
  36116. "id": {
  36117. "type": "string",
  36118. "pattern": "^que"
  36119. },
  36120. "sessionID": {
  36121. "type": "string",
  36122. "pattern": "^ses"
  36123. },
  36124. "questions": {
  36125. "type": "array",
  36126. "items": {
  36127. "$ref": "#/components/schemas/QuestionInfo"
  36128. },
  36129. "description": "Questions to ask"
  36130. },
  36131. "tool": {
  36132. "$ref": "#/components/schemas/QuestionTool"
  36133. }
  36134. },
  36135. "required": ["id", "sessionID", "questions"],
  36136. "additionalProperties": false
  36137. }
  36138. },
  36139. "required": ["id", "type", "properties"],
  36140. "additionalProperties": false
  36141. },
  36142. "EventQuestionReplied": {
  36143. "type": "object",
  36144. "properties": {
  36145. "id": {
  36146. "type": "string",
  36147. "pattern": "^evt_"
  36148. },
  36149. "type": {
  36150. "type": "string",
  36151. "enum": ["question.replied"]
  36152. },
  36153. "properties": {
  36154. "type": "object",
  36155. "properties": {
  36156. "sessionID": {
  36157. "type": "string",
  36158. "pattern": "^ses"
  36159. },
  36160. "requestID": {
  36161. "type": "string",
  36162. "pattern": "^que"
  36163. },
  36164. "answers": {
  36165. "type": "array",
  36166. "items": {
  36167. "$ref": "#/components/schemas/QuestionAnswer"
  36168. }
  36169. }
  36170. },
  36171. "required": ["sessionID", "requestID", "answers"],
  36172. "additionalProperties": false
  36173. }
  36174. },
  36175. "required": ["id", "type", "properties"],
  36176. "additionalProperties": false
  36177. },
  36178. "EventQuestionRejected": {
  36179. "type": "object",
  36180. "properties": {
  36181. "id": {
  36182. "type": "string",
  36183. "pattern": "^evt_"
  36184. },
  36185. "type": {
  36186. "type": "string",
  36187. "enum": ["question.rejected"]
  36188. },
  36189. "properties": {
  36190. "type": "object",
  36191. "properties": {
  36192. "sessionID": {
  36193. "type": "string",
  36194. "pattern": "^ses"
  36195. },
  36196. "requestID": {
  36197. "type": "string",
  36198. "pattern": "^que"
  36199. }
  36200. },
  36201. "required": ["sessionID", "requestID"],
  36202. "additionalProperties": false
  36203. }
  36204. },
  36205. "required": ["id", "type", "properties"],
  36206. "additionalProperties": false
  36207. },
  36208. "EventSessionCompacted": {
  36209. "type": "object",
  36210. "properties": {
  36211. "id": {
  36212. "type": "string",
  36213. "pattern": "^evt_"
  36214. },
  36215. "type": {
  36216. "type": "string",
  36217. "enum": ["session.compacted"]
  36218. },
  36219. "properties": {
  36220. "type": "object",
  36221. "properties": {
  36222. "sessionID": {
  36223. "type": "string",
  36224. "pattern": "^ses"
  36225. }
  36226. },
  36227. "required": ["sessionID"],
  36228. "additionalProperties": false
  36229. }
  36230. },
  36231. "required": ["id", "type", "properties"],
  36232. "additionalProperties": false
  36233. },
  36234. "EventVcsBranchUpdated": {
  36235. "type": "object",
  36236. "properties": {
  36237. "id": {
  36238. "type": "string",
  36239. "pattern": "^evt_"
  36240. },
  36241. "type": {
  36242. "type": "string",
  36243. "enum": ["vcs.branch.updated"]
  36244. },
  36245. "properties": {
  36246. "type": "object",
  36247. "properties": {
  36248. "branch": {
  36249. "type": "string"
  36250. }
  36251. },
  36252. "additionalProperties": false
  36253. }
  36254. },
  36255. "required": ["id", "type", "properties"],
  36256. "additionalProperties": false
  36257. },
  36258. "EventWorkspaceReady": {
  36259. "type": "object",
  36260. "properties": {
  36261. "id": {
  36262. "type": "string",
  36263. "pattern": "^evt_"
  36264. },
  36265. "type": {
  36266. "type": "string",
  36267. "enum": ["workspace.ready"]
  36268. },
  36269. "properties": {
  36270. "type": "object",
  36271. "properties": {
  36272. "name": {
  36273. "type": "string"
  36274. }
  36275. },
  36276. "required": ["name"],
  36277. "additionalProperties": false
  36278. }
  36279. },
  36280. "required": ["id", "type", "properties"],
  36281. "additionalProperties": false
  36282. },
  36283. "EventWorkspaceFailed": {
  36284. "type": "object",
  36285. "properties": {
  36286. "id": {
  36287. "type": "string",
  36288. "pattern": "^evt_"
  36289. },
  36290. "type": {
  36291. "type": "string",
  36292. "enum": ["workspace.failed"]
  36293. },
  36294. "properties": {
  36295. "type": "object",
  36296. "properties": {
  36297. "message": {
  36298. "type": "string"
  36299. }
  36300. },
  36301. "required": ["message"],
  36302. "additionalProperties": false
  36303. }
  36304. },
  36305. "required": ["id", "type", "properties"],
  36306. "additionalProperties": false
  36307. },
  36308. "EventWorkspaceStatus": {
  36309. "type": "object",
  36310. "properties": {
  36311. "id": {
  36312. "type": "string",
  36313. "pattern": "^evt_"
  36314. },
  36315. "type": {
  36316. "type": "string",
  36317. "enum": ["workspace.status"]
  36318. },
  36319. "properties": {
  36320. "type": "object",
  36321. "properties": {
  36322. "workspaceID": {
  36323. "type": "string",
  36324. "pattern": "^wrk"
  36325. },
  36326. "status": {
  36327. "type": "string",
  36328. "enum": ["connected", "connecting", "disconnected", "error"]
  36329. }
  36330. },
  36331. "required": ["workspaceID", "status"],
  36332. "additionalProperties": false
  36333. }
  36334. },
  36335. "required": ["id", "type", "properties"],
  36336. "additionalProperties": false
  36337. },
  36338. "EventWorktreeReady": {
  36339. "type": "object",
  36340. "properties": {
  36341. "id": {
  36342. "type": "string",
  36343. "pattern": "^evt_"
  36344. },
  36345. "type": {
  36346. "type": "string",
  36347. "enum": ["worktree.ready"]
  36348. },
  36349. "properties": {
  36350. "type": "object",
  36351. "properties": {
  36352. "name": {
  36353. "type": "string"
  36354. },
  36355. "branch": {
  36356. "type": "string"
  36357. }
  36358. },
  36359. "required": ["name"],
  36360. "additionalProperties": false
  36361. }
  36362. },
  36363. "required": ["id", "type", "properties"],
  36364. "additionalProperties": false
  36365. },
  36366. "EventWorktreeFailed": {
  36367. "type": "object",
  36368. "properties": {
  36369. "id": {
  36370. "type": "string",
  36371. "pattern": "^evt_"
  36372. },
  36373. "type": {
  36374. "type": "string",
  36375. "enum": ["worktree.failed"]
  36376. },
  36377. "properties": {
  36378. "type": "object",
  36379. "properties": {
  36380. "message": {
  36381. "type": "string"
  36382. }
  36383. },
  36384. "required": ["message"],
  36385. "additionalProperties": false
  36386. }
  36387. },
  36388. "required": ["id", "type", "properties"],
  36389. "additionalProperties": false
  36390. },
  36391. "EventServerConnected": {
  36392. "type": "object",
  36393. "properties": {
  36394. "id": {
  36395. "type": "string",
  36396. "pattern": "^evt_"
  36397. },
  36398. "type": {
  36399. "type": "string",
  36400. "enum": ["server.connected"]
  36401. },
  36402. "properties": {
  36403. "type": "object",
  36404. "properties": {}
  36405. }
  36406. },
  36407. "required": ["id", "type", "properties"],
  36408. "additionalProperties": false
  36409. },
  36410. "EventGlobalDisposed": {
  36411. "type": "object",
  36412. "properties": {
  36413. "id": {
  36414. "type": "string",
  36415. "pattern": "^evt_"
  36416. },
  36417. "type": {
  36418. "type": "string",
  36419. "enum": ["global.disposed"]
  36420. },
  36421. "properties": {
  36422. "type": "object",
  36423. "properties": {}
  36424. }
  36425. },
  36426. "required": ["id", "type", "properties"],
  36427. "additionalProperties": false
  36428. },
  36429. "CredentialOAuth": {
  36430. "type": "object",
  36431. "properties": {
  36432. "type": {
  36433. "type": "string",
  36434. "enum": ["oauth"]
  36435. },
  36436. "methodID": {
  36437. "type": "string"
  36438. },
  36439. "refresh": {
  36440. "type": "string"
  36441. },
  36442. "access": {
  36443. "type": "string"
  36444. },
  36445. "expires": {
  36446. "type": "integer",
  36447. "minimum": 0
  36448. },
  36449. "metadata": {
  36450. "type": "object"
  36451. }
  36452. },
  36453. "required": ["type", "methodID", "refresh", "access", "expires"],
  36454. "additionalProperties": false
  36455. },
  36456. "CredentialKey": {
  36457. "type": "object",
  36458. "properties": {
  36459. "type": {
  36460. "type": "string",
  36461. "enum": ["key"]
  36462. },
  36463. "key": {
  36464. "type": "string"
  36465. },
  36466. "metadata": {
  36467. "type": "object"
  36468. }
  36469. },
  36470. "required": ["type", "key"],
  36471. "additionalProperties": false
  36472. },
  36473. "SkillV2DirectorySource": {
  36474. "type": "object",
  36475. "properties": {
  36476. "type": {
  36477. "type": "string",
  36478. "enum": ["directory"]
  36479. },
  36480. "path": {
  36481. "type": "string"
  36482. }
  36483. },
  36484. "required": ["type", "path"],
  36485. "additionalProperties": false
  36486. },
  36487. "SkillV2UrlSource": {
  36488. "type": "object",
  36489. "properties": {
  36490. "type": {
  36491. "type": "string",
  36492. "enum": ["url"]
  36493. },
  36494. "url": {
  36495. "type": "string"
  36496. }
  36497. },
  36498. "required": ["type", "url"],
  36499. "additionalProperties": false
  36500. },
  36501. "SkillV2EmbeddedSource": {
  36502. "type": "object",
  36503. "properties": {
  36504. "type": {
  36505. "type": "string",
  36506. "enum": ["embedded"]
  36507. },
  36508. "skill": {
  36509. "$ref": "#/components/schemas/SkillV2Info"
  36510. }
  36511. },
  36512. "required": ["type", "skill"],
  36513. "additionalProperties": false
  36514. },
  36515. "BadRequestError": {
  36516. "type": "object",
  36517. "required": ["name", "data"],
  36518. "properties": {
  36519. "name": {
  36520. "type": "string",
  36521. "enum": ["BadRequest"]
  36522. },
  36523. "data": {
  36524. "type": "object",
  36525. "required": ["message"],
  36526. "properties": {
  36527. "message": {
  36528. "type": "string"
  36529. },
  36530. "kind": {
  36531. "type": "string",
  36532. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36533. }
  36534. }
  36535. }
  36536. }
  36537. }
  36538. }
  36539. },
  36540. "security": [],
  36541. "tags": [
  36542. {
  36543. "name": "control",
  36544. "description": "Control plane routes."
  36545. },
  36546. {
  36547. "name": "controlPlane",
  36548. "description": "Control-plane orchestration routes."
  36549. },
  36550. {
  36551. "name": "global",
  36552. "description": "Global server routes."
  36553. },
  36554. {
  36555. "name": "event",
  36556. "description": "Instance event stream route."
  36557. },
  36558. {
  36559. "name": "config",
  36560. "description": "Experimental HttpApi config routes."
  36561. },
  36562. {
  36563. "name": "experimental",
  36564. "description": "Experimental HttpApi read-only routes."
  36565. },
  36566. {
  36567. "name": "file",
  36568. "description": "Experimental HttpApi file routes."
  36569. },
  36570. {
  36571. "name": "instance",
  36572. "description": "Experimental HttpApi instance read routes."
  36573. },
  36574. {
  36575. "name": "mcp",
  36576. "description": "Experimental HttpApi MCP routes."
  36577. },
  36578. {
  36579. "name": "project",
  36580. "description": "Experimental HttpApi project routes."
  36581. },
  36582. {
  36583. "name": "projectCopy",
  36584. "description": "Project copy naming routes."
  36585. },
  36586. {
  36587. "name": "pty",
  36588. "description": "Experimental HttpApi PTY routes."
  36589. },
  36590. {
  36591. "name": "question",
  36592. "description": "Question routes."
  36593. },
  36594. {
  36595. "name": "permission",
  36596. "description": "Experimental HttpApi permission routes."
  36597. },
  36598. {
  36599. "name": "provider",
  36600. "description": "Experimental HttpApi provider routes."
  36601. },
  36602. {
  36603. "name": "session",
  36604. "description": "Experimental HttpApi session routes."
  36605. },
  36606. {
  36607. "name": "sync",
  36608. "description": "Experimental HttpApi sync routes."
  36609. },
  36610. {
  36611. "name": "tui",
  36612. "description": "Experimental HttpApi TUI routes."
  36613. },
  36614. {
  36615. "name": "workspace",
  36616. "description": "Experimental HttpApi workspace routes."
  36617. },
  36618. {
  36619. "name": "opencode HttpApi",
  36620. "description": "Experimental HttpApi surface for selected instance 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": "sessions",
  36632. "description": "Experimental session routes."
  36633. },
  36634. {
  36635. "name": "messages",
  36636. "description": "Experimental message routes."
  36637. },
  36638. {
  36639. "name": "models",
  36640. "description": "Experimental model routes."
  36641. },
  36642. {
  36643. "name": "providers",
  36644. "description": "Experimental provider routes."
  36645. },
  36646. {
  36647. "name": "integrations",
  36648. "description": "Integration discovery and authentication routes."
  36649. },
  36650. {
  36651. "name": "opencode HttpApi",
  36652. "description": "Experimental HttpApi surface for selected instance routes."
  36653. },
  36654. {
  36655. "name": "permissions",
  36656. "description": "Experimental permission routes."
  36657. },
  36658. {
  36659. "name": "filesystem",
  36660. "description": "Experimental location-scoped filesystem routes."
  36661. },
  36662. {
  36663. "name": "commands",
  36664. "description": "Experimental command routes."
  36665. },
  36666. {
  36667. "name": "skills",
  36668. "description": "Experimental skill routes."
  36669. },
  36670. {
  36671. "name": "events",
  36672. "description": "Experimental event stream route."
  36673. },
  36674. {
  36675. "name": "pty",
  36676. "description": "Experimental location-scoped PTY routes."
  36677. },
  36678. {
  36679. "name": "session questions",
  36680. "description": "Experimental session question routes."
  36681. },
  36682. {
  36683. "name": "reference",
  36684. "description": "Location-scoped project references."
  36685. },
  36686. {
  36687. "name": "projectCopy",
  36688. "description": "Project copy management routes."
  36689. },
  36690. {
  36691. "name": "pty",
  36692. "description": "PTY websocket route."
  36693. }
  36694. ]
  36695. }