openapi.json 1.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. }
  856. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "$ref": "#/components/schemas/ProjectIcon"
  3850. },
  3851. "commands": {
  3852. "$ref": "#/components/schemas/ProjectCommands"
  3853. }
  3854. },
  3855. "additionalProperties": false
  3856. }
  3857. }
  3858. }
  3859. },
  3860. "x-codeSamples": [
  3861. {
  3862. "lang": "js",
  3863. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3864. }
  3865. ]
  3866. }
  3867. },
  3868. "/project/{projectID}/directories": {
  3869. "get": {
  3870. "tags": ["project"],
  3871. "operationId": "project.directories",
  3872. "parameters": [
  3873. {
  3874. "name": "projectID",
  3875. "in": "path",
  3876. "schema": {
  3877. "type": "string"
  3878. },
  3879. "required": true
  3880. },
  3881. {
  3882. "name": "directory",
  3883. "in": "query",
  3884. "schema": {
  3885. "type": "string"
  3886. },
  3887. "required": false
  3888. },
  3889. {
  3890. "name": "workspace",
  3891. "in": "query",
  3892. "schema": {
  3893. "type": "string"
  3894. },
  3895. "required": false
  3896. }
  3897. ],
  3898. "responses": {
  3899. "200": {
  3900. "description": "Project directories",
  3901. "content": {
  3902. "application/json": {
  3903. "schema": {
  3904. "$ref": "#/components/schemas/ProjectDirectories"
  3905. }
  3906. }
  3907. }
  3908. },
  3909. "400": {
  3910. "description": "Bad request",
  3911. "content": {
  3912. "application/json": {
  3913. "schema": {
  3914. "$ref": "#/components/schemas/BadRequestError"
  3915. }
  3916. }
  3917. }
  3918. }
  3919. },
  3920. "description": "List known local absolute directories for a project.",
  3921. "summary": "List project directories",
  3922. "x-codeSamples": [
  3923. {
  3924. "lang": "js",
  3925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3926. }
  3927. ]
  3928. }
  3929. },
  3930. "/experimental/project/{projectID}/copy/generate-name": {
  3931. "post": {
  3932. "tags": ["projectCopy"],
  3933. "operationId": "experimental.projectCopy.generateName",
  3934. "parameters": [
  3935. {
  3936. "name": "projectID",
  3937. "in": "path",
  3938. "schema": {
  3939. "type": "string"
  3940. },
  3941. "required": true
  3942. },
  3943. {
  3944. "name": "directory",
  3945. "in": "query",
  3946. "schema": {
  3947. "type": "string"
  3948. },
  3949. "required": false
  3950. },
  3951. {
  3952. "name": "workspace",
  3953. "in": "query",
  3954. "schema": {
  3955. "type": "string"
  3956. },
  3957. "required": false
  3958. }
  3959. ],
  3960. "responses": {
  3961. "200": {
  3962. "description": "Success",
  3963. "content": {
  3964. "application/json": {
  3965. "schema": {
  3966. "type": "object",
  3967. "properties": {
  3968. "name": {
  3969. "type": "string"
  3970. }
  3971. },
  3972. "required": ["name"],
  3973. "additionalProperties": false
  3974. }
  3975. }
  3976. }
  3977. },
  3978. "400": {
  3979. "description": "Bad request",
  3980. "content": {
  3981. "application/json": {
  3982. "schema": {
  3983. "$ref": "#/components/schemas/BadRequestError"
  3984. }
  3985. }
  3986. }
  3987. }
  3988. },
  3989. "description": "Generate a short name for a project copy from task context.",
  3990. "summary": "Generate project copy name",
  3991. "requestBody": {
  3992. "content": {
  3993. "application/json": {
  3994. "schema": {
  3995. "type": "object",
  3996. "properties": {
  3997. "context": {
  3998. "type": "string"
  3999. }
  4000. },
  4001. "additionalProperties": false
  4002. }
  4003. }
  4004. }
  4005. },
  4006. "x-codeSamples": [
  4007. {
  4008. "lang": "js",
  4009. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4010. }
  4011. ]
  4012. }
  4013. },
  4014. "/pty/shells": {
  4015. "get": {
  4016. "tags": ["pty"],
  4017. "operationId": "pty.shells",
  4018. "parameters": [
  4019. {
  4020. "name": "directory",
  4021. "in": "query",
  4022. "schema": {
  4023. "type": "string"
  4024. },
  4025. "required": false
  4026. },
  4027. {
  4028. "name": "workspace",
  4029. "in": "query",
  4030. "schema": {
  4031. "type": "string"
  4032. },
  4033. "required": false
  4034. }
  4035. ],
  4036. "responses": {
  4037. "200": {
  4038. "description": "List of shells",
  4039. "content": {
  4040. "application/json": {
  4041. "schema": {
  4042. "type": "array",
  4043. "items": {
  4044. "type": "object",
  4045. "properties": {
  4046. "path": {
  4047. "type": "string"
  4048. },
  4049. "name": {
  4050. "type": "string"
  4051. },
  4052. "acceptable": {
  4053. "type": "boolean"
  4054. }
  4055. },
  4056. "required": ["path", "name", "acceptable"],
  4057. "additionalProperties": false
  4058. },
  4059. "description": "List of shells"
  4060. }
  4061. }
  4062. }
  4063. },
  4064. "400": {
  4065. "description": "Bad request",
  4066. "content": {
  4067. "application/json": {
  4068. "schema": {
  4069. "$ref": "#/components/schemas/BadRequestError"
  4070. }
  4071. }
  4072. }
  4073. }
  4074. },
  4075. "description": "Get a list of available shells on the system.",
  4076. "summary": "List available shells",
  4077. "x-codeSamples": [
  4078. {
  4079. "lang": "js",
  4080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4081. }
  4082. ]
  4083. }
  4084. },
  4085. "/pty": {
  4086. "get": {
  4087. "tags": ["pty"],
  4088. "operationId": "pty.list",
  4089. "parameters": [
  4090. {
  4091. "name": "directory",
  4092. "in": "query",
  4093. "schema": {
  4094. "type": "string"
  4095. },
  4096. "required": false
  4097. },
  4098. {
  4099. "name": "workspace",
  4100. "in": "query",
  4101. "schema": {
  4102. "type": "string"
  4103. },
  4104. "required": false
  4105. }
  4106. ],
  4107. "responses": {
  4108. "200": {
  4109. "description": "List of sessions",
  4110. "content": {
  4111. "application/json": {
  4112. "schema": {
  4113. "type": "array",
  4114. "items": {
  4115. "$ref": "#/components/schemas/Pty"
  4116. },
  4117. "description": "List of sessions"
  4118. }
  4119. }
  4120. }
  4121. },
  4122. "400": {
  4123. "description": "Bad request",
  4124. "content": {
  4125. "application/json": {
  4126. "schema": {
  4127. "$ref": "#/components/schemas/BadRequestError"
  4128. }
  4129. }
  4130. }
  4131. }
  4132. },
  4133. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4134. "summary": "List PTY sessions",
  4135. "x-codeSamples": [
  4136. {
  4137. "lang": "js",
  4138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4139. }
  4140. ]
  4141. },
  4142. "post": {
  4143. "tags": ["pty"],
  4144. "operationId": "pty.create",
  4145. "parameters": [
  4146. {
  4147. "name": "directory",
  4148. "in": "query",
  4149. "schema": {
  4150. "type": "string"
  4151. },
  4152. "required": false
  4153. },
  4154. {
  4155. "name": "workspace",
  4156. "in": "query",
  4157. "schema": {
  4158. "type": "string"
  4159. },
  4160. "required": false
  4161. }
  4162. ],
  4163. "responses": {
  4164. "200": {
  4165. "description": "Created session",
  4166. "content": {
  4167. "application/json": {
  4168. "schema": {
  4169. "$ref": "#/components/schemas/Pty"
  4170. }
  4171. }
  4172. }
  4173. },
  4174. "400": {
  4175. "description": "BadRequest | InvalidRequestError",
  4176. "content": {
  4177. "application/json": {
  4178. "schema": {
  4179. "anyOf": [
  4180. {
  4181. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4182. },
  4183. {
  4184. "$ref": "#/components/schemas/InvalidRequestError"
  4185. }
  4186. ]
  4187. }
  4188. }
  4189. }
  4190. }
  4191. },
  4192. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4193. "summary": "Create PTY session",
  4194. "requestBody": {
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "type": "object",
  4199. "properties": {
  4200. "command": {
  4201. "type": "string"
  4202. },
  4203. "args": {
  4204. "type": "array",
  4205. "items": {
  4206. "type": "string"
  4207. }
  4208. },
  4209. "cwd": {
  4210. "type": "string"
  4211. },
  4212. "title": {
  4213. "type": "string"
  4214. },
  4215. "env": {
  4216. "type": "object",
  4217. "additionalProperties": {
  4218. "type": "string"
  4219. }
  4220. }
  4221. },
  4222. "additionalProperties": false
  4223. }
  4224. }
  4225. }
  4226. },
  4227. "x-codeSamples": [
  4228. {
  4229. "lang": "js",
  4230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4231. }
  4232. ]
  4233. }
  4234. },
  4235. "/pty/{ptyID}": {
  4236. "get": {
  4237. "tags": ["pty"],
  4238. "operationId": "pty.get",
  4239. "parameters": [
  4240. {
  4241. "name": "ptyID",
  4242. "in": "path",
  4243. "schema": {
  4244. "type": "string",
  4245. "pattern": "^pty"
  4246. },
  4247. "required": true
  4248. },
  4249. {
  4250. "name": "directory",
  4251. "in": "query",
  4252. "schema": {
  4253. "type": "string"
  4254. },
  4255. "required": false
  4256. },
  4257. {
  4258. "name": "workspace",
  4259. "in": "query",
  4260. "schema": {
  4261. "type": "string"
  4262. },
  4263. "required": false
  4264. }
  4265. ],
  4266. "responses": {
  4267. "200": {
  4268. "description": "Session info",
  4269. "content": {
  4270. "application/json": {
  4271. "schema": {
  4272. "$ref": "#/components/schemas/Pty"
  4273. }
  4274. }
  4275. }
  4276. },
  4277. "400": {
  4278. "description": "Bad request",
  4279. "content": {
  4280. "application/json": {
  4281. "schema": {
  4282. "$ref": "#/components/schemas/BadRequestError"
  4283. }
  4284. }
  4285. }
  4286. },
  4287. "404": {
  4288. "description": "PtyNotFoundError",
  4289. "content": {
  4290. "application/json": {
  4291. "schema": {
  4292. "$ref": "#/components/schemas/PtyNotFoundError"
  4293. }
  4294. }
  4295. }
  4296. }
  4297. },
  4298. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4299. "summary": "Get PTY session",
  4300. "x-codeSamples": [
  4301. {
  4302. "lang": "js",
  4303. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4304. }
  4305. ]
  4306. },
  4307. "put": {
  4308. "tags": ["pty"],
  4309. "operationId": "pty.update",
  4310. "parameters": [
  4311. {
  4312. "name": "ptyID",
  4313. "in": "path",
  4314. "schema": {
  4315. "type": "string",
  4316. "pattern": "^pty"
  4317. },
  4318. "required": true
  4319. },
  4320. {
  4321. "name": "directory",
  4322. "in": "query",
  4323. "schema": {
  4324. "type": "string"
  4325. },
  4326. "required": false
  4327. },
  4328. {
  4329. "name": "workspace",
  4330. "in": "query",
  4331. "schema": {
  4332. "type": "string"
  4333. },
  4334. "required": false
  4335. }
  4336. ],
  4337. "responses": {
  4338. "200": {
  4339. "description": "Updated session",
  4340. "content": {
  4341. "application/json": {
  4342. "schema": {
  4343. "$ref": "#/components/schemas/Pty"
  4344. }
  4345. }
  4346. }
  4347. },
  4348. "400": {
  4349. "description": "BadRequest | InvalidRequestError",
  4350. "content": {
  4351. "application/json": {
  4352. "schema": {
  4353. "anyOf": [
  4354. {
  4355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4356. },
  4357. {
  4358. "$ref": "#/components/schemas/InvalidRequestError"
  4359. }
  4360. ]
  4361. }
  4362. }
  4363. }
  4364. },
  4365. "404": {
  4366. "description": "PtyNotFoundError",
  4367. "content": {
  4368. "application/json": {
  4369. "schema": {
  4370. "$ref": "#/components/schemas/PtyNotFoundError"
  4371. }
  4372. }
  4373. }
  4374. }
  4375. },
  4376. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4377. "summary": "Update PTY session",
  4378. "requestBody": {
  4379. "content": {
  4380. "application/json": {
  4381. "schema": {
  4382. "type": "object",
  4383. "properties": {
  4384. "title": {
  4385. "type": "string"
  4386. },
  4387. "size": {
  4388. "type": "object",
  4389. "properties": {
  4390. "rows": {
  4391. "type": "integer",
  4392. "exclusiveMinimum": 0
  4393. },
  4394. "cols": {
  4395. "type": "integer",
  4396. "exclusiveMinimum": 0
  4397. }
  4398. },
  4399. "required": ["rows", "cols"],
  4400. "additionalProperties": false
  4401. }
  4402. },
  4403. "additionalProperties": false
  4404. }
  4405. }
  4406. }
  4407. },
  4408. "x-codeSamples": [
  4409. {
  4410. "lang": "js",
  4411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4412. }
  4413. ]
  4414. },
  4415. "delete": {
  4416. "tags": ["pty"],
  4417. "operationId": "pty.remove",
  4418. "parameters": [
  4419. {
  4420. "name": "ptyID",
  4421. "in": "path",
  4422. "schema": {
  4423. "type": "string",
  4424. "pattern": "^pty"
  4425. },
  4426. "required": true
  4427. },
  4428. {
  4429. "name": "directory",
  4430. "in": "query",
  4431. "schema": {
  4432. "type": "string"
  4433. },
  4434. "required": false
  4435. },
  4436. {
  4437. "name": "workspace",
  4438. "in": "query",
  4439. "schema": {
  4440. "type": "string"
  4441. },
  4442. "required": false
  4443. }
  4444. ],
  4445. "responses": {
  4446. "200": {
  4447. "description": "Session removed",
  4448. "content": {
  4449. "application/json": {
  4450. "schema": {
  4451. "type": "boolean",
  4452. "description": "Session removed"
  4453. }
  4454. }
  4455. }
  4456. },
  4457. "400": {
  4458. "description": "Bad request",
  4459. "content": {
  4460. "application/json": {
  4461. "schema": {
  4462. "$ref": "#/components/schemas/BadRequestError"
  4463. }
  4464. }
  4465. }
  4466. },
  4467. "404": {
  4468. "description": "PtyNotFoundError",
  4469. "content": {
  4470. "application/json": {
  4471. "schema": {
  4472. "$ref": "#/components/schemas/PtyNotFoundError"
  4473. }
  4474. }
  4475. }
  4476. }
  4477. },
  4478. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4479. "summary": "Remove PTY session",
  4480. "x-codeSamples": [
  4481. {
  4482. "lang": "js",
  4483. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4484. }
  4485. ]
  4486. }
  4487. },
  4488. "/pty/{ptyID}/connect-token": {
  4489. "post": {
  4490. "tags": ["pty"],
  4491. "operationId": "pty.connectToken",
  4492. "parameters": [
  4493. {
  4494. "name": "ptyID",
  4495. "in": "path",
  4496. "schema": {
  4497. "type": "string",
  4498. "pattern": "^pty"
  4499. },
  4500. "required": true
  4501. },
  4502. {
  4503. "name": "directory",
  4504. "in": "query",
  4505. "schema": {
  4506. "type": "string"
  4507. },
  4508. "required": false
  4509. },
  4510. {
  4511. "name": "workspace",
  4512. "in": "query",
  4513. "schema": {
  4514. "type": "string"
  4515. },
  4516. "required": false
  4517. }
  4518. ],
  4519. "responses": {
  4520. "200": {
  4521. "description": "WebSocket connect token",
  4522. "content": {
  4523. "application/json": {
  4524. "schema": {
  4525. "$ref": "#/components/schemas/PtyTicketConnectToken"
  4526. }
  4527. }
  4528. }
  4529. },
  4530. "400": {
  4531. "description": "Bad request",
  4532. "content": {
  4533. "application/json": {
  4534. "schema": {
  4535. "$ref": "#/components/schemas/BadRequestError"
  4536. }
  4537. }
  4538. }
  4539. },
  4540. "403": {
  4541. "description": "PtyForbiddenError",
  4542. "content": {
  4543. "application/json": {
  4544. "schema": {
  4545. "$ref": "#/components/schemas/PtyForbiddenError"
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "404": {
  4551. "description": "PtyNotFoundError",
  4552. "content": {
  4553. "application/json": {
  4554. "schema": {
  4555. "$ref": "#/components/schemas/PtyNotFoundError"
  4556. }
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4562. "summary": "Create PTY WebSocket token",
  4563. "x-codeSamples": [
  4564. {
  4565. "lang": "js",
  4566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4567. }
  4568. ]
  4569. }
  4570. },
  4571. "/question": {
  4572. "get": {
  4573. "tags": ["question"],
  4574. "operationId": "question.list",
  4575. "parameters": [
  4576. {
  4577. "name": "directory",
  4578. "in": "query",
  4579. "schema": {
  4580. "type": "string"
  4581. },
  4582. "required": false
  4583. },
  4584. {
  4585. "name": "workspace",
  4586. "in": "query",
  4587. "schema": {
  4588. "type": "string"
  4589. },
  4590. "required": false
  4591. }
  4592. ],
  4593. "responses": {
  4594. "200": {
  4595. "description": "List of pending questions",
  4596. "content": {
  4597. "application/json": {
  4598. "schema": {
  4599. "type": "array",
  4600. "items": {
  4601. "$ref": "#/components/schemas/QuestionRequest"
  4602. },
  4603. "description": "List of pending questions"
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "400": {
  4609. "description": "Bad request",
  4610. "content": {
  4611. "application/json": {
  4612. "schema": {
  4613. "$ref": "#/components/schemas/BadRequestError"
  4614. }
  4615. }
  4616. }
  4617. }
  4618. },
  4619. "description": "Get all pending question requests across all sessions.",
  4620. "summary": "List pending questions",
  4621. "x-codeSamples": [
  4622. {
  4623. "lang": "js",
  4624. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4625. }
  4626. ]
  4627. }
  4628. },
  4629. "/question/{requestID}/reply": {
  4630. "post": {
  4631. "tags": ["question"],
  4632. "operationId": "question.reply",
  4633. "parameters": [
  4634. {
  4635. "name": "requestID",
  4636. "in": "path",
  4637. "schema": {
  4638. "type": "string",
  4639. "pattern": "^que"
  4640. },
  4641. "required": true
  4642. },
  4643. {
  4644. "name": "directory",
  4645. "in": "query",
  4646. "schema": {
  4647. "type": "string"
  4648. },
  4649. "required": false
  4650. },
  4651. {
  4652. "name": "workspace",
  4653. "in": "query",
  4654. "schema": {
  4655. "type": "string"
  4656. },
  4657. "required": false
  4658. }
  4659. ],
  4660. "responses": {
  4661. "200": {
  4662. "description": "Question answered successfully",
  4663. "content": {
  4664. "application/json": {
  4665. "schema": {
  4666. "type": "boolean",
  4667. "description": "Question answered successfully"
  4668. }
  4669. }
  4670. }
  4671. },
  4672. "400": {
  4673. "description": "BadRequest | InvalidRequestError",
  4674. "content": {
  4675. "application/json": {
  4676. "schema": {
  4677. "anyOf": [
  4678. {
  4679. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4680. },
  4681. {
  4682. "$ref": "#/components/schemas/InvalidRequestError"
  4683. }
  4684. ]
  4685. }
  4686. }
  4687. }
  4688. },
  4689. "404": {
  4690. "description": "QuestionNotFoundError",
  4691. "content": {
  4692. "application/json": {
  4693. "schema": {
  4694. "$ref": "#/components/schemas/QuestionNotFoundError"
  4695. }
  4696. }
  4697. }
  4698. }
  4699. },
  4700. "description": "Provide answers to a question request from the AI assistant.",
  4701. "summary": "Reply to question request",
  4702. "requestBody": {
  4703. "content": {
  4704. "application/json": {
  4705. "schema": {
  4706. "type": "object",
  4707. "properties": {
  4708. "answers": {
  4709. "type": "array",
  4710. "items": {
  4711. "$ref": "#/components/schemas/QuestionAnswer"
  4712. },
  4713. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4714. }
  4715. },
  4716. "required": ["answers"],
  4717. "additionalProperties": false
  4718. }
  4719. }
  4720. }
  4721. },
  4722. "x-codeSamples": [
  4723. {
  4724. "lang": "js",
  4725. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4726. }
  4727. ]
  4728. }
  4729. },
  4730. "/question/{requestID}/reject": {
  4731. "post": {
  4732. "tags": ["question"],
  4733. "operationId": "question.reject",
  4734. "parameters": [
  4735. {
  4736. "name": "requestID",
  4737. "in": "path",
  4738. "schema": {
  4739. "type": "string",
  4740. "pattern": "^que"
  4741. },
  4742. "required": true
  4743. },
  4744. {
  4745. "name": "directory",
  4746. "in": "query",
  4747. "schema": {
  4748. "type": "string"
  4749. },
  4750. "required": false
  4751. },
  4752. {
  4753. "name": "workspace",
  4754. "in": "query",
  4755. "schema": {
  4756. "type": "string"
  4757. },
  4758. "required": false
  4759. }
  4760. ],
  4761. "responses": {
  4762. "200": {
  4763. "description": "Question rejected successfully",
  4764. "content": {
  4765. "application/json": {
  4766. "schema": {
  4767. "type": "boolean",
  4768. "description": "Question rejected successfully"
  4769. }
  4770. }
  4771. }
  4772. },
  4773. "400": {
  4774. "description": "BadRequest | InvalidRequestError",
  4775. "content": {
  4776. "application/json": {
  4777. "schema": {
  4778. "anyOf": [
  4779. {
  4780. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4781. },
  4782. {
  4783. "$ref": "#/components/schemas/InvalidRequestError"
  4784. }
  4785. ]
  4786. }
  4787. }
  4788. }
  4789. },
  4790. "404": {
  4791. "description": "QuestionNotFoundError",
  4792. "content": {
  4793. "application/json": {
  4794. "schema": {
  4795. "$ref": "#/components/schemas/QuestionNotFoundError"
  4796. }
  4797. }
  4798. }
  4799. }
  4800. },
  4801. "description": "Reject a question request from the AI assistant.",
  4802. "summary": "Reject question request",
  4803. "x-codeSamples": [
  4804. {
  4805. "lang": "js",
  4806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4807. }
  4808. ]
  4809. }
  4810. },
  4811. "/permission": {
  4812. "get": {
  4813. "tags": ["permission"],
  4814. "operationId": "permission.list",
  4815. "parameters": [
  4816. {
  4817. "name": "directory",
  4818. "in": "query",
  4819. "schema": {
  4820. "type": "string"
  4821. },
  4822. "required": false
  4823. },
  4824. {
  4825. "name": "workspace",
  4826. "in": "query",
  4827. "schema": {
  4828. "type": "string"
  4829. },
  4830. "required": false
  4831. }
  4832. ],
  4833. "responses": {
  4834. "200": {
  4835. "description": "List of pending permissions",
  4836. "content": {
  4837. "application/json": {
  4838. "schema": {
  4839. "type": "array",
  4840. "items": {
  4841. "$ref": "#/components/schemas/PermissionRequest"
  4842. },
  4843. "description": "List of pending permissions"
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "400": {
  4849. "description": "Bad request",
  4850. "content": {
  4851. "application/json": {
  4852. "schema": {
  4853. "$ref": "#/components/schemas/BadRequestError"
  4854. }
  4855. }
  4856. }
  4857. }
  4858. },
  4859. "description": "Get all pending permission requests across all sessions.",
  4860. "summary": "List pending permissions",
  4861. "x-codeSamples": [
  4862. {
  4863. "lang": "js",
  4864. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4865. }
  4866. ]
  4867. }
  4868. },
  4869. "/permission/{requestID}/reply": {
  4870. "post": {
  4871. "tags": ["permission"],
  4872. "operationId": "permission.reply",
  4873. "parameters": [
  4874. {
  4875. "name": "requestID",
  4876. "in": "path",
  4877. "schema": {
  4878. "type": "string",
  4879. "pattern": "^per"
  4880. },
  4881. "required": true
  4882. },
  4883. {
  4884. "name": "directory",
  4885. "in": "query",
  4886. "schema": {
  4887. "type": "string"
  4888. },
  4889. "required": false
  4890. },
  4891. {
  4892. "name": "workspace",
  4893. "in": "query",
  4894. "schema": {
  4895. "type": "string"
  4896. },
  4897. "required": false
  4898. }
  4899. ],
  4900. "responses": {
  4901. "200": {
  4902. "description": "Permission processed successfully",
  4903. "content": {
  4904. "application/json": {
  4905. "schema": {
  4906. "type": "boolean",
  4907. "description": "Permission processed successfully"
  4908. }
  4909. }
  4910. }
  4911. },
  4912. "400": {
  4913. "description": "BadRequest | InvalidRequestError",
  4914. "content": {
  4915. "application/json": {
  4916. "schema": {
  4917. "anyOf": [
  4918. {
  4919. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4920. },
  4921. {
  4922. "$ref": "#/components/schemas/InvalidRequestError"
  4923. }
  4924. ]
  4925. }
  4926. }
  4927. }
  4928. },
  4929. "404": {
  4930. "description": "PermissionNotFoundError",
  4931. "content": {
  4932. "application/json": {
  4933. "schema": {
  4934. "$ref": "#/components/schemas/PermissionNotFoundError"
  4935. }
  4936. }
  4937. }
  4938. }
  4939. },
  4940. "description": "Approve or deny a permission request from the AI assistant.",
  4941. "summary": "Respond to permission request",
  4942. "requestBody": {
  4943. "content": {
  4944. "application/json": {
  4945. "schema": {
  4946. "type": "object",
  4947. "properties": {
  4948. "reply": {
  4949. "type": "string",
  4950. "enum": ["once", "always", "reject"]
  4951. },
  4952. "message": {
  4953. "type": "string"
  4954. }
  4955. },
  4956. "required": ["reply"],
  4957. "additionalProperties": false
  4958. }
  4959. }
  4960. }
  4961. },
  4962. "x-codeSamples": [
  4963. {
  4964. "lang": "js",
  4965. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4966. }
  4967. ]
  4968. }
  4969. },
  4970. "/provider": {
  4971. "get": {
  4972. "tags": ["provider"],
  4973. "operationId": "provider.list",
  4974. "parameters": [
  4975. {
  4976. "name": "directory",
  4977. "in": "query",
  4978. "schema": {
  4979. "type": "string"
  4980. },
  4981. "required": false
  4982. },
  4983. {
  4984. "name": "workspace",
  4985. "in": "query",
  4986. "schema": {
  4987. "type": "string"
  4988. },
  4989. "required": false
  4990. }
  4991. ],
  4992. "responses": {
  4993. "200": {
  4994. "description": "List of providers",
  4995. "content": {
  4996. "application/json": {
  4997. "schema": {
  4998. "type": "object",
  4999. "properties": {
  5000. "all": {
  5001. "type": "array",
  5002. "items": {
  5003. "$ref": "#/components/schemas/Provider"
  5004. }
  5005. },
  5006. "default": {
  5007. "type": "object",
  5008. "additionalProperties": {
  5009. "type": "string"
  5010. }
  5011. },
  5012. "connected": {
  5013. "type": "array",
  5014. "items": {
  5015. "type": "string"
  5016. }
  5017. }
  5018. },
  5019. "required": ["all", "default", "connected"],
  5020. "additionalProperties": false,
  5021. "description": "List of providers"
  5022. }
  5023. }
  5024. }
  5025. },
  5026. "400": {
  5027. "description": "Bad request",
  5028. "content": {
  5029. "application/json": {
  5030. "schema": {
  5031. "$ref": "#/components/schemas/BadRequestError"
  5032. }
  5033. }
  5034. }
  5035. }
  5036. },
  5037. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5038. "summary": "List providers",
  5039. "x-codeSamples": [
  5040. {
  5041. "lang": "js",
  5042. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5043. }
  5044. ]
  5045. }
  5046. },
  5047. "/provider/auth": {
  5048. "get": {
  5049. "tags": ["provider"],
  5050. "operationId": "provider.auth",
  5051. "parameters": [
  5052. {
  5053. "name": "directory",
  5054. "in": "query",
  5055. "schema": {
  5056. "type": "string"
  5057. },
  5058. "required": false
  5059. },
  5060. {
  5061. "name": "workspace",
  5062. "in": "query",
  5063. "schema": {
  5064. "type": "string"
  5065. },
  5066. "required": false
  5067. }
  5068. ],
  5069. "responses": {
  5070. "200": {
  5071. "description": "Provider auth methods",
  5072. "content": {
  5073. "application/json": {
  5074. "schema": {
  5075. "type": "object",
  5076. "additionalProperties": {
  5077. "type": "array",
  5078. "items": {
  5079. "$ref": "#/components/schemas/ProviderAuthMethod"
  5080. }
  5081. },
  5082. "description": "Provider auth methods"
  5083. }
  5084. }
  5085. }
  5086. },
  5087. "400": {
  5088. "description": "Bad request",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/BadRequestError"
  5093. }
  5094. }
  5095. }
  5096. }
  5097. },
  5098. "description": "Retrieve available authentication methods for all AI providers.",
  5099. "summary": "Get provider auth methods",
  5100. "x-codeSamples": [
  5101. {
  5102. "lang": "js",
  5103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5104. }
  5105. ]
  5106. }
  5107. },
  5108. "/provider/{providerID}/oauth/authorize": {
  5109. "post": {
  5110. "tags": ["provider"],
  5111. "operationId": "provider.oauth.authorize",
  5112. "parameters": [
  5113. {
  5114. "name": "providerID",
  5115. "in": "path",
  5116. "schema": {
  5117. "type": "string"
  5118. },
  5119. "required": true
  5120. },
  5121. {
  5122. "name": "directory",
  5123. "in": "query",
  5124. "schema": {
  5125. "type": "string"
  5126. },
  5127. "required": false
  5128. },
  5129. {
  5130. "name": "workspace",
  5131. "in": "query",
  5132. "schema": {
  5133. "type": "string"
  5134. },
  5135. "required": false
  5136. }
  5137. ],
  5138. "responses": {
  5139. "200": {
  5140. "description": "Authorization URL and method",
  5141. "content": {
  5142. "application/json": {
  5143. "schema": {
  5144. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5145. }
  5146. }
  5147. }
  5148. },
  5149. "400": {
  5150. "description": "ProviderAuthError | InvalidRequestError",
  5151. "content": {
  5152. "application/json": {
  5153. "schema": {
  5154. "anyOf": [
  5155. {
  5156. "$ref": "#/components/schemas/ProviderAuthError1"
  5157. },
  5158. {
  5159. "$ref": "#/components/schemas/InvalidRequestError"
  5160. }
  5161. ]
  5162. }
  5163. }
  5164. }
  5165. }
  5166. },
  5167. "description": "Start the OAuth authorization flow for a provider.",
  5168. "summary": "Start OAuth authorization",
  5169. "requestBody": {
  5170. "content": {
  5171. "application/json": {
  5172. "schema": {
  5173. "type": "object",
  5174. "properties": {
  5175. "method": {
  5176. "type": "number",
  5177. "description": "Auth method index"
  5178. },
  5179. "inputs": {
  5180. "type": "object",
  5181. "additionalProperties": {
  5182. "type": "string"
  5183. }
  5184. }
  5185. },
  5186. "required": ["method"],
  5187. "additionalProperties": false
  5188. }
  5189. }
  5190. }
  5191. },
  5192. "x-codeSamples": [
  5193. {
  5194. "lang": "js",
  5195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5196. }
  5197. ]
  5198. }
  5199. },
  5200. "/provider/{providerID}/oauth/callback": {
  5201. "post": {
  5202. "tags": ["provider"],
  5203. "operationId": "provider.oauth.callback",
  5204. "parameters": [
  5205. {
  5206. "name": "providerID",
  5207. "in": "path",
  5208. "schema": {
  5209. "type": "string"
  5210. },
  5211. "required": true
  5212. },
  5213. {
  5214. "name": "directory",
  5215. "in": "query",
  5216. "schema": {
  5217. "type": "string"
  5218. },
  5219. "required": false
  5220. },
  5221. {
  5222. "name": "workspace",
  5223. "in": "query",
  5224. "schema": {
  5225. "type": "string"
  5226. },
  5227. "required": false
  5228. }
  5229. ],
  5230. "responses": {
  5231. "200": {
  5232. "description": "OAuth callback processed successfully",
  5233. "content": {
  5234. "application/json": {
  5235. "schema": {
  5236. "type": "boolean",
  5237. "description": "OAuth callback processed successfully"
  5238. }
  5239. }
  5240. }
  5241. },
  5242. "400": {
  5243. "description": "ProviderAuthError | InvalidRequestError",
  5244. "content": {
  5245. "application/json": {
  5246. "schema": {
  5247. "anyOf": [
  5248. {
  5249. "$ref": "#/components/schemas/ProviderAuthError1"
  5250. },
  5251. {
  5252. "$ref": "#/components/schemas/InvalidRequestError"
  5253. }
  5254. ]
  5255. }
  5256. }
  5257. }
  5258. }
  5259. },
  5260. "description": "Handle the OAuth callback from a provider after user authorization.",
  5261. "summary": "Handle OAuth callback",
  5262. "requestBody": {
  5263. "content": {
  5264. "application/json": {
  5265. "schema": {
  5266. "type": "object",
  5267. "properties": {
  5268. "method": {
  5269. "type": "number",
  5270. "description": "Auth method index"
  5271. },
  5272. "code": {
  5273. "type": "string"
  5274. }
  5275. },
  5276. "required": ["method"],
  5277. "additionalProperties": false
  5278. }
  5279. }
  5280. }
  5281. },
  5282. "x-codeSamples": [
  5283. {
  5284. "lang": "js",
  5285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5286. }
  5287. ]
  5288. }
  5289. },
  5290. "/session": {
  5291. "get": {
  5292. "tags": ["session"],
  5293. "operationId": "session.list",
  5294. "parameters": [
  5295. {
  5296. "name": "directory",
  5297. "in": "query",
  5298. "schema": {
  5299. "type": "string"
  5300. },
  5301. "required": false
  5302. },
  5303. {
  5304. "name": "workspace",
  5305. "in": "query",
  5306. "schema": {
  5307. "type": "string"
  5308. },
  5309. "required": false
  5310. },
  5311. {
  5312. "name": "scope",
  5313. "in": "query",
  5314. "schema": {
  5315. "type": "string",
  5316. "enum": ["project"]
  5317. },
  5318. "required": false
  5319. },
  5320. {
  5321. "name": "path",
  5322. "in": "query",
  5323. "schema": {
  5324. "type": "string"
  5325. },
  5326. "required": false
  5327. },
  5328. {
  5329. "name": "roots",
  5330. "in": "query",
  5331. "schema": {
  5332. "anyOf": [
  5333. {
  5334. "type": "boolean"
  5335. },
  5336. {
  5337. "type": "string",
  5338. "enum": ["true", "false"]
  5339. }
  5340. ]
  5341. },
  5342. "required": false
  5343. },
  5344. {
  5345. "name": "start",
  5346. "in": "query",
  5347. "schema": {
  5348. "type": "number"
  5349. },
  5350. "required": false
  5351. },
  5352. {
  5353. "name": "search",
  5354. "in": "query",
  5355. "schema": {
  5356. "type": "string"
  5357. },
  5358. "required": false
  5359. },
  5360. {
  5361. "name": "limit",
  5362. "in": "query",
  5363. "schema": {
  5364. "type": "number"
  5365. },
  5366. "required": false
  5367. }
  5368. ],
  5369. "responses": {
  5370. "200": {
  5371. "description": "List of sessions",
  5372. "content": {
  5373. "application/json": {
  5374. "schema": {
  5375. "type": "array",
  5376. "items": {
  5377. "$ref": "#/components/schemas/Session"
  5378. },
  5379. "description": "List of sessions"
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "400": {
  5385. "description": "Bad request",
  5386. "content": {
  5387. "application/json": {
  5388. "schema": {
  5389. "$ref": "#/components/schemas/BadRequestError"
  5390. }
  5391. }
  5392. }
  5393. }
  5394. },
  5395. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5396. "summary": "List sessions",
  5397. "x-codeSamples": [
  5398. {
  5399. "lang": "js",
  5400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5401. }
  5402. ]
  5403. },
  5404. "post": {
  5405. "tags": ["session"],
  5406. "operationId": "session.create",
  5407. "parameters": [
  5408. {
  5409. "name": "directory",
  5410. "in": "query",
  5411. "schema": {
  5412. "type": "string"
  5413. },
  5414. "required": false
  5415. },
  5416. {
  5417. "name": "workspace",
  5418. "in": "query",
  5419. "schema": {
  5420. "type": "string"
  5421. },
  5422. "required": false
  5423. }
  5424. ],
  5425. "responses": {
  5426. "200": {
  5427. "description": "Successfully created session",
  5428. "content": {
  5429. "application/json": {
  5430. "schema": {
  5431. "$ref": "#/components/schemas/Session"
  5432. }
  5433. }
  5434. }
  5435. },
  5436. "400": {
  5437. "description": "BadRequest | InvalidRequestError",
  5438. "content": {
  5439. "application/json": {
  5440. "schema": {
  5441. "anyOf": [
  5442. {
  5443. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5444. },
  5445. {
  5446. "$ref": "#/components/schemas/InvalidRequestError"
  5447. }
  5448. ]
  5449. }
  5450. }
  5451. }
  5452. }
  5453. },
  5454. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5455. "summary": "Create session",
  5456. "requestBody": {
  5457. "content": {
  5458. "application/json": {
  5459. "schema": {
  5460. "type": "object",
  5461. "properties": {
  5462. "parentID": {
  5463. "type": "string",
  5464. "pattern": "^ses"
  5465. },
  5466. "title": {
  5467. "type": "string"
  5468. },
  5469. "agent": {
  5470. "type": "string"
  5471. },
  5472. "model": {
  5473. "type": "object",
  5474. "properties": {
  5475. "id": {
  5476. "type": "string"
  5477. },
  5478. "providerID": {
  5479. "type": "string"
  5480. },
  5481. "variant": {
  5482. "type": "string"
  5483. }
  5484. },
  5485. "required": ["id", "providerID"],
  5486. "additionalProperties": false
  5487. },
  5488. "metadata": {
  5489. "type": "object"
  5490. },
  5491. "permission": {
  5492. "$ref": "#/components/schemas/PermissionRuleset"
  5493. },
  5494. "workspaceID": {
  5495. "type": "string",
  5496. "pattern": "^wrk"
  5497. }
  5498. },
  5499. "additionalProperties": false
  5500. }
  5501. }
  5502. }
  5503. },
  5504. "x-codeSamples": [
  5505. {
  5506. "lang": "js",
  5507. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5508. }
  5509. ]
  5510. }
  5511. },
  5512. "/session/status": {
  5513. "get": {
  5514. "tags": ["session"],
  5515. "operationId": "session.status",
  5516. "parameters": [
  5517. {
  5518. "name": "directory",
  5519. "in": "query",
  5520. "schema": {
  5521. "type": "string"
  5522. },
  5523. "required": false
  5524. },
  5525. {
  5526. "name": "workspace",
  5527. "in": "query",
  5528. "schema": {
  5529. "type": "string"
  5530. },
  5531. "required": false
  5532. }
  5533. ],
  5534. "responses": {
  5535. "200": {
  5536. "description": "Get session status",
  5537. "content": {
  5538. "application/json": {
  5539. "schema": {
  5540. "type": "object",
  5541. "additionalProperties": {
  5542. "$ref": "#/components/schemas/SessionStatus"
  5543. },
  5544. "description": "Get session status"
  5545. }
  5546. }
  5547. }
  5548. },
  5549. "400": {
  5550. "description": "BadRequest | InvalidRequestError",
  5551. "content": {
  5552. "application/json": {
  5553. "schema": {
  5554. "anyOf": [
  5555. {
  5556. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5557. },
  5558. {
  5559. "$ref": "#/components/schemas/InvalidRequestError"
  5560. }
  5561. ]
  5562. }
  5563. }
  5564. }
  5565. }
  5566. },
  5567. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5568. "summary": "Get session status",
  5569. "x-codeSamples": [
  5570. {
  5571. "lang": "js",
  5572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5573. }
  5574. ]
  5575. }
  5576. },
  5577. "/session/{sessionID}": {
  5578. "get": {
  5579. "tags": ["session"],
  5580. "operationId": "session.get",
  5581. "parameters": [
  5582. {
  5583. "name": "sessionID",
  5584. "in": "path",
  5585. "schema": {
  5586. "type": "string",
  5587. "pattern": "^ses"
  5588. },
  5589. "required": true
  5590. },
  5591. {
  5592. "name": "directory",
  5593. "in": "query",
  5594. "schema": {
  5595. "type": "string"
  5596. },
  5597. "required": false
  5598. },
  5599. {
  5600. "name": "workspace",
  5601. "in": "query",
  5602. "schema": {
  5603. "type": "string"
  5604. },
  5605. "required": false
  5606. }
  5607. ],
  5608. "responses": {
  5609. "200": {
  5610. "description": "Get session",
  5611. "content": {
  5612. "application/json": {
  5613. "schema": {
  5614. "$ref": "#/components/schemas/Session"
  5615. }
  5616. }
  5617. }
  5618. },
  5619. "400": {
  5620. "description": "BadRequest | InvalidRequestError",
  5621. "content": {
  5622. "application/json": {
  5623. "schema": {
  5624. "anyOf": [
  5625. {
  5626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5627. },
  5628. {
  5629. "$ref": "#/components/schemas/InvalidRequestError"
  5630. }
  5631. ]
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "404": {
  5637. "description": "NotFoundError",
  5638. "content": {
  5639. "application/json": {
  5640. "schema": {
  5641. "$ref": "#/components/schemas/NotFoundError"
  5642. }
  5643. }
  5644. }
  5645. }
  5646. },
  5647. "description": "Retrieve detailed information about a specific OpenCode session.",
  5648. "summary": "Get session",
  5649. "x-codeSamples": [
  5650. {
  5651. "lang": "js",
  5652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5653. }
  5654. ]
  5655. },
  5656. "delete": {
  5657. "tags": ["session"],
  5658. "operationId": "session.delete",
  5659. "parameters": [
  5660. {
  5661. "name": "sessionID",
  5662. "in": "path",
  5663. "schema": {
  5664. "type": "string",
  5665. "pattern": "^ses"
  5666. },
  5667. "required": true
  5668. },
  5669. {
  5670. "name": "directory",
  5671. "in": "query",
  5672. "schema": {
  5673. "type": "string"
  5674. },
  5675. "required": false
  5676. },
  5677. {
  5678. "name": "workspace",
  5679. "in": "query",
  5680. "schema": {
  5681. "type": "string"
  5682. },
  5683. "required": false
  5684. }
  5685. ],
  5686. "responses": {
  5687. "200": {
  5688. "description": "Successfully deleted session",
  5689. "content": {
  5690. "application/json": {
  5691. "schema": {
  5692. "type": "boolean",
  5693. "description": "Successfully deleted session"
  5694. }
  5695. }
  5696. }
  5697. },
  5698. "400": {
  5699. "description": "BadRequest | InvalidRequestError",
  5700. "content": {
  5701. "application/json": {
  5702. "schema": {
  5703. "anyOf": [
  5704. {
  5705. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5706. },
  5707. {
  5708. "$ref": "#/components/schemas/InvalidRequestError"
  5709. }
  5710. ]
  5711. }
  5712. }
  5713. }
  5714. },
  5715. "404": {
  5716. "description": "NotFoundError",
  5717. "content": {
  5718. "application/json": {
  5719. "schema": {
  5720. "$ref": "#/components/schemas/NotFoundError"
  5721. }
  5722. }
  5723. }
  5724. }
  5725. },
  5726. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5727. "summary": "Delete session",
  5728. "x-codeSamples": [
  5729. {
  5730. "lang": "js",
  5731. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5732. }
  5733. ]
  5734. },
  5735. "patch": {
  5736. "tags": ["session"],
  5737. "operationId": "session.update",
  5738. "parameters": [
  5739. {
  5740. "name": "sessionID",
  5741. "in": "path",
  5742. "schema": {
  5743. "type": "string",
  5744. "pattern": "^ses"
  5745. },
  5746. "required": true
  5747. },
  5748. {
  5749. "name": "directory",
  5750. "in": "query",
  5751. "schema": {
  5752. "type": "string"
  5753. },
  5754. "required": false
  5755. },
  5756. {
  5757. "name": "workspace",
  5758. "in": "query",
  5759. "schema": {
  5760. "type": "string"
  5761. },
  5762. "required": false
  5763. }
  5764. ],
  5765. "responses": {
  5766. "200": {
  5767. "description": "Successfully updated session",
  5768. "content": {
  5769. "application/json": {
  5770. "schema": {
  5771. "$ref": "#/components/schemas/Session"
  5772. }
  5773. }
  5774. }
  5775. },
  5776. "400": {
  5777. "description": "BadRequest | InvalidRequestError",
  5778. "content": {
  5779. "application/json": {
  5780. "schema": {
  5781. "anyOf": [
  5782. {
  5783. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5784. },
  5785. {
  5786. "$ref": "#/components/schemas/InvalidRequestError"
  5787. }
  5788. ]
  5789. }
  5790. }
  5791. }
  5792. },
  5793. "404": {
  5794. "description": "NotFoundError",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "$ref": "#/components/schemas/NotFoundError"
  5799. }
  5800. }
  5801. }
  5802. }
  5803. },
  5804. "description": "Update properties of an existing session, such as title or other metadata.",
  5805. "summary": "Update session",
  5806. "requestBody": {
  5807. "content": {
  5808. "application/json": {
  5809. "schema": {
  5810. "type": "object",
  5811. "properties": {
  5812. "title": {
  5813. "type": "string"
  5814. },
  5815. "metadata": {
  5816. "type": "object"
  5817. },
  5818. "permission": {
  5819. "$ref": "#/components/schemas/PermissionRuleset"
  5820. },
  5821. "time": {
  5822. "type": "object",
  5823. "properties": {
  5824. "archived": {
  5825. "type": "number"
  5826. }
  5827. },
  5828. "additionalProperties": false
  5829. }
  5830. },
  5831. "additionalProperties": false
  5832. }
  5833. }
  5834. }
  5835. },
  5836. "x-codeSamples": [
  5837. {
  5838. "lang": "js",
  5839. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5840. }
  5841. ]
  5842. }
  5843. },
  5844. "/session/{sessionID}/children": {
  5845. "get": {
  5846. "tags": ["session"],
  5847. "operationId": "session.children",
  5848. "parameters": [
  5849. {
  5850. "name": "sessionID",
  5851. "in": "path",
  5852. "schema": {
  5853. "type": "string",
  5854. "pattern": "^ses"
  5855. },
  5856. "required": true
  5857. },
  5858. {
  5859. "name": "directory",
  5860. "in": "query",
  5861. "schema": {
  5862. "type": "string"
  5863. },
  5864. "required": false
  5865. },
  5866. {
  5867. "name": "workspace",
  5868. "in": "query",
  5869. "schema": {
  5870. "type": "string"
  5871. },
  5872. "required": false
  5873. }
  5874. ],
  5875. "responses": {
  5876. "200": {
  5877. "description": "List of children",
  5878. "content": {
  5879. "application/json": {
  5880. "schema": {
  5881. "type": "array",
  5882. "items": {
  5883. "$ref": "#/components/schemas/Session"
  5884. },
  5885. "description": "List of children"
  5886. }
  5887. }
  5888. }
  5889. },
  5890. "400": {
  5891. "description": "BadRequest | InvalidRequestError",
  5892. "content": {
  5893. "application/json": {
  5894. "schema": {
  5895. "anyOf": [
  5896. {
  5897. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5898. },
  5899. {
  5900. "$ref": "#/components/schemas/InvalidRequestError"
  5901. }
  5902. ]
  5903. }
  5904. }
  5905. }
  5906. },
  5907. "404": {
  5908. "description": "NotFoundError",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "$ref": "#/components/schemas/NotFoundError"
  5913. }
  5914. }
  5915. }
  5916. }
  5917. },
  5918. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5919. "summary": "Get session children",
  5920. "x-codeSamples": [
  5921. {
  5922. "lang": "js",
  5923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5924. }
  5925. ]
  5926. }
  5927. },
  5928. "/session/{sessionID}/todo": {
  5929. "get": {
  5930. "tags": ["session"],
  5931. "operationId": "session.todo",
  5932. "parameters": [
  5933. {
  5934. "name": "sessionID",
  5935. "in": "path",
  5936. "schema": {
  5937. "type": "string",
  5938. "pattern": "^ses"
  5939. },
  5940. "required": true
  5941. },
  5942. {
  5943. "name": "directory",
  5944. "in": "query",
  5945. "schema": {
  5946. "type": "string"
  5947. },
  5948. "required": false
  5949. },
  5950. {
  5951. "name": "workspace",
  5952. "in": "query",
  5953. "schema": {
  5954. "type": "string"
  5955. },
  5956. "required": false
  5957. }
  5958. ],
  5959. "responses": {
  5960. "200": {
  5961. "description": "Todo list",
  5962. "content": {
  5963. "application/json": {
  5964. "schema": {
  5965. "type": "array",
  5966. "items": {
  5967. "$ref": "#/components/schemas/Todo"
  5968. },
  5969. "description": "Todo list"
  5970. }
  5971. }
  5972. }
  5973. },
  5974. "400": {
  5975. "description": "BadRequest | InvalidRequestError",
  5976. "content": {
  5977. "application/json": {
  5978. "schema": {
  5979. "anyOf": [
  5980. {
  5981. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5982. },
  5983. {
  5984. "$ref": "#/components/schemas/InvalidRequestError"
  5985. }
  5986. ]
  5987. }
  5988. }
  5989. }
  5990. },
  5991. "404": {
  5992. "description": "NotFoundError",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "$ref": "#/components/schemas/NotFoundError"
  5997. }
  5998. }
  5999. }
  6000. }
  6001. },
  6002. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6003. "summary": "Get session todos",
  6004. "x-codeSamples": [
  6005. {
  6006. "lang": "js",
  6007. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6008. }
  6009. ]
  6010. }
  6011. },
  6012. "/session/{sessionID}/diff": {
  6013. "get": {
  6014. "tags": ["session"],
  6015. "operationId": "session.diff",
  6016. "parameters": [
  6017. {
  6018. "name": "sessionID",
  6019. "in": "path",
  6020. "schema": {
  6021. "type": "string",
  6022. "pattern": "^ses"
  6023. },
  6024. "required": true
  6025. },
  6026. {
  6027. "name": "directory",
  6028. "in": "query",
  6029. "schema": {
  6030. "type": "string"
  6031. },
  6032. "required": false
  6033. },
  6034. {
  6035. "name": "workspace",
  6036. "in": "query",
  6037. "schema": {
  6038. "type": "string"
  6039. },
  6040. "required": false
  6041. },
  6042. {
  6043. "name": "messageID",
  6044. "in": "query",
  6045. "schema": {
  6046. "type": "string",
  6047. "pattern": "^msg"
  6048. },
  6049. "required": false
  6050. }
  6051. ],
  6052. "responses": {
  6053. "200": {
  6054. "description": "Successfully retrieved diff",
  6055. "content": {
  6056. "application/json": {
  6057. "schema": {
  6058. "type": "array",
  6059. "items": {
  6060. "$ref": "#/components/schemas/SnapshotFileDiff"
  6061. },
  6062. "description": "Successfully retrieved diff"
  6063. }
  6064. }
  6065. }
  6066. },
  6067. "400": {
  6068. "description": "Bad request",
  6069. "content": {
  6070. "application/json": {
  6071. "schema": {
  6072. "$ref": "#/components/schemas/BadRequestError"
  6073. }
  6074. }
  6075. }
  6076. }
  6077. },
  6078. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6079. "summary": "Get message diff",
  6080. "x-codeSamples": [
  6081. {
  6082. "lang": "js",
  6083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6084. }
  6085. ]
  6086. }
  6087. },
  6088. "/session/{sessionID}/message": {
  6089. "get": {
  6090. "tags": ["session"],
  6091. "operationId": "session.messages",
  6092. "parameters": [
  6093. {
  6094. "name": "sessionID",
  6095. "in": "path",
  6096. "schema": {
  6097. "type": "string",
  6098. "pattern": "^ses"
  6099. },
  6100. "required": true
  6101. },
  6102. {
  6103. "name": "directory",
  6104. "in": "query",
  6105. "schema": {
  6106. "type": "string"
  6107. },
  6108. "required": false
  6109. },
  6110. {
  6111. "name": "workspace",
  6112. "in": "query",
  6113. "schema": {
  6114. "type": "string"
  6115. },
  6116. "required": false
  6117. },
  6118. {
  6119. "name": "limit",
  6120. "in": "query",
  6121. "schema": {
  6122. "type": "integer",
  6123. "minimum": 0,
  6124. "maximum": 9007199254740991
  6125. },
  6126. "required": false
  6127. },
  6128. {
  6129. "name": "before",
  6130. "in": "query",
  6131. "schema": {
  6132. "type": "string"
  6133. },
  6134. "required": false
  6135. }
  6136. ],
  6137. "responses": {
  6138. "200": {
  6139. "description": "List of messages",
  6140. "content": {
  6141. "application/json": {
  6142. "schema": {
  6143. "type": "array",
  6144. "items": {
  6145. "type": "object",
  6146. "properties": {
  6147. "info": {
  6148. "$ref": "#/components/schemas/Message"
  6149. },
  6150. "parts": {
  6151. "type": "array",
  6152. "items": {
  6153. "$ref": "#/components/schemas/Part"
  6154. }
  6155. }
  6156. },
  6157. "required": ["info", "parts"],
  6158. "additionalProperties": false
  6159. },
  6160. "description": "List of messages"
  6161. }
  6162. }
  6163. }
  6164. },
  6165. "400": {
  6166. "description": "BadRequest | InvalidRequestError",
  6167. "content": {
  6168. "application/json": {
  6169. "schema": {
  6170. "anyOf": [
  6171. {
  6172. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6173. },
  6174. {
  6175. "$ref": "#/components/schemas/InvalidRequestError"
  6176. }
  6177. ]
  6178. }
  6179. }
  6180. }
  6181. },
  6182. "404": {
  6183. "description": "NotFoundError",
  6184. "content": {
  6185. "application/json": {
  6186. "schema": {
  6187. "$ref": "#/components/schemas/NotFoundError"
  6188. }
  6189. }
  6190. }
  6191. }
  6192. },
  6193. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6194. "summary": "Get session messages",
  6195. "x-codeSamples": [
  6196. {
  6197. "lang": "js",
  6198. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6199. }
  6200. ]
  6201. },
  6202. "post": {
  6203. "tags": ["session"],
  6204. "operationId": "session.prompt",
  6205. "parameters": [
  6206. {
  6207. "name": "sessionID",
  6208. "in": "path",
  6209. "schema": {
  6210. "type": "string",
  6211. "pattern": "^ses"
  6212. },
  6213. "required": true
  6214. },
  6215. {
  6216. "name": "directory",
  6217. "in": "query",
  6218. "schema": {
  6219. "type": "string"
  6220. },
  6221. "required": false
  6222. },
  6223. {
  6224. "name": "workspace",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. }
  6231. ],
  6232. "responses": {
  6233. "200": {
  6234. "description": "Created message",
  6235. "content": {
  6236. "application/json": {
  6237. "schema": {
  6238. "type": "object",
  6239. "required": ["info", "parts"],
  6240. "properties": {
  6241. "info": {
  6242. "$ref": "#/components/schemas/AssistantMessage"
  6243. },
  6244. "parts": {
  6245. "type": "array",
  6246. "items": {
  6247. "$ref": "#/components/schemas/Part"
  6248. }
  6249. }
  6250. }
  6251. }
  6252. }
  6253. }
  6254. },
  6255. "400": {
  6256. "description": "BadRequest | InvalidRequestError",
  6257. "content": {
  6258. "application/json": {
  6259. "schema": {
  6260. "anyOf": [
  6261. {
  6262. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6263. },
  6264. {
  6265. "$ref": "#/components/schemas/InvalidRequestError"
  6266. }
  6267. ]
  6268. }
  6269. }
  6270. }
  6271. },
  6272. "404": {
  6273. "description": "NotFoundError",
  6274. "content": {
  6275. "application/json": {
  6276. "schema": {
  6277. "$ref": "#/components/schemas/NotFoundError"
  6278. }
  6279. }
  6280. }
  6281. }
  6282. },
  6283. "description": "Create and send a new message to a session, streaming the AI response.",
  6284. "summary": "Send message",
  6285. "requestBody": {
  6286. "content": {
  6287. "application/json": {
  6288. "schema": {
  6289. "type": "object",
  6290. "properties": {
  6291. "messageID": {
  6292. "type": "string",
  6293. "pattern": "^msg"
  6294. },
  6295. "model": {
  6296. "type": "object",
  6297. "properties": {
  6298. "providerID": {
  6299. "type": "string"
  6300. },
  6301. "modelID": {
  6302. "type": "string"
  6303. }
  6304. },
  6305. "required": ["providerID", "modelID"],
  6306. "additionalProperties": false
  6307. },
  6308. "agent": {
  6309. "type": "string"
  6310. },
  6311. "noReply": {
  6312. "type": "boolean"
  6313. },
  6314. "tools": {
  6315. "type": "object",
  6316. "additionalProperties": {
  6317. "type": "boolean"
  6318. }
  6319. },
  6320. "format": {
  6321. "$ref": "#/components/schemas/OutputFormat"
  6322. },
  6323. "system": {
  6324. "type": "string"
  6325. },
  6326. "variant": {
  6327. "type": "string"
  6328. },
  6329. "parts": {
  6330. "type": "array",
  6331. "items": {
  6332. "anyOf": [
  6333. {
  6334. "$ref": "#/components/schemas/TextPartInput"
  6335. },
  6336. {
  6337. "$ref": "#/components/schemas/FilePartInput"
  6338. },
  6339. {
  6340. "$ref": "#/components/schemas/AgentPartInput"
  6341. },
  6342. {
  6343. "$ref": "#/components/schemas/SubtaskPartInput"
  6344. }
  6345. ]
  6346. }
  6347. }
  6348. },
  6349. "required": ["parts"],
  6350. "additionalProperties": false
  6351. }
  6352. }
  6353. }
  6354. },
  6355. "x-codeSamples": [
  6356. {
  6357. "lang": "js",
  6358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6359. }
  6360. ]
  6361. }
  6362. },
  6363. "/session/{sessionID}/message/{messageID}": {
  6364. "get": {
  6365. "tags": ["session"],
  6366. "operationId": "session.message",
  6367. "parameters": [
  6368. {
  6369. "name": "sessionID",
  6370. "in": "path",
  6371. "schema": {
  6372. "type": "string",
  6373. "pattern": "^ses"
  6374. },
  6375. "required": true
  6376. },
  6377. {
  6378. "name": "messageID",
  6379. "in": "path",
  6380. "schema": {
  6381. "type": "string",
  6382. "pattern": "^msg"
  6383. },
  6384. "required": true
  6385. },
  6386. {
  6387. "name": "directory",
  6388. "in": "query",
  6389. "schema": {
  6390. "type": "string"
  6391. },
  6392. "required": false
  6393. },
  6394. {
  6395. "name": "workspace",
  6396. "in": "query",
  6397. "schema": {
  6398. "type": "string"
  6399. },
  6400. "required": false
  6401. }
  6402. ],
  6403. "responses": {
  6404. "200": {
  6405. "description": "Message",
  6406. "content": {
  6407. "application/json": {
  6408. "schema": {
  6409. "type": "object",
  6410. "properties": {
  6411. "info": {
  6412. "$ref": "#/components/schemas/Message"
  6413. },
  6414. "parts": {
  6415. "type": "array",
  6416. "items": {
  6417. "$ref": "#/components/schemas/Part"
  6418. }
  6419. }
  6420. },
  6421. "required": ["info", "parts"],
  6422. "additionalProperties": false,
  6423. "description": "Message"
  6424. }
  6425. }
  6426. }
  6427. },
  6428. "400": {
  6429. "description": "BadRequest | InvalidRequestError",
  6430. "content": {
  6431. "application/json": {
  6432. "schema": {
  6433. "anyOf": [
  6434. {
  6435. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6436. },
  6437. {
  6438. "$ref": "#/components/schemas/InvalidRequestError"
  6439. }
  6440. ]
  6441. }
  6442. }
  6443. }
  6444. },
  6445. "404": {
  6446. "description": "NotFoundError",
  6447. "content": {
  6448. "application/json": {
  6449. "schema": {
  6450. "$ref": "#/components/schemas/NotFoundError"
  6451. }
  6452. }
  6453. }
  6454. }
  6455. },
  6456. "description": "Retrieve a specific message from a session by its message ID.",
  6457. "summary": "Get message",
  6458. "x-codeSamples": [
  6459. {
  6460. "lang": "js",
  6461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6462. }
  6463. ]
  6464. },
  6465. "delete": {
  6466. "tags": ["session"],
  6467. "operationId": "session.deleteMessage",
  6468. "parameters": [
  6469. {
  6470. "name": "sessionID",
  6471. "in": "path",
  6472. "schema": {
  6473. "type": "string",
  6474. "pattern": "^ses"
  6475. },
  6476. "required": true
  6477. },
  6478. {
  6479. "name": "messageID",
  6480. "in": "path",
  6481. "schema": {
  6482. "type": "string",
  6483. "pattern": "^msg"
  6484. },
  6485. "required": true
  6486. },
  6487. {
  6488. "name": "directory",
  6489. "in": "query",
  6490. "schema": {
  6491. "type": "string"
  6492. },
  6493. "required": false
  6494. },
  6495. {
  6496. "name": "workspace",
  6497. "in": "query",
  6498. "schema": {
  6499. "type": "string"
  6500. },
  6501. "required": false
  6502. }
  6503. ],
  6504. "responses": {
  6505. "200": {
  6506. "description": "Successfully deleted message",
  6507. "content": {
  6508. "application/json": {
  6509. "schema": {
  6510. "type": "boolean",
  6511. "description": "Successfully deleted message"
  6512. }
  6513. }
  6514. }
  6515. },
  6516. "400": {
  6517. "description": "BadRequest | InvalidRequestError",
  6518. "content": {
  6519. "application/json": {
  6520. "schema": {
  6521. "anyOf": [
  6522. {
  6523. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6524. },
  6525. {
  6526. "$ref": "#/components/schemas/InvalidRequestError"
  6527. }
  6528. ]
  6529. }
  6530. }
  6531. }
  6532. },
  6533. "404": {
  6534. "description": "NotFoundError",
  6535. "content": {
  6536. "application/json": {
  6537. "schema": {
  6538. "$ref": "#/components/schemas/NotFoundError"
  6539. }
  6540. }
  6541. }
  6542. },
  6543. "409": {
  6544. "description": "SessionBusyError",
  6545. "content": {
  6546. "application/json": {
  6547. "schema": {
  6548. "$ref": "#/components/schemas/SessionBusyError"
  6549. }
  6550. }
  6551. }
  6552. }
  6553. },
  6554. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6555. "summary": "Delete message",
  6556. "x-codeSamples": [
  6557. {
  6558. "lang": "js",
  6559. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6560. }
  6561. ]
  6562. }
  6563. },
  6564. "/session/{sessionID}/fork": {
  6565. "post": {
  6566. "tags": ["session"],
  6567. "operationId": "session.fork",
  6568. "parameters": [
  6569. {
  6570. "name": "sessionID",
  6571. "in": "path",
  6572. "schema": {
  6573. "type": "string",
  6574. "pattern": "^ses"
  6575. },
  6576. "required": true
  6577. },
  6578. {
  6579. "name": "directory",
  6580. "in": "query",
  6581. "schema": {
  6582. "type": "string"
  6583. },
  6584. "required": false
  6585. },
  6586. {
  6587. "name": "workspace",
  6588. "in": "query",
  6589. "schema": {
  6590. "type": "string"
  6591. },
  6592. "required": false
  6593. }
  6594. ],
  6595. "responses": {
  6596. "200": {
  6597. "description": "200",
  6598. "content": {
  6599. "application/json": {
  6600. "schema": {
  6601. "$ref": "#/components/schemas/Session"
  6602. }
  6603. }
  6604. }
  6605. },
  6606. "400": {
  6607. "description": "BadRequest | InvalidRequestError",
  6608. "content": {
  6609. "application/json": {
  6610. "schema": {
  6611. "anyOf": [
  6612. {
  6613. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6614. },
  6615. {
  6616. "$ref": "#/components/schemas/InvalidRequestError"
  6617. }
  6618. ]
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "404": {
  6624. "description": "NotFoundError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/NotFoundError"
  6629. }
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "description": "Create a new session by forking an existing session at a specific message point.",
  6635. "summary": "Fork session",
  6636. "requestBody": {
  6637. "content": {
  6638. "application/json": {
  6639. "schema": {
  6640. "type": "object",
  6641. "properties": {
  6642. "messageID": {
  6643. "type": "string",
  6644. "pattern": "^msg"
  6645. }
  6646. },
  6647. "additionalProperties": false
  6648. }
  6649. }
  6650. }
  6651. },
  6652. "x-codeSamples": [
  6653. {
  6654. "lang": "js",
  6655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6656. }
  6657. ]
  6658. }
  6659. },
  6660. "/session/{sessionID}/abort": {
  6661. "post": {
  6662. "tags": ["session"],
  6663. "operationId": "session.abort",
  6664. "parameters": [
  6665. {
  6666. "name": "sessionID",
  6667. "in": "path",
  6668. "schema": {
  6669. "type": "string",
  6670. "pattern": "^ses"
  6671. },
  6672. "required": true
  6673. },
  6674. {
  6675. "name": "directory",
  6676. "in": "query",
  6677. "schema": {
  6678. "type": "string"
  6679. },
  6680. "required": false
  6681. },
  6682. {
  6683. "name": "workspace",
  6684. "in": "query",
  6685. "schema": {
  6686. "type": "string"
  6687. },
  6688. "required": false
  6689. }
  6690. ],
  6691. "responses": {
  6692. "200": {
  6693. "description": "Aborted session",
  6694. "content": {
  6695. "application/json": {
  6696. "schema": {
  6697. "type": "boolean",
  6698. "description": "Aborted session"
  6699. }
  6700. }
  6701. }
  6702. },
  6703. "400": {
  6704. "description": "BadRequest | InvalidRequestError",
  6705. "content": {
  6706. "application/json": {
  6707. "schema": {
  6708. "anyOf": [
  6709. {
  6710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6711. },
  6712. {
  6713. "$ref": "#/components/schemas/InvalidRequestError"
  6714. }
  6715. ]
  6716. }
  6717. }
  6718. }
  6719. }
  6720. },
  6721. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6722. "summary": "Abort session",
  6723. "x-codeSamples": [
  6724. {
  6725. "lang": "js",
  6726. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6727. }
  6728. ]
  6729. }
  6730. },
  6731. "/session/{sessionID}/init": {
  6732. "post": {
  6733. "tags": ["session"],
  6734. "operationId": "session.init",
  6735. "parameters": [
  6736. {
  6737. "name": "sessionID",
  6738. "in": "path",
  6739. "schema": {
  6740. "type": "string",
  6741. "pattern": "^ses"
  6742. },
  6743. "required": true
  6744. },
  6745. {
  6746. "name": "directory",
  6747. "in": "query",
  6748. "schema": {
  6749. "type": "string"
  6750. },
  6751. "required": false
  6752. },
  6753. {
  6754. "name": "workspace",
  6755. "in": "query",
  6756. "schema": {
  6757. "type": "string"
  6758. },
  6759. "required": false
  6760. }
  6761. ],
  6762. "responses": {
  6763. "200": {
  6764. "description": "200",
  6765. "content": {
  6766. "application/json": {
  6767. "schema": {
  6768. "type": "boolean",
  6769. "description": "200"
  6770. }
  6771. }
  6772. }
  6773. },
  6774. "400": {
  6775. "description": "BadRequest | InvalidRequestError",
  6776. "content": {
  6777. "application/json": {
  6778. "schema": {
  6779. "anyOf": [
  6780. {
  6781. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6782. },
  6783. {
  6784. "$ref": "#/components/schemas/InvalidRequestError"
  6785. }
  6786. ]
  6787. }
  6788. }
  6789. }
  6790. },
  6791. "404": {
  6792. "description": "NotFoundError",
  6793. "content": {
  6794. "application/json": {
  6795. "schema": {
  6796. "$ref": "#/components/schemas/NotFoundError"
  6797. }
  6798. }
  6799. }
  6800. }
  6801. },
  6802. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6803. "summary": "Initialize session",
  6804. "requestBody": {
  6805. "content": {
  6806. "application/json": {
  6807. "schema": {
  6808. "type": "object",
  6809. "properties": {
  6810. "modelID": {
  6811. "type": "string"
  6812. },
  6813. "providerID": {
  6814. "type": "string"
  6815. },
  6816. "messageID": {
  6817. "type": "string",
  6818. "pattern": "^msg"
  6819. }
  6820. },
  6821. "required": ["modelID", "providerID", "messageID"],
  6822. "additionalProperties": false
  6823. }
  6824. }
  6825. }
  6826. },
  6827. "x-codeSamples": [
  6828. {
  6829. "lang": "js",
  6830. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6831. }
  6832. ]
  6833. }
  6834. },
  6835. "/session/{sessionID}/share": {
  6836. "post": {
  6837. "tags": ["session"],
  6838. "operationId": "session.share",
  6839. "parameters": [
  6840. {
  6841. "name": "sessionID",
  6842. "in": "path",
  6843. "schema": {
  6844. "type": "string",
  6845. "pattern": "^ses"
  6846. },
  6847. "required": true
  6848. },
  6849. {
  6850. "name": "directory",
  6851. "in": "query",
  6852. "schema": {
  6853. "type": "string"
  6854. },
  6855. "required": false
  6856. },
  6857. {
  6858. "name": "workspace",
  6859. "in": "query",
  6860. "schema": {
  6861. "type": "string"
  6862. },
  6863. "required": false
  6864. }
  6865. ],
  6866. "responses": {
  6867. "200": {
  6868. "description": "Successfully shared session",
  6869. "content": {
  6870. "application/json": {
  6871. "schema": {
  6872. "$ref": "#/components/schemas/Session"
  6873. }
  6874. }
  6875. }
  6876. },
  6877. "400": {
  6878. "description": "Bad request",
  6879. "content": {
  6880. "application/json": {
  6881. "schema": {
  6882. "$ref": "#/components/schemas/BadRequestError"
  6883. }
  6884. }
  6885. }
  6886. },
  6887. "404": {
  6888. "description": "NotFoundError",
  6889. "content": {
  6890. "application/json": {
  6891. "schema": {
  6892. "$ref": "#/components/schemas/NotFoundError"
  6893. }
  6894. }
  6895. }
  6896. },
  6897. "500": {
  6898. "description": "InternalServerError",
  6899. "content": {
  6900. "application/json": {
  6901. "schema": {
  6902. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6903. }
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6909. "summary": "Share session",
  6910. "x-codeSamples": [
  6911. {
  6912. "lang": "js",
  6913. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6914. }
  6915. ]
  6916. },
  6917. "delete": {
  6918. "tags": ["session"],
  6919. "operationId": "session.unshare",
  6920. "parameters": [
  6921. {
  6922. "name": "sessionID",
  6923. "in": "path",
  6924. "schema": {
  6925. "type": "string",
  6926. "pattern": "^ses"
  6927. },
  6928. "required": true
  6929. },
  6930. {
  6931. "name": "directory",
  6932. "in": "query",
  6933. "schema": {
  6934. "type": "string"
  6935. },
  6936. "required": false
  6937. },
  6938. {
  6939. "name": "workspace",
  6940. "in": "query",
  6941. "schema": {
  6942. "type": "string"
  6943. },
  6944. "required": false
  6945. }
  6946. ],
  6947. "responses": {
  6948. "200": {
  6949. "description": "Successfully unshared session",
  6950. "content": {
  6951. "application/json": {
  6952. "schema": {
  6953. "$ref": "#/components/schemas/Session"
  6954. }
  6955. }
  6956. }
  6957. },
  6958. "400": {
  6959. "description": "Bad request",
  6960. "content": {
  6961. "application/json": {
  6962. "schema": {
  6963. "$ref": "#/components/schemas/BadRequestError"
  6964. }
  6965. }
  6966. }
  6967. },
  6968. "404": {
  6969. "description": "NotFoundError",
  6970. "content": {
  6971. "application/json": {
  6972. "schema": {
  6973. "$ref": "#/components/schemas/NotFoundError"
  6974. }
  6975. }
  6976. }
  6977. },
  6978. "500": {
  6979. "description": "InternalServerError",
  6980. "content": {
  6981. "application/json": {
  6982. "schema": {
  6983. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6984. }
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "description": "Remove the shareable link for a session, making it private again.",
  6990. "summary": "Unshare session",
  6991. "x-codeSamples": [
  6992. {
  6993. "lang": "js",
  6994. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6995. }
  6996. ]
  6997. }
  6998. },
  6999. "/session/{sessionID}/summarize": {
  7000. "post": {
  7001. "tags": ["session"],
  7002. "operationId": "session.summarize",
  7003. "parameters": [
  7004. {
  7005. "name": "sessionID",
  7006. "in": "path",
  7007. "schema": {
  7008. "type": "string",
  7009. "pattern": "^ses"
  7010. },
  7011. "required": true
  7012. },
  7013. {
  7014. "name": "directory",
  7015. "in": "query",
  7016. "schema": {
  7017. "type": "string"
  7018. },
  7019. "required": false
  7020. },
  7021. {
  7022. "name": "workspace",
  7023. "in": "query",
  7024. "schema": {
  7025. "type": "string"
  7026. },
  7027. "required": false
  7028. }
  7029. ],
  7030. "responses": {
  7031. "200": {
  7032. "description": "Summarized session",
  7033. "content": {
  7034. "application/json": {
  7035. "schema": {
  7036. "type": "boolean",
  7037. "description": "Summarized session"
  7038. }
  7039. }
  7040. }
  7041. },
  7042. "400": {
  7043. "description": "BadRequest | InvalidRequestError",
  7044. "content": {
  7045. "application/json": {
  7046. "schema": {
  7047. "anyOf": [
  7048. {
  7049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7050. },
  7051. {
  7052. "$ref": "#/components/schemas/InvalidRequestError"
  7053. }
  7054. ]
  7055. }
  7056. }
  7057. }
  7058. },
  7059. "404": {
  7060. "description": "NotFoundError",
  7061. "content": {
  7062. "application/json": {
  7063. "schema": {
  7064. "$ref": "#/components/schemas/NotFoundError"
  7065. }
  7066. }
  7067. }
  7068. }
  7069. },
  7070. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7071. "summary": "Summarize session",
  7072. "requestBody": {
  7073. "content": {
  7074. "application/json": {
  7075. "schema": {
  7076. "type": "object",
  7077. "properties": {
  7078. "providerID": {
  7079. "type": "string"
  7080. },
  7081. "modelID": {
  7082. "type": "string"
  7083. },
  7084. "auto": {
  7085. "type": "boolean"
  7086. }
  7087. },
  7088. "required": ["providerID", "modelID"],
  7089. "additionalProperties": false
  7090. }
  7091. }
  7092. }
  7093. },
  7094. "x-codeSamples": [
  7095. {
  7096. "lang": "js",
  7097. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7098. }
  7099. ]
  7100. }
  7101. },
  7102. "/session/{sessionID}/prompt_async": {
  7103. "post": {
  7104. "tags": ["session"],
  7105. "operationId": "session.prompt_async",
  7106. "parameters": [
  7107. {
  7108. "name": "sessionID",
  7109. "in": "path",
  7110. "schema": {
  7111. "type": "string",
  7112. "pattern": "^ses"
  7113. },
  7114. "required": true
  7115. },
  7116. {
  7117. "name": "directory",
  7118. "in": "query",
  7119. "schema": {
  7120. "type": "string"
  7121. },
  7122. "required": false
  7123. },
  7124. {
  7125. "name": "workspace",
  7126. "in": "query",
  7127. "schema": {
  7128. "type": "string"
  7129. },
  7130. "required": false
  7131. }
  7132. ],
  7133. "responses": {
  7134. "204": {
  7135. "description": "Prompt accepted"
  7136. },
  7137. "400": {
  7138. "description": "BadRequest | InvalidRequestError",
  7139. "content": {
  7140. "application/json": {
  7141. "schema": {
  7142. "anyOf": [
  7143. {
  7144. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7145. },
  7146. {
  7147. "$ref": "#/components/schemas/InvalidRequestError"
  7148. }
  7149. ]
  7150. }
  7151. }
  7152. }
  7153. },
  7154. "404": {
  7155. "description": "NotFoundError",
  7156. "content": {
  7157. "application/json": {
  7158. "schema": {
  7159. "$ref": "#/components/schemas/NotFoundError"
  7160. }
  7161. }
  7162. }
  7163. }
  7164. },
  7165. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7166. "summary": "Send async message",
  7167. "requestBody": {
  7168. "content": {
  7169. "application/json": {
  7170. "schema": {
  7171. "type": "object",
  7172. "properties": {
  7173. "messageID": {
  7174. "type": "string",
  7175. "pattern": "^msg"
  7176. },
  7177. "model": {
  7178. "type": "object",
  7179. "properties": {
  7180. "providerID": {
  7181. "type": "string"
  7182. },
  7183. "modelID": {
  7184. "type": "string"
  7185. }
  7186. },
  7187. "required": ["providerID", "modelID"],
  7188. "additionalProperties": false
  7189. },
  7190. "agent": {
  7191. "type": "string"
  7192. },
  7193. "noReply": {
  7194. "type": "boolean"
  7195. },
  7196. "tools": {
  7197. "type": "object",
  7198. "additionalProperties": {
  7199. "type": "boolean"
  7200. }
  7201. },
  7202. "format": {
  7203. "$ref": "#/components/schemas/OutputFormat"
  7204. },
  7205. "system": {
  7206. "type": "string"
  7207. },
  7208. "variant": {
  7209. "type": "string"
  7210. },
  7211. "parts": {
  7212. "type": "array",
  7213. "items": {
  7214. "anyOf": [
  7215. {
  7216. "$ref": "#/components/schemas/TextPartInput"
  7217. },
  7218. {
  7219. "$ref": "#/components/schemas/FilePartInput"
  7220. },
  7221. {
  7222. "$ref": "#/components/schemas/AgentPartInput"
  7223. },
  7224. {
  7225. "$ref": "#/components/schemas/SubtaskPartInput"
  7226. }
  7227. ]
  7228. }
  7229. }
  7230. },
  7231. "required": ["parts"],
  7232. "additionalProperties": false
  7233. }
  7234. }
  7235. }
  7236. },
  7237. "x-codeSamples": [
  7238. {
  7239. "lang": "js",
  7240. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7241. }
  7242. ]
  7243. }
  7244. },
  7245. "/session/{sessionID}/command": {
  7246. "post": {
  7247. "tags": ["session"],
  7248. "operationId": "session.command",
  7249. "parameters": [
  7250. {
  7251. "name": "sessionID",
  7252. "in": "path",
  7253. "schema": {
  7254. "type": "string",
  7255. "pattern": "^ses"
  7256. },
  7257. "required": true
  7258. },
  7259. {
  7260. "name": "directory",
  7261. "in": "query",
  7262. "schema": {
  7263. "type": "string"
  7264. },
  7265. "required": false
  7266. },
  7267. {
  7268. "name": "workspace",
  7269. "in": "query",
  7270. "schema": {
  7271. "type": "string"
  7272. },
  7273. "required": false
  7274. }
  7275. ],
  7276. "responses": {
  7277. "200": {
  7278. "description": "Created message",
  7279. "content": {
  7280. "application/json": {
  7281. "schema": {
  7282. "type": "object",
  7283. "required": ["info", "parts"],
  7284. "properties": {
  7285. "info": {
  7286. "$ref": "#/components/schemas/AssistantMessage"
  7287. },
  7288. "parts": {
  7289. "type": "array",
  7290. "items": {
  7291. "$ref": "#/components/schemas/Part"
  7292. }
  7293. }
  7294. }
  7295. }
  7296. }
  7297. }
  7298. },
  7299. "400": {
  7300. "description": "BadRequest | InvalidRequestError",
  7301. "content": {
  7302. "application/json": {
  7303. "schema": {
  7304. "anyOf": [
  7305. {
  7306. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7307. },
  7308. {
  7309. "$ref": "#/components/schemas/InvalidRequestError"
  7310. }
  7311. ]
  7312. }
  7313. }
  7314. }
  7315. },
  7316. "404": {
  7317. "description": "NotFoundError",
  7318. "content": {
  7319. "application/json": {
  7320. "schema": {
  7321. "$ref": "#/components/schemas/NotFoundError"
  7322. }
  7323. }
  7324. }
  7325. }
  7326. },
  7327. "description": "Send a new command to a session for execution by the AI assistant.",
  7328. "summary": "Send command",
  7329. "requestBody": {
  7330. "content": {
  7331. "application/json": {
  7332. "schema": {
  7333. "type": "object",
  7334. "properties": {
  7335. "messageID": {
  7336. "type": "string",
  7337. "pattern": "^msg"
  7338. },
  7339. "agent": {
  7340. "type": "string"
  7341. },
  7342. "model": {
  7343. "type": "string"
  7344. },
  7345. "arguments": {
  7346. "type": "string"
  7347. },
  7348. "command": {
  7349. "type": "string"
  7350. },
  7351. "variant": {
  7352. "type": "string"
  7353. },
  7354. "parts": {
  7355. "type": "array",
  7356. "items": {
  7357. "type": "object",
  7358. "properties": {
  7359. "id": {
  7360. "type": "string",
  7361. "pattern": "^prt"
  7362. },
  7363. "type": {
  7364. "type": "string",
  7365. "enum": ["file"]
  7366. },
  7367. "mime": {
  7368. "type": "string"
  7369. },
  7370. "filename": {
  7371. "type": "string"
  7372. },
  7373. "url": {
  7374. "type": "string"
  7375. },
  7376. "source": {
  7377. "$ref": "#/components/schemas/FilePartSource"
  7378. }
  7379. },
  7380. "required": ["type", "mime", "url"],
  7381. "additionalProperties": false
  7382. }
  7383. }
  7384. },
  7385. "required": ["arguments", "command"],
  7386. "additionalProperties": false
  7387. }
  7388. }
  7389. }
  7390. },
  7391. "x-codeSamples": [
  7392. {
  7393. "lang": "js",
  7394. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7395. }
  7396. ]
  7397. }
  7398. },
  7399. "/session/{sessionID}/shell": {
  7400. "post": {
  7401. "tags": ["session"],
  7402. "operationId": "session.shell",
  7403. "parameters": [
  7404. {
  7405. "name": "sessionID",
  7406. "in": "path",
  7407. "schema": {
  7408. "type": "string",
  7409. "pattern": "^ses"
  7410. },
  7411. "required": true
  7412. },
  7413. {
  7414. "name": "directory",
  7415. "in": "query",
  7416. "schema": {
  7417. "type": "string"
  7418. },
  7419. "required": false
  7420. },
  7421. {
  7422. "name": "workspace",
  7423. "in": "query",
  7424. "schema": {
  7425. "type": "string"
  7426. },
  7427. "required": false
  7428. }
  7429. ],
  7430. "responses": {
  7431. "200": {
  7432. "description": "Created message",
  7433. "content": {
  7434. "application/json": {
  7435. "schema": {
  7436. "type": "object",
  7437. "properties": {
  7438. "info": {
  7439. "$ref": "#/components/schemas/Message"
  7440. },
  7441. "parts": {
  7442. "type": "array",
  7443. "items": {
  7444. "$ref": "#/components/schemas/Part"
  7445. }
  7446. }
  7447. },
  7448. "required": ["info", "parts"],
  7449. "additionalProperties": false,
  7450. "description": "Created message"
  7451. }
  7452. }
  7453. }
  7454. },
  7455. "400": {
  7456. "description": "BadRequest | InvalidRequestError",
  7457. "content": {
  7458. "application/json": {
  7459. "schema": {
  7460. "anyOf": [
  7461. {
  7462. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7463. },
  7464. {
  7465. "$ref": "#/components/schemas/InvalidRequestError"
  7466. }
  7467. ]
  7468. }
  7469. }
  7470. }
  7471. },
  7472. "404": {
  7473. "description": "NotFoundError",
  7474. "content": {
  7475. "application/json": {
  7476. "schema": {
  7477. "$ref": "#/components/schemas/NotFoundError"
  7478. }
  7479. }
  7480. }
  7481. },
  7482. "409": {
  7483. "description": "SessionBusyError",
  7484. "content": {
  7485. "application/json": {
  7486. "schema": {
  7487. "$ref": "#/components/schemas/SessionBusyError"
  7488. }
  7489. }
  7490. }
  7491. }
  7492. },
  7493. "description": "Execute a shell command within the session context and return the AI's response.",
  7494. "summary": "Run shell command",
  7495. "requestBody": {
  7496. "content": {
  7497. "application/json": {
  7498. "schema": {
  7499. "type": "object",
  7500. "properties": {
  7501. "messageID": {
  7502. "type": "string",
  7503. "pattern": "^msg"
  7504. },
  7505. "agent": {
  7506. "type": "string"
  7507. },
  7508. "model": {
  7509. "type": "object",
  7510. "properties": {
  7511. "providerID": {
  7512. "type": "string"
  7513. },
  7514. "modelID": {
  7515. "type": "string"
  7516. }
  7517. },
  7518. "required": ["providerID", "modelID"],
  7519. "additionalProperties": false
  7520. },
  7521. "command": {
  7522. "type": "string"
  7523. }
  7524. },
  7525. "required": ["agent", "command"],
  7526. "additionalProperties": false
  7527. }
  7528. }
  7529. }
  7530. },
  7531. "x-codeSamples": [
  7532. {
  7533. "lang": "js",
  7534. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7535. }
  7536. ]
  7537. }
  7538. },
  7539. "/session/{sessionID}/revert": {
  7540. "post": {
  7541. "tags": ["session"],
  7542. "operationId": "session.revert",
  7543. "parameters": [
  7544. {
  7545. "name": "sessionID",
  7546. "in": "path",
  7547. "schema": {
  7548. "type": "string",
  7549. "pattern": "^ses"
  7550. },
  7551. "required": true
  7552. },
  7553. {
  7554. "name": "directory",
  7555. "in": "query",
  7556. "schema": {
  7557. "type": "string"
  7558. },
  7559. "required": false
  7560. },
  7561. {
  7562. "name": "workspace",
  7563. "in": "query",
  7564. "schema": {
  7565. "type": "string"
  7566. },
  7567. "required": false
  7568. }
  7569. ],
  7570. "responses": {
  7571. "200": {
  7572. "description": "Updated session",
  7573. "content": {
  7574. "application/json": {
  7575. "schema": {
  7576. "$ref": "#/components/schemas/Session"
  7577. }
  7578. }
  7579. }
  7580. },
  7581. "400": {
  7582. "description": "BadRequest | InvalidRequestError",
  7583. "content": {
  7584. "application/json": {
  7585. "schema": {
  7586. "anyOf": [
  7587. {
  7588. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7589. },
  7590. {
  7591. "$ref": "#/components/schemas/InvalidRequestError"
  7592. }
  7593. ]
  7594. }
  7595. }
  7596. }
  7597. },
  7598. "404": {
  7599. "description": "NotFoundError",
  7600. "content": {
  7601. "application/json": {
  7602. "schema": {
  7603. "$ref": "#/components/schemas/NotFoundError"
  7604. }
  7605. }
  7606. }
  7607. },
  7608. "409": {
  7609. "description": "SessionBusyError",
  7610. "content": {
  7611. "application/json": {
  7612. "schema": {
  7613. "$ref": "#/components/schemas/SessionBusyError"
  7614. }
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7620. "summary": "Revert message",
  7621. "requestBody": {
  7622. "content": {
  7623. "application/json": {
  7624. "schema": {
  7625. "type": "object",
  7626. "properties": {
  7627. "messageID": {
  7628. "type": "string",
  7629. "pattern": "^msg"
  7630. },
  7631. "partID": {
  7632. "type": "string",
  7633. "pattern": "^prt"
  7634. }
  7635. },
  7636. "required": ["messageID"],
  7637. "additionalProperties": false
  7638. }
  7639. }
  7640. }
  7641. },
  7642. "x-codeSamples": [
  7643. {
  7644. "lang": "js",
  7645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7646. }
  7647. ]
  7648. }
  7649. },
  7650. "/session/{sessionID}/unrevert": {
  7651. "post": {
  7652. "tags": ["session"],
  7653. "operationId": "session.unrevert",
  7654. "parameters": [
  7655. {
  7656. "name": "sessionID",
  7657. "in": "path",
  7658. "schema": {
  7659. "type": "string",
  7660. "pattern": "^ses"
  7661. },
  7662. "required": true
  7663. },
  7664. {
  7665. "name": "directory",
  7666. "in": "query",
  7667. "schema": {
  7668. "type": "string"
  7669. },
  7670. "required": false
  7671. },
  7672. {
  7673. "name": "workspace",
  7674. "in": "query",
  7675. "schema": {
  7676. "type": "string"
  7677. },
  7678. "required": false
  7679. }
  7680. ],
  7681. "responses": {
  7682. "200": {
  7683. "description": "Updated session",
  7684. "content": {
  7685. "application/json": {
  7686. "schema": {
  7687. "$ref": "#/components/schemas/Session"
  7688. }
  7689. }
  7690. }
  7691. },
  7692. "400": {
  7693. "description": "BadRequest | InvalidRequestError",
  7694. "content": {
  7695. "application/json": {
  7696. "schema": {
  7697. "anyOf": [
  7698. {
  7699. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7700. },
  7701. {
  7702. "$ref": "#/components/schemas/InvalidRequestError"
  7703. }
  7704. ]
  7705. }
  7706. }
  7707. }
  7708. },
  7709. "404": {
  7710. "description": "NotFoundError",
  7711. "content": {
  7712. "application/json": {
  7713. "schema": {
  7714. "$ref": "#/components/schemas/NotFoundError"
  7715. }
  7716. }
  7717. }
  7718. },
  7719. "409": {
  7720. "description": "SessionBusyError",
  7721. "content": {
  7722. "application/json": {
  7723. "schema": {
  7724. "$ref": "#/components/schemas/SessionBusyError"
  7725. }
  7726. }
  7727. }
  7728. }
  7729. },
  7730. "description": "Restore all previously reverted messages in a session.",
  7731. "summary": "Restore reverted messages",
  7732. "x-codeSamples": [
  7733. {
  7734. "lang": "js",
  7735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7736. }
  7737. ]
  7738. }
  7739. },
  7740. "/session/{sessionID}/permissions/{permissionID}": {
  7741. "post": {
  7742. "tags": ["session"],
  7743. "operationId": "permission.respond",
  7744. "parameters": [
  7745. {
  7746. "name": "sessionID",
  7747. "in": "path",
  7748. "schema": {
  7749. "type": "string",
  7750. "pattern": "^ses"
  7751. },
  7752. "required": true
  7753. },
  7754. {
  7755. "name": "permissionID",
  7756. "in": "path",
  7757. "schema": {
  7758. "type": "string",
  7759. "pattern": "^per"
  7760. },
  7761. "required": true
  7762. },
  7763. {
  7764. "name": "directory",
  7765. "in": "query",
  7766. "schema": {
  7767. "type": "string"
  7768. },
  7769. "required": false
  7770. },
  7771. {
  7772. "name": "workspace",
  7773. "in": "query",
  7774. "schema": {
  7775. "type": "string"
  7776. },
  7777. "required": false
  7778. }
  7779. ],
  7780. "responses": {
  7781. "200": {
  7782. "description": "Permission processed successfully",
  7783. "content": {
  7784. "application/json": {
  7785. "schema": {
  7786. "type": "boolean",
  7787. "description": "Permission processed successfully"
  7788. }
  7789. }
  7790. }
  7791. },
  7792. "400": {
  7793. "description": "BadRequest | InvalidRequestError",
  7794. "content": {
  7795. "application/json": {
  7796. "schema": {
  7797. "anyOf": [
  7798. {
  7799. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7800. },
  7801. {
  7802. "$ref": "#/components/schemas/InvalidRequestError"
  7803. }
  7804. ]
  7805. }
  7806. }
  7807. }
  7808. },
  7809. "404": {
  7810. "description": "NotFoundError | PermissionNotFoundError",
  7811. "content": {
  7812. "application/json": {
  7813. "schema": {
  7814. "anyOf": [
  7815. {
  7816. "$ref": "#/components/schemas/NotFoundError"
  7817. },
  7818. {
  7819. "$ref": "#/components/schemas/PermissionNotFoundError"
  7820. }
  7821. ]
  7822. }
  7823. }
  7824. }
  7825. }
  7826. },
  7827. "description": "Approve or deny a permission request from the AI assistant.",
  7828. "summary": "Respond to permission",
  7829. "deprecated": true,
  7830. "requestBody": {
  7831. "content": {
  7832. "application/json": {
  7833. "schema": {
  7834. "type": "object",
  7835. "properties": {
  7836. "response": {
  7837. "type": "string",
  7838. "enum": ["once", "always", "reject"]
  7839. }
  7840. },
  7841. "required": ["response"],
  7842. "additionalProperties": false
  7843. }
  7844. }
  7845. }
  7846. },
  7847. "x-codeSamples": [
  7848. {
  7849. "lang": "js",
  7850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7851. }
  7852. ]
  7853. }
  7854. },
  7855. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7856. "delete": {
  7857. "tags": ["session"],
  7858. "operationId": "part.delete",
  7859. "parameters": [
  7860. {
  7861. "name": "sessionID",
  7862. "in": "path",
  7863. "schema": {
  7864. "type": "string",
  7865. "pattern": "^ses"
  7866. },
  7867. "required": true
  7868. },
  7869. {
  7870. "name": "messageID",
  7871. "in": "path",
  7872. "schema": {
  7873. "type": "string",
  7874. "pattern": "^msg"
  7875. },
  7876. "required": true
  7877. },
  7878. {
  7879. "name": "partID",
  7880. "in": "path",
  7881. "schema": {
  7882. "type": "string",
  7883. "pattern": "^prt"
  7884. },
  7885. "required": true
  7886. },
  7887. {
  7888. "name": "directory",
  7889. "in": "query",
  7890. "schema": {
  7891. "type": "string"
  7892. },
  7893. "required": false
  7894. },
  7895. {
  7896. "name": "workspace",
  7897. "in": "query",
  7898. "schema": {
  7899. "type": "string"
  7900. },
  7901. "required": false
  7902. }
  7903. ],
  7904. "responses": {
  7905. "200": {
  7906. "description": "Successfully deleted part",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "type": "boolean",
  7911. "description": "Successfully deleted part"
  7912. }
  7913. }
  7914. }
  7915. },
  7916. "400": {
  7917. "description": "BadRequest | InvalidRequestError",
  7918. "content": {
  7919. "application/json": {
  7920. "schema": {
  7921. "anyOf": [
  7922. {
  7923. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7924. },
  7925. {
  7926. "$ref": "#/components/schemas/InvalidRequestError"
  7927. }
  7928. ]
  7929. }
  7930. }
  7931. }
  7932. },
  7933. "404": {
  7934. "description": "NotFoundError",
  7935. "content": {
  7936. "application/json": {
  7937. "schema": {
  7938. "$ref": "#/components/schemas/NotFoundError"
  7939. }
  7940. }
  7941. }
  7942. }
  7943. },
  7944. "description": "Delete a part from a message.",
  7945. "x-codeSamples": [
  7946. {
  7947. "lang": "js",
  7948. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7949. }
  7950. ]
  7951. },
  7952. "patch": {
  7953. "tags": ["session"],
  7954. "operationId": "part.update",
  7955. "parameters": [
  7956. {
  7957. "name": "sessionID",
  7958. "in": "path",
  7959. "schema": {
  7960. "type": "string",
  7961. "pattern": "^ses"
  7962. },
  7963. "required": true
  7964. },
  7965. {
  7966. "name": "messageID",
  7967. "in": "path",
  7968. "schema": {
  7969. "type": "string",
  7970. "pattern": "^msg"
  7971. },
  7972. "required": true
  7973. },
  7974. {
  7975. "name": "partID",
  7976. "in": "path",
  7977. "schema": {
  7978. "type": "string",
  7979. "pattern": "^prt"
  7980. },
  7981. "required": true
  7982. },
  7983. {
  7984. "name": "directory",
  7985. "in": "query",
  7986. "schema": {
  7987. "type": "string"
  7988. },
  7989. "required": false
  7990. },
  7991. {
  7992. "name": "workspace",
  7993. "in": "query",
  7994. "schema": {
  7995. "type": "string"
  7996. },
  7997. "required": false
  7998. }
  7999. ],
  8000. "responses": {
  8001. "200": {
  8002. "description": "Successfully updated part",
  8003. "content": {
  8004. "application/json": {
  8005. "schema": {
  8006. "$ref": "#/components/schemas/Part"
  8007. }
  8008. }
  8009. }
  8010. },
  8011. "400": {
  8012. "description": "BadRequest | InvalidRequestError",
  8013. "content": {
  8014. "application/json": {
  8015. "schema": {
  8016. "anyOf": [
  8017. {
  8018. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8019. },
  8020. {
  8021. "$ref": "#/components/schemas/InvalidRequestError"
  8022. }
  8023. ]
  8024. }
  8025. }
  8026. }
  8027. },
  8028. "404": {
  8029. "description": "NotFoundError",
  8030. "content": {
  8031. "application/json": {
  8032. "schema": {
  8033. "$ref": "#/components/schemas/NotFoundError"
  8034. }
  8035. }
  8036. }
  8037. }
  8038. },
  8039. "description": "Update a part in a message.",
  8040. "requestBody": {
  8041. "content": {
  8042. "application/json": {
  8043. "schema": {
  8044. "$ref": "#/components/schemas/Part"
  8045. }
  8046. }
  8047. }
  8048. },
  8049. "x-codeSamples": [
  8050. {
  8051. "lang": "js",
  8052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8053. }
  8054. ]
  8055. }
  8056. },
  8057. "/sync/start": {
  8058. "post": {
  8059. "tags": ["sync"],
  8060. "operationId": "sync.start",
  8061. "parameters": [
  8062. {
  8063. "name": "directory",
  8064. "in": "query",
  8065. "schema": {
  8066. "type": "string"
  8067. },
  8068. "required": false
  8069. },
  8070. {
  8071. "name": "workspace",
  8072. "in": "query",
  8073. "schema": {
  8074. "type": "string"
  8075. },
  8076. "required": false
  8077. }
  8078. ],
  8079. "responses": {
  8080. "200": {
  8081. "description": "Workspace sync started",
  8082. "content": {
  8083. "application/json": {
  8084. "schema": {
  8085. "type": "boolean",
  8086. "description": "Workspace sync started"
  8087. }
  8088. }
  8089. }
  8090. },
  8091. "400": {
  8092. "description": "Bad request",
  8093. "content": {
  8094. "application/json": {
  8095. "schema": {
  8096. "$ref": "#/components/schemas/BadRequestError"
  8097. }
  8098. }
  8099. }
  8100. }
  8101. },
  8102. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8103. "summary": "Start workspace sync",
  8104. "x-codeSamples": [
  8105. {
  8106. "lang": "js",
  8107. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8108. }
  8109. ]
  8110. }
  8111. },
  8112. "/sync/replay": {
  8113. "post": {
  8114. "tags": ["sync"],
  8115. "operationId": "sync.replay",
  8116. "parameters": [
  8117. {
  8118. "name": "directory",
  8119. "in": "query",
  8120. "schema": {
  8121. "type": "string"
  8122. },
  8123. "required": false
  8124. },
  8125. {
  8126. "name": "workspace",
  8127. "in": "query",
  8128. "schema": {
  8129. "type": "string"
  8130. },
  8131. "required": false
  8132. }
  8133. ],
  8134. "responses": {
  8135. "200": {
  8136. "description": "Replayed sync events",
  8137. "content": {
  8138. "application/json": {
  8139. "schema": {
  8140. "type": "object",
  8141. "properties": {
  8142. "sessionID": {
  8143. "type": "string"
  8144. }
  8145. },
  8146. "required": ["sessionID"],
  8147. "additionalProperties": false,
  8148. "description": "Replayed sync events"
  8149. }
  8150. }
  8151. }
  8152. },
  8153. "400": {
  8154. "description": "BadRequest | InvalidRequestError",
  8155. "content": {
  8156. "application/json": {
  8157. "schema": {
  8158. "anyOf": [
  8159. {
  8160. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8161. },
  8162. {
  8163. "$ref": "#/components/schemas/InvalidRequestError"
  8164. }
  8165. ]
  8166. }
  8167. }
  8168. }
  8169. }
  8170. },
  8171. "description": "Validate and replay a complete sync event history.",
  8172. "summary": "Replay sync events",
  8173. "requestBody": {
  8174. "content": {
  8175. "application/json": {
  8176. "schema": {
  8177. "type": "object",
  8178. "properties": {
  8179. "directory": {
  8180. "type": "string"
  8181. },
  8182. "events": {
  8183. "type": "array",
  8184. "minItems": 1,
  8185. "items": {
  8186. "type": "object",
  8187. "properties": {
  8188. "id": {
  8189. "type": "string",
  8190. "pattern": "^evt_"
  8191. },
  8192. "aggregateID": {
  8193. "type": "string"
  8194. },
  8195. "seq": {
  8196. "type": "integer",
  8197. "minimum": 0
  8198. },
  8199. "type": {
  8200. "type": "string"
  8201. },
  8202. "data": {
  8203. "type": "object"
  8204. }
  8205. },
  8206. "required": ["id", "aggregateID", "seq", "type", "data"],
  8207. "additionalProperties": false
  8208. }
  8209. }
  8210. },
  8211. "required": ["directory", "events"],
  8212. "additionalProperties": false
  8213. }
  8214. }
  8215. }
  8216. },
  8217. "x-codeSamples": [
  8218. {
  8219. "lang": "js",
  8220. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8221. }
  8222. ]
  8223. }
  8224. },
  8225. "/sync/steal": {
  8226. "post": {
  8227. "tags": ["sync"],
  8228. "operationId": "sync.steal",
  8229. "parameters": [
  8230. {
  8231. "name": "directory",
  8232. "in": "query",
  8233. "schema": {
  8234. "type": "string"
  8235. },
  8236. "required": false
  8237. },
  8238. {
  8239. "name": "workspace",
  8240. "in": "query",
  8241. "schema": {
  8242. "type": "string"
  8243. },
  8244. "required": false
  8245. }
  8246. ],
  8247. "responses": {
  8248. "200": {
  8249. "description": "Session stolen into workspace",
  8250. "content": {
  8251. "application/json": {
  8252. "schema": {
  8253. "type": "object",
  8254. "properties": {
  8255. "sessionID": {
  8256. "type": "string",
  8257. "pattern": "^ses"
  8258. }
  8259. },
  8260. "required": ["sessionID"],
  8261. "additionalProperties": false,
  8262. "description": "Session stolen into workspace"
  8263. }
  8264. }
  8265. }
  8266. },
  8267. "400": {
  8268. "description": "BadRequest | InvalidRequestError",
  8269. "content": {
  8270. "application/json": {
  8271. "schema": {
  8272. "anyOf": [
  8273. {
  8274. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8275. },
  8276. {
  8277. "$ref": "#/components/schemas/InvalidRequestError"
  8278. }
  8279. ]
  8280. }
  8281. }
  8282. }
  8283. }
  8284. },
  8285. "description": "Update a session to belong to the current workspace through the sync event system.",
  8286. "summary": "Steal session into workspace",
  8287. "requestBody": {
  8288. "content": {
  8289. "application/json": {
  8290. "schema": {
  8291. "type": "object",
  8292. "properties": {
  8293. "sessionID": {
  8294. "type": "string",
  8295. "pattern": "^ses"
  8296. }
  8297. },
  8298. "required": ["sessionID"],
  8299. "additionalProperties": false
  8300. }
  8301. }
  8302. }
  8303. },
  8304. "x-codeSamples": [
  8305. {
  8306. "lang": "js",
  8307. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8308. }
  8309. ]
  8310. }
  8311. },
  8312. "/sync/history": {
  8313. "post": {
  8314. "tags": ["sync"],
  8315. "operationId": "sync.history.list",
  8316. "parameters": [
  8317. {
  8318. "name": "directory",
  8319. "in": "query",
  8320. "schema": {
  8321. "type": "string"
  8322. },
  8323. "required": false
  8324. },
  8325. {
  8326. "name": "workspace",
  8327. "in": "query",
  8328. "schema": {
  8329. "type": "string"
  8330. },
  8331. "required": false
  8332. }
  8333. ],
  8334. "responses": {
  8335. "200": {
  8336. "description": "Sync events",
  8337. "content": {
  8338. "application/json": {
  8339. "schema": {
  8340. "type": "array",
  8341. "items": {
  8342. "type": "object",
  8343. "properties": {
  8344. "id": {
  8345. "type": "string",
  8346. "pattern": "^evt_"
  8347. },
  8348. "aggregate_id": {
  8349. "type": "string"
  8350. },
  8351. "seq": {
  8352. "type": "integer",
  8353. "minimum": 0
  8354. },
  8355. "type": {
  8356. "type": "string"
  8357. },
  8358. "data": {
  8359. "type": "object"
  8360. }
  8361. },
  8362. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8363. "additionalProperties": false
  8364. },
  8365. "description": "Sync events"
  8366. }
  8367. }
  8368. }
  8369. },
  8370. "400": {
  8371. "description": "BadRequest | InvalidRequestError",
  8372. "content": {
  8373. "application/json": {
  8374. "schema": {
  8375. "anyOf": [
  8376. {
  8377. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8378. },
  8379. {
  8380. "$ref": "#/components/schemas/InvalidRequestError"
  8381. }
  8382. ]
  8383. }
  8384. }
  8385. }
  8386. }
  8387. },
  8388. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  8389. "summary": "List sync events",
  8390. "requestBody": {
  8391. "content": {
  8392. "application/json": {
  8393. "schema": {
  8394. "type": "object",
  8395. "additionalProperties": {
  8396. "type": "integer",
  8397. "minimum": 0
  8398. }
  8399. }
  8400. }
  8401. }
  8402. },
  8403. "x-codeSamples": [
  8404. {
  8405. "lang": "js",
  8406. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8407. }
  8408. ]
  8409. }
  8410. },
  8411. "/tui/append-prompt": {
  8412. "post": {
  8413. "tags": ["tui"],
  8414. "operationId": "tui.appendPrompt",
  8415. "parameters": [
  8416. {
  8417. "name": "directory",
  8418. "in": "query",
  8419. "schema": {
  8420. "type": "string"
  8421. },
  8422. "required": false
  8423. },
  8424. {
  8425. "name": "workspace",
  8426. "in": "query",
  8427. "schema": {
  8428. "type": "string"
  8429. },
  8430. "required": false
  8431. }
  8432. ],
  8433. "responses": {
  8434. "200": {
  8435. "description": "Prompt processed successfully",
  8436. "content": {
  8437. "application/json": {
  8438. "schema": {
  8439. "type": "boolean",
  8440. "description": "Prompt processed successfully"
  8441. }
  8442. }
  8443. }
  8444. },
  8445. "400": {
  8446. "description": "BadRequest | InvalidRequestError",
  8447. "content": {
  8448. "application/json": {
  8449. "schema": {
  8450. "anyOf": [
  8451. {
  8452. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8453. },
  8454. {
  8455. "$ref": "#/components/schemas/InvalidRequestError"
  8456. }
  8457. ]
  8458. }
  8459. }
  8460. }
  8461. }
  8462. },
  8463. "description": "Append prompt to the TUI.",
  8464. "summary": "Append TUI prompt",
  8465. "requestBody": {
  8466. "content": {
  8467. "application/json": {
  8468. "schema": {
  8469. "type": "object",
  8470. "properties": {
  8471. "text": {
  8472. "type": "string"
  8473. }
  8474. },
  8475. "required": ["text"],
  8476. "additionalProperties": false
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "x-codeSamples": [
  8482. {
  8483. "lang": "js",
  8484. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8485. }
  8486. ]
  8487. }
  8488. },
  8489. "/tui/open-help": {
  8490. "post": {
  8491. "tags": ["tui"],
  8492. "operationId": "tui.openHelp",
  8493. "parameters": [
  8494. {
  8495. "name": "directory",
  8496. "in": "query",
  8497. "schema": {
  8498. "type": "string"
  8499. },
  8500. "required": false
  8501. },
  8502. {
  8503. "name": "workspace",
  8504. "in": "query",
  8505. "schema": {
  8506. "type": "string"
  8507. },
  8508. "required": false
  8509. }
  8510. ],
  8511. "responses": {
  8512. "200": {
  8513. "description": "Help dialog opened successfully",
  8514. "content": {
  8515. "application/json": {
  8516. "schema": {
  8517. "type": "boolean",
  8518. "description": "Help dialog opened successfully"
  8519. }
  8520. }
  8521. }
  8522. },
  8523. "400": {
  8524. "description": "Bad request",
  8525. "content": {
  8526. "application/json": {
  8527. "schema": {
  8528. "$ref": "#/components/schemas/BadRequestError"
  8529. }
  8530. }
  8531. }
  8532. }
  8533. },
  8534. "description": "Open the help dialog in the TUI to display user assistance information.",
  8535. "summary": "Open help dialog",
  8536. "x-codeSamples": [
  8537. {
  8538. "lang": "js",
  8539. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8540. }
  8541. ]
  8542. }
  8543. },
  8544. "/tui/open-sessions": {
  8545. "post": {
  8546. "tags": ["tui"],
  8547. "operationId": "tui.openSessions",
  8548. "parameters": [
  8549. {
  8550. "name": "directory",
  8551. "in": "query",
  8552. "schema": {
  8553. "type": "string"
  8554. },
  8555. "required": false
  8556. },
  8557. {
  8558. "name": "workspace",
  8559. "in": "query",
  8560. "schema": {
  8561. "type": "string"
  8562. },
  8563. "required": false
  8564. }
  8565. ],
  8566. "responses": {
  8567. "200": {
  8568. "description": "Session dialog opened successfully",
  8569. "content": {
  8570. "application/json": {
  8571. "schema": {
  8572. "type": "boolean",
  8573. "description": "Session dialog opened successfully"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "400": {
  8579. "description": "Bad request",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/BadRequestError"
  8584. }
  8585. }
  8586. }
  8587. }
  8588. },
  8589. "description": "Open the session dialog.",
  8590. "summary": "Open sessions dialog",
  8591. "x-codeSamples": [
  8592. {
  8593. "lang": "js",
  8594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8595. }
  8596. ]
  8597. }
  8598. },
  8599. "/tui/open-themes": {
  8600. "post": {
  8601. "tags": ["tui"],
  8602. "operationId": "tui.openThemes",
  8603. "parameters": [
  8604. {
  8605. "name": "directory",
  8606. "in": "query",
  8607. "schema": {
  8608. "type": "string"
  8609. },
  8610. "required": false
  8611. },
  8612. {
  8613. "name": "workspace",
  8614. "in": "query",
  8615. "schema": {
  8616. "type": "string"
  8617. },
  8618. "required": false
  8619. }
  8620. ],
  8621. "responses": {
  8622. "200": {
  8623. "description": "Theme dialog opened successfully",
  8624. "content": {
  8625. "application/json": {
  8626. "schema": {
  8627. "type": "boolean",
  8628. "description": "Theme dialog opened successfully"
  8629. }
  8630. }
  8631. }
  8632. },
  8633. "400": {
  8634. "description": "Bad request",
  8635. "content": {
  8636. "application/json": {
  8637. "schema": {
  8638. "$ref": "#/components/schemas/BadRequestError"
  8639. }
  8640. }
  8641. }
  8642. }
  8643. },
  8644. "description": "Open the theme dialog.",
  8645. "summary": "Open themes dialog",
  8646. "x-codeSamples": [
  8647. {
  8648. "lang": "js",
  8649. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8650. }
  8651. ]
  8652. }
  8653. },
  8654. "/tui/open-models": {
  8655. "post": {
  8656. "tags": ["tui"],
  8657. "operationId": "tui.openModels",
  8658. "parameters": [
  8659. {
  8660. "name": "directory",
  8661. "in": "query",
  8662. "schema": {
  8663. "type": "string"
  8664. },
  8665. "required": false
  8666. },
  8667. {
  8668. "name": "workspace",
  8669. "in": "query",
  8670. "schema": {
  8671. "type": "string"
  8672. },
  8673. "required": false
  8674. }
  8675. ],
  8676. "responses": {
  8677. "200": {
  8678. "description": "Model dialog opened successfully",
  8679. "content": {
  8680. "application/json": {
  8681. "schema": {
  8682. "type": "boolean",
  8683. "description": "Model dialog opened successfully"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "400": {
  8689. "description": "Bad request",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "$ref": "#/components/schemas/BadRequestError"
  8694. }
  8695. }
  8696. }
  8697. }
  8698. },
  8699. "description": "Open the model dialog.",
  8700. "summary": "Open models dialog",
  8701. "x-codeSamples": [
  8702. {
  8703. "lang": "js",
  8704. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8705. }
  8706. ]
  8707. }
  8708. },
  8709. "/tui/submit-prompt": {
  8710. "post": {
  8711. "tags": ["tui"],
  8712. "operationId": "tui.submitPrompt",
  8713. "parameters": [
  8714. {
  8715. "name": "directory",
  8716. "in": "query",
  8717. "schema": {
  8718. "type": "string"
  8719. },
  8720. "required": false
  8721. },
  8722. {
  8723. "name": "workspace",
  8724. "in": "query",
  8725. "schema": {
  8726. "type": "string"
  8727. },
  8728. "required": false
  8729. }
  8730. ],
  8731. "responses": {
  8732. "200": {
  8733. "description": "Prompt submitted successfully",
  8734. "content": {
  8735. "application/json": {
  8736. "schema": {
  8737. "type": "boolean",
  8738. "description": "Prompt submitted successfully"
  8739. }
  8740. }
  8741. }
  8742. },
  8743. "400": {
  8744. "description": "Bad request",
  8745. "content": {
  8746. "application/json": {
  8747. "schema": {
  8748. "$ref": "#/components/schemas/BadRequestError"
  8749. }
  8750. }
  8751. }
  8752. }
  8753. },
  8754. "description": "Submit the prompt.",
  8755. "summary": "Submit TUI prompt",
  8756. "x-codeSamples": [
  8757. {
  8758. "lang": "js",
  8759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8760. }
  8761. ]
  8762. }
  8763. },
  8764. "/tui/clear-prompt": {
  8765. "post": {
  8766. "tags": ["tui"],
  8767. "operationId": "tui.clearPrompt",
  8768. "parameters": [
  8769. {
  8770. "name": "directory",
  8771. "in": "query",
  8772. "schema": {
  8773. "type": "string"
  8774. },
  8775. "required": false
  8776. },
  8777. {
  8778. "name": "workspace",
  8779. "in": "query",
  8780. "schema": {
  8781. "type": "string"
  8782. },
  8783. "required": false
  8784. }
  8785. ],
  8786. "responses": {
  8787. "200": {
  8788. "description": "Prompt cleared successfully",
  8789. "content": {
  8790. "application/json": {
  8791. "schema": {
  8792. "type": "boolean",
  8793. "description": "Prompt cleared successfully"
  8794. }
  8795. }
  8796. }
  8797. },
  8798. "400": {
  8799. "description": "Bad request",
  8800. "content": {
  8801. "application/json": {
  8802. "schema": {
  8803. "$ref": "#/components/schemas/BadRequestError"
  8804. }
  8805. }
  8806. }
  8807. }
  8808. },
  8809. "description": "Clear the prompt.",
  8810. "summary": "Clear TUI prompt",
  8811. "x-codeSamples": [
  8812. {
  8813. "lang": "js",
  8814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8815. }
  8816. ]
  8817. }
  8818. },
  8819. "/tui/execute-command": {
  8820. "post": {
  8821. "tags": ["tui"],
  8822. "operationId": "tui.executeCommand",
  8823. "parameters": [
  8824. {
  8825. "name": "directory",
  8826. "in": "query",
  8827. "schema": {
  8828. "type": "string"
  8829. },
  8830. "required": false
  8831. },
  8832. {
  8833. "name": "workspace",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "string"
  8837. },
  8838. "required": false
  8839. }
  8840. ],
  8841. "responses": {
  8842. "200": {
  8843. "description": "Command executed successfully",
  8844. "content": {
  8845. "application/json": {
  8846. "schema": {
  8847. "type": "boolean",
  8848. "description": "Command executed successfully"
  8849. }
  8850. }
  8851. }
  8852. },
  8853. "400": {
  8854. "description": "BadRequest | InvalidRequestError",
  8855. "content": {
  8856. "application/json": {
  8857. "schema": {
  8858. "anyOf": [
  8859. {
  8860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8861. },
  8862. {
  8863. "$ref": "#/components/schemas/InvalidRequestError"
  8864. }
  8865. ]
  8866. }
  8867. }
  8868. }
  8869. }
  8870. },
  8871. "description": "Execute a TUI command.",
  8872. "summary": "Execute TUI command",
  8873. "requestBody": {
  8874. "content": {
  8875. "application/json": {
  8876. "schema": {
  8877. "type": "object",
  8878. "properties": {
  8879. "command": {
  8880. "type": "string"
  8881. }
  8882. },
  8883. "required": ["command"],
  8884. "additionalProperties": false
  8885. }
  8886. }
  8887. }
  8888. },
  8889. "x-codeSamples": [
  8890. {
  8891. "lang": "js",
  8892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8893. }
  8894. ]
  8895. }
  8896. },
  8897. "/tui/show-toast": {
  8898. "post": {
  8899. "tags": ["tui"],
  8900. "operationId": "tui.showToast",
  8901. "parameters": [
  8902. {
  8903. "name": "directory",
  8904. "in": "query",
  8905. "schema": {
  8906. "type": "string"
  8907. },
  8908. "required": false
  8909. },
  8910. {
  8911. "name": "workspace",
  8912. "in": "query",
  8913. "schema": {
  8914. "type": "string"
  8915. },
  8916. "required": false
  8917. }
  8918. ],
  8919. "responses": {
  8920. "200": {
  8921. "description": "Toast notification shown successfully",
  8922. "content": {
  8923. "application/json": {
  8924. "schema": {
  8925. "type": "boolean",
  8926. "description": "Toast notification shown successfully"
  8927. }
  8928. }
  8929. }
  8930. },
  8931. "400": {
  8932. "description": "Bad request",
  8933. "content": {
  8934. "application/json": {
  8935. "schema": {
  8936. "$ref": "#/components/schemas/BadRequestError"
  8937. }
  8938. }
  8939. }
  8940. }
  8941. },
  8942. "description": "Show a toast notification in the TUI.",
  8943. "summary": "Show TUI toast",
  8944. "requestBody": {
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "type": "object",
  8949. "properties": {
  8950. "title": {
  8951. "type": "string"
  8952. },
  8953. "message": {
  8954. "type": "string"
  8955. },
  8956. "variant": {
  8957. "type": "string",
  8958. "enum": ["info", "success", "warning", "error"]
  8959. },
  8960. "duration": {
  8961. "type": "integer",
  8962. "exclusiveMinimum": 0
  8963. }
  8964. },
  8965. "required": ["message", "variant"],
  8966. "additionalProperties": false
  8967. }
  8968. }
  8969. }
  8970. },
  8971. "x-codeSamples": [
  8972. {
  8973. "lang": "js",
  8974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8975. }
  8976. ]
  8977. }
  8978. },
  8979. "/tui/publish": {
  8980. "post": {
  8981. "tags": ["tui"],
  8982. "operationId": "tui.publish",
  8983. "parameters": [
  8984. {
  8985. "name": "directory",
  8986. "in": "query",
  8987. "schema": {
  8988. "type": "string"
  8989. },
  8990. "required": false
  8991. },
  8992. {
  8993. "name": "workspace",
  8994. "in": "query",
  8995. "schema": {
  8996. "type": "string"
  8997. },
  8998. "required": false
  8999. }
  9000. ],
  9001. "responses": {
  9002. "200": {
  9003. "description": "Event published successfully",
  9004. "content": {
  9005. "application/json": {
  9006. "schema": {
  9007. "type": "boolean",
  9008. "description": "Event published successfully"
  9009. }
  9010. }
  9011. }
  9012. },
  9013. "400": {
  9014. "description": "BadRequest | InvalidRequestError",
  9015. "content": {
  9016. "application/json": {
  9017. "schema": {
  9018. "anyOf": [
  9019. {
  9020. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9021. },
  9022. {
  9023. "$ref": "#/components/schemas/InvalidRequestError"
  9024. }
  9025. ]
  9026. }
  9027. }
  9028. }
  9029. }
  9030. },
  9031. "description": "Publish a TUI event.",
  9032. "summary": "Publish TUI event",
  9033. "requestBody": {
  9034. "content": {
  9035. "application/json": {
  9036. "schema": {
  9037. "anyOf": [
  9038. {
  9039. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9040. },
  9041. {
  9042. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9043. },
  9044. {
  9045. "$ref": "#/components/schemas/EventTuiToastShow"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9049. }
  9050. ]
  9051. }
  9052. }
  9053. }
  9054. },
  9055. "x-codeSamples": [
  9056. {
  9057. "lang": "js",
  9058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9059. }
  9060. ]
  9061. }
  9062. },
  9063. "/tui/select-session": {
  9064. "post": {
  9065. "tags": ["tui"],
  9066. "operationId": "tui.selectSession",
  9067. "parameters": [
  9068. {
  9069. "name": "directory",
  9070. "in": "query",
  9071. "schema": {
  9072. "type": "string"
  9073. },
  9074. "required": false
  9075. },
  9076. {
  9077. "name": "workspace",
  9078. "in": "query",
  9079. "schema": {
  9080. "type": "string"
  9081. },
  9082. "required": false
  9083. }
  9084. ],
  9085. "responses": {
  9086. "200": {
  9087. "description": "Session selected successfully",
  9088. "content": {
  9089. "application/json": {
  9090. "schema": {
  9091. "type": "boolean",
  9092. "description": "Session selected successfully"
  9093. }
  9094. }
  9095. }
  9096. },
  9097. "400": {
  9098. "description": "BadRequest | InvalidRequestError",
  9099. "content": {
  9100. "application/json": {
  9101. "schema": {
  9102. "anyOf": [
  9103. {
  9104. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9105. },
  9106. {
  9107. "$ref": "#/components/schemas/InvalidRequestError"
  9108. }
  9109. ]
  9110. }
  9111. }
  9112. }
  9113. },
  9114. "404": {
  9115. "description": "NotFoundError",
  9116. "content": {
  9117. "application/json": {
  9118. "schema": {
  9119. "$ref": "#/components/schemas/NotFoundError"
  9120. }
  9121. }
  9122. }
  9123. }
  9124. },
  9125. "description": "Navigate the TUI to display the specified session.",
  9126. "summary": "Select session",
  9127. "requestBody": {
  9128. "content": {
  9129. "application/json": {
  9130. "schema": {
  9131. "type": "object",
  9132. "properties": {
  9133. "sessionID": {
  9134. "type": "string",
  9135. "pattern": "^ses",
  9136. "description": "Session ID to navigate to"
  9137. }
  9138. },
  9139. "required": ["sessionID"],
  9140. "additionalProperties": false
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "x-codeSamples": [
  9146. {
  9147. "lang": "js",
  9148. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9149. }
  9150. ]
  9151. }
  9152. },
  9153. "/tui/control/next": {
  9154. "get": {
  9155. "tags": ["tui"],
  9156. "operationId": "tui.control.next",
  9157. "parameters": [
  9158. {
  9159. "name": "directory",
  9160. "in": "query",
  9161. "schema": {
  9162. "type": "string"
  9163. },
  9164. "required": false
  9165. },
  9166. {
  9167. "name": "workspace",
  9168. "in": "query",
  9169. "schema": {
  9170. "type": "string"
  9171. },
  9172. "required": false
  9173. }
  9174. ],
  9175. "responses": {
  9176. "200": {
  9177. "description": "Next TUI request",
  9178. "content": {
  9179. "application/json": {
  9180. "schema": {
  9181. "type": "object",
  9182. "properties": {
  9183. "path": {
  9184. "type": "string"
  9185. },
  9186. "body": {}
  9187. },
  9188. "required": ["path", "body"],
  9189. "additionalProperties": false,
  9190. "description": "Next TUI request"
  9191. }
  9192. }
  9193. }
  9194. },
  9195. "400": {
  9196. "description": "Bad request",
  9197. "content": {
  9198. "application/json": {
  9199. "schema": {
  9200. "$ref": "#/components/schemas/BadRequestError"
  9201. }
  9202. }
  9203. }
  9204. }
  9205. },
  9206. "description": "Retrieve the next TUI request from the queue for processing.",
  9207. "summary": "Get next TUI request",
  9208. "x-codeSamples": [
  9209. {
  9210. "lang": "js",
  9211. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9212. }
  9213. ]
  9214. }
  9215. },
  9216. "/tui/control/response": {
  9217. "post": {
  9218. "tags": ["tui"],
  9219. "operationId": "tui.control.response",
  9220. "parameters": [
  9221. {
  9222. "name": "directory",
  9223. "in": "query",
  9224. "schema": {
  9225. "type": "string"
  9226. },
  9227. "required": false
  9228. },
  9229. {
  9230. "name": "workspace",
  9231. "in": "query",
  9232. "schema": {
  9233. "type": "string"
  9234. },
  9235. "required": false
  9236. }
  9237. ],
  9238. "responses": {
  9239. "200": {
  9240. "description": "Response submitted successfully",
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {
  9244. "type": "boolean",
  9245. "description": "Response submitted successfully"
  9246. }
  9247. }
  9248. }
  9249. },
  9250. "400": {
  9251. "description": "Bad request",
  9252. "content": {
  9253. "application/json": {
  9254. "schema": {
  9255. "$ref": "#/components/schemas/BadRequestError"
  9256. }
  9257. }
  9258. }
  9259. }
  9260. },
  9261. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9262. "summary": "Submit TUI response",
  9263. "requestBody": {
  9264. "content": {
  9265. "application/json": {
  9266. "schema": {}
  9267. }
  9268. }
  9269. },
  9270. "x-codeSamples": [
  9271. {
  9272. "lang": "js",
  9273. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9274. }
  9275. ]
  9276. }
  9277. },
  9278. "/experimental/workspace/adapter": {
  9279. "get": {
  9280. "tags": ["workspace"],
  9281. "operationId": "experimental.workspace.adapter.list",
  9282. "parameters": [
  9283. {
  9284. "name": "directory",
  9285. "in": "query",
  9286. "schema": {
  9287. "type": "string"
  9288. },
  9289. "required": false
  9290. },
  9291. {
  9292. "name": "workspace",
  9293. "in": "query",
  9294. "schema": {
  9295. "type": "string"
  9296. },
  9297. "required": false
  9298. }
  9299. ],
  9300. "responses": {
  9301. "200": {
  9302. "description": "Workspace adapters",
  9303. "content": {
  9304. "application/json": {
  9305. "schema": {
  9306. "type": "array",
  9307. "items": {
  9308. "type": "object",
  9309. "properties": {
  9310. "type": {
  9311. "type": "string"
  9312. },
  9313. "name": {
  9314. "type": "string"
  9315. },
  9316. "description": {
  9317. "type": "string"
  9318. }
  9319. },
  9320. "required": ["type", "name", "description"],
  9321. "additionalProperties": false
  9322. },
  9323. "description": "Workspace adapters"
  9324. }
  9325. }
  9326. }
  9327. },
  9328. "400": {
  9329. "description": "Bad request",
  9330. "content": {
  9331. "application/json": {
  9332. "schema": {
  9333. "$ref": "#/components/schemas/BadRequestError"
  9334. }
  9335. }
  9336. }
  9337. }
  9338. },
  9339. "description": "List all available workspace adapters for the current project.",
  9340. "summary": "List workspace adapters",
  9341. "x-codeSamples": [
  9342. {
  9343. "lang": "js",
  9344. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9345. }
  9346. ]
  9347. }
  9348. },
  9349. "/experimental/workspace": {
  9350. "get": {
  9351. "tags": ["workspace"],
  9352. "operationId": "experimental.workspace.list",
  9353. "parameters": [
  9354. {
  9355. "name": "directory",
  9356. "in": "query",
  9357. "schema": {
  9358. "type": "string"
  9359. },
  9360. "required": false
  9361. },
  9362. {
  9363. "name": "workspace",
  9364. "in": "query",
  9365. "schema": {
  9366. "type": "string"
  9367. },
  9368. "required": false
  9369. }
  9370. ],
  9371. "responses": {
  9372. "200": {
  9373. "description": "Workspaces",
  9374. "content": {
  9375. "application/json": {
  9376. "schema": {
  9377. "type": "array",
  9378. "items": {
  9379. "$ref": "#/components/schemas/Workspace"
  9380. },
  9381. "description": "Workspaces"
  9382. }
  9383. }
  9384. }
  9385. },
  9386. "400": {
  9387. "description": "Bad request",
  9388. "content": {
  9389. "application/json": {
  9390. "schema": {
  9391. "$ref": "#/components/schemas/BadRequestError"
  9392. }
  9393. }
  9394. }
  9395. }
  9396. },
  9397. "description": "List all workspaces.",
  9398. "summary": "List workspaces",
  9399. "x-codeSamples": [
  9400. {
  9401. "lang": "js",
  9402. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9403. }
  9404. ]
  9405. },
  9406. "post": {
  9407. "tags": ["workspace"],
  9408. "operationId": "experimental.workspace.create",
  9409. "parameters": [
  9410. {
  9411. "name": "directory",
  9412. "in": "query",
  9413. "schema": {
  9414. "type": "string"
  9415. },
  9416. "required": false
  9417. },
  9418. {
  9419. "name": "workspace",
  9420. "in": "query",
  9421. "schema": {
  9422. "type": "string"
  9423. },
  9424. "required": false
  9425. }
  9426. ],
  9427. "responses": {
  9428. "200": {
  9429. "description": "Workspace created",
  9430. "content": {
  9431. "application/json": {
  9432. "schema": {
  9433. "$ref": "#/components/schemas/Workspace"
  9434. }
  9435. }
  9436. }
  9437. },
  9438. "400": {
  9439. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9440. "content": {
  9441. "application/json": {
  9442. "schema": {
  9443. "anyOf": [
  9444. {
  9445. "$ref": "#/components/schemas/WorkspaceCreateError"
  9446. },
  9447. {
  9448. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9449. },
  9450. {
  9451. "$ref": "#/components/schemas/InvalidRequestError"
  9452. }
  9453. ]
  9454. }
  9455. }
  9456. }
  9457. }
  9458. },
  9459. "description": "Create a workspace for the current project.",
  9460. "summary": "Create workspace",
  9461. "requestBody": {
  9462. "content": {
  9463. "application/json": {
  9464. "schema": {
  9465. "type": "object",
  9466. "properties": {
  9467. "id": {
  9468. "type": "string",
  9469. "pattern": "^wrk"
  9470. },
  9471. "type": {
  9472. "type": "string"
  9473. },
  9474. "branch": {
  9475. "anyOf": [
  9476. {
  9477. "type": "string"
  9478. },
  9479. {
  9480. "type": "null"
  9481. }
  9482. ]
  9483. },
  9484. "extra": {
  9485. "anyOf": [
  9486. {},
  9487. {
  9488. "type": "null"
  9489. }
  9490. ]
  9491. }
  9492. },
  9493. "required": ["type"],
  9494. "additionalProperties": false
  9495. }
  9496. }
  9497. }
  9498. },
  9499. "x-codeSamples": [
  9500. {
  9501. "lang": "js",
  9502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9503. }
  9504. ]
  9505. }
  9506. },
  9507. "/experimental/workspace/sync-list": {
  9508. "post": {
  9509. "tags": ["workspace"],
  9510. "operationId": "experimental.workspace.syncList",
  9511. "parameters": [
  9512. {
  9513. "name": "directory",
  9514. "in": "query",
  9515. "schema": {
  9516. "type": "string"
  9517. },
  9518. "required": false
  9519. },
  9520. {
  9521. "name": "workspace",
  9522. "in": "query",
  9523. "schema": {
  9524. "type": "string"
  9525. },
  9526. "required": false
  9527. }
  9528. ],
  9529. "responses": {
  9530. "204": {
  9531. "description": "Workspace list synced"
  9532. },
  9533. "400": {
  9534. "description": "Bad request",
  9535. "content": {
  9536. "application/json": {
  9537. "schema": {
  9538. "$ref": "#/components/schemas/BadRequestError"
  9539. }
  9540. }
  9541. }
  9542. }
  9543. },
  9544. "description": "Register missing workspaces returned by workspace adapters.",
  9545. "summary": "Sync workspace list",
  9546. "x-codeSamples": [
  9547. {
  9548. "lang": "js",
  9549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9550. }
  9551. ]
  9552. }
  9553. },
  9554. "/experimental/workspace/status": {
  9555. "get": {
  9556. "tags": ["workspace"],
  9557. "operationId": "experimental.workspace.status",
  9558. "parameters": [
  9559. {
  9560. "name": "directory",
  9561. "in": "query",
  9562. "schema": {
  9563. "type": "string"
  9564. },
  9565. "required": false
  9566. },
  9567. {
  9568. "name": "workspace",
  9569. "in": "query",
  9570. "schema": {
  9571. "type": "string"
  9572. },
  9573. "required": false
  9574. }
  9575. ],
  9576. "responses": {
  9577. "200": {
  9578. "description": "Workspace status",
  9579. "content": {
  9580. "application/json": {
  9581. "schema": {
  9582. "type": "array",
  9583. "items": {
  9584. "$ref": "#/components/schemas/WorkspaceEventConnectionStatus"
  9585. },
  9586. "description": "Workspace status"
  9587. }
  9588. }
  9589. }
  9590. },
  9591. "400": {
  9592. "description": "Bad request",
  9593. "content": {
  9594. "application/json": {
  9595. "schema": {
  9596. "$ref": "#/components/schemas/BadRequestError"
  9597. }
  9598. }
  9599. }
  9600. }
  9601. },
  9602. "description": "Get connection status for workspaces in the current project.",
  9603. "summary": "Workspace status",
  9604. "x-codeSamples": [
  9605. {
  9606. "lang": "js",
  9607. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9608. }
  9609. ]
  9610. }
  9611. },
  9612. "/experimental/workspace/{id}": {
  9613. "delete": {
  9614. "tags": ["workspace"],
  9615. "operationId": "experimental.workspace.remove",
  9616. "parameters": [
  9617. {
  9618. "name": "id",
  9619. "in": "path",
  9620. "schema": {
  9621. "type": "string",
  9622. "pattern": "^wrk"
  9623. },
  9624. "required": true
  9625. },
  9626. {
  9627. "name": "directory",
  9628. "in": "query",
  9629. "schema": {
  9630. "type": "string"
  9631. },
  9632. "required": false
  9633. },
  9634. {
  9635. "name": "workspace",
  9636. "in": "query",
  9637. "schema": {
  9638. "type": "string"
  9639. },
  9640. "required": false
  9641. }
  9642. ],
  9643. "responses": {
  9644. "200": {
  9645. "description": "Workspace removed",
  9646. "content": {
  9647. "application/json": {
  9648. "schema": {
  9649. "$ref": "#/components/schemas/Workspace"
  9650. }
  9651. }
  9652. }
  9653. },
  9654. "400": {
  9655. "description": "BadRequest | InvalidRequestError",
  9656. "content": {
  9657. "application/json": {
  9658. "schema": {
  9659. "anyOf": [
  9660. {
  9661. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9662. },
  9663. {
  9664. "$ref": "#/components/schemas/InvalidRequestError"
  9665. }
  9666. ]
  9667. }
  9668. }
  9669. }
  9670. }
  9671. },
  9672. "description": "Remove an existing workspace.",
  9673. "summary": "Remove workspace",
  9674. "x-codeSamples": [
  9675. {
  9676. "lang": "js",
  9677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9678. }
  9679. ]
  9680. }
  9681. },
  9682. "/experimental/workspace/warp": {
  9683. "post": {
  9684. "tags": ["workspace"],
  9685. "operationId": "experimental.workspace.warp",
  9686. "parameters": [
  9687. {
  9688. "name": "directory",
  9689. "in": "query",
  9690. "schema": {
  9691. "type": "string"
  9692. },
  9693. "required": false
  9694. },
  9695. {
  9696. "name": "workspace",
  9697. "in": "query",
  9698. "schema": {
  9699. "type": "string"
  9700. },
  9701. "required": false
  9702. }
  9703. ],
  9704. "responses": {
  9705. "204": {
  9706. "description": "Session warped"
  9707. },
  9708. "400": {
  9709. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9710. "content": {
  9711. "application/json": {
  9712. "schema": {
  9713. "anyOf": [
  9714. {
  9715. "$ref": "#/components/schemas/WorkspaceWarpError"
  9716. },
  9717. {
  9718. "$ref": "#/components/schemas/VcsApplyError"
  9719. },
  9720. {
  9721. "$ref": "#/components/schemas/InvalidRequestError"
  9722. }
  9723. ]
  9724. }
  9725. }
  9726. }
  9727. },
  9728. "404": {
  9729. "description": "NotFoundError",
  9730. "content": {
  9731. "application/json": {
  9732. "schema": {
  9733. "$ref": "#/components/schemas/NotFoundError"
  9734. }
  9735. }
  9736. }
  9737. }
  9738. },
  9739. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9740. "summary": "Warp session into workspace",
  9741. "requestBody": {
  9742. "content": {
  9743. "application/json": {
  9744. "schema": {
  9745. "type": "object",
  9746. "properties": {
  9747. "id": {
  9748. "anyOf": [
  9749. {
  9750. "type": "string",
  9751. "pattern": "^wrk"
  9752. },
  9753. {
  9754. "type": "null"
  9755. }
  9756. ]
  9757. },
  9758. "sessionID": {
  9759. "type": "string",
  9760. "pattern": "^ses"
  9761. },
  9762. "copyChanges": {
  9763. "type": "boolean"
  9764. }
  9765. },
  9766. "required": ["id", "sessionID"],
  9767. "additionalProperties": false
  9768. }
  9769. }
  9770. }
  9771. },
  9772. "x-codeSamples": [
  9773. {
  9774. "lang": "js",
  9775. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9776. }
  9777. ]
  9778. }
  9779. },
  9780. "/api/health": {
  9781. "get": {
  9782. "tags": ["opencode HttpApi"],
  9783. "operationId": "v2.health.get",
  9784. "parameters": [],
  9785. "security": [],
  9786. "responses": {
  9787. "200": {
  9788. "description": "Success",
  9789. "content": {
  9790. "application/json": {
  9791. "schema": {
  9792. "type": "object",
  9793. "properties": {
  9794. "healthy": {
  9795. "type": "boolean",
  9796. "enum": [true]
  9797. }
  9798. },
  9799. "required": ["healthy"],
  9800. "additionalProperties": false
  9801. }
  9802. }
  9803. }
  9804. },
  9805. "400": {
  9806. "description": "InvalidRequestError",
  9807. "content": {
  9808. "application/json": {
  9809. "schema": {
  9810. "$ref": "#/components/schemas/InvalidRequestError"
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "401": {
  9816. "description": "UnauthorizedError",
  9817. "content": {
  9818. "application/json": {
  9819. "schema": {
  9820. "$ref": "#/components/schemas/UnauthorizedError"
  9821. }
  9822. }
  9823. }
  9824. }
  9825. },
  9826. "description": "Check whether the API server is ready to accept requests.",
  9827. "summary": "Check server health",
  9828. "x-codeSamples": [
  9829. {
  9830. "lang": "js",
  9831. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9832. }
  9833. ]
  9834. }
  9835. },
  9836. "/api/location": {
  9837. "get": {
  9838. "tags": ["opencode HttpApi"],
  9839. "operationId": "v2.location.get",
  9840. "parameters": [
  9841. {
  9842. "name": "location",
  9843. "in": "query",
  9844. "schema": {
  9845. "type": "object",
  9846. "properties": {
  9847. "directory": {
  9848. "type": "string"
  9849. },
  9850. "workspace": {
  9851. "type": "string"
  9852. }
  9853. },
  9854. "additionalProperties": false
  9855. },
  9856. "required": false,
  9857. "style": "deepObject",
  9858. "explode": true
  9859. }
  9860. ],
  9861. "security": [],
  9862. "responses": {
  9863. "200": {
  9864. "description": "Location.Info",
  9865. "content": {
  9866. "application/json": {
  9867. "schema": {
  9868. "$ref": "#/components/schemas/LocationInfo"
  9869. }
  9870. }
  9871. }
  9872. },
  9873. "400": {
  9874. "description": "InvalidRequestError",
  9875. "content": {
  9876. "application/json": {
  9877. "schema": {
  9878. "$ref": "#/components/schemas/InvalidRequestError"
  9879. }
  9880. }
  9881. }
  9882. },
  9883. "401": {
  9884. "description": "UnauthorizedError",
  9885. "content": {
  9886. "application/json": {
  9887. "schema": {
  9888. "$ref": "#/components/schemas/UnauthorizedError"
  9889. }
  9890. }
  9891. }
  9892. }
  9893. },
  9894. "description": "Resolve the requested location or the server default location.",
  9895. "summary": "Get location",
  9896. "x-codeSamples": [
  9897. {
  9898. "lang": "js",
  9899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9900. }
  9901. ]
  9902. }
  9903. },
  9904. "/api/agent": {
  9905. "get": {
  9906. "tags": ["opencode HttpApi"],
  9907. "operationId": "v2.agent.list",
  9908. "parameters": [
  9909. {
  9910. "name": "location",
  9911. "in": "query",
  9912. "schema": {
  9913. "type": "object",
  9914. "properties": {
  9915. "directory": {
  9916. "type": "string"
  9917. },
  9918. "workspace": {
  9919. "type": "string"
  9920. }
  9921. },
  9922. "additionalProperties": false
  9923. },
  9924. "required": false,
  9925. "style": "deepObject",
  9926. "explode": true
  9927. }
  9928. ],
  9929. "security": [],
  9930. "responses": {
  9931. "200": {
  9932. "description": "Success",
  9933. "content": {
  9934. "application/json": {
  9935. "schema": {
  9936. "type": "object",
  9937. "properties": {
  9938. "location": {
  9939. "$ref": "#/components/schemas/LocationInfo"
  9940. },
  9941. "data": {
  9942. "type": "array",
  9943. "items": {
  9944. "$ref": "#/components/schemas/AgentV2Info"
  9945. }
  9946. }
  9947. },
  9948. "required": ["location", "data"],
  9949. "additionalProperties": false
  9950. }
  9951. }
  9952. }
  9953. },
  9954. "400": {
  9955. "description": "InvalidRequestError",
  9956. "content": {
  9957. "application/json": {
  9958. "schema": {
  9959. "$ref": "#/components/schemas/InvalidRequestError"
  9960. }
  9961. }
  9962. }
  9963. },
  9964. "401": {
  9965. "description": "UnauthorizedError",
  9966. "content": {
  9967. "application/json": {
  9968. "schema": {
  9969. "$ref": "#/components/schemas/UnauthorizedError"
  9970. }
  9971. }
  9972. }
  9973. }
  9974. },
  9975. "description": "Retrieve currently registered agents.",
  9976. "summary": "List agents",
  9977. "x-codeSamples": [
  9978. {
  9979. "lang": "js",
  9980. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9981. }
  9982. ]
  9983. }
  9984. },
  9985. "/api/session": {
  9986. "get": {
  9987. "tags": ["sessions"],
  9988. "operationId": "v2.session.list",
  9989. "parameters": [
  9990. {
  9991. "name": "workspace",
  9992. "in": "query",
  9993. "schema": {
  9994. "type": "string",
  9995. "pattern": "^wrk"
  9996. },
  9997. "required": false
  9998. },
  9999. {
  10000. "name": "limit",
  10001. "in": "query",
  10002. "schema": {
  10003. "type": "number"
  10004. },
  10005. "required": false
  10006. },
  10007. {
  10008. "name": "order",
  10009. "in": "query",
  10010. "schema": {
  10011. "type": "string",
  10012. "enum": ["asc", "desc"]
  10013. },
  10014. "required": false
  10015. },
  10016. {
  10017. "name": "search",
  10018. "in": "query",
  10019. "schema": {
  10020. "type": "string"
  10021. },
  10022. "required": false
  10023. },
  10024. {
  10025. "name": "directory",
  10026. "in": "query",
  10027. "schema": {
  10028. "type": "string"
  10029. },
  10030. "required": false
  10031. },
  10032. {
  10033. "name": "project",
  10034. "in": "query",
  10035. "schema": {
  10036. "type": "string"
  10037. },
  10038. "required": false
  10039. },
  10040. {
  10041. "name": "subpath",
  10042. "in": "query",
  10043. "schema": {
  10044. "type": "string"
  10045. },
  10046. "required": false
  10047. },
  10048. {
  10049. "name": "cursor",
  10050. "in": "query",
  10051. "schema": {
  10052. "type": "string",
  10053. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10054. },
  10055. "required": false
  10056. }
  10057. ],
  10058. "security": [],
  10059. "responses": {
  10060. "200": {
  10061. "description": "SessionsResponse",
  10062. "content": {
  10063. "application/json": {
  10064. "schema": {
  10065. "$ref": "#/components/schemas/SessionsResponse"
  10066. }
  10067. }
  10068. }
  10069. },
  10070. "400": {
  10071. "description": "InvalidCursorError | InvalidRequestError",
  10072. "content": {
  10073. "application/json": {
  10074. "schema": {
  10075. "anyOf": [
  10076. {
  10077. "$ref": "#/components/schemas/InvalidCursorError"
  10078. },
  10079. {
  10080. "$ref": "#/components/schemas/InvalidRequestError"
  10081. },
  10082. {
  10083. "$ref": "#/components/schemas/InvalidRequestError"
  10084. }
  10085. ]
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "401": {
  10091. "description": "UnauthorizedError",
  10092. "content": {
  10093. "application/json": {
  10094. "schema": {
  10095. "$ref": "#/components/schemas/UnauthorizedError"
  10096. }
  10097. }
  10098. }
  10099. }
  10100. },
  10101. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10102. "summary": "List sessions",
  10103. "x-codeSamples": [
  10104. {
  10105. "lang": "js",
  10106. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10107. }
  10108. ]
  10109. },
  10110. "post": {
  10111. "tags": ["sessions"],
  10112. "operationId": "v2.session.create",
  10113. "parameters": [],
  10114. "security": [],
  10115. "responses": {
  10116. "200": {
  10117. "description": "Success",
  10118. "content": {
  10119. "application/json": {
  10120. "schema": {
  10121. "type": "object",
  10122. "properties": {
  10123. "data": {
  10124. "$ref": "#/components/schemas/SessionV2Info"
  10125. }
  10126. },
  10127. "required": ["data"],
  10128. "additionalProperties": false
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "400": {
  10134. "description": "InvalidRequestError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/InvalidRequestError"
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "401": {
  10144. "description": "UnauthorizedError",
  10145. "content": {
  10146. "application/json": {
  10147. "schema": {
  10148. "$ref": "#/components/schemas/UnauthorizedError"
  10149. }
  10150. }
  10151. }
  10152. }
  10153. },
  10154. "description": "Create a session at the requested location.",
  10155. "summary": "Create session",
  10156. "requestBody": {
  10157. "content": {
  10158. "application/json": {
  10159. "schema": {
  10160. "type": "object",
  10161. "properties": {
  10162. "id": {
  10163. "type": "string",
  10164. "pattern": "^ses"
  10165. },
  10166. "agent": {
  10167. "type": "string"
  10168. },
  10169. "model": {
  10170. "$ref": "#/components/schemas/ModelRef"
  10171. },
  10172. "location": {
  10173. "$ref": "#/components/schemas/LocationRef"
  10174. }
  10175. },
  10176. "additionalProperties": false
  10177. }
  10178. }
  10179. },
  10180. "required": true
  10181. },
  10182. "x-codeSamples": [
  10183. {
  10184. "lang": "js",
  10185. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10186. }
  10187. ]
  10188. }
  10189. },
  10190. "/api/session/active": {
  10191. "get": {
  10192. "tags": ["sessions"],
  10193. "operationId": "v2.session.active",
  10194. "parameters": [],
  10195. "security": [],
  10196. "responses": {
  10197. "200": {
  10198. "description": "Success",
  10199. "content": {
  10200. "application/json": {
  10201. "schema": {
  10202. "type": "object",
  10203. "properties": {
  10204. "data": {
  10205. "type": "object",
  10206. "patternProperties": {
  10207. "^ses": {
  10208. "$ref": "#/components/schemas/SessionActive"
  10209. }
  10210. }
  10211. }
  10212. },
  10213. "required": ["data"],
  10214. "additionalProperties": false
  10215. }
  10216. }
  10217. }
  10218. },
  10219. "400": {
  10220. "description": "InvalidRequestError",
  10221. "content": {
  10222. "application/json": {
  10223. "schema": {
  10224. "$ref": "#/components/schemas/InvalidRequestError"
  10225. }
  10226. }
  10227. }
  10228. },
  10229. "401": {
  10230. "description": "UnauthorizedError",
  10231. "content": {
  10232. "application/json": {
  10233. "schema": {
  10234. "$ref": "#/components/schemas/UnauthorizedError"
  10235. }
  10236. }
  10237. }
  10238. }
  10239. },
  10240. "description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
  10241. "summary": "List active sessions",
  10242. "x-codeSamples": [
  10243. {
  10244. "lang": "js",
  10245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.active({\n ...\n})"
  10246. }
  10247. ]
  10248. }
  10249. },
  10250. "/api/session/{sessionID}": {
  10251. "get": {
  10252. "tags": ["sessions"],
  10253. "operationId": "v2.session.get",
  10254. "parameters": [
  10255. {
  10256. "name": "sessionID",
  10257. "in": "path",
  10258. "schema": {
  10259. "type": "string",
  10260. "pattern": "^ses"
  10261. },
  10262. "required": true
  10263. }
  10264. ],
  10265. "security": [],
  10266. "responses": {
  10267. "200": {
  10268. "description": "Success",
  10269. "content": {
  10270. "application/json": {
  10271. "schema": {
  10272. "type": "object",
  10273. "properties": {
  10274. "data": {
  10275. "$ref": "#/components/schemas/SessionV2Info"
  10276. }
  10277. },
  10278. "required": ["data"],
  10279. "additionalProperties": false
  10280. }
  10281. }
  10282. }
  10283. },
  10284. "400": {
  10285. "description": "InvalidRequestError",
  10286. "content": {
  10287. "application/json": {
  10288. "schema": {
  10289. "$ref": "#/components/schemas/InvalidRequestError"
  10290. }
  10291. }
  10292. }
  10293. },
  10294. "401": {
  10295. "description": "UnauthorizedError",
  10296. "content": {
  10297. "application/json": {
  10298. "schema": {
  10299. "$ref": "#/components/schemas/UnauthorizedError"
  10300. }
  10301. }
  10302. }
  10303. },
  10304. "404": {
  10305. "description": "SessionNotFoundError",
  10306. "content": {
  10307. "application/json": {
  10308. "schema": {
  10309. "anyOf": [
  10310. {
  10311. "$ref": "#/components/schemas/SessionNotFoundError"
  10312. },
  10313. {
  10314. "$ref": "#/components/schemas/SessionNotFoundError"
  10315. }
  10316. ]
  10317. }
  10318. }
  10319. }
  10320. }
  10321. },
  10322. "description": "Retrieve a session by ID.",
  10323. "summary": "Get session",
  10324. "x-codeSamples": [
  10325. {
  10326. "lang": "js",
  10327. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10328. }
  10329. ]
  10330. }
  10331. },
  10332. "/api/session/{sessionID}/agent": {
  10333. "post": {
  10334. "tags": ["sessions"],
  10335. "operationId": "v2.session.switchAgent",
  10336. "parameters": [
  10337. {
  10338. "name": "sessionID",
  10339. "in": "path",
  10340. "schema": {
  10341. "type": "string",
  10342. "pattern": "^ses"
  10343. },
  10344. "required": true
  10345. }
  10346. ],
  10347. "security": [],
  10348. "responses": {
  10349. "204": {
  10350. "description": "<No Content>"
  10351. },
  10352. "400": {
  10353. "description": "InvalidRequestError",
  10354. "content": {
  10355. "application/json": {
  10356. "schema": {
  10357. "$ref": "#/components/schemas/InvalidRequestError"
  10358. }
  10359. }
  10360. }
  10361. },
  10362. "401": {
  10363. "description": "UnauthorizedError",
  10364. "content": {
  10365. "application/json": {
  10366. "schema": {
  10367. "$ref": "#/components/schemas/UnauthorizedError"
  10368. }
  10369. }
  10370. }
  10371. },
  10372. "404": {
  10373. "description": "SessionNotFoundError",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "anyOf": [
  10378. {
  10379. "$ref": "#/components/schemas/SessionNotFoundError"
  10380. },
  10381. {
  10382. "$ref": "#/components/schemas/SessionNotFoundError"
  10383. }
  10384. ]
  10385. }
  10386. }
  10387. }
  10388. }
  10389. },
  10390. "description": "Switch the agent used by subsequent provider turns.",
  10391. "summary": "Switch session agent",
  10392. "requestBody": {
  10393. "content": {
  10394. "application/json": {
  10395. "schema": {
  10396. "type": "object",
  10397. "properties": {
  10398. "agent": {
  10399. "type": "string"
  10400. }
  10401. },
  10402. "required": ["agent"],
  10403. "additionalProperties": false
  10404. }
  10405. }
  10406. },
  10407. "required": true
  10408. },
  10409. "x-codeSamples": [
  10410. {
  10411. "lang": "js",
  10412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchAgent({\n ...\n})"
  10413. }
  10414. ]
  10415. }
  10416. },
  10417. "/api/session/{sessionID}/model": {
  10418. "post": {
  10419. "tags": ["sessions"],
  10420. "operationId": "v2.session.switchModel",
  10421. "parameters": [
  10422. {
  10423. "name": "sessionID",
  10424. "in": "path",
  10425. "schema": {
  10426. "type": "string",
  10427. "pattern": "^ses"
  10428. },
  10429. "required": true
  10430. }
  10431. ],
  10432. "security": [],
  10433. "responses": {
  10434. "204": {
  10435. "description": "<No Content>"
  10436. },
  10437. "400": {
  10438. "description": "InvalidRequestError",
  10439. "content": {
  10440. "application/json": {
  10441. "schema": {
  10442. "$ref": "#/components/schemas/InvalidRequestError"
  10443. }
  10444. }
  10445. }
  10446. },
  10447. "401": {
  10448. "description": "UnauthorizedError",
  10449. "content": {
  10450. "application/json": {
  10451. "schema": {
  10452. "$ref": "#/components/schemas/UnauthorizedError"
  10453. }
  10454. }
  10455. }
  10456. },
  10457. "404": {
  10458. "description": "SessionNotFoundError",
  10459. "content": {
  10460. "application/json": {
  10461. "schema": {
  10462. "anyOf": [
  10463. {
  10464. "$ref": "#/components/schemas/SessionNotFoundError"
  10465. },
  10466. {
  10467. "$ref": "#/components/schemas/SessionNotFoundError"
  10468. }
  10469. ]
  10470. }
  10471. }
  10472. }
  10473. }
  10474. },
  10475. "description": "Switch the model used by subsequent provider turns.",
  10476. "summary": "Switch session model",
  10477. "requestBody": {
  10478. "content": {
  10479. "application/json": {
  10480. "schema": {
  10481. "type": "object",
  10482. "properties": {
  10483. "model": {
  10484. "$ref": "#/components/schemas/ModelRef"
  10485. }
  10486. },
  10487. "required": ["model"],
  10488. "additionalProperties": false
  10489. }
  10490. }
  10491. },
  10492. "required": true
  10493. },
  10494. "x-codeSamples": [
  10495. {
  10496. "lang": "js",
  10497. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.switchModel({\n ...\n})"
  10498. }
  10499. ]
  10500. }
  10501. },
  10502. "/api/session/{sessionID}/prompt": {
  10503. "post": {
  10504. "tags": ["sessions"],
  10505. "operationId": "v2.session.prompt",
  10506. "parameters": [
  10507. {
  10508. "name": "sessionID",
  10509. "in": "path",
  10510. "schema": {
  10511. "type": "string",
  10512. "pattern": "^ses"
  10513. },
  10514. "required": true
  10515. }
  10516. ],
  10517. "security": [],
  10518. "responses": {
  10519. "200": {
  10520. "description": "Success",
  10521. "content": {
  10522. "application/json": {
  10523. "schema": {
  10524. "type": "object",
  10525. "properties": {
  10526. "data": {
  10527. "$ref": "#/components/schemas/SessionInputAdmitted"
  10528. }
  10529. },
  10530. "required": ["data"],
  10531. "additionalProperties": false
  10532. }
  10533. }
  10534. }
  10535. },
  10536. "400": {
  10537. "description": "InvalidRequestError",
  10538. "content": {
  10539. "application/json": {
  10540. "schema": {
  10541. "$ref": "#/components/schemas/InvalidRequestError"
  10542. }
  10543. }
  10544. }
  10545. },
  10546. "401": {
  10547. "description": "UnauthorizedError",
  10548. "content": {
  10549. "application/json": {
  10550. "schema": {
  10551. "$ref": "#/components/schemas/UnauthorizedError"
  10552. }
  10553. }
  10554. }
  10555. },
  10556. "404": {
  10557. "description": "SessionNotFoundError",
  10558. "content": {
  10559. "application/json": {
  10560. "schema": {
  10561. "anyOf": [
  10562. {
  10563. "$ref": "#/components/schemas/SessionNotFoundError"
  10564. },
  10565. {
  10566. "$ref": "#/components/schemas/SessionNotFoundError"
  10567. }
  10568. ]
  10569. }
  10570. }
  10571. }
  10572. },
  10573. "409": {
  10574. "description": "ConflictError",
  10575. "content": {
  10576. "application/json": {
  10577. "schema": {
  10578. "$ref": "#/components/schemas/ConflictError"
  10579. }
  10580. }
  10581. }
  10582. }
  10583. },
  10584. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10585. "summary": "Send message",
  10586. "requestBody": {
  10587. "content": {
  10588. "application/json": {
  10589. "schema": {
  10590. "type": "object",
  10591. "properties": {
  10592. "id": {
  10593. "type": "string",
  10594. "pattern": "^msg_"
  10595. },
  10596. "prompt": {
  10597. "$ref": "#/components/schemas/PromptInput"
  10598. },
  10599. "delivery": {
  10600. "type": "string",
  10601. "enum": ["steer", "queue"]
  10602. },
  10603. "resume": {
  10604. "type": "boolean"
  10605. }
  10606. },
  10607. "required": ["prompt"],
  10608. "additionalProperties": false
  10609. }
  10610. }
  10611. },
  10612. "required": true
  10613. },
  10614. "x-codeSamples": [
  10615. {
  10616. "lang": "js",
  10617. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10618. }
  10619. ]
  10620. }
  10621. },
  10622. "/api/session/{sessionID}/compact": {
  10623. "post": {
  10624. "tags": ["sessions"],
  10625. "operationId": "v2.session.compact",
  10626. "parameters": [
  10627. {
  10628. "name": "sessionID",
  10629. "in": "path",
  10630. "schema": {
  10631. "type": "string",
  10632. "pattern": "^ses"
  10633. },
  10634. "required": true
  10635. }
  10636. ],
  10637. "security": [],
  10638. "responses": {
  10639. "204": {
  10640. "description": "<No Content>"
  10641. },
  10642. "400": {
  10643. "description": "InvalidRequestError",
  10644. "content": {
  10645. "application/json": {
  10646. "schema": {
  10647. "$ref": "#/components/schemas/InvalidRequestError"
  10648. }
  10649. }
  10650. }
  10651. },
  10652. "401": {
  10653. "description": "UnauthorizedError",
  10654. "content": {
  10655. "application/json": {
  10656. "schema": {
  10657. "$ref": "#/components/schemas/UnauthorizedError"
  10658. }
  10659. }
  10660. }
  10661. },
  10662. "404": {
  10663. "description": "SessionNotFoundError",
  10664. "content": {
  10665. "application/json": {
  10666. "schema": {
  10667. "anyOf": [
  10668. {
  10669. "$ref": "#/components/schemas/SessionNotFoundError"
  10670. },
  10671. {
  10672. "$ref": "#/components/schemas/SessionNotFoundError"
  10673. }
  10674. ]
  10675. }
  10676. }
  10677. }
  10678. },
  10679. "503": {
  10680. "description": "ServiceUnavailableError",
  10681. "content": {
  10682. "application/json": {
  10683. "schema": {
  10684. "$ref": "#/components/schemas/ServiceUnavailableError"
  10685. }
  10686. }
  10687. }
  10688. }
  10689. },
  10690. "description": "Compact a session conversation.",
  10691. "summary": "Compact session",
  10692. "x-codeSamples": [
  10693. {
  10694. "lang": "js",
  10695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10696. }
  10697. ]
  10698. }
  10699. },
  10700. "/api/session/{sessionID}/wait": {
  10701. "post": {
  10702. "tags": ["sessions"],
  10703. "operationId": "v2.session.wait",
  10704. "parameters": [
  10705. {
  10706. "name": "sessionID",
  10707. "in": "path",
  10708. "schema": {
  10709. "type": "string",
  10710. "pattern": "^ses"
  10711. },
  10712. "required": true
  10713. }
  10714. ],
  10715. "security": [],
  10716. "responses": {
  10717. "204": {
  10718. "description": "<No Content>"
  10719. },
  10720. "400": {
  10721. "description": "InvalidRequestError",
  10722. "content": {
  10723. "application/json": {
  10724. "schema": {
  10725. "$ref": "#/components/schemas/InvalidRequestError"
  10726. }
  10727. }
  10728. }
  10729. },
  10730. "401": {
  10731. "description": "UnauthorizedError",
  10732. "content": {
  10733. "application/json": {
  10734. "schema": {
  10735. "$ref": "#/components/schemas/UnauthorizedError"
  10736. }
  10737. }
  10738. }
  10739. },
  10740. "404": {
  10741. "description": "SessionNotFoundError",
  10742. "content": {
  10743. "application/json": {
  10744. "schema": {
  10745. "anyOf": [
  10746. {
  10747. "$ref": "#/components/schemas/SessionNotFoundError"
  10748. },
  10749. {
  10750. "$ref": "#/components/schemas/SessionNotFoundError"
  10751. }
  10752. ]
  10753. }
  10754. }
  10755. }
  10756. },
  10757. "503": {
  10758. "description": "ServiceUnavailableError",
  10759. "content": {
  10760. "application/json": {
  10761. "schema": {
  10762. "$ref": "#/components/schemas/ServiceUnavailableError"
  10763. }
  10764. }
  10765. }
  10766. }
  10767. },
  10768. "description": "Wait for a session agent loop to become idle.",
  10769. "summary": "Wait for session",
  10770. "x-codeSamples": [
  10771. {
  10772. "lang": "js",
  10773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10774. }
  10775. ]
  10776. }
  10777. },
  10778. "/api/session/{sessionID}/revert/stage": {
  10779. "post": {
  10780. "tags": ["sessions"],
  10781. "operationId": "v2.session.revert.stage",
  10782. "parameters": [
  10783. {
  10784. "name": "sessionID",
  10785. "in": "path",
  10786. "schema": {
  10787. "type": "string",
  10788. "pattern": "^ses"
  10789. },
  10790. "required": true
  10791. }
  10792. ],
  10793. "security": [],
  10794. "responses": {
  10795. "200": {
  10796. "description": "Success",
  10797. "content": {
  10798. "application/json": {
  10799. "schema": {
  10800. "type": "object",
  10801. "properties": {
  10802. "data": {
  10803. "$ref": "#/components/schemas/RevertState"
  10804. }
  10805. },
  10806. "required": ["data"],
  10807. "additionalProperties": false
  10808. }
  10809. }
  10810. }
  10811. },
  10812. "400": {
  10813. "description": "InvalidRequestError",
  10814. "content": {
  10815. "application/json": {
  10816. "schema": {
  10817. "$ref": "#/components/schemas/InvalidRequestError"
  10818. }
  10819. }
  10820. }
  10821. },
  10822. "401": {
  10823. "description": "UnauthorizedError",
  10824. "content": {
  10825. "application/json": {
  10826. "schema": {
  10827. "$ref": "#/components/schemas/UnauthorizedError"
  10828. }
  10829. }
  10830. }
  10831. },
  10832. "404": {
  10833. "description": "MessageNotFoundError | SessionNotFoundError",
  10834. "content": {
  10835. "application/json": {
  10836. "schema": {
  10837. "anyOf": [
  10838. {
  10839. "$ref": "#/components/schemas/MessageNotFoundError"
  10840. },
  10841. {
  10842. "$ref": "#/components/schemas/SessionNotFoundError"
  10843. },
  10844. {
  10845. "$ref": "#/components/schemas/SessionNotFoundError"
  10846. }
  10847. ]
  10848. }
  10849. }
  10850. }
  10851. },
  10852. "500": {
  10853. "description": "UnknownError",
  10854. "content": {
  10855. "application/json": {
  10856. "schema": {
  10857. "$ref": "#/components/schemas/UnknownError1"
  10858. }
  10859. }
  10860. }
  10861. }
  10862. },
  10863. "description": "Stage or move a reversible session boundary and optionally apply its file changes.",
  10864. "summary": "Stage session revert",
  10865. "requestBody": {
  10866. "content": {
  10867. "application/json": {
  10868. "schema": {
  10869. "type": "object",
  10870. "properties": {
  10871. "messageID": {
  10872. "type": "string",
  10873. "pattern": "^msg_"
  10874. },
  10875. "files": {
  10876. "type": "boolean"
  10877. }
  10878. },
  10879. "required": ["messageID"],
  10880. "additionalProperties": false
  10881. }
  10882. }
  10883. },
  10884. "required": true
  10885. },
  10886. "x-codeSamples": [
  10887. {
  10888. "lang": "js",
  10889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.stage({\n ...\n})"
  10890. }
  10891. ]
  10892. }
  10893. },
  10894. "/api/session/{sessionID}/revert/clear": {
  10895. "post": {
  10896. "tags": ["sessions"],
  10897. "operationId": "v2.session.revert.clear",
  10898. "parameters": [
  10899. {
  10900. "name": "sessionID",
  10901. "in": "path",
  10902. "schema": {
  10903. "type": "string",
  10904. "pattern": "^ses"
  10905. },
  10906. "required": true
  10907. }
  10908. ],
  10909. "security": [],
  10910. "responses": {
  10911. "204": {
  10912. "description": "<No Content>"
  10913. },
  10914. "400": {
  10915. "description": "InvalidRequestError",
  10916. "content": {
  10917. "application/json": {
  10918. "schema": {
  10919. "$ref": "#/components/schemas/InvalidRequestError"
  10920. }
  10921. }
  10922. }
  10923. },
  10924. "401": {
  10925. "description": "UnauthorizedError",
  10926. "content": {
  10927. "application/json": {
  10928. "schema": {
  10929. "$ref": "#/components/schemas/UnauthorizedError"
  10930. }
  10931. }
  10932. }
  10933. },
  10934. "404": {
  10935. "description": "SessionNotFoundError",
  10936. "content": {
  10937. "application/json": {
  10938. "schema": {
  10939. "anyOf": [
  10940. {
  10941. "$ref": "#/components/schemas/SessionNotFoundError"
  10942. },
  10943. {
  10944. "$ref": "#/components/schemas/SessionNotFoundError"
  10945. }
  10946. ]
  10947. }
  10948. }
  10949. }
  10950. },
  10951. "500": {
  10952. "description": "UnknownError",
  10953. "content": {
  10954. "application/json": {
  10955. "schema": {
  10956. "$ref": "#/components/schemas/UnknownError1"
  10957. }
  10958. }
  10959. }
  10960. }
  10961. },
  10962. "summary": "Clear staged revert",
  10963. "x-codeSamples": [
  10964. {
  10965. "lang": "js",
  10966. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.clear({\n ...\n})"
  10967. }
  10968. ]
  10969. }
  10970. },
  10971. "/api/session/{sessionID}/revert/commit": {
  10972. "post": {
  10973. "tags": ["sessions"],
  10974. "operationId": "v2.session.revert.commit",
  10975. "parameters": [
  10976. {
  10977. "name": "sessionID",
  10978. "in": "path",
  10979. "schema": {
  10980. "type": "string",
  10981. "pattern": "^ses"
  10982. },
  10983. "required": true
  10984. }
  10985. ],
  10986. "security": [],
  10987. "responses": {
  10988. "204": {
  10989. "description": "<No Content>"
  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. },
  11029. "summary": "Commit staged revert",
  11030. "x-codeSamples": [
  11031. {
  11032. "lang": "js",
  11033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.revert.commit({\n ...\n})"
  11034. }
  11035. ]
  11036. }
  11037. },
  11038. "/api/session/{sessionID}/context": {
  11039. "get": {
  11040. "tags": ["sessions"],
  11041. "operationId": "v2.session.context",
  11042. "parameters": [
  11043. {
  11044. "name": "sessionID",
  11045. "in": "path",
  11046. "schema": {
  11047. "type": "string",
  11048. "pattern": "^ses"
  11049. },
  11050. "required": true
  11051. }
  11052. ],
  11053. "security": [],
  11054. "responses": {
  11055. "200": {
  11056. "description": "Success",
  11057. "content": {
  11058. "application/json": {
  11059. "schema": {
  11060. "type": "object",
  11061. "properties": {
  11062. "data": {
  11063. "type": "array",
  11064. "items": {
  11065. "$ref": "#/components/schemas/SessionMessage"
  11066. }
  11067. }
  11068. },
  11069. "required": ["data"],
  11070. "additionalProperties": false
  11071. }
  11072. }
  11073. }
  11074. },
  11075. "400": {
  11076. "description": "InvalidRequestError",
  11077. "content": {
  11078. "application/json": {
  11079. "schema": {
  11080. "$ref": "#/components/schemas/InvalidRequestError"
  11081. }
  11082. }
  11083. }
  11084. },
  11085. "401": {
  11086. "description": "UnauthorizedError",
  11087. "content": {
  11088. "application/json": {
  11089. "schema": {
  11090. "$ref": "#/components/schemas/UnauthorizedError"
  11091. }
  11092. }
  11093. }
  11094. },
  11095. "404": {
  11096. "description": "SessionNotFoundError",
  11097. "content": {
  11098. "application/json": {
  11099. "schema": {
  11100. "anyOf": [
  11101. {
  11102. "$ref": "#/components/schemas/SessionNotFoundError"
  11103. },
  11104. {
  11105. "$ref": "#/components/schemas/SessionNotFoundError"
  11106. }
  11107. ]
  11108. }
  11109. }
  11110. }
  11111. },
  11112. "500": {
  11113. "description": "UnknownError",
  11114. "content": {
  11115. "application/json": {
  11116. "schema": {
  11117. "$ref": "#/components/schemas/UnknownError1"
  11118. }
  11119. }
  11120. }
  11121. }
  11122. },
  11123. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  11124. "summary": "Get session context",
  11125. "x-codeSamples": [
  11126. {
  11127. "lang": "js",
  11128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  11129. }
  11130. ]
  11131. }
  11132. },
  11133. "/api/session/{sessionID}/history": {
  11134. "get": {
  11135. "tags": ["sessions"],
  11136. "operationId": "v2.session.history",
  11137. "parameters": [
  11138. {
  11139. "name": "sessionID",
  11140. "in": "path",
  11141. "schema": {
  11142. "type": "string",
  11143. "pattern": "^ses"
  11144. },
  11145. "required": true
  11146. },
  11147. {
  11148. "name": "limit",
  11149. "in": "query",
  11150. "schema": {
  11151. "type": "string"
  11152. },
  11153. "required": false
  11154. },
  11155. {
  11156. "name": "after",
  11157. "in": "query",
  11158. "schema": {
  11159. "type": "string"
  11160. },
  11161. "required": false
  11162. }
  11163. ],
  11164. "security": [],
  11165. "responses": {
  11166. "200": {
  11167. "description": "SessionHistory",
  11168. "content": {
  11169. "application/json": {
  11170. "schema": {
  11171. "$ref": "#/components/schemas/SessionHistory"
  11172. }
  11173. }
  11174. }
  11175. },
  11176. "400": {
  11177. "description": "InvalidRequestError",
  11178. "content": {
  11179. "application/json": {
  11180. "schema": {
  11181. "$ref": "#/components/schemas/InvalidRequestError"
  11182. }
  11183. }
  11184. }
  11185. },
  11186. "401": {
  11187. "description": "UnauthorizedError",
  11188. "content": {
  11189. "application/json": {
  11190. "schema": {
  11191. "$ref": "#/components/schemas/UnauthorizedError"
  11192. }
  11193. }
  11194. }
  11195. },
  11196. "404": {
  11197. "description": "SessionNotFoundError",
  11198. "content": {
  11199. "application/json": {
  11200. "schema": {
  11201. "anyOf": [
  11202. {
  11203. "$ref": "#/components/schemas/SessionNotFoundError"
  11204. },
  11205. {
  11206. "$ref": "#/components/schemas/SessionNotFoundError"
  11207. }
  11208. ]
  11209. }
  11210. }
  11211. }
  11212. }
  11213. },
  11214. "description": "Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.",
  11215. "summary": "Get session history",
  11216. "x-codeSamples": [
  11217. {
  11218. "lang": "js",
  11219. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.history({\n ...\n})"
  11220. }
  11221. ]
  11222. }
  11223. },
  11224. "/api/session/{sessionID}/event": {
  11225. "get": {
  11226. "tags": ["sessions"],
  11227. "operationId": "v2.session.events",
  11228. "parameters": [
  11229. {
  11230. "name": "sessionID",
  11231. "in": "path",
  11232. "schema": {
  11233. "type": "string",
  11234. "pattern": "^ses"
  11235. },
  11236. "required": true
  11237. },
  11238. {
  11239. "name": "after",
  11240. "in": "query",
  11241. "schema": {
  11242. "type": "string"
  11243. },
  11244. "required": false
  11245. }
  11246. ],
  11247. "security": [],
  11248. "responses": {
  11249. "200": {
  11250. "description": "Success",
  11251. "content": {
  11252. "text/event-stream": {
  11253. "schema": {
  11254. "type": "object",
  11255. "properties": {
  11256. "id": {
  11257. "type": "string"
  11258. },
  11259. "event": {
  11260. "type": "string"
  11261. },
  11262. "data": {
  11263. "$ref": "#/components/schemas/SessionDurableEvent1"
  11264. }
  11265. },
  11266. "required": ["id", "event", "data"],
  11267. "additionalProperties": false
  11268. },
  11269. "x-effect-stream": {
  11270. "encoding": "sse",
  11271. "causeSchema": {
  11272. "type": "array",
  11273. "items": {
  11274. "anyOf": [
  11275. {
  11276. "type": "object",
  11277. "properties": {
  11278. "_tag": {
  11279. "type": "string",
  11280. "enum": ["Fail"]
  11281. },
  11282. "error": {
  11283. "not": {}
  11284. }
  11285. },
  11286. "required": ["_tag", "error"],
  11287. "additionalProperties": false
  11288. },
  11289. {
  11290. "type": "object",
  11291. "properties": {
  11292. "_tag": {
  11293. "type": "string",
  11294. "enum": ["Die"]
  11295. },
  11296. "defect": {}
  11297. },
  11298. "required": ["_tag", "defect"],
  11299. "additionalProperties": false
  11300. },
  11301. {
  11302. "type": "object",
  11303. "properties": {
  11304. "_tag": {
  11305. "type": "string",
  11306. "enum": ["Interrupt"]
  11307. },
  11308. "fiberId": {
  11309. "anyOf": [
  11310. {
  11311. "type": "number"
  11312. },
  11313. {
  11314. "type": "null"
  11315. }
  11316. ]
  11317. }
  11318. },
  11319. "required": ["_tag", "fiberId"],
  11320. "additionalProperties": false
  11321. }
  11322. ]
  11323. }
  11324. },
  11325. "errorSchema": {
  11326. "not": {}
  11327. },
  11328. "failureEvent": "effect/httpapi/stream/failure"
  11329. }
  11330. }
  11331. }
  11332. },
  11333. "400": {
  11334. "description": "InvalidRequestError",
  11335. "content": {
  11336. "application/json": {
  11337. "schema": {
  11338. "$ref": "#/components/schemas/InvalidRequestError"
  11339. }
  11340. }
  11341. }
  11342. },
  11343. "401": {
  11344. "description": "UnauthorizedError",
  11345. "content": {
  11346. "application/json": {
  11347. "schema": {
  11348. "$ref": "#/components/schemas/UnauthorizedError"
  11349. }
  11350. }
  11351. }
  11352. },
  11353. "404": {
  11354. "description": "SessionNotFoundError",
  11355. "content": {
  11356. "application/json": {
  11357. "schema": {
  11358. "anyOf": [
  11359. {
  11360. "$ref": "#/components/schemas/SessionNotFoundError"
  11361. },
  11362. {
  11363. "$ref": "#/components/schemas/SessionNotFoundError"
  11364. }
  11365. ]
  11366. }
  11367. }
  11368. }
  11369. }
  11370. },
  11371. "description": "Replay durable events after an aggregate sequence, then continue with new durable events.",
  11372. "summary": "Subscribe to session events",
  11373. "x-codeSamples": [
  11374. {
  11375. "lang": "js",
  11376. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.events({\n ...\n})"
  11377. }
  11378. ]
  11379. }
  11380. },
  11381. "/api/session/{sessionID}/interrupt": {
  11382. "post": {
  11383. "tags": ["sessions"],
  11384. "operationId": "v2.session.interrupt",
  11385. "parameters": [
  11386. {
  11387. "name": "sessionID",
  11388. "in": "path",
  11389. "schema": {
  11390. "type": "string",
  11391. "pattern": "^ses"
  11392. },
  11393. "required": true
  11394. }
  11395. ],
  11396. "security": [],
  11397. "responses": {
  11398. "204": {
  11399. "description": "<No Content>"
  11400. },
  11401. "400": {
  11402. "description": "InvalidRequestError",
  11403. "content": {
  11404. "application/json": {
  11405. "schema": {
  11406. "$ref": "#/components/schemas/InvalidRequestError"
  11407. }
  11408. }
  11409. }
  11410. },
  11411. "401": {
  11412. "description": "UnauthorizedError",
  11413. "content": {
  11414. "application/json": {
  11415. "schema": {
  11416. "$ref": "#/components/schemas/UnauthorizedError"
  11417. }
  11418. }
  11419. }
  11420. },
  11421. "404": {
  11422. "description": "SessionNotFoundError",
  11423. "content": {
  11424. "application/json": {
  11425. "schema": {
  11426. "anyOf": [
  11427. {
  11428. "$ref": "#/components/schemas/SessionNotFoundError"
  11429. },
  11430. {
  11431. "$ref": "#/components/schemas/SessionNotFoundError"
  11432. }
  11433. ]
  11434. }
  11435. }
  11436. }
  11437. }
  11438. },
  11439. "description": "Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.",
  11440. "summary": "Interrupt session execution",
  11441. "x-codeSamples": [
  11442. {
  11443. "lang": "js",
  11444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.interrupt({\n ...\n})"
  11445. }
  11446. ]
  11447. }
  11448. },
  11449. "/api/session/{sessionID}/message/{messageID}": {
  11450. "get": {
  11451. "tags": ["sessions"],
  11452. "operationId": "v2.session.message",
  11453. "parameters": [
  11454. {
  11455. "name": "sessionID",
  11456. "in": "path",
  11457. "schema": {
  11458. "type": "string",
  11459. "pattern": "^ses"
  11460. },
  11461. "required": true
  11462. },
  11463. {
  11464. "name": "messageID",
  11465. "in": "path",
  11466. "schema": {
  11467. "type": "string",
  11468. "pattern": "^msg_"
  11469. },
  11470. "required": true
  11471. }
  11472. ],
  11473. "security": [],
  11474. "responses": {
  11475. "200": {
  11476. "description": "Success",
  11477. "content": {
  11478. "application/json": {
  11479. "schema": {
  11480. "type": "object",
  11481. "properties": {
  11482. "data": {
  11483. "$ref": "#/components/schemas/SessionMessage"
  11484. }
  11485. },
  11486. "required": ["data"],
  11487. "additionalProperties": false
  11488. }
  11489. }
  11490. }
  11491. },
  11492. "400": {
  11493. "description": "InvalidRequestError",
  11494. "content": {
  11495. "application/json": {
  11496. "schema": {
  11497. "$ref": "#/components/schemas/InvalidRequestError"
  11498. }
  11499. }
  11500. }
  11501. },
  11502. "401": {
  11503. "description": "UnauthorizedError",
  11504. "content": {
  11505. "application/json": {
  11506. "schema": {
  11507. "$ref": "#/components/schemas/UnauthorizedError"
  11508. }
  11509. }
  11510. }
  11511. },
  11512. "404": {
  11513. "description": "SessionNotFoundError | MessageNotFoundError",
  11514. "content": {
  11515. "application/json": {
  11516. "schema": {
  11517. "anyOf": [
  11518. {
  11519. "$ref": "#/components/schemas/MessageNotFoundError"
  11520. },
  11521. {
  11522. "$ref": "#/components/schemas/SessionNotFoundError"
  11523. },
  11524. {
  11525. "$ref": "#/components/schemas/SessionNotFoundError"
  11526. }
  11527. ]
  11528. }
  11529. }
  11530. }
  11531. }
  11532. },
  11533. "description": "Retrieve one projected message owned by the Session.",
  11534. "summary": "Get session message",
  11535. "x-codeSamples": [
  11536. {
  11537. "lang": "js",
  11538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.message({\n ...\n})"
  11539. }
  11540. ]
  11541. }
  11542. },
  11543. "/api/session/{sessionID}/message": {
  11544. "get": {
  11545. "tags": ["messages"],
  11546. "operationId": "v2.session.messages",
  11547. "parameters": [
  11548. {
  11549. "name": "sessionID",
  11550. "in": "path",
  11551. "schema": {
  11552. "type": "string",
  11553. "pattern": "^ses"
  11554. },
  11555. "required": true
  11556. },
  11557. {
  11558. "name": "limit",
  11559. "in": "query",
  11560. "schema": {
  11561. "type": "number"
  11562. },
  11563. "required": false
  11564. },
  11565. {
  11566. "name": "order",
  11567. "in": "query",
  11568. "schema": {
  11569. "type": "string",
  11570. "enum": ["asc", "desc"]
  11571. },
  11572. "required": false
  11573. },
  11574. {
  11575. "name": "cursor",
  11576. "in": "query",
  11577. "schema": {
  11578. "type": "string",
  11579. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  11580. },
  11581. "required": false
  11582. }
  11583. ],
  11584. "security": [],
  11585. "responses": {
  11586. "200": {
  11587. "description": "SessionMessagesResponse",
  11588. "content": {
  11589. "application/json": {
  11590. "schema": {
  11591. "$ref": "#/components/schemas/SessionMessagesResponse"
  11592. }
  11593. }
  11594. }
  11595. },
  11596. "400": {
  11597. "description": "InvalidCursorError | InvalidRequestError",
  11598. "content": {
  11599. "application/json": {
  11600. "schema": {
  11601. "anyOf": [
  11602. {
  11603. "$ref": "#/components/schemas/InvalidCursorError"
  11604. },
  11605. {
  11606. "$ref": "#/components/schemas/InvalidRequestError"
  11607. }
  11608. ]
  11609. }
  11610. }
  11611. }
  11612. },
  11613. "401": {
  11614. "description": "UnauthorizedError",
  11615. "content": {
  11616. "application/json": {
  11617. "schema": {
  11618. "$ref": "#/components/schemas/UnauthorizedError"
  11619. }
  11620. }
  11621. }
  11622. },
  11623. "404": {
  11624. "description": "SessionNotFoundError",
  11625. "content": {
  11626. "application/json": {
  11627. "schema": {
  11628. "anyOf": [
  11629. {
  11630. "$ref": "#/components/schemas/SessionNotFoundError"
  11631. },
  11632. {
  11633. "$ref": "#/components/schemas/SessionNotFoundError"
  11634. }
  11635. ]
  11636. }
  11637. }
  11638. }
  11639. },
  11640. "500": {
  11641. "description": "UnknownError",
  11642. "content": {
  11643. "application/json": {
  11644. "schema": {
  11645. "$ref": "#/components/schemas/UnknownError1"
  11646. }
  11647. }
  11648. }
  11649. }
  11650. },
  11651. "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.",
  11652. "summary": "Get session messages",
  11653. "x-codeSamples": [
  11654. {
  11655. "lang": "js",
  11656. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  11657. }
  11658. ]
  11659. }
  11660. },
  11661. "/api/model": {
  11662. "get": {
  11663. "tags": ["models"],
  11664. "operationId": "v2.model.list",
  11665. "parameters": [
  11666. {
  11667. "name": "location",
  11668. "in": "query",
  11669. "schema": {
  11670. "type": "object",
  11671. "properties": {
  11672. "directory": {
  11673. "type": "string"
  11674. },
  11675. "workspace": {
  11676. "type": "string"
  11677. }
  11678. },
  11679. "additionalProperties": false
  11680. },
  11681. "required": false,
  11682. "style": "deepObject",
  11683. "explode": true
  11684. }
  11685. ],
  11686. "security": [],
  11687. "responses": {
  11688. "200": {
  11689. "description": "Success",
  11690. "content": {
  11691. "application/json": {
  11692. "schema": {
  11693. "type": "object",
  11694. "properties": {
  11695. "location": {
  11696. "$ref": "#/components/schemas/LocationInfo"
  11697. },
  11698. "data": {
  11699. "type": "array",
  11700. "items": {
  11701. "$ref": "#/components/schemas/ModelV2Info"
  11702. }
  11703. }
  11704. },
  11705. "required": ["location", "data"],
  11706. "additionalProperties": false
  11707. }
  11708. }
  11709. }
  11710. },
  11711. "400": {
  11712. "description": "InvalidRequestError",
  11713. "content": {
  11714. "application/json": {
  11715. "schema": {
  11716. "$ref": "#/components/schemas/InvalidRequestError"
  11717. }
  11718. }
  11719. }
  11720. },
  11721. "401": {
  11722. "description": "UnauthorizedError",
  11723. "content": {
  11724. "application/json": {
  11725. "schema": {
  11726. "$ref": "#/components/schemas/UnauthorizedError"
  11727. }
  11728. }
  11729. }
  11730. },
  11731. "503": {
  11732. "description": "ServiceUnavailableError",
  11733. "content": {
  11734. "application/json": {
  11735. "schema": {
  11736. "$ref": "#/components/schemas/ServiceUnavailableError"
  11737. }
  11738. }
  11739. }
  11740. }
  11741. },
  11742. "description": "Retrieve available models ordered by release date.",
  11743. "summary": "List models",
  11744. "x-codeSamples": [
  11745. {
  11746. "lang": "js",
  11747. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  11748. }
  11749. ]
  11750. }
  11751. },
  11752. "/api/provider": {
  11753. "get": {
  11754. "tags": ["providers"],
  11755. "operationId": "v2.provider.list",
  11756. "parameters": [
  11757. {
  11758. "name": "location",
  11759. "in": "query",
  11760. "schema": {
  11761. "type": "object",
  11762. "properties": {
  11763. "directory": {
  11764. "type": "string"
  11765. },
  11766. "workspace": {
  11767. "type": "string"
  11768. }
  11769. },
  11770. "additionalProperties": false
  11771. },
  11772. "required": false,
  11773. "style": "deepObject",
  11774. "explode": true
  11775. }
  11776. ],
  11777. "security": [],
  11778. "responses": {
  11779. "200": {
  11780. "description": "Success",
  11781. "content": {
  11782. "application/json": {
  11783. "schema": {
  11784. "type": "object",
  11785. "properties": {
  11786. "location": {
  11787. "$ref": "#/components/schemas/LocationInfo"
  11788. },
  11789. "data": {
  11790. "type": "array",
  11791. "items": {
  11792. "$ref": "#/components/schemas/ProviderV2Info"
  11793. }
  11794. }
  11795. },
  11796. "required": ["location", "data"],
  11797. "additionalProperties": false
  11798. }
  11799. }
  11800. }
  11801. },
  11802. "400": {
  11803. "description": "InvalidRequestError",
  11804. "content": {
  11805. "application/json": {
  11806. "schema": {
  11807. "$ref": "#/components/schemas/InvalidRequestError"
  11808. }
  11809. }
  11810. }
  11811. },
  11812. "401": {
  11813. "description": "UnauthorizedError",
  11814. "content": {
  11815. "application/json": {
  11816. "schema": {
  11817. "$ref": "#/components/schemas/UnauthorizedError"
  11818. }
  11819. }
  11820. }
  11821. },
  11822. "503": {
  11823. "description": "ServiceUnavailableError",
  11824. "content": {
  11825. "application/json": {
  11826. "schema": {
  11827. "$ref": "#/components/schemas/ServiceUnavailableError"
  11828. }
  11829. }
  11830. }
  11831. }
  11832. },
  11833. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  11834. "summary": "List providers",
  11835. "x-codeSamples": [
  11836. {
  11837. "lang": "js",
  11838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  11839. }
  11840. ]
  11841. }
  11842. },
  11843. "/api/provider/{providerID}": {
  11844. "get": {
  11845. "tags": ["providers"],
  11846. "operationId": "v2.provider.get",
  11847. "parameters": [
  11848. {
  11849. "name": "providerID",
  11850. "in": "path",
  11851. "schema": {
  11852. "type": "string"
  11853. },
  11854. "required": true
  11855. },
  11856. {
  11857. "name": "location",
  11858. "in": "query",
  11859. "schema": {
  11860. "type": "object",
  11861. "properties": {
  11862. "directory": {
  11863. "type": "string"
  11864. },
  11865. "workspace": {
  11866. "type": "string"
  11867. }
  11868. },
  11869. "additionalProperties": false
  11870. },
  11871. "required": false,
  11872. "style": "deepObject",
  11873. "explode": true
  11874. }
  11875. ],
  11876. "security": [],
  11877. "responses": {
  11878. "200": {
  11879. "description": "Success",
  11880. "content": {
  11881. "application/json": {
  11882. "schema": {
  11883. "type": "object",
  11884. "properties": {
  11885. "location": {
  11886. "$ref": "#/components/schemas/LocationInfo"
  11887. },
  11888. "data": {
  11889. "$ref": "#/components/schemas/ProviderV2Info"
  11890. }
  11891. },
  11892. "required": ["location", "data"],
  11893. "additionalProperties": false
  11894. }
  11895. }
  11896. }
  11897. },
  11898. "400": {
  11899. "description": "InvalidRequestError",
  11900. "content": {
  11901. "application/json": {
  11902. "schema": {
  11903. "$ref": "#/components/schemas/InvalidRequestError"
  11904. }
  11905. }
  11906. }
  11907. },
  11908. "401": {
  11909. "description": "UnauthorizedError",
  11910. "content": {
  11911. "application/json": {
  11912. "schema": {
  11913. "$ref": "#/components/schemas/UnauthorizedError"
  11914. }
  11915. }
  11916. }
  11917. },
  11918. "404": {
  11919. "description": "ProviderNotFoundError",
  11920. "content": {
  11921. "application/json": {
  11922. "schema": {
  11923. "$ref": "#/components/schemas/ProviderNotFoundError"
  11924. }
  11925. }
  11926. }
  11927. },
  11928. "503": {
  11929. "description": "ServiceUnavailableError",
  11930. "content": {
  11931. "application/json": {
  11932. "schema": {
  11933. "$ref": "#/components/schemas/ServiceUnavailableError"
  11934. }
  11935. }
  11936. }
  11937. }
  11938. },
  11939. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11940. "summary": "Get provider",
  11941. "x-codeSamples": [
  11942. {
  11943. "lang": "js",
  11944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11945. }
  11946. ]
  11947. }
  11948. },
  11949. "/api/integration": {
  11950. "get": {
  11951. "tags": ["integrations"],
  11952. "operationId": "v2.integration.list",
  11953. "parameters": [
  11954. {
  11955. "name": "location",
  11956. "in": "query",
  11957. "schema": {
  11958. "type": "object",
  11959. "properties": {
  11960. "directory": {
  11961. "type": "string"
  11962. },
  11963. "workspace": {
  11964. "type": "string"
  11965. }
  11966. },
  11967. "additionalProperties": false
  11968. },
  11969. "required": false,
  11970. "style": "deepObject",
  11971. "explode": true
  11972. }
  11973. ],
  11974. "security": [],
  11975. "responses": {
  11976. "200": {
  11977. "description": "Success",
  11978. "content": {
  11979. "application/json": {
  11980. "schema": {
  11981. "type": "object",
  11982. "properties": {
  11983. "location": {
  11984. "$ref": "#/components/schemas/LocationInfo"
  11985. },
  11986. "data": {
  11987. "type": "array",
  11988. "items": {
  11989. "$ref": "#/components/schemas/IntegrationInfo"
  11990. }
  11991. }
  11992. },
  11993. "required": ["location", "data"],
  11994. "additionalProperties": false
  11995. }
  11996. }
  11997. }
  11998. },
  11999. "400": {
  12000. "description": "InvalidRequestError",
  12001. "content": {
  12002. "application/json": {
  12003. "schema": {
  12004. "$ref": "#/components/schemas/InvalidRequestError"
  12005. }
  12006. }
  12007. }
  12008. },
  12009. "401": {
  12010. "description": "UnauthorizedError",
  12011. "content": {
  12012. "application/json": {
  12013. "schema": {
  12014. "$ref": "#/components/schemas/UnauthorizedError"
  12015. }
  12016. }
  12017. }
  12018. }
  12019. },
  12020. "description": "Retrieve available integrations and their authentication methods.",
  12021. "summary": "List integrations",
  12022. "x-codeSamples": [
  12023. {
  12024. "lang": "js",
  12025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  12026. }
  12027. ]
  12028. }
  12029. },
  12030. "/api/integration/{integrationID}": {
  12031. "get": {
  12032. "tags": ["integrations"],
  12033. "operationId": "v2.integration.get",
  12034. "parameters": [
  12035. {
  12036. "name": "integrationID",
  12037. "in": "path",
  12038. "schema": {
  12039. "type": "string"
  12040. },
  12041. "required": true
  12042. },
  12043. {
  12044. "name": "location",
  12045. "in": "query",
  12046. "schema": {
  12047. "type": "object",
  12048. "properties": {
  12049. "directory": {
  12050. "type": "string"
  12051. },
  12052. "workspace": {
  12053. "type": "string"
  12054. }
  12055. },
  12056. "additionalProperties": false
  12057. },
  12058. "required": false,
  12059. "style": "deepObject",
  12060. "explode": true
  12061. }
  12062. ],
  12063. "security": [],
  12064. "responses": {
  12065. "200": {
  12066. "description": "Success",
  12067. "content": {
  12068. "application/json": {
  12069. "schema": {
  12070. "type": "object",
  12071. "properties": {
  12072. "location": {
  12073. "$ref": "#/components/schemas/LocationInfo"
  12074. },
  12075. "data": {
  12076. "$ref": "#/components/schemas/IntegrationInfo"
  12077. }
  12078. },
  12079. "required": ["location", "data"],
  12080. "additionalProperties": false
  12081. }
  12082. }
  12083. }
  12084. },
  12085. "400": {
  12086. "description": "InvalidRequestError",
  12087. "content": {
  12088. "application/json": {
  12089. "schema": {
  12090. "$ref": "#/components/schemas/InvalidRequestError"
  12091. }
  12092. }
  12093. }
  12094. },
  12095. "401": {
  12096. "description": "UnauthorizedError",
  12097. "content": {
  12098. "application/json": {
  12099. "schema": {
  12100. "$ref": "#/components/schemas/UnauthorizedError"
  12101. }
  12102. }
  12103. }
  12104. }
  12105. },
  12106. "description": "Retrieve one integration and its authentication methods.",
  12107. "summary": "Get integration",
  12108. "x-codeSamples": [
  12109. {
  12110. "lang": "js",
  12111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  12112. }
  12113. ]
  12114. }
  12115. },
  12116. "/api/integration/{integrationID}/connect/key": {
  12117. "post": {
  12118. "tags": ["integrations"],
  12119. "operationId": "v2.integration.connect.key",
  12120. "parameters": [
  12121. {
  12122. "name": "integrationID",
  12123. "in": "path",
  12124. "schema": {
  12125. "type": "string"
  12126. },
  12127. "required": true
  12128. },
  12129. {
  12130. "name": "location",
  12131. "in": "query",
  12132. "schema": {
  12133. "type": "object",
  12134. "properties": {
  12135. "directory": {
  12136. "type": "string"
  12137. },
  12138. "workspace": {
  12139. "type": "string"
  12140. }
  12141. },
  12142. "additionalProperties": false
  12143. },
  12144. "required": false,
  12145. "style": "deepObject",
  12146. "explode": true
  12147. }
  12148. ],
  12149. "security": [],
  12150. "responses": {
  12151. "204": {
  12152. "description": "<No Content>"
  12153. },
  12154. "400": {
  12155. "description": "InvalidRequestError",
  12156. "content": {
  12157. "application/json": {
  12158. "schema": {
  12159. "anyOf": [
  12160. {
  12161. "$ref": "#/components/schemas/InvalidRequestError"
  12162. },
  12163. {
  12164. "$ref": "#/components/schemas/InvalidRequestError"
  12165. }
  12166. ]
  12167. }
  12168. }
  12169. }
  12170. },
  12171. "401": {
  12172. "description": "UnauthorizedError",
  12173. "content": {
  12174. "application/json": {
  12175. "schema": {
  12176. "$ref": "#/components/schemas/UnauthorizedError"
  12177. }
  12178. }
  12179. }
  12180. }
  12181. },
  12182. "description": "Run a key authentication method and store the resulting credential.",
  12183. "summary": "Connect with key",
  12184. "requestBody": {
  12185. "content": {
  12186. "application/json": {
  12187. "schema": {
  12188. "type": "object",
  12189. "properties": {
  12190. "key": {
  12191. "type": "string"
  12192. },
  12193. "label": {
  12194. "type": "string"
  12195. }
  12196. },
  12197. "required": ["key"],
  12198. "additionalProperties": false
  12199. }
  12200. }
  12201. },
  12202. "required": true
  12203. },
  12204. "x-codeSamples": [
  12205. {
  12206. "lang": "js",
  12207. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  12208. }
  12209. ]
  12210. }
  12211. },
  12212. "/api/integration/{integrationID}/connect/oauth": {
  12213. "post": {
  12214. "tags": ["integrations"],
  12215. "operationId": "v2.integration.connect.oauth",
  12216. "parameters": [
  12217. {
  12218. "name": "integrationID",
  12219. "in": "path",
  12220. "schema": {
  12221. "type": "string"
  12222. },
  12223. "required": true
  12224. },
  12225. {
  12226. "name": "location",
  12227. "in": "query",
  12228. "schema": {
  12229. "type": "object",
  12230. "properties": {
  12231. "directory": {
  12232. "type": "string"
  12233. },
  12234. "workspace": {
  12235. "type": "string"
  12236. }
  12237. },
  12238. "additionalProperties": false
  12239. },
  12240. "required": false,
  12241. "style": "deepObject",
  12242. "explode": true
  12243. }
  12244. ],
  12245. "security": [],
  12246. "responses": {
  12247. "200": {
  12248. "description": "Success",
  12249. "content": {
  12250. "application/json": {
  12251. "schema": {
  12252. "type": "object",
  12253. "properties": {
  12254. "location": {
  12255. "$ref": "#/components/schemas/LocationInfo"
  12256. },
  12257. "data": {
  12258. "$ref": "#/components/schemas/IntegrationAttempt"
  12259. }
  12260. },
  12261. "required": ["location", "data"],
  12262. "additionalProperties": false
  12263. }
  12264. }
  12265. }
  12266. },
  12267. "400": {
  12268. "description": "InvalidRequestError",
  12269. "content": {
  12270. "application/json": {
  12271. "schema": {
  12272. "anyOf": [
  12273. {
  12274. "$ref": "#/components/schemas/InvalidRequestError"
  12275. },
  12276. {
  12277. "$ref": "#/components/schemas/InvalidRequestError"
  12278. }
  12279. ]
  12280. }
  12281. }
  12282. }
  12283. },
  12284. "401": {
  12285. "description": "UnauthorizedError",
  12286. "content": {
  12287. "application/json": {
  12288. "schema": {
  12289. "$ref": "#/components/schemas/UnauthorizedError"
  12290. }
  12291. }
  12292. }
  12293. }
  12294. },
  12295. "description": "Start an OAuth attempt and return the authorization details.",
  12296. "summary": "Begin OAuth connection",
  12297. "requestBody": {
  12298. "content": {
  12299. "application/json": {
  12300. "schema": {
  12301. "type": "object",
  12302. "properties": {
  12303. "methodID": {
  12304. "type": "string"
  12305. },
  12306. "inputs": {
  12307. "type": "object",
  12308. "additionalProperties": {
  12309. "type": "string"
  12310. }
  12311. },
  12312. "label": {
  12313. "type": "string"
  12314. }
  12315. },
  12316. "required": ["methodID", "inputs"],
  12317. "additionalProperties": false
  12318. }
  12319. }
  12320. },
  12321. "required": true
  12322. },
  12323. "x-codeSamples": [
  12324. {
  12325. "lang": "js",
  12326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  12327. }
  12328. ]
  12329. }
  12330. },
  12331. "/api/integration/attempt/{attemptID}": {
  12332. "get": {
  12333. "tags": ["integrations"],
  12334. "operationId": "v2.integration.attempt.status",
  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. "200": {
  12367. "description": "Success",
  12368. "content": {
  12369. "application/json": {
  12370. "schema": {
  12371. "type": "object",
  12372. "properties": {
  12373. "location": {
  12374. "$ref": "#/components/schemas/LocationInfo"
  12375. },
  12376. "data": {
  12377. "$ref": "#/components/schemas/IntegrationAttemptStatus"
  12378. }
  12379. },
  12380. "required": ["location", "data"],
  12381. "additionalProperties": false
  12382. }
  12383. }
  12384. }
  12385. },
  12386. "400": {
  12387. "description": "InvalidRequestError",
  12388. "content": {
  12389. "application/json": {
  12390. "schema": {
  12391. "$ref": "#/components/schemas/InvalidRequestError"
  12392. }
  12393. }
  12394. }
  12395. },
  12396. "401": {
  12397. "description": "UnauthorizedError",
  12398. "content": {
  12399. "application/json": {
  12400. "schema": {
  12401. "$ref": "#/components/schemas/UnauthorizedError"
  12402. }
  12403. }
  12404. }
  12405. }
  12406. },
  12407. "description": "Poll the current status of an OAuth attempt.",
  12408. "summary": "Get OAuth attempt status",
  12409. "x-codeSamples": [
  12410. {
  12411. "lang": "js",
  12412. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  12413. }
  12414. ]
  12415. },
  12416. "delete": {
  12417. "tags": ["integrations"],
  12418. "operationId": "v2.integration.attempt.cancel",
  12419. "parameters": [
  12420. {
  12421. "name": "attemptID",
  12422. "in": "path",
  12423. "schema": {
  12424. "type": "string"
  12425. },
  12426. "required": true
  12427. },
  12428. {
  12429. "name": "location",
  12430. "in": "query",
  12431. "schema": {
  12432. "type": "object",
  12433. "properties": {
  12434. "directory": {
  12435. "type": "string"
  12436. },
  12437. "workspace": {
  12438. "type": "string"
  12439. }
  12440. },
  12441. "additionalProperties": false
  12442. },
  12443. "required": false,
  12444. "style": "deepObject",
  12445. "explode": true
  12446. }
  12447. ],
  12448. "security": [],
  12449. "responses": {
  12450. "204": {
  12451. "description": "<No Content>"
  12452. },
  12453. "400": {
  12454. "description": "InvalidRequestError",
  12455. "content": {
  12456. "application/json": {
  12457. "schema": {
  12458. "$ref": "#/components/schemas/InvalidRequestError"
  12459. }
  12460. }
  12461. }
  12462. },
  12463. "401": {
  12464. "description": "UnauthorizedError",
  12465. "content": {
  12466. "application/json": {
  12467. "schema": {
  12468. "$ref": "#/components/schemas/UnauthorizedError"
  12469. }
  12470. }
  12471. }
  12472. }
  12473. },
  12474. "description": "Cancel an OAuth attempt and release its resources.",
  12475. "summary": "Cancel OAuth connection",
  12476. "x-codeSamples": [
  12477. {
  12478. "lang": "js",
  12479. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  12480. }
  12481. ]
  12482. }
  12483. },
  12484. "/api/integration/attempt/{attemptID}/complete": {
  12485. "post": {
  12486. "tags": ["integrations"],
  12487. "operationId": "v2.integration.attempt.complete",
  12488. "parameters": [
  12489. {
  12490. "name": "attemptID",
  12491. "in": "path",
  12492. "schema": {
  12493. "type": "string"
  12494. },
  12495. "required": true
  12496. },
  12497. {
  12498. "name": "location",
  12499. "in": "query",
  12500. "schema": {
  12501. "type": "object",
  12502. "properties": {
  12503. "directory": {
  12504. "type": "string"
  12505. },
  12506. "workspace": {
  12507. "type": "string"
  12508. }
  12509. },
  12510. "additionalProperties": false
  12511. },
  12512. "required": false,
  12513. "style": "deepObject",
  12514. "explode": true
  12515. }
  12516. ],
  12517. "security": [],
  12518. "responses": {
  12519. "204": {
  12520. "description": "<No Content>"
  12521. },
  12522. "400": {
  12523. "description": "InvalidRequestError",
  12524. "content": {
  12525. "application/json": {
  12526. "schema": {
  12527. "anyOf": [
  12528. {
  12529. "$ref": "#/components/schemas/InvalidRequestError"
  12530. },
  12531. {
  12532. "$ref": "#/components/schemas/InvalidRequestError"
  12533. }
  12534. ]
  12535. }
  12536. }
  12537. }
  12538. },
  12539. "401": {
  12540. "description": "UnauthorizedError",
  12541. "content": {
  12542. "application/json": {
  12543. "schema": {
  12544. "$ref": "#/components/schemas/UnauthorizedError"
  12545. }
  12546. }
  12547. }
  12548. }
  12549. },
  12550. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  12551. "summary": "Complete OAuth connection",
  12552. "requestBody": {
  12553. "content": {
  12554. "application/json": {
  12555. "schema": {
  12556. "type": "object",
  12557. "properties": {
  12558. "code": {
  12559. "type": "string"
  12560. }
  12561. },
  12562. "additionalProperties": false
  12563. }
  12564. }
  12565. },
  12566. "required": true
  12567. },
  12568. "x-codeSamples": [
  12569. {
  12570. "lang": "js",
  12571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  12572. }
  12573. ]
  12574. }
  12575. },
  12576. "/api/credential/{credentialID}": {
  12577. "patch": {
  12578. "tags": ["opencode HttpApi"],
  12579. "operationId": "v2.credential.update",
  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": "Update a stored credential label.",
  12636. "summary": "Update credential",
  12637. "requestBody": {
  12638. "content": {
  12639. "application/json": {
  12640. "schema": {
  12641. "type": "object",
  12642. "properties": {
  12643. "label": {
  12644. "type": "string"
  12645. }
  12646. },
  12647. "required": ["label"],
  12648. "additionalProperties": false
  12649. }
  12650. }
  12651. },
  12652. "required": true
  12653. },
  12654. "x-codeSamples": [
  12655. {
  12656. "lang": "js",
  12657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12658. }
  12659. ]
  12660. },
  12661. "delete": {
  12662. "tags": ["opencode HttpApi"],
  12663. "operationId": "v2.credential.remove",
  12664. "parameters": [
  12665. {
  12666. "name": "credentialID",
  12667. "in": "path",
  12668. "schema": {
  12669. "type": "string"
  12670. },
  12671. "required": true
  12672. },
  12673. {
  12674. "name": "location",
  12675. "in": "query",
  12676. "schema": {
  12677. "type": "object",
  12678. "properties": {
  12679. "directory": {
  12680. "type": "string"
  12681. },
  12682. "workspace": {
  12683. "type": "string"
  12684. }
  12685. },
  12686. "additionalProperties": false
  12687. },
  12688. "required": false,
  12689. "style": "deepObject",
  12690. "explode": true
  12691. }
  12692. ],
  12693. "security": [],
  12694. "responses": {
  12695. "204": {
  12696. "description": "<No Content>"
  12697. },
  12698. "400": {
  12699. "description": "InvalidRequestError",
  12700. "content": {
  12701. "application/json": {
  12702. "schema": {
  12703. "$ref": "#/components/schemas/InvalidRequestError"
  12704. }
  12705. }
  12706. }
  12707. },
  12708. "401": {
  12709. "description": "UnauthorizedError",
  12710. "content": {
  12711. "application/json": {
  12712. "schema": {
  12713. "$ref": "#/components/schemas/UnauthorizedError"
  12714. }
  12715. }
  12716. }
  12717. }
  12718. },
  12719. "description": "Remove a stored integration credential.",
  12720. "summary": "Remove credential",
  12721. "x-codeSamples": [
  12722. {
  12723. "lang": "js",
  12724. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12725. }
  12726. ]
  12727. }
  12728. },
  12729. "/api/permission/request": {
  12730. "get": {
  12731. "tags": ["permissions"],
  12732. "operationId": "v2.permission.request.list",
  12733. "parameters": [
  12734. {
  12735. "name": "location",
  12736. "in": "query",
  12737. "schema": {
  12738. "type": "object",
  12739. "properties": {
  12740. "directory": {
  12741. "type": "string"
  12742. },
  12743. "workspace": {
  12744. "type": "string"
  12745. }
  12746. },
  12747. "additionalProperties": false
  12748. },
  12749. "required": false,
  12750. "style": "deepObject",
  12751. "explode": true
  12752. }
  12753. ],
  12754. "security": [],
  12755. "responses": {
  12756. "200": {
  12757. "description": "Success",
  12758. "content": {
  12759. "application/json": {
  12760. "schema": {
  12761. "type": "object",
  12762. "properties": {
  12763. "location": {
  12764. "$ref": "#/components/schemas/LocationInfo"
  12765. },
  12766. "data": {
  12767. "type": "array",
  12768. "items": {
  12769. "$ref": "#/components/schemas/PermissionV2Request"
  12770. }
  12771. }
  12772. },
  12773. "required": ["location", "data"],
  12774. "additionalProperties": false
  12775. }
  12776. }
  12777. }
  12778. },
  12779. "400": {
  12780. "description": "InvalidRequestError",
  12781. "content": {
  12782. "application/json": {
  12783. "schema": {
  12784. "$ref": "#/components/schemas/InvalidRequestError"
  12785. }
  12786. }
  12787. }
  12788. },
  12789. "401": {
  12790. "description": "UnauthorizedError",
  12791. "content": {
  12792. "application/json": {
  12793. "schema": {
  12794. "$ref": "#/components/schemas/UnauthorizedError"
  12795. }
  12796. }
  12797. }
  12798. }
  12799. },
  12800. "description": "Retrieve pending permission requests for a location.",
  12801. "summary": "List pending permission requests",
  12802. "x-codeSamples": [
  12803. {
  12804. "lang": "js",
  12805. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12806. }
  12807. ]
  12808. }
  12809. },
  12810. "/api/permission/saved": {
  12811. "get": {
  12812. "tags": ["permissions"],
  12813. "operationId": "v2.permission.saved.list",
  12814. "parameters": [
  12815. {
  12816. "name": "projectID",
  12817. "in": "query",
  12818. "schema": {
  12819. "type": "string"
  12820. },
  12821. "required": false
  12822. }
  12823. ],
  12824. "security": [],
  12825. "responses": {
  12826. "200": {
  12827. "description": "Success",
  12828. "content": {
  12829. "application/json": {
  12830. "schema": {
  12831. "type": "object",
  12832. "properties": {
  12833. "data": {
  12834. "type": "array",
  12835. "items": {
  12836. "$ref": "#/components/schemas/PermissionSavedInfo"
  12837. }
  12838. }
  12839. },
  12840. "required": ["data"],
  12841. "additionalProperties": false
  12842. }
  12843. }
  12844. }
  12845. },
  12846. "400": {
  12847. "description": "InvalidRequestError",
  12848. "content": {
  12849. "application/json": {
  12850. "schema": {
  12851. "$ref": "#/components/schemas/InvalidRequestError"
  12852. }
  12853. }
  12854. }
  12855. },
  12856. "401": {
  12857. "description": "UnauthorizedError",
  12858. "content": {
  12859. "application/json": {
  12860. "schema": {
  12861. "$ref": "#/components/schemas/UnauthorizedError"
  12862. }
  12863. }
  12864. }
  12865. }
  12866. },
  12867. "description": "Retrieve saved permissions, optionally filtered by project.",
  12868. "summary": "List saved permissions",
  12869. "x-codeSamples": [
  12870. {
  12871. "lang": "js",
  12872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12873. }
  12874. ]
  12875. }
  12876. },
  12877. "/api/permission/saved/{id}": {
  12878. "delete": {
  12879. "tags": ["permissions"],
  12880. "operationId": "v2.permission.saved.remove",
  12881. "parameters": [
  12882. {
  12883. "name": "id",
  12884. "in": "path",
  12885. "schema": {
  12886. "type": "string"
  12887. },
  12888. "required": true
  12889. }
  12890. ],
  12891. "security": [],
  12892. "responses": {
  12893. "204": {
  12894. "description": "<No Content>"
  12895. },
  12896. "400": {
  12897. "description": "InvalidRequestError",
  12898. "content": {
  12899. "application/json": {
  12900. "schema": {
  12901. "$ref": "#/components/schemas/InvalidRequestError"
  12902. }
  12903. }
  12904. }
  12905. },
  12906. "401": {
  12907. "description": "UnauthorizedError",
  12908. "content": {
  12909. "application/json": {
  12910. "schema": {
  12911. "$ref": "#/components/schemas/UnauthorizedError"
  12912. }
  12913. }
  12914. }
  12915. }
  12916. },
  12917. "description": "Remove a saved permission by ID.",
  12918. "summary": "Remove saved permission",
  12919. "x-codeSamples": [
  12920. {
  12921. "lang": "js",
  12922. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12923. }
  12924. ]
  12925. }
  12926. },
  12927. "/api/session/{sessionID}/permission": {
  12928. "post": {
  12929. "tags": ["permissions"],
  12930. "operationId": "v2.session.permission.create",
  12931. "parameters": [
  12932. {
  12933. "name": "sessionID",
  12934. "in": "path",
  12935. "schema": {
  12936. "type": "string",
  12937. "pattern": "^ses"
  12938. },
  12939. "required": true
  12940. }
  12941. ],
  12942. "security": [],
  12943. "responses": {
  12944. "200": {
  12945. "description": "Success",
  12946. "content": {
  12947. "application/json": {
  12948. "schema": {
  12949. "type": "object",
  12950. "properties": {
  12951. "data": {
  12952. "type": "object",
  12953. "properties": {
  12954. "id": {
  12955. "type": "string",
  12956. "pattern": "^per"
  12957. },
  12958. "effect": {
  12959. "$ref": "#/components/schemas/PermissionV2Effect"
  12960. }
  12961. },
  12962. "required": ["id", "effect"],
  12963. "additionalProperties": false
  12964. }
  12965. },
  12966. "required": ["data"],
  12967. "additionalProperties": false
  12968. }
  12969. }
  12970. }
  12971. },
  12972. "400": {
  12973. "description": "InvalidRequestError",
  12974. "content": {
  12975. "application/json": {
  12976. "schema": {
  12977. "$ref": "#/components/schemas/InvalidRequestError"
  12978. }
  12979. }
  12980. }
  12981. },
  12982. "401": {
  12983. "description": "UnauthorizedError",
  12984. "content": {
  12985. "application/json": {
  12986. "schema": {
  12987. "$ref": "#/components/schemas/UnauthorizedError"
  12988. }
  12989. }
  12990. }
  12991. },
  12992. "404": {
  12993. "description": "SessionNotFoundError",
  12994. "content": {
  12995. "application/json": {
  12996. "schema": {
  12997. "anyOf": [
  12998. {
  12999. "$ref": "#/components/schemas/SessionNotFoundError"
  13000. },
  13001. {
  13002. "$ref": "#/components/schemas/SessionNotFoundError"
  13003. }
  13004. ]
  13005. }
  13006. }
  13007. }
  13008. }
  13009. },
  13010. "description": "Evaluate and, when approval is required, create a permission request for a session.",
  13011. "summary": "Create permission request",
  13012. "requestBody": {
  13013. "content": {
  13014. "application/json": {
  13015. "schema": {
  13016. "type": "object",
  13017. "properties": {
  13018. "id": {
  13019. "type": "string",
  13020. "pattern": "^per"
  13021. },
  13022. "action": {
  13023. "type": "string"
  13024. },
  13025. "resources": {
  13026. "type": "array",
  13027. "items": {
  13028. "type": "string"
  13029. }
  13030. },
  13031. "save": {
  13032. "type": "array",
  13033. "items": {
  13034. "type": "string"
  13035. }
  13036. },
  13037. "metadata": {
  13038. "type": "object"
  13039. },
  13040. "source": {
  13041. "$ref": "#/components/schemas/PermissionV2Source"
  13042. },
  13043. "agent": {
  13044. "type": "string"
  13045. }
  13046. },
  13047. "required": ["action", "resources"],
  13048. "additionalProperties": false
  13049. }
  13050. }
  13051. },
  13052. "required": true
  13053. },
  13054. "x-codeSamples": [
  13055. {
  13056. "lang": "js",
  13057. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.create({\n ...\n})"
  13058. }
  13059. ]
  13060. },
  13061. "get": {
  13062. "tags": ["permissions"],
  13063. "operationId": "v2.session.permission.list",
  13064. "parameters": [
  13065. {
  13066. "name": "sessionID",
  13067. "in": "path",
  13068. "schema": {
  13069. "type": "string",
  13070. "pattern": "^ses"
  13071. },
  13072. "required": true
  13073. }
  13074. ],
  13075. "security": [],
  13076. "responses": {
  13077. "200": {
  13078. "description": "Success",
  13079. "content": {
  13080. "application/json": {
  13081. "schema": {
  13082. "type": "object",
  13083. "properties": {
  13084. "data": {
  13085. "type": "array",
  13086. "items": {
  13087. "$ref": "#/components/schemas/PermissionV2Request"
  13088. }
  13089. }
  13090. },
  13091. "required": ["data"],
  13092. "additionalProperties": false
  13093. }
  13094. }
  13095. }
  13096. },
  13097. "400": {
  13098. "description": "InvalidRequestError",
  13099. "content": {
  13100. "application/json": {
  13101. "schema": {
  13102. "$ref": "#/components/schemas/InvalidRequestError"
  13103. }
  13104. }
  13105. }
  13106. },
  13107. "401": {
  13108. "description": "UnauthorizedError",
  13109. "content": {
  13110. "application/json": {
  13111. "schema": {
  13112. "$ref": "#/components/schemas/UnauthorizedError"
  13113. }
  13114. }
  13115. }
  13116. },
  13117. "404": {
  13118. "description": "SessionNotFoundError",
  13119. "content": {
  13120. "application/json": {
  13121. "schema": {
  13122. "anyOf": [
  13123. {
  13124. "$ref": "#/components/schemas/SessionNotFoundError"
  13125. },
  13126. {
  13127. "$ref": "#/components/schemas/SessionNotFoundError"
  13128. }
  13129. ]
  13130. }
  13131. }
  13132. }
  13133. }
  13134. },
  13135. "description": "Retrieve pending permission requests owned by a session.",
  13136. "summary": "List session permission requests",
  13137. "x-codeSamples": [
  13138. {
  13139. "lang": "js",
  13140. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  13141. }
  13142. ]
  13143. }
  13144. },
  13145. "/api/session/{sessionID}/permission/{requestID}": {
  13146. "get": {
  13147. "tags": ["permissions"],
  13148. "operationId": "v2.session.permission.get",
  13149. "parameters": [
  13150. {
  13151. "name": "sessionID",
  13152. "in": "path",
  13153. "schema": {
  13154. "type": "string",
  13155. "pattern": "^ses"
  13156. },
  13157. "required": true
  13158. },
  13159. {
  13160. "name": "requestID",
  13161. "in": "path",
  13162. "schema": {
  13163. "type": "string",
  13164. "pattern": "^per"
  13165. },
  13166. "required": true
  13167. }
  13168. ],
  13169. "security": [],
  13170. "responses": {
  13171. "200": {
  13172. "description": "Success",
  13173. "content": {
  13174. "application/json": {
  13175. "schema": {
  13176. "type": "object",
  13177. "properties": {
  13178. "data": {
  13179. "$ref": "#/components/schemas/PermissionV2Request"
  13180. }
  13181. },
  13182. "required": ["data"],
  13183. "additionalProperties": false
  13184. }
  13185. }
  13186. }
  13187. },
  13188. "400": {
  13189. "description": "InvalidRequestError",
  13190. "content": {
  13191. "application/json": {
  13192. "schema": {
  13193. "$ref": "#/components/schemas/InvalidRequestError"
  13194. }
  13195. }
  13196. }
  13197. },
  13198. "401": {
  13199. "description": "UnauthorizedError",
  13200. "content": {
  13201. "application/json": {
  13202. "schema": {
  13203. "$ref": "#/components/schemas/UnauthorizedError"
  13204. }
  13205. }
  13206. }
  13207. },
  13208. "404": {
  13209. "description": "SessionNotFoundError | PermissionNotFoundError",
  13210. "content": {
  13211. "application/json": {
  13212. "schema": {
  13213. "anyOf": [
  13214. {
  13215. "$ref": "#/components/schemas/PermissionNotFoundError"
  13216. },
  13217. {
  13218. "$ref": "#/components/schemas/SessionNotFoundError"
  13219. },
  13220. {
  13221. "$ref": "#/components/schemas/SessionNotFoundError"
  13222. }
  13223. ]
  13224. }
  13225. }
  13226. }
  13227. }
  13228. },
  13229. "description": "Retrieve a pending permission request owned by a session.",
  13230. "summary": "Get permission request",
  13231. "x-codeSamples": [
  13232. {
  13233. "lang": "js",
  13234. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.get({\n ...\n})"
  13235. }
  13236. ]
  13237. }
  13238. },
  13239. "/api/session/{sessionID}/permission/{requestID}/reply": {
  13240. "post": {
  13241. "tags": ["permissions"],
  13242. "operationId": "v2.session.permission.reply",
  13243. "parameters": [
  13244. {
  13245. "name": "sessionID",
  13246. "in": "path",
  13247. "schema": {
  13248. "type": "string",
  13249. "pattern": "^ses"
  13250. },
  13251. "required": true
  13252. },
  13253. {
  13254. "name": "requestID",
  13255. "in": "path",
  13256. "schema": {
  13257. "type": "string",
  13258. "pattern": "^per"
  13259. },
  13260. "required": true
  13261. }
  13262. ],
  13263. "security": [],
  13264. "responses": {
  13265. "204": {
  13266. "description": "<No Content>"
  13267. },
  13268. "400": {
  13269. "description": "InvalidRequestError",
  13270. "content": {
  13271. "application/json": {
  13272. "schema": {
  13273. "$ref": "#/components/schemas/InvalidRequestError"
  13274. }
  13275. }
  13276. }
  13277. },
  13278. "401": {
  13279. "description": "UnauthorizedError",
  13280. "content": {
  13281. "application/json": {
  13282. "schema": {
  13283. "$ref": "#/components/schemas/UnauthorizedError"
  13284. }
  13285. }
  13286. }
  13287. },
  13288. "404": {
  13289. "description": "SessionNotFoundError | PermissionNotFoundError",
  13290. "content": {
  13291. "application/json": {
  13292. "schema": {
  13293. "anyOf": [
  13294. {
  13295. "$ref": "#/components/schemas/PermissionNotFoundError"
  13296. },
  13297. {
  13298. "$ref": "#/components/schemas/SessionNotFoundError"
  13299. },
  13300. {
  13301. "$ref": "#/components/schemas/SessionNotFoundError"
  13302. }
  13303. ]
  13304. }
  13305. }
  13306. }
  13307. }
  13308. },
  13309. "description": "Respond to a pending permission request owned by a session.",
  13310. "summary": "Reply to pending permission request",
  13311. "requestBody": {
  13312. "content": {
  13313. "application/json": {
  13314. "schema": {
  13315. "type": "object",
  13316. "properties": {
  13317. "reply": {
  13318. "$ref": "#/components/schemas/PermissionV2Reply"
  13319. },
  13320. "message": {
  13321. "type": "string"
  13322. }
  13323. },
  13324. "required": ["reply"],
  13325. "additionalProperties": false
  13326. }
  13327. }
  13328. },
  13329. "required": true
  13330. },
  13331. "x-codeSamples": [
  13332. {
  13333. "lang": "js",
  13334. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  13335. }
  13336. ]
  13337. }
  13338. },
  13339. "/api/fs/read/*": {
  13340. "get": {
  13341. "tags": ["filesystem"],
  13342. "operationId": "v2.fs.read",
  13343. "parameters": [
  13344. {
  13345. "name": "location",
  13346. "in": "query",
  13347. "schema": {
  13348. "type": "object",
  13349. "properties": {
  13350. "directory": {
  13351. "type": "string"
  13352. },
  13353. "workspace": {
  13354. "type": "string"
  13355. }
  13356. },
  13357. "additionalProperties": false
  13358. },
  13359. "required": false,
  13360. "style": "deepObject",
  13361. "explode": true
  13362. }
  13363. ],
  13364. "security": [],
  13365. "responses": {
  13366. "200": {
  13367. "description": "Success",
  13368. "content": {
  13369. "application/octet-stream": {
  13370. "schema": {
  13371. "type": "string",
  13372. "format": "binary"
  13373. }
  13374. }
  13375. }
  13376. },
  13377. "400": {
  13378. "description": "InvalidRequestError",
  13379. "content": {
  13380. "application/json": {
  13381. "schema": {
  13382. "$ref": "#/components/schemas/InvalidRequestError"
  13383. }
  13384. }
  13385. }
  13386. },
  13387. "401": {
  13388. "description": "UnauthorizedError",
  13389. "content": {
  13390. "application/json": {
  13391. "schema": {
  13392. "$ref": "#/components/schemas/UnauthorizedError"
  13393. }
  13394. }
  13395. }
  13396. }
  13397. },
  13398. "description": "Serve one file relative to the requested location.",
  13399. "summary": "Read file",
  13400. "x-codeSamples": [
  13401. {
  13402. "lang": "js",
  13403. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  13404. }
  13405. ]
  13406. }
  13407. },
  13408. "/api/fs/list": {
  13409. "get": {
  13410. "tags": ["filesystem"],
  13411. "operationId": "v2.fs.list",
  13412. "parameters": [
  13413. {
  13414. "name": "location",
  13415. "in": "query",
  13416. "schema": {
  13417. "type": "object",
  13418. "properties": {
  13419. "directory": {
  13420. "type": "string"
  13421. },
  13422. "workspace": {
  13423. "type": "string"
  13424. }
  13425. },
  13426. "additionalProperties": false
  13427. },
  13428. "required": false,
  13429. "style": "deepObject",
  13430. "explode": true
  13431. },
  13432. {
  13433. "name": "path",
  13434. "in": "query",
  13435. "schema": {
  13436. "type": "string"
  13437. },
  13438. "required": false
  13439. }
  13440. ],
  13441. "security": [],
  13442. "responses": {
  13443. "200": {
  13444. "description": "Success",
  13445. "content": {
  13446. "application/json": {
  13447. "schema": {
  13448. "type": "object",
  13449. "properties": {
  13450. "location": {
  13451. "$ref": "#/components/schemas/LocationInfo"
  13452. },
  13453. "data": {
  13454. "type": "array",
  13455. "items": {
  13456. "$ref": "#/components/schemas/FileSystemEntry"
  13457. }
  13458. }
  13459. },
  13460. "required": ["location", "data"],
  13461. "additionalProperties": false
  13462. }
  13463. }
  13464. }
  13465. },
  13466. "400": {
  13467. "description": "InvalidRequestError",
  13468. "content": {
  13469. "application/json": {
  13470. "schema": {
  13471. "$ref": "#/components/schemas/InvalidRequestError"
  13472. }
  13473. }
  13474. }
  13475. },
  13476. "401": {
  13477. "description": "UnauthorizedError",
  13478. "content": {
  13479. "application/json": {
  13480. "schema": {
  13481. "$ref": "#/components/schemas/UnauthorizedError"
  13482. }
  13483. }
  13484. }
  13485. }
  13486. },
  13487. "description": "List direct children of one directory relative to the requested location.",
  13488. "summary": "List directory",
  13489. "x-codeSamples": [
  13490. {
  13491. "lang": "js",
  13492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  13493. }
  13494. ]
  13495. }
  13496. },
  13497. "/api/fs/find": {
  13498. "get": {
  13499. "tags": ["filesystem"],
  13500. "operationId": "v2.fs.find",
  13501. "parameters": [
  13502. {
  13503. "name": "location",
  13504. "in": "query",
  13505. "schema": {
  13506. "type": "object",
  13507. "properties": {
  13508. "directory": {
  13509. "type": "string"
  13510. },
  13511. "workspace": {
  13512. "type": "string"
  13513. }
  13514. },
  13515. "additionalProperties": false
  13516. },
  13517. "required": false,
  13518. "style": "deepObject",
  13519. "explode": true
  13520. },
  13521. {
  13522. "name": "query",
  13523. "in": "query",
  13524. "schema": {
  13525. "type": "string"
  13526. },
  13527. "required": true
  13528. },
  13529. {
  13530. "name": "type",
  13531. "in": "query",
  13532. "schema": {
  13533. "type": "string",
  13534. "enum": ["file", "directory"]
  13535. },
  13536. "required": false
  13537. },
  13538. {
  13539. "name": "limit",
  13540. "in": "query",
  13541. "schema": {
  13542. "type": "string"
  13543. },
  13544. "required": false
  13545. }
  13546. ],
  13547. "security": [],
  13548. "responses": {
  13549. "200": {
  13550. "description": "Success",
  13551. "content": {
  13552. "application/json": {
  13553. "schema": {
  13554. "type": "object",
  13555. "properties": {
  13556. "location": {
  13557. "$ref": "#/components/schemas/LocationInfo"
  13558. },
  13559. "data": {
  13560. "type": "array",
  13561. "items": {
  13562. "$ref": "#/components/schemas/FileSystemEntry"
  13563. }
  13564. }
  13565. },
  13566. "required": ["location", "data"],
  13567. "additionalProperties": false
  13568. }
  13569. }
  13570. }
  13571. },
  13572. "400": {
  13573. "description": "InvalidRequestError",
  13574. "content": {
  13575. "application/json": {
  13576. "schema": {
  13577. "$ref": "#/components/schemas/InvalidRequestError"
  13578. }
  13579. }
  13580. }
  13581. },
  13582. "401": {
  13583. "description": "UnauthorizedError",
  13584. "content": {
  13585. "application/json": {
  13586. "schema": {
  13587. "$ref": "#/components/schemas/UnauthorizedError"
  13588. }
  13589. }
  13590. }
  13591. }
  13592. },
  13593. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  13594. "summary": "Find files",
  13595. "x-codeSamples": [
  13596. {
  13597. "lang": "js",
  13598. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  13599. }
  13600. ]
  13601. }
  13602. },
  13603. "/api/command": {
  13604. "get": {
  13605. "tags": ["commands"],
  13606. "operationId": "v2.command.list",
  13607. "parameters": [
  13608. {
  13609. "name": "location",
  13610. "in": "query",
  13611. "schema": {
  13612. "type": "object",
  13613. "properties": {
  13614. "directory": {
  13615. "type": "string"
  13616. },
  13617. "workspace": {
  13618. "type": "string"
  13619. }
  13620. },
  13621. "additionalProperties": false
  13622. },
  13623. "required": false,
  13624. "style": "deepObject",
  13625. "explode": true
  13626. }
  13627. ],
  13628. "security": [],
  13629. "responses": {
  13630. "200": {
  13631. "description": "Success",
  13632. "content": {
  13633. "application/json": {
  13634. "schema": {
  13635. "type": "object",
  13636. "properties": {
  13637. "location": {
  13638. "$ref": "#/components/schemas/LocationInfo"
  13639. },
  13640. "data": {
  13641. "type": "array",
  13642. "items": {
  13643. "$ref": "#/components/schemas/CommandV2Info"
  13644. }
  13645. }
  13646. },
  13647. "required": ["location", "data"],
  13648. "additionalProperties": false
  13649. }
  13650. }
  13651. }
  13652. },
  13653. "400": {
  13654. "description": "InvalidRequestError",
  13655. "content": {
  13656. "application/json": {
  13657. "schema": {
  13658. "$ref": "#/components/schemas/InvalidRequestError"
  13659. }
  13660. }
  13661. }
  13662. },
  13663. "401": {
  13664. "description": "UnauthorizedError",
  13665. "content": {
  13666. "application/json": {
  13667. "schema": {
  13668. "$ref": "#/components/schemas/UnauthorizedError"
  13669. }
  13670. }
  13671. }
  13672. }
  13673. },
  13674. "description": "Retrieve currently registered commands.",
  13675. "summary": "List commands",
  13676. "x-codeSamples": [
  13677. {
  13678. "lang": "js",
  13679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  13680. }
  13681. ]
  13682. }
  13683. },
  13684. "/api/skill": {
  13685. "get": {
  13686. "tags": ["skills"],
  13687. "operationId": "v2.skill.list",
  13688. "parameters": [
  13689. {
  13690. "name": "location",
  13691. "in": "query",
  13692. "schema": {
  13693. "type": "object",
  13694. "properties": {
  13695. "directory": {
  13696. "type": "string"
  13697. },
  13698. "workspace": {
  13699. "type": "string"
  13700. }
  13701. },
  13702. "additionalProperties": false
  13703. },
  13704. "required": false,
  13705. "style": "deepObject",
  13706. "explode": true
  13707. }
  13708. ],
  13709. "security": [],
  13710. "responses": {
  13711. "200": {
  13712. "description": "Success",
  13713. "content": {
  13714. "application/json": {
  13715. "schema": {
  13716. "type": "object",
  13717. "properties": {
  13718. "location": {
  13719. "$ref": "#/components/schemas/LocationInfo"
  13720. },
  13721. "data": {
  13722. "type": "array",
  13723. "items": {
  13724. "$ref": "#/components/schemas/SkillV2Info"
  13725. }
  13726. }
  13727. },
  13728. "required": ["location", "data"],
  13729. "additionalProperties": false
  13730. }
  13731. }
  13732. }
  13733. },
  13734. "400": {
  13735. "description": "InvalidRequestError",
  13736. "content": {
  13737. "application/json": {
  13738. "schema": {
  13739. "$ref": "#/components/schemas/InvalidRequestError"
  13740. }
  13741. }
  13742. }
  13743. },
  13744. "401": {
  13745. "description": "UnauthorizedError",
  13746. "content": {
  13747. "application/json": {
  13748. "schema": {
  13749. "$ref": "#/components/schemas/UnauthorizedError"
  13750. }
  13751. }
  13752. }
  13753. }
  13754. },
  13755. "description": "Retrieve currently registered skills.",
  13756. "summary": "List skills",
  13757. "x-codeSamples": [
  13758. {
  13759. "lang": "js",
  13760. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  13761. }
  13762. ]
  13763. }
  13764. },
  13765. "/api/event": {
  13766. "get": {
  13767. "tags": ["events"],
  13768. "operationId": "v2.event.subscribe",
  13769. "parameters": [],
  13770. "security": [],
  13771. "responses": {
  13772. "200": {
  13773. "description": "Event stream",
  13774. "content": {
  13775. "text/event-stream": {
  13776. "schema": {
  13777. "$ref": "#/components/schemas/V2Event"
  13778. }
  13779. }
  13780. }
  13781. },
  13782. "400": {
  13783. "description": "InvalidRequestError",
  13784. "content": {
  13785. "application/json": {
  13786. "schema": {
  13787. "$ref": "#/components/schemas/InvalidRequestError"
  13788. }
  13789. }
  13790. }
  13791. },
  13792. "401": {
  13793. "description": "UnauthorizedError",
  13794. "content": {
  13795. "application/json": {
  13796. "schema": {
  13797. "$ref": "#/components/schemas/UnauthorizedError"
  13798. }
  13799. }
  13800. }
  13801. }
  13802. },
  13803. "description": "Subscribe to native event payloads for the server.",
  13804. "summary": "Subscribe to events",
  13805. "x-codeSamples": [
  13806. {
  13807. "lang": "js",
  13808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13809. }
  13810. ]
  13811. }
  13812. },
  13813. "/api/pty": {
  13814. "get": {
  13815. "tags": ["pty"],
  13816. "operationId": "v2.pty.list",
  13817. "parameters": [
  13818. {
  13819. "name": "location",
  13820. "in": "query",
  13821. "schema": {
  13822. "type": "object",
  13823. "properties": {
  13824. "directory": {
  13825. "type": "string"
  13826. },
  13827. "workspace": {
  13828. "type": "string"
  13829. }
  13830. },
  13831. "additionalProperties": false
  13832. },
  13833. "required": false,
  13834. "style": "deepObject",
  13835. "explode": true
  13836. }
  13837. ],
  13838. "security": [],
  13839. "responses": {
  13840. "200": {
  13841. "description": "Success",
  13842. "content": {
  13843. "application/json": {
  13844. "schema": {
  13845. "type": "object",
  13846. "properties": {
  13847. "location": {
  13848. "$ref": "#/components/schemas/LocationInfo"
  13849. },
  13850. "data": {
  13851. "type": "array",
  13852. "items": {
  13853. "$ref": "#/components/schemas/Pty"
  13854. }
  13855. }
  13856. },
  13857. "required": ["location", "data"],
  13858. "additionalProperties": false
  13859. }
  13860. }
  13861. }
  13862. },
  13863. "400": {
  13864. "description": "InvalidRequestError",
  13865. "content": {
  13866. "application/json": {
  13867. "schema": {
  13868. "$ref": "#/components/schemas/InvalidRequestError"
  13869. }
  13870. }
  13871. }
  13872. },
  13873. "401": {
  13874. "description": "UnauthorizedError",
  13875. "content": {
  13876. "application/json": {
  13877. "schema": {
  13878. "$ref": "#/components/schemas/UnauthorizedError"
  13879. }
  13880. }
  13881. }
  13882. }
  13883. },
  13884. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13885. "summary": "List PTY sessions",
  13886. "x-codeSamples": [
  13887. {
  13888. "lang": "js",
  13889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13890. }
  13891. ]
  13892. },
  13893. "post": {
  13894. "tags": ["pty"],
  13895. "operationId": "v2.pty.create",
  13896. "parameters": [
  13897. {
  13898. "name": "location",
  13899. "in": "query",
  13900. "schema": {
  13901. "type": "object",
  13902. "properties": {
  13903. "directory": {
  13904. "type": "string"
  13905. },
  13906. "workspace": {
  13907. "type": "string"
  13908. }
  13909. },
  13910. "additionalProperties": false
  13911. },
  13912. "required": false,
  13913. "style": "deepObject",
  13914. "explode": true
  13915. }
  13916. ],
  13917. "security": [],
  13918. "responses": {
  13919. "200": {
  13920. "description": "Success",
  13921. "content": {
  13922. "application/json": {
  13923. "schema": {
  13924. "type": "object",
  13925. "properties": {
  13926. "location": {
  13927. "$ref": "#/components/schemas/LocationInfo"
  13928. },
  13929. "data": {
  13930. "$ref": "#/components/schemas/Pty"
  13931. }
  13932. },
  13933. "required": ["location", "data"],
  13934. "additionalProperties": false
  13935. }
  13936. }
  13937. }
  13938. },
  13939. "400": {
  13940. "description": "InvalidRequestError",
  13941. "content": {
  13942. "application/json": {
  13943. "schema": {
  13944. "$ref": "#/components/schemas/InvalidRequestError"
  13945. }
  13946. }
  13947. }
  13948. },
  13949. "401": {
  13950. "description": "UnauthorizedError",
  13951. "content": {
  13952. "application/json": {
  13953. "schema": {
  13954. "$ref": "#/components/schemas/UnauthorizedError"
  13955. }
  13956. }
  13957. }
  13958. }
  13959. },
  13960. "description": "Create a pseudo-terminal session for a location.",
  13961. "summary": "Create PTY session",
  13962. "requestBody": {
  13963. "content": {
  13964. "application/json": {
  13965. "schema": {
  13966. "type": "object",
  13967. "properties": {
  13968. "command": {
  13969. "type": "string"
  13970. },
  13971. "args": {
  13972. "type": "array",
  13973. "items": {
  13974. "type": "string"
  13975. }
  13976. },
  13977. "cwd": {
  13978. "type": "string"
  13979. },
  13980. "title": {
  13981. "type": "string"
  13982. },
  13983. "env": {
  13984. "type": "object",
  13985. "additionalProperties": {
  13986. "type": "string"
  13987. }
  13988. }
  13989. },
  13990. "additionalProperties": false
  13991. }
  13992. }
  13993. },
  13994. "required": true
  13995. },
  13996. "x-codeSamples": [
  13997. {
  13998. "lang": "js",
  13999. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  14000. }
  14001. ]
  14002. }
  14003. },
  14004. "/api/pty/{ptyID}": {
  14005. "get": {
  14006. "tags": ["pty"],
  14007. "operationId": "v2.pty.get",
  14008. "parameters": [
  14009. {
  14010. "name": "ptyID",
  14011. "in": "path",
  14012. "schema": {
  14013. "type": "string",
  14014. "pattern": "^pty"
  14015. },
  14016. "required": true
  14017. },
  14018. {
  14019. "name": "location",
  14020. "in": "query",
  14021. "schema": {
  14022. "type": "object",
  14023. "properties": {
  14024. "directory": {
  14025. "type": "string"
  14026. },
  14027. "workspace": {
  14028. "type": "string"
  14029. }
  14030. },
  14031. "additionalProperties": false
  14032. },
  14033. "required": false,
  14034. "style": "deepObject",
  14035. "explode": true
  14036. }
  14037. ],
  14038. "security": [],
  14039. "responses": {
  14040. "200": {
  14041. "description": "Success",
  14042. "content": {
  14043. "application/json": {
  14044. "schema": {
  14045. "type": "object",
  14046. "properties": {
  14047. "location": {
  14048. "$ref": "#/components/schemas/LocationInfo"
  14049. },
  14050. "data": {
  14051. "$ref": "#/components/schemas/Pty"
  14052. }
  14053. },
  14054. "required": ["location", "data"],
  14055. "additionalProperties": false
  14056. }
  14057. }
  14058. }
  14059. },
  14060. "400": {
  14061. "description": "InvalidRequestError",
  14062. "content": {
  14063. "application/json": {
  14064. "schema": {
  14065. "$ref": "#/components/schemas/InvalidRequestError"
  14066. }
  14067. }
  14068. }
  14069. },
  14070. "401": {
  14071. "description": "UnauthorizedError",
  14072. "content": {
  14073. "application/json": {
  14074. "schema": {
  14075. "$ref": "#/components/schemas/UnauthorizedError"
  14076. }
  14077. }
  14078. }
  14079. },
  14080. "404": {
  14081. "description": "PtyNotFoundError",
  14082. "content": {
  14083. "application/json": {
  14084. "schema": {
  14085. "$ref": "#/components/schemas/PtyNotFoundError"
  14086. }
  14087. }
  14088. }
  14089. }
  14090. },
  14091. "description": "Get one PTY session, including its exit code once exited.",
  14092. "summary": "Get PTY session",
  14093. "x-codeSamples": [
  14094. {
  14095. "lang": "js",
  14096. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  14097. }
  14098. ]
  14099. },
  14100. "put": {
  14101. "tags": ["pty"],
  14102. "operationId": "v2.pty.update",
  14103. "parameters": [
  14104. {
  14105. "name": "ptyID",
  14106. "in": "path",
  14107. "schema": {
  14108. "type": "string",
  14109. "pattern": "^pty"
  14110. },
  14111. "required": true
  14112. },
  14113. {
  14114. "name": "location",
  14115. "in": "query",
  14116. "schema": {
  14117. "type": "object",
  14118. "properties": {
  14119. "directory": {
  14120. "type": "string"
  14121. },
  14122. "workspace": {
  14123. "type": "string"
  14124. }
  14125. },
  14126. "additionalProperties": false
  14127. },
  14128. "required": false,
  14129. "style": "deepObject",
  14130. "explode": true
  14131. }
  14132. ],
  14133. "security": [],
  14134. "responses": {
  14135. "200": {
  14136. "description": "Success",
  14137. "content": {
  14138. "application/json": {
  14139. "schema": {
  14140. "type": "object",
  14141. "properties": {
  14142. "location": {
  14143. "$ref": "#/components/schemas/LocationInfo"
  14144. },
  14145. "data": {
  14146. "$ref": "#/components/schemas/Pty"
  14147. }
  14148. },
  14149. "required": ["location", "data"],
  14150. "additionalProperties": false
  14151. }
  14152. }
  14153. }
  14154. },
  14155. "400": {
  14156. "description": "InvalidRequestError",
  14157. "content": {
  14158. "application/json": {
  14159. "schema": {
  14160. "$ref": "#/components/schemas/InvalidRequestError"
  14161. }
  14162. }
  14163. }
  14164. },
  14165. "401": {
  14166. "description": "UnauthorizedError",
  14167. "content": {
  14168. "application/json": {
  14169. "schema": {
  14170. "$ref": "#/components/schemas/UnauthorizedError"
  14171. }
  14172. }
  14173. }
  14174. },
  14175. "404": {
  14176. "description": "PtyNotFoundError",
  14177. "content": {
  14178. "application/json": {
  14179. "schema": {
  14180. "$ref": "#/components/schemas/PtyNotFoundError"
  14181. }
  14182. }
  14183. }
  14184. }
  14185. },
  14186. "description": "Update the title or viewport size of one PTY session.",
  14187. "summary": "Update PTY session",
  14188. "requestBody": {
  14189. "content": {
  14190. "application/json": {
  14191. "schema": {
  14192. "type": "object",
  14193. "properties": {
  14194. "title": {
  14195. "type": "string"
  14196. },
  14197. "size": {
  14198. "type": "object",
  14199. "properties": {
  14200. "rows": {
  14201. "type": "integer",
  14202. "exclusiveMinimum": 0
  14203. },
  14204. "cols": {
  14205. "type": "integer",
  14206. "exclusiveMinimum": 0
  14207. }
  14208. },
  14209. "required": ["rows", "cols"],
  14210. "additionalProperties": false
  14211. }
  14212. },
  14213. "additionalProperties": false
  14214. }
  14215. }
  14216. },
  14217. "required": true
  14218. },
  14219. "x-codeSamples": [
  14220. {
  14221. "lang": "js",
  14222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  14223. }
  14224. ]
  14225. },
  14226. "delete": {
  14227. "tags": ["pty"],
  14228. "operationId": "v2.pty.remove",
  14229. "parameters": [
  14230. {
  14231. "name": "ptyID",
  14232. "in": "path",
  14233. "schema": {
  14234. "type": "string",
  14235. "pattern": "^pty"
  14236. },
  14237. "required": true
  14238. },
  14239. {
  14240. "name": "location",
  14241. "in": "query",
  14242. "schema": {
  14243. "type": "object",
  14244. "properties": {
  14245. "directory": {
  14246. "type": "string"
  14247. },
  14248. "workspace": {
  14249. "type": "string"
  14250. }
  14251. },
  14252. "additionalProperties": false
  14253. },
  14254. "required": false,
  14255. "style": "deepObject",
  14256. "explode": true
  14257. }
  14258. ],
  14259. "security": [],
  14260. "responses": {
  14261. "204": {
  14262. "description": "<No Content>"
  14263. },
  14264. "400": {
  14265. "description": "InvalidRequestError",
  14266. "content": {
  14267. "application/json": {
  14268. "schema": {
  14269. "$ref": "#/components/schemas/InvalidRequestError"
  14270. }
  14271. }
  14272. }
  14273. },
  14274. "401": {
  14275. "description": "UnauthorizedError",
  14276. "content": {
  14277. "application/json": {
  14278. "schema": {
  14279. "$ref": "#/components/schemas/UnauthorizedError"
  14280. }
  14281. }
  14282. }
  14283. },
  14284. "404": {
  14285. "description": "PtyNotFoundError",
  14286. "content": {
  14287. "application/json": {
  14288. "schema": {
  14289. "$ref": "#/components/schemas/PtyNotFoundError"
  14290. }
  14291. }
  14292. }
  14293. }
  14294. },
  14295. "description": "Terminate and remove one PTY session.",
  14296. "summary": "Remove PTY session",
  14297. "x-codeSamples": [
  14298. {
  14299. "lang": "js",
  14300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  14301. }
  14302. ]
  14303. }
  14304. },
  14305. "/api/pty/{ptyID}/connect-token": {
  14306. "post": {
  14307. "tags": ["pty"],
  14308. "operationId": "v2.pty.connectToken",
  14309. "parameters": [
  14310. {
  14311. "name": "ptyID",
  14312. "in": "path",
  14313. "schema": {
  14314. "type": "string",
  14315. "pattern": "^pty"
  14316. },
  14317. "required": true
  14318. },
  14319. {
  14320. "name": "location",
  14321. "in": "query",
  14322. "schema": {
  14323. "type": "object",
  14324. "properties": {
  14325. "directory": {
  14326. "type": "string"
  14327. },
  14328. "workspace": {
  14329. "type": "string"
  14330. }
  14331. },
  14332. "additionalProperties": false
  14333. },
  14334. "required": false,
  14335. "style": "deepObject",
  14336. "explode": true
  14337. }
  14338. ],
  14339. "security": [],
  14340. "responses": {
  14341. "200": {
  14342. "description": "Success",
  14343. "content": {
  14344. "application/json": {
  14345. "schema": {
  14346. "type": "object",
  14347. "properties": {
  14348. "location": {
  14349. "$ref": "#/components/schemas/LocationInfo"
  14350. },
  14351. "data": {
  14352. "$ref": "#/components/schemas/PtyTicketConnectToken"
  14353. }
  14354. },
  14355. "required": ["location", "data"],
  14356. "additionalProperties": false
  14357. }
  14358. }
  14359. }
  14360. },
  14361. "400": {
  14362. "description": "InvalidRequestError",
  14363. "content": {
  14364. "application/json": {
  14365. "schema": {
  14366. "$ref": "#/components/schemas/InvalidRequestError"
  14367. }
  14368. }
  14369. }
  14370. },
  14371. "401": {
  14372. "description": "UnauthorizedError",
  14373. "content": {
  14374. "application/json": {
  14375. "schema": {
  14376. "$ref": "#/components/schemas/UnauthorizedError"
  14377. }
  14378. }
  14379. }
  14380. },
  14381. "403": {
  14382. "description": "ForbiddenError",
  14383. "content": {
  14384. "application/json": {
  14385. "schema": {
  14386. "$ref": "#/components/schemas/ForbiddenError"
  14387. }
  14388. }
  14389. }
  14390. },
  14391. "404": {
  14392. "description": "PtyNotFoundError",
  14393. "content": {
  14394. "application/json": {
  14395. "schema": {
  14396. "$ref": "#/components/schemas/PtyNotFoundError"
  14397. }
  14398. }
  14399. }
  14400. }
  14401. },
  14402. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  14403. "summary": "Create PTY WebSocket token",
  14404. "x-codeSamples": [
  14405. {
  14406. "lang": "js",
  14407. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  14408. }
  14409. ]
  14410. }
  14411. },
  14412. "/api/pty/{ptyID}/connect": {
  14413. "get": {
  14414. "tags": ["pty"],
  14415. "operationId": "v2.pty.connect",
  14416. "parameters": [
  14417. {
  14418. "name": "ptyID",
  14419. "in": "path",
  14420. "schema": {
  14421. "type": "string",
  14422. "pattern": "^pty"
  14423. },
  14424. "required": true
  14425. },
  14426. {
  14427. "in": "query",
  14428. "name": "location[directory]",
  14429. "schema": {
  14430. "type": "string"
  14431. }
  14432. },
  14433. {
  14434. "in": "query",
  14435. "name": "location[workspace]",
  14436. "schema": {
  14437. "type": "string"
  14438. }
  14439. },
  14440. {
  14441. "in": "query",
  14442. "name": "cursor",
  14443. "schema": {
  14444. "type": "string"
  14445. }
  14446. },
  14447. {
  14448. "in": "query",
  14449. "name": "ticket",
  14450. "schema": {
  14451. "type": "string"
  14452. }
  14453. }
  14454. ],
  14455. "security": [],
  14456. "responses": {
  14457. "200": {
  14458. "description": "Success",
  14459. "content": {
  14460. "application/json": {
  14461. "schema": {
  14462. "type": "boolean"
  14463. }
  14464. }
  14465. }
  14466. },
  14467. "400": {
  14468. "description": "InvalidRequestError",
  14469. "content": {
  14470. "application/json": {
  14471. "schema": {
  14472. "$ref": "#/components/schemas/InvalidRequestError"
  14473. }
  14474. }
  14475. }
  14476. },
  14477. "401": {
  14478. "description": "UnauthorizedError",
  14479. "content": {
  14480. "application/json": {
  14481. "schema": {
  14482. "$ref": "#/components/schemas/UnauthorizedError"
  14483. }
  14484. }
  14485. }
  14486. },
  14487. "403": {
  14488. "description": "ForbiddenError",
  14489. "content": {
  14490. "application/json": {
  14491. "schema": {
  14492. "$ref": "#/components/schemas/ForbiddenError"
  14493. }
  14494. }
  14495. }
  14496. },
  14497. "404": {
  14498. "description": "PtyNotFoundError",
  14499. "content": {
  14500. "application/json": {
  14501. "schema": {
  14502. "$ref": "#/components/schemas/PtyNotFoundError"
  14503. }
  14504. }
  14505. }
  14506. }
  14507. },
  14508. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  14509. "summary": "Connect to PTY session",
  14510. "x-codeSamples": [
  14511. {
  14512. "lang": "js",
  14513. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14514. }
  14515. ]
  14516. }
  14517. },
  14518. "/api/question/request": {
  14519. "get": {
  14520. "tags": ["session questions"],
  14521. "operationId": "v2.question.request.list",
  14522. "parameters": [
  14523. {
  14524. "name": "location",
  14525. "in": "query",
  14526. "schema": {
  14527. "type": "object",
  14528. "properties": {
  14529. "directory": {
  14530. "type": "string"
  14531. },
  14532. "workspace": {
  14533. "type": "string"
  14534. }
  14535. },
  14536. "additionalProperties": false
  14537. },
  14538. "required": false,
  14539. "style": "deepObject",
  14540. "explode": true
  14541. }
  14542. ],
  14543. "security": [],
  14544. "responses": {
  14545. "200": {
  14546. "description": "Success",
  14547. "content": {
  14548. "application/json": {
  14549. "schema": {
  14550. "type": "object",
  14551. "properties": {
  14552. "location": {
  14553. "$ref": "#/components/schemas/LocationInfo"
  14554. },
  14555. "data": {
  14556. "type": "array",
  14557. "items": {
  14558. "$ref": "#/components/schemas/QuestionV2Request"
  14559. }
  14560. }
  14561. },
  14562. "required": ["location", "data"],
  14563. "additionalProperties": false
  14564. }
  14565. }
  14566. }
  14567. },
  14568. "400": {
  14569. "description": "InvalidRequestError",
  14570. "content": {
  14571. "application/json": {
  14572. "schema": {
  14573. "$ref": "#/components/schemas/InvalidRequestError"
  14574. }
  14575. }
  14576. }
  14577. },
  14578. "401": {
  14579. "description": "UnauthorizedError",
  14580. "content": {
  14581. "application/json": {
  14582. "schema": {
  14583. "$ref": "#/components/schemas/UnauthorizedError"
  14584. }
  14585. }
  14586. }
  14587. }
  14588. },
  14589. "description": "Retrieve pending question requests for a location.",
  14590. "summary": "List pending question requests",
  14591. "x-codeSamples": [
  14592. {
  14593. "lang": "js",
  14594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14595. }
  14596. ]
  14597. }
  14598. },
  14599. "/api/session/{sessionID}/question": {
  14600. "get": {
  14601. "tags": ["session questions"],
  14602. "operationId": "v2.session.question.list",
  14603. "parameters": [
  14604. {
  14605. "name": "sessionID",
  14606. "in": "path",
  14607. "schema": {
  14608. "type": "string",
  14609. "pattern": "^ses"
  14610. },
  14611. "required": true
  14612. }
  14613. ],
  14614. "security": [],
  14615. "responses": {
  14616. "200": {
  14617. "description": "Success",
  14618. "content": {
  14619. "application/json": {
  14620. "schema": {
  14621. "type": "object",
  14622. "properties": {
  14623. "data": {
  14624. "type": "array",
  14625. "items": {
  14626. "$ref": "#/components/schemas/QuestionV2Request"
  14627. }
  14628. }
  14629. },
  14630. "required": ["data"],
  14631. "additionalProperties": false
  14632. }
  14633. }
  14634. }
  14635. },
  14636. "400": {
  14637. "description": "InvalidRequestError",
  14638. "content": {
  14639. "application/json": {
  14640. "schema": {
  14641. "$ref": "#/components/schemas/InvalidRequestError"
  14642. }
  14643. }
  14644. }
  14645. },
  14646. "401": {
  14647. "description": "UnauthorizedError",
  14648. "content": {
  14649. "application/json": {
  14650. "schema": {
  14651. "$ref": "#/components/schemas/UnauthorizedError"
  14652. }
  14653. }
  14654. }
  14655. },
  14656. "404": {
  14657. "description": "SessionNotFoundError",
  14658. "content": {
  14659. "application/json": {
  14660. "schema": {
  14661. "anyOf": [
  14662. {
  14663. "$ref": "#/components/schemas/SessionNotFoundError"
  14664. },
  14665. {
  14666. "$ref": "#/components/schemas/SessionNotFoundError"
  14667. }
  14668. ]
  14669. }
  14670. }
  14671. }
  14672. }
  14673. },
  14674. "description": "Retrieve pending question requests owned by a session.",
  14675. "summary": "List session question requests",
  14676. "x-codeSamples": [
  14677. {
  14678. "lang": "js",
  14679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14680. }
  14681. ]
  14682. }
  14683. },
  14684. "/api/session/{sessionID}/question/{requestID}/reply": {
  14685. "post": {
  14686. "tags": ["session questions"],
  14687. "operationId": "v2.session.question.reply",
  14688. "parameters": [
  14689. {
  14690. "name": "sessionID",
  14691. "in": "path",
  14692. "schema": {
  14693. "type": "string",
  14694. "pattern": "^ses"
  14695. },
  14696. "required": true
  14697. },
  14698. {
  14699. "name": "requestID",
  14700. "in": "path",
  14701. "schema": {
  14702. "type": "string",
  14703. "pattern": "^que"
  14704. },
  14705. "required": true
  14706. }
  14707. ],
  14708. "security": [],
  14709. "responses": {
  14710. "204": {
  14711. "description": "<No Content>"
  14712. },
  14713. "400": {
  14714. "description": "InvalidRequestError",
  14715. "content": {
  14716. "application/json": {
  14717. "schema": {
  14718. "$ref": "#/components/schemas/InvalidRequestError"
  14719. }
  14720. }
  14721. }
  14722. },
  14723. "401": {
  14724. "description": "UnauthorizedError",
  14725. "content": {
  14726. "application/json": {
  14727. "schema": {
  14728. "$ref": "#/components/schemas/UnauthorizedError"
  14729. }
  14730. }
  14731. }
  14732. },
  14733. "404": {
  14734. "description": "SessionNotFoundError | QuestionNotFoundError",
  14735. "content": {
  14736. "application/json": {
  14737. "schema": {
  14738. "anyOf": [
  14739. {
  14740. "$ref": "#/components/schemas/QuestionNotFoundError"
  14741. },
  14742. {
  14743. "$ref": "#/components/schemas/SessionNotFoundError"
  14744. },
  14745. {
  14746. "$ref": "#/components/schemas/SessionNotFoundError"
  14747. }
  14748. ]
  14749. }
  14750. }
  14751. }
  14752. }
  14753. },
  14754. "description": "Answer a pending question request owned by a session.",
  14755. "summary": "Reply to pending question request",
  14756. "requestBody": {
  14757. "content": {
  14758. "application/json": {
  14759. "schema": {
  14760. "$ref": "#/components/schemas/QuestionV2Reply"
  14761. }
  14762. }
  14763. },
  14764. "required": true
  14765. },
  14766. "x-codeSamples": [
  14767. {
  14768. "lang": "js",
  14769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14770. }
  14771. ]
  14772. }
  14773. },
  14774. "/api/session/{sessionID}/question/{requestID}/reject": {
  14775. "post": {
  14776. "tags": ["session questions"],
  14777. "operationId": "v2.session.question.reject",
  14778. "parameters": [
  14779. {
  14780. "name": "sessionID",
  14781. "in": "path",
  14782. "schema": {
  14783. "type": "string",
  14784. "pattern": "^ses"
  14785. },
  14786. "required": true
  14787. },
  14788. {
  14789. "name": "requestID",
  14790. "in": "path",
  14791. "schema": {
  14792. "type": "string",
  14793. "pattern": "^que"
  14794. },
  14795. "required": true
  14796. }
  14797. ],
  14798. "security": [],
  14799. "responses": {
  14800. "204": {
  14801. "description": "<No Content>"
  14802. },
  14803. "400": {
  14804. "description": "InvalidRequestError",
  14805. "content": {
  14806. "application/json": {
  14807. "schema": {
  14808. "$ref": "#/components/schemas/InvalidRequestError"
  14809. }
  14810. }
  14811. }
  14812. },
  14813. "401": {
  14814. "description": "UnauthorizedError",
  14815. "content": {
  14816. "application/json": {
  14817. "schema": {
  14818. "$ref": "#/components/schemas/UnauthorizedError"
  14819. }
  14820. }
  14821. }
  14822. },
  14823. "404": {
  14824. "description": "SessionNotFoundError | QuestionNotFoundError",
  14825. "content": {
  14826. "application/json": {
  14827. "schema": {
  14828. "anyOf": [
  14829. {
  14830. "$ref": "#/components/schemas/QuestionNotFoundError"
  14831. },
  14832. {
  14833. "$ref": "#/components/schemas/SessionNotFoundError"
  14834. },
  14835. {
  14836. "$ref": "#/components/schemas/SessionNotFoundError"
  14837. }
  14838. ]
  14839. }
  14840. }
  14841. }
  14842. }
  14843. },
  14844. "description": "Reject a pending question request owned by a session.",
  14845. "summary": "Reject pending question request",
  14846. "x-codeSamples": [
  14847. {
  14848. "lang": "js",
  14849. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14850. }
  14851. ]
  14852. }
  14853. },
  14854. "/api/reference": {
  14855. "get": {
  14856. "tags": ["reference"],
  14857. "operationId": "v2.reference.list",
  14858. "parameters": [
  14859. {
  14860. "name": "location",
  14861. "in": "query",
  14862. "schema": {
  14863. "type": "object",
  14864. "properties": {
  14865. "directory": {
  14866. "type": "string"
  14867. },
  14868. "workspace": {
  14869. "type": "string"
  14870. }
  14871. },
  14872. "additionalProperties": false
  14873. },
  14874. "required": false,
  14875. "style": "deepObject",
  14876. "explode": true
  14877. }
  14878. ],
  14879. "security": [],
  14880. "responses": {
  14881. "200": {
  14882. "description": "Success",
  14883. "content": {
  14884. "application/json": {
  14885. "schema": {
  14886. "type": "object",
  14887. "properties": {
  14888. "location": {
  14889. "$ref": "#/components/schemas/LocationInfo"
  14890. },
  14891. "data": {
  14892. "type": "array",
  14893. "items": {
  14894. "$ref": "#/components/schemas/ReferenceInfo"
  14895. }
  14896. }
  14897. },
  14898. "required": ["location", "data"],
  14899. "additionalProperties": false
  14900. }
  14901. }
  14902. }
  14903. },
  14904. "400": {
  14905. "description": "InvalidRequestError",
  14906. "content": {
  14907. "application/json": {
  14908. "schema": {
  14909. "$ref": "#/components/schemas/InvalidRequestError"
  14910. }
  14911. }
  14912. }
  14913. },
  14914. "401": {
  14915. "description": "UnauthorizedError",
  14916. "content": {
  14917. "application/json": {
  14918. "schema": {
  14919. "$ref": "#/components/schemas/UnauthorizedError"
  14920. }
  14921. }
  14922. }
  14923. }
  14924. },
  14925. "description": "List references available in the requested location.",
  14926. "summary": "List references",
  14927. "x-codeSamples": [
  14928. {
  14929. "lang": "js",
  14930. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14931. }
  14932. ]
  14933. }
  14934. },
  14935. "/experimental/project/{projectID}/copy": {
  14936. "post": {
  14937. "tags": ["projectCopy"],
  14938. "operationId": "v2.projectCopy.create",
  14939. "parameters": [
  14940. {
  14941. "name": "projectID",
  14942. "in": "path",
  14943. "schema": {
  14944. "type": "string"
  14945. },
  14946. "required": true
  14947. },
  14948. {
  14949. "name": "location",
  14950. "in": "query",
  14951. "schema": {
  14952. "type": "object",
  14953. "properties": {
  14954. "directory": {
  14955. "type": "string"
  14956. },
  14957. "workspace": {
  14958. "type": "string"
  14959. }
  14960. },
  14961. "additionalProperties": false
  14962. },
  14963. "required": false,
  14964. "style": "deepObject",
  14965. "explode": true
  14966. }
  14967. ],
  14968. "responses": {
  14969. "200": {
  14970. "description": "ProjectCopy.Copy",
  14971. "content": {
  14972. "application/json": {
  14973. "schema": {
  14974. "$ref": "#/components/schemas/ProjectCopyCopy"
  14975. }
  14976. }
  14977. }
  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. "strategy": {
  15004. "type": "string"
  15005. },
  15006. "directory": {
  15007. "type": "string"
  15008. },
  15009. "name": {
  15010. "type": "string"
  15011. }
  15012. },
  15013. "required": ["strategy", "directory"],
  15014. "additionalProperties": false
  15015. }
  15016. }
  15017. }
  15018. },
  15019. "x-codeSamples": [
  15020. {
  15021. "lang": "js",
  15022. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  15023. }
  15024. ]
  15025. },
  15026. "delete": {
  15027. "tags": ["projectCopy"],
  15028. "operationId": "v2.projectCopy.remove",
  15029. "parameters": [
  15030. {
  15031. "name": "projectID",
  15032. "in": "path",
  15033. "schema": {
  15034. "type": "string"
  15035. },
  15036. "required": true
  15037. },
  15038. {
  15039. "name": "location",
  15040. "in": "query",
  15041. "schema": {
  15042. "type": "object",
  15043. "properties": {
  15044. "directory": {
  15045. "type": "string"
  15046. },
  15047. "workspace": {
  15048. "type": "string"
  15049. }
  15050. },
  15051. "additionalProperties": false
  15052. },
  15053. "required": false,
  15054. "style": "deepObject",
  15055. "explode": true
  15056. }
  15057. ],
  15058. "responses": {
  15059. "204": {
  15060. "description": "<No Content>"
  15061. },
  15062. "400": {
  15063. "description": "ProjectCopyError | InvalidRequestError",
  15064. "content": {
  15065. "application/json": {
  15066. "schema": {
  15067. "anyOf": [
  15068. {
  15069. "$ref": "#/components/schemas/ProjectCopyError"
  15070. },
  15071. {
  15072. "$ref": "#/components/schemas/InvalidRequestError"
  15073. }
  15074. ]
  15075. }
  15076. }
  15077. }
  15078. }
  15079. },
  15080. "requestBody": {
  15081. "content": {
  15082. "application/json": {
  15083. "schema": {
  15084. "type": "object",
  15085. "properties": {
  15086. "directory": {
  15087. "type": "string"
  15088. },
  15089. "force": {
  15090. "type": "boolean"
  15091. }
  15092. },
  15093. "required": ["directory", "force"],
  15094. "additionalProperties": false
  15095. }
  15096. }
  15097. }
  15098. },
  15099. "x-codeSamples": [
  15100. {
  15101. "lang": "js",
  15102. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  15103. }
  15104. ]
  15105. }
  15106. },
  15107. "/experimental/project/{projectID}/copy/refresh": {
  15108. "post": {
  15109. "tags": ["projectCopy"],
  15110. "operationId": "v2.projectCopy.refresh",
  15111. "parameters": [
  15112. {
  15113. "name": "projectID",
  15114. "in": "path",
  15115. "schema": {
  15116. "type": "string"
  15117. },
  15118. "required": true
  15119. },
  15120. {
  15121. "name": "location",
  15122. "in": "query",
  15123. "schema": {
  15124. "type": "object",
  15125. "properties": {
  15126. "directory": {
  15127. "type": "string"
  15128. },
  15129. "workspace": {
  15130. "type": "string"
  15131. }
  15132. },
  15133. "additionalProperties": false
  15134. },
  15135. "required": false,
  15136. "style": "deepObject",
  15137. "explode": true
  15138. }
  15139. ],
  15140. "responses": {
  15141. "204": {
  15142. "description": "<No Content>"
  15143. },
  15144. "400": {
  15145. "description": "ProjectCopyError | InvalidRequestError",
  15146. "content": {
  15147. "application/json": {
  15148. "schema": {
  15149. "anyOf": [
  15150. {
  15151. "$ref": "#/components/schemas/ProjectCopyError"
  15152. },
  15153. {
  15154. "$ref": "#/components/schemas/InvalidRequestError"
  15155. }
  15156. ]
  15157. }
  15158. }
  15159. }
  15160. }
  15161. },
  15162. "x-codeSamples": [
  15163. {
  15164. "lang": "js",
  15165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  15166. }
  15167. ]
  15168. }
  15169. },
  15170. "/pty/{ptyID}/connect": {
  15171. "get": {
  15172. "tags": ["pty"],
  15173. "operationId": "pty.connect",
  15174. "parameters": [
  15175. {
  15176. "name": "ptyID",
  15177. "in": "path",
  15178. "schema": {
  15179. "type": "string",
  15180. "pattern": "^pty"
  15181. },
  15182. "required": true
  15183. },
  15184. {
  15185. "in": "query",
  15186. "name": "directory",
  15187. "schema": {
  15188. "type": "string"
  15189. }
  15190. },
  15191. {
  15192. "in": "query",
  15193. "name": "workspace",
  15194. "schema": {
  15195. "type": "string"
  15196. }
  15197. },
  15198. {
  15199. "in": "query",
  15200. "name": "cursor",
  15201. "schema": {
  15202. "type": "string"
  15203. }
  15204. },
  15205. {
  15206. "in": "query",
  15207. "name": "ticket",
  15208. "schema": {
  15209. "type": "string"
  15210. }
  15211. }
  15212. ],
  15213. "responses": {
  15214. "200": {
  15215. "description": "Connected session",
  15216. "content": {
  15217. "application/json": {
  15218. "schema": {
  15219. "type": "boolean",
  15220. "description": "Connected session"
  15221. }
  15222. }
  15223. }
  15224. },
  15225. "403": {
  15226. "description": "Forbidden",
  15227. "content": {
  15228. "application/json": {
  15229. "schema": {
  15230. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  15231. }
  15232. }
  15233. }
  15234. },
  15235. "404": {
  15236. "description": "Not found",
  15237. "content": {
  15238. "application/json": {
  15239. "schema": {
  15240. "$ref": "#/components/schemas/NotFoundError"
  15241. }
  15242. }
  15243. }
  15244. }
  15245. },
  15246. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  15247. "summary": "Connect to PTY session",
  15248. "x-codeSamples": [
  15249. {
  15250. "lang": "js",
  15251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  15252. }
  15253. ]
  15254. }
  15255. }
  15256. },
  15257. "components": {
  15258. "schemas": {
  15259. "Event": {
  15260. "anyOf": [
  15261. {
  15262. "$ref": "#/components/schemas/EventModels-devRefreshed"
  15263. },
  15264. {
  15265. "$ref": "#/components/schemas/EventIntegrationUpdated"
  15266. },
  15267. {
  15268. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  15269. },
  15270. {
  15271. "$ref": "#/components/schemas/EventCatalogUpdated"
  15272. },
  15273. {
  15274. "$ref": "#/components/schemas/EventSessionCreated"
  15275. },
  15276. {
  15277. "$ref": "#/components/schemas/EventSessionUpdated"
  15278. },
  15279. {
  15280. "$ref": "#/components/schemas/EventSessionDeleted"
  15281. },
  15282. {
  15283. "$ref": "#/components/schemas/EventMessageUpdated"
  15284. },
  15285. {
  15286. "$ref": "#/components/schemas/EventMessageRemoved"
  15287. },
  15288. {
  15289. "$ref": "#/components/schemas/EventMessagePartUpdated"
  15290. },
  15291. {
  15292. "$ref": "#/components/schemas/EventMessagePartRemoved"
  15293. },
  15294. {
  15295. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  15296. },
  15297. {
  15298. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  15299. },
  15300. {
  15301. "$ref": "#/components/schemas/EventSessionNextMoved"
  15302. },
  15303. {
  15304. "$ref": "#/components/schemas/EventSessionNextPrompted"
  15305. },
  15306. {
  15307. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  15308. },
  15309. {
  15310. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  15311. },
  15312. {
  15313. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  15314. },
  15315. {
  15316. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  15317. },
  15318. {
  15319. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  15320. },
  15321. {
  15322. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  15323. },
  15324. {
  15325. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  15326. },
  15327. {
  15328. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  15329. },
  15330. {
  15331. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  15332. },
  15333. {
  15334. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15335. },
  15336. {
  15337. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15338. },
  15339. {
  15340. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15341. },
  15342. {
  15343. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15344. },
  15345. {
  15346. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15347. },
  15348. {
  15349. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15350. },
  15351. {
  15352. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15353. },
  15354. {
  15355. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15356. },
  15357. {
  15358. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15359. },
  15360. {
  15361. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15362. },
  15363. {
  15364. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15365. },
  15366. {
  15367. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15368. },
  15369. {
  15370. "$ref": "#/components/schemas/EventSessionNextRetried"
  15371. },
  15372. {
  15373. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15374. },
  15375. {
  15376. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15377. },
  15378. {
  15379. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15380. },
  15381. {
  15382. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15383. },
  15384. {
  15385. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15386. },
  15387. {
  15388. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15389. },
  15390. {
  15391. "$ref": "#/components/schemas/EventMessagePartDelta"
  15392. },
  15393. {
  15394. "$ref": "#/components/schemas/EventSessionDiff"
  15395. },
  15396. {
  15397. "$ref": "#/components/schemas/EventSessionError"
  15398. },
  15399. {
  15400. "$ref": "#/components/schemas/EventInstallationUpdated"
  15401. },
  15402. {
  15403. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15404. },
  15405. {
  15406. "$ref": "#/components/schemas/EventFileEdited"
  15407. },
  15408. {
  15409. "$ref": "#/components/schemas/EventReferenceUpdated"
  15410. },
  15411. {
  15412. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15413. },
  15414. {
  15415. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15416. },
  15417. {
  15418. "$ref": "#/components/schemas/EventPluginAdded"
  15419. },
  15420. {
  15421. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15422. },
  15423. {
  15424. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15425. },
  15426. {
  15427. "$ref": "#/components/schemas/EventPtyCreated"
  15428. },
  15429. {
  15430. "$ref": "#/components/schemas/EventPtyUpdated"
  15431. },
  15432. {
  15433. "$ref": "#/components/schemas/EventPtyExited"
  15434. },
  15435. {
  15436. "$ref": "#/components/schemas/EventPtyDeleted"
  15437. },
  15438. {
  15439. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15440. },
  15441. {
  15442. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15443. },
  15444. {
  15445. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15446. },
  15447. {
  15448. "$ref": "#/components/schemas/EventTodoUpdated"
  15449. },
  15450. {
  15451. "$ref": "#/components/schemas/EventLspUpdated"
  15452. },
  15453. {
  15454. "$ref": "#/components/schemas/EventPermissionAsked"
  15455. },
  15456. {
  15457. "$ref": "#/components/schemas/EventPermissionReplied"
  15458. },
  15459. {
  15460. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15461. },
  15462. {
  15463. "$ref": "#/components/schemas/Event.tui.command.execute"
  15464. },
  15465. {
  15466. "$ref": "#/components/schemas/Event.tui.toast.show"
  15467. },
  15468. {
  15469. "$ref": "#/components/schemas/Event.tui.session.select"
  15470. },
  15471. {
  15472. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15473. },
  15474. {
  15475. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15476. },
  15477. {
  15478. "$ref": "#/components/schemas/EventCommandExecuted"
  15479. },
  15480. {
  15481. "$ref": "#/components/schemas/EventProjectUpdated"
  15482. },
  15483. {
  15484. "$ref": "#/components/schemas/EventSessionStatus"
  15485. },
  15486. {
  15487. "$ref": "#/components/schemas/EventSessionIdle"
  15488. },
  15489. {
  15490. "$ref": "#/components/schemas/EventQuestionAsked"
  15491. },
  15492. {
  15493. "$ref": "#/components/schemas/EventQuestionReplied"
  15494. },
  15495. {
  15496. "$ref": "#/components/schemas/EventQuestionRejected"
  15497. },
  15498. {
  15499. "$ref": "#/components/schemas/EventSessionCompacted"
  15500. },
  15501. {
  15502. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15503. },
  15504. {
  15505. "$ref": "#/components/schemas/EventWorkspaceReady"
  15506. },
  15507. {
  15508. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15509. },
  15510. {
  15511. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15512. },
  15513. {
  15514. "$ref": "#/components/schemas/EventWorktreeReady"
  15515. },
  15516. {
  15517. "$ref": "#/components/schemas/EventWorktreeFailed"
  15518. },
  15519. {
  15520. "$ref": "#/components/schemas/EventServerConnected"
  15521. },
  15522. {
  15523. "$ref": "#/components/schemas/EventGlobalDisposed"
  15524. },
  15525. {
  15526. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15527. }
  15528. ]
  15529. },
  15530. "QuestionReplied": {
  15531. "type": "object",
  15532. "properties": {
  15533. "sessionID": {
  15534. "type": "string",
  15535. "pattern": "^ses"
  15536. },
  15537. "requestID": {
  15538. "type": "string",
  15539. "pattern": "^que"
  15540. },
  15541. "answers": {
  15542. "type": "array",
  15543. "items": {
  15544. "$ref": "#/components/schemas/QuestionAnswer"
  15545. }
  15546. }
  15547. },
  15548. "required": ["sessionID", "requestID", "answers"],
  15549. "additionalProperties": false
  15550. },
  15551. "QuestionRejected": {
  15552. "type": "object",
  15553. "properties": {
  15554. "sessionID": {
  15555. "type": "string",
  15556. "pattern": "^ses"
  15557. },
  15558. "requestID": {
  15559. "type": "string",
  15560. "pattern": "^que"
  15561. }
  15562. },
  15563. "required": ["sessionID", "requestID"],
  15564. "additionalProperties": false
  15565. },
  15566. "OAuth": {
  15567. "type": "object",
  15568. "properties": {
  15569. "type": {
  15570. "type": "string",
  15571. "enum": ["oauth"]
  15572. },
  15573. "refresh": {
  15574. "type": "string"
  15575. },
  15576. "access": {
  15577. "type": "string"
  15578. },
  15579. "expires": {
  15580. "type": "integer",
  15581. "minimum": 0
  15582. },
  15583. "accountId": {
  15584. "type": "string"
  15585. },
  15586. "enterpriseUrl": {
  15587. "type": "string"
  15588. }
  15589. },
  15590. "required": ["type", "refresh", "access", "expires"],
  15591. "additionalProperties": false
  15592. },
  15593. "ApiAuth": {
  15594. "type": "object",
  15595. "properties": {
  15596. "type": {
  15597. "type": "string",
  15598. "enum": ["api"]
  15599. },
  15600. "key": {
  15601. "type": "string"
  15602. },
  15603. "metadata": {
  15604. "type": "object",
  15605. "additionalProperties": {
  15606. "type": "string"
  15607. }
  15608. }
  15609. },
  15610. "required": ["type", "key"],
  15611. "additionalProperties": false
  15612. },
  15613. "WellKnownAuth": {
  15614. "type": "object",
  15615. "properties": {
  15616. "type": {
  15617. "type": "string",
  15618. "enum": ["wellknown"]
  15619. },
  15620. "key": {
  15621. "type": "string"
  15622. },
  15623. "token": {
  15624. "type": "string"
  15625. }
  15626. },
  15627. "required": ["type", "key", "token"],
  15628. "additionalProperties": false
  15629. },
  15630. "Auth": {
  15631. "anyOf": [
  15632. {
  15633. "$ref": "#/components/schemas/OAuth"
  15634. },
  15635. {
  15636. "$ref": "#/components/schemas/ApiAuth"
  15637. },
  15638. {
  15639. "$ref": "#/components/schemas/WellKnownAuth"
  15640. }
  15641. ]
  15642. },
  15643. "effect_HttpApiError_BadRequest": {
  15644. "type": "object",
  15645. "properties": {
  15646. "_tag": {
  15647. "type": "string",
  15648. "enum": ["BadRequest"]
  15649. }
  15650. },
  15651. "required": ["_tag"],
  15652. "additionalProperties": false
  15653. },
  15654. "InvalidRequestError": {
  15655. "type": "object",
  15656. "properties": {
  15657. "_tag": {
  15658. "type": "string",
  15659. "enum": ["InvalidRequestError"]
  15660. },
  15661. "message": {
  15662. "type": "string"
  15663. },
  15664. "kind": {
  15665. "type": "string"
  15666. },
  15667. "field": {
  15668. "type": "string"
  15669. }
  15670. },
  15671. "required": ["_tag", "message"],
  15672. "additionalProperties": false
  15673. },
  15674. "MoveSessionError": {
  15675. "type": "object",
  15676. "properties": {
  15677. "name": {
  15678. "type": "string",
  15679. "enum": ["MoveSessionError"]
  15680. },
  15681. "data": {
  15682. "type": "object",
  15683. "properties": {
  15684. "message": {
  15685. "type": "string"
  15686. }
  15687. },
  15688. "required": ["message"],
  15689. "additionalProperties": false
  15690. }
  15691. },
  15692. "required": ["name", "data"],
  15693. "additionalProperties": false
  15694. },
  15695. "SnapshotFileDiff": {
  15696. "type": "object",
  15697. "properties": {
  15698. "file": {
  15699. "type": "string"
  15700. },
  15701. "patch": {
  15702. "type": "string"
  15703. },
  15704. "additions": {
  15705. "type": "number"
  15706. },
  15707. "deletions": {
  15708. "type": "number"
  15709. },
  15710. "status": {
  15711. "type": "string",
  15712. "enum": ["added", "deleted", "modified"]
  15713. }
  15714. },
  15715. "required": ["additions", "deletions"],
  15716. "additionalProperties": false
  15717. },
  15718. "PermissionAction": {
  15719. "type": "string",
  15720. "enum": ["allow", "deny", "ask"]
  15721. },
  15722. "PermissionRule": {
  15723. "type": "object",
  15724. "properties": {
  15725. "permission": {
  15726. "type": "string"
  15727. },
  15728. "pattern": {
  15729. "type": "string"
  15730. },
  15731. "action": {
  15732. "$ref": "#/components/schemas/PermissionAction"
  15733. }
  15734. },
  15735. "required": ["permission", "pattern", "action"],
  15736. "additionalProperties": false
  15737. },
  15738. "PermissionRuleset": {
  15739. "type": "array",
  15740. "items": {
  15741. "$ref": "#/components/schemas/PermissionRule"
  15742. }
  15743. },
  15744. "Session": {
  15745. "type": "object",
  15746. "properties": {
  15747. "id": {
  15748. "type": "string",
  15749. "pattern": "^ses"
  15750. },
  15751. "slug": {
  15752. "type": "string"
  15753. },
  15754. "projectID": {
  15755. "type": "string"
  15756. },
  15757. "workspaceID": {
  15758. "type": "string",
  15759. "pattern": "^wrk"
  15760. },
  15761. "directory": {
  15762. "type": "string"
  15763. },
  15764. "path": {
  15765. "type": "string"
  15766. },
  15767. "parentID": {
  15768. "type": "string",
  15769. "pattern": "^ses"
  15770. },
  15771. "summary": {
  15772. "type": "object",
  15773. "properties": {
  15774. "additions": {
  15775. "type": "number"
  15776. },
  15777. "deletions": {
  15778. "type": "number"
  15779. },
  15780. "files": {
  15781. "type": "number"
  15782. },
  15783. "diffs": {
  15784. "type": "array",
  15785. "items": {
  15786. "$ref": "#/components/schemas/SnapshotFileDiff"
  15787. }
  15788. }
  15789. },
  15790. "required": ["additions", "deletions", "files"],
  15791. "additionalProperties": false
  15792. },
  15793. "cost": {
  15794. "type": "number"
  15795. },
  15796. "tokens": {
  15797. "type": "object",
  15798. "properties": {
  15799. "input": {
  15800. "type": "number"
  15801. },
  15802. "output": {
  15803. "type": "number"
  15804. },
  15805. "reasoning": {
  15806. "type": "number"
  15807. },
  15808. "cache": {
  15809. "type": "object",
  15810. "properties": {
  15811. "read": {
  15812. "type": "number"
  15813. },
  15814. "write": {
  15815. "type": "number"
  15816. }
  15817. },
  15818. "required": ["read", "write"],
  15819. "additionalProperties": false
  15820. }
  15821. },
  15822. "required": ["input", "output", "reasoning", "cache"],
  15823. "additionalProperties": false
  15824. },
  15825. "share": {
  15826. "type": "object",
  15827. "properties": {
  15828. "url": {
  15829. "type": "string"
  15830. }
  15831. },
  15832. "required": ["url"],
  15833. "additionalProperties": false
  15834. },
  15835. "title": {
  15836. "type": "string"
  15837. },
  15838. "agent": {
  15839. "type": "string"
  15840. },
  15841. "model": {
  15842. "type": "object",
  15843. "properties": {
  15844. "id": {
  15845. "type": "string"
  15846. },
  15847. "providerID": {
  15848. "type": "string"
  15849. },
  15850. "variant": {
  15851. "type": "string"
  15852. }
  15853. },
  15854. "required": ["id", "providerID"],
  15855. "additionalProperties": false
  15856. },
  15857. "version": {
  15858. "type": "string"
  15859. },
  15860. "metadata": {
  15861. "type": "object"
  15862. },
  15863. "time": {
  15864. "type": "object",
  15865. "properties": {
  15866. "created": {
  15867. "type": "integer",
  15868. "minimum": 0
  15869. },
  15870. "updated": {
  15871. "type": "integer",
  15872. "minimum": 0
  15873. },
  15874. "compacting": {
  15875. "type": "integer",
  15876. "minimum": 0
  15877. },
  15878. "archived": {
  15879. "type": "number"
  15880. }
  15881. },
  15882. "required": ["created", "updated"],
  15883. "additionalProperties": false
  15884. },
  15885. "permission": {
  15886. "$ref": "#/components/schemas/PermissionRuleset"
  15887. },
  15888. "revert": {
  15889. "type": "object",
  15890. "properties": {
  15891. "messageID": {
  15892. "type": "string",
  15893. "pattern": "^msg"
  15894. },
  15895. "partID": {
  15896. "type": "string",
  15897. "pattern": "^prt"
  15898. },
  15899. "snapshot": {
  15900. "type": "string"
  15901. },
  15902. "diff": {
  15903. "type": "string"
  15904. }
  15905. },
  15906. "required": ["messageID"],
  15907. "additionalProperties": false
  15908. }
  15909. },
  15910. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15911. "additionalProperties": false
  15912. },
  15913. "OutputFormatText": {
  15914. "type": "object",
  15915. "properties": {
  15916. "type": {
  15917. "type": "string",
  15918. "enum": ["text"]
  15919. }
  15920. },
  15921. "required": ["type"],
  15922. "additionalProperties": false
  15923. },
  15924. "JSONSchema": {
  15925. "type": "object"
  15926. },
  15927. "OutputFormatJsonSchema": {
  15928. "type": "object",
  15929. "properties": {
  15930. "type": {
  15931. "type": "string",
  15932. "enum": ["json_schema"]
  15933. },
  15934. "schema": {
  15935. "$ref": "#/components/schemas/JSONSchema"
  15936. },
  15937. "retryCount": {
  15938. "type": "integer",
  15939. "minimum": 0
  15940. }
  15941. },
  15942. "required": ["type", "schema"],
  15943. "additionalProperties": false
  15944. },
  15945. "OutputFormat": {
  15946. "anyOf": [
  15947. {
  15948. "$ref": "#/components/schemas/OutputFormatText"
  15949. },
  15950. {
  15951. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15952. }
  15953. ]
  15954. },
  15955. "UserMessage": {
  15956. "type": "object",
  15957. "properties": {
  15958. "id": {
  15959. "type": "string",
  15960. "pattern": "^msg"
  15961. },
  15962. "sessionID": {
  15963. "type": "string",
  15964. "pattern": "^ses"
  15965. },
  15966. "role": {
  15967. "type": "string",
  15968. "enum": ["user"]
  15969. },
  15970. "time": {
  15971. "type": "object",
  15972. "properties": {
  15973. "created": {
  15974. "type": "number",
  15975. "minimum": 0
  15976. }
  15977. },
  15978. "required": ["created"],
  15979. "additionalProperties": false
  15980. },
  15981. "format": {
  15982. "$ref": "#/components/schemas/OutputFormat"
  15983. },
  15984. "summary": {
  15985. "type": "object",
  15986. "properties": {
  15987. "title": {
  15988. "type": "string"
  15989. },
  15990. "body": {
  15991. "type": "string"
  15992. },
  15993. "diffs": {
  15994. "type": "array",
  15995. "items": {
  15996. "$ref": "#/components/schemas/SnapshotFileDiff"
  15997. }
  15998. }
  15999. },
  16000. "required": ["diffs"],
  16001. "additionalProperties": false
  16002. },
  16003. "agent": {
  16004. "type": "string"
  16005. },
  16006. "model": {
  16007. "type": "object",
  16008. "properties": {
  16009. "providerID": {
  16010. "type": "string"
  16011. },
  16012. "modelID": {
  16013. "type": "string"
  16014. },
  16015. "variant": {
  16016. "type": "string"
  16017. }
  16018. },
  16019. "required": ["providerID", "modelID"],
  16020. "additionalProperties": false
  16021. },
  16022. "system": {
  16023. "type": "string"
  16024. },
  16025. "tools": {
  16026. "type": "object",
  16027. "additionalProperties": {
  16028. "type": "boolean"
  16029. }
  16030. }
  16031. },
  16032. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  16033. "additionalProperties": false
  16034. },
  16035. "ProviderAuthError": {
  16036. "type": "object",
  16037. "properties": {
  16038. "name": {
  16039. "type": "string",
  16040. "enum": ["ProviderAuthError"]
  16041. },
  16042. "data": {
  16043. "type": "object",
  16044. "properties": {
  16045. "providerID": {
  16046. "type": "string"
  16047. },
  16048. "message": {
  16049. "type": "string"
  16050. }
  16051. },
  16052. "required": ["providerID", "message"],
  16053. "additionalProperties": false
  16054. }
  16055. },
  16056. "required": ["name", "data"],
  16057. "additionalProperties": false
  16058. },
  16059. "UnknownError": {
  16060. "type": "object",
  16061. "properties": {
  16062. "name": {
  16063. "type": "string",
  16064. "enum": ["UnknownError"]
  16065. },
  16066. "data": {
  16067. "type": "object",
  16068. "properties": {
  16069. "message": {
  16070. "type": "string"
  16071. },
  16072. "ref": {
  16073. "type": "string"
  16074. }
  16075. },
  16076. "required": ["message"],
  16077. "additionalProperties": false
  16078. }
  16079. },
  16080. "required": ["name", "data"],
  16081. "additionalProperties": false
  16082. },
  16083. "MessageOutputLengthError": {
  16084. "type": "object",
  16085. "properties": {
  16086. "name": {
  16087. "type": "string",
  16088. "enum": ["MessageOutputLengthError"]
  16089. },
  16090. "data": {
  16091. "type": "object",
  16092. "properties": {}
  16093. }
  16094. },
  16095. "required": ["name", "data"],
  16096. "additionalProperties": false
  16097. },
  16098. "MessageAbortedError": {
  16099. "type": "object",
  16100. "properties": {
  16101. "name": {
  16102. "type": "string",
  16103. "enum": ["MessageAbortedError"]
  16104. },
  16105. "data": {
  16106. "type": "object",
  16107. "properties": {
  16108. "message": {
  16109. "type": "string"
  16110. }
  16111. },
  16112. "required": ["message"],
  16113. "additionalProperties": false
  16114. }
  16115. },
  16116. "required": ["name", "data"],
  16117. "additionalProperties": false
  16118. },
  16119. "StructuredOutputError": {
  16120. "type": "object",
  16121. "properties": {
  16122. "name": {
  16123. "type": "string",
  16124. "enum": ["StructuredOutputError"]
  16125. },
  16126. "data": {
  16127. "type": "object",
  16128. "properties": {
  16129. "message": {
  16130. "type": "string"
  16131. },
  16132. "retries": {
  16133. "type": "integer",
  16134. "minimum": 0
  16135. }
  16136. },
  16137. "required": ["message", "retries"],
  16138. "additionalProperties": false
  16139. }
  16140. },
  16141. "required": ["name", "data"],
  16142. "additionalProperties": false
  16143. },
  16144. "ContextOverflowError": {
  16145. "type": "object",
  16146. "properties": {
  16147. "name": {
  16148. "type": "string",
  16149. "enum": ["ContextOverflowError"]
  16150. },
  16151. "data": {
  16152. "type": "object",
  16153. "properties": {
  16154. "message": {
  16155. "type": "string"
  16156. },
  16157. "responseBody": {
  16158. "type": "string"
  16159. }
  16160. },
  16161. "required": ["message"],
  16162. "additionalProperties": false
  16163. }
  16164. },
  16165. "required": ["name", "data"],
  16166. "additionalProperties": false
  16167. },
  16168. "ContentFilterError": {
  16169. "type": "object",
  16170. "properties": {
  16171. "name": {
  16172. "type": "string",
  16173. "enum": ["ContentFilterError"]
  16174. },
  16175. "data": {
  16176. "type": "object",
  16177. "properties": {
  16178. "message": {
  16179. "type": "string"
  16180. }
  16181. },
  16182. "required": ["message"],
  16183. "additionalProperties": false
  16184. }
  16185. },
  16186. "required": ["name", "data"],
  16187. "additionalProperties": false
  16188. },
  16189. "APIError": {
  16190. "type": "object",
  16191. "properties": {
  16192. "name": {
  16193. "type": "string",
  16194. "enum": ["APIError"]
  16195. },
  16196. "data": {
  16197. "type": "object",
  16198. "properties": {
  16199. "message": {
  16200. "type": "string"
  16201. },
  16202. "statusCode": {
  16203. "type": "integer",
  16204. "minimum": 0
  16205. },
  16206. "isRetryable": {
  16207. "type": "boolean"
  16208. },
  16209. "responseHeaders": {
  16210. "type": "object",
  16211. "additionalProperties": {
  16212. "type": "string"
  16213. }
  16214. },
  16215. "responseBody": {
  16216. "type": "string"
  16217. },
  16218. "metadata": {
  16219. "type": "object",
  16220. "additionalProperties": {
  16221. "type": "string"
  16222. }
  16223. }
  16224. },
  16225. "required": ["message", "isRetryable"],
  16226. "additionalProperties": false
  16227. }
  16228. },
  16229. "required": ["name", "data"],
  16230. "additionalProperties": false
  16231. },
  16232. "AssistantMessage": {
  16233. "type": "object",
  16234. "properties": {
  16235. "id": {
  16236. "type": "string",
  16237. "pattern": "^msg"
  16238. },
  16239. "sessionID": {
  16240. "type": "string",
  16241. "pattern": "^ses"
  16242. },
  16243. "role": {
  16244. "type": "string",
  16245. "enum": ["assistant"]
  16246. },
  16247. "time": {
  16248. "type": "object",
  16249. "properties": {
  16250. "created": {
  16251. "type": "integer",
  16252. "minimum": 0
  16253. },
  16254. "completed": {
  16255. "type": "integer",
  16256. "minimum": 0
  16257. }
  16258. },
  16259. "required": ["created"],
  16260. "additionalProperties": false
  16261. },
  16262. "error": {
  16263. "anyOf": [
  16264. {
  16265. "$ref": "#/components/schemas/ProviderAuthError"
  16266. },
  16267. {
  16268. "$ref": "#/components/schemas/UnknownError"
  16269. },
  16270. {
  16271. "$ref": "#/components/schemas/MessageOutputLengthError"
  16272. },
  16273. {
  16274. "$ref": "#/components/schemas/MessageAbortedError"
  16275. },
  16276. {
  16277. "$ref": "#/components/schemas/StructuredOutputError"
  16278. },
  16279. {
  16280. "$ref": "#/components/schemas/ContextOverflowError"
  16281. },
  16282. {
  16283. "$ref": "#/components/schemas/ContentFilterError"
  16284. },
  16285. {
  16286. "$ref": "#/components/schemas/APIError"
  16287. }
  16288. ]
  16289. },
  16290. "parentID": {
  16291. "type": "string",
  16292. "pattern": "^msg"
  16293. },
  16294. "modelID": {
  16295. "type": "string"
  16296. },
  16297. "providerID": {
  16298. "type": "string"
  16299. },
  16300. "mode": {
  16301. "type": "string"
  16302. },
  16303. "agent": {
  16304. "type": "string"
  16305. },
  16306. "path": {
  16307. "type": "object",
  16308. "properties": {
  16309. "cwd": {
  16310. "type": "string"
  16311. },
  16312. "root": {
  16313. "type": "string"
  16314. }
  16315. },
  16316. "required": ["cwd", "root"],
  16317. "additionalProperties": false
  16318. },
  16319. "summary": {
  16320. "type": "boolean"
  16321. },
  16322. "cost": {
  16323. "type": "number"
  16324. },
  16325. "tokens": {
  16326. "type": "object",
  16327. "properties": {
  16328. "total": {
  16329. "type": "number"
  16330. },
  16331. "input": {
  16332. "type": "number"
  16333. },
  16334. "output": {
  16335. "type": "number"
  16336. },
  16337. "reasoning": {
  16338. "type": "number"
  16339. },
  16340. "cache": {
  16341. "type": "object",
  16342. "properties": {
  16343. "read": {
  16344. "type": "number"
  16345. },
  16346. "write": {
  16347. "type": "number"
  16348. }
  16349. },
  16350. "required": ["read", "write"],
  16351. "additionalProperties": false
  16352. }
  16353. },
  16354. "required": ["input", "output", "reasoning", "cache"],
  16355. "additionalProperties": false
  16356. },
  16357. "structured": {},
  16358. "variant": {
  16359. "type": "string"
  16360. },
  16361. "finish": {
  16362. "type": "string"
  16363. }
  16364. },
  16365. "required": [
  16366. "id",
  16367. "sessionID",
  16368. "role",
  16369. "time",
  16370. "parentID",
  16371. "modelID",
  16372. "providerID",
  16373. "mode",
  16374. "agent",
  16375. "path",
  16376. "cost",
  16377. "tokens"
  16378. ],
  16379. "additionalProperties": false
  16380. },
  16381. "Message": {
  16382. "anyOf": [
  16383. {
  16384. "$ref": "#/components/schemas/UserMessage"
  16385. },
  16386. {
  16387. "$ref": "#/components/schemas/AssistantMessage"
  16388. }
  16389. ]
  16390. },
  16391. "TextPart": {
  16392. "type": "object",
  16393. "properties": {
  16394. "id": {
  16395. "type": "string",
  16396. "pattern": "^prt"
  16397. },
  16398. "sessionID": {
  16399. "type": "string",
  16400. "pattern": "^ses"
  16401. },
  16402. "messageID": {
  16403. "type": "string",
  16404. "pattern": "^msg"
  16405. },
  16406. "type": {
  16407. "type": "string",
  16408. "enum": ["text"]
  16409. },
  16410. "text": {
  16411. "type": "string"
  16412. },
  16413. "synthetic": {
  16414. "type": "boolean"
  16415. },
  16416. "ignored": {
  16417. "type": "boolean"
  16418. },
  16419. "time": {
  16420. "type": "object",
  16421. "properties": {
  16422. "start": {
  16423. "type": "integer",
  16424. "minimum": 0
  16425. },
  16426. "end": {
  16427. "type": "integer",
  16428. "minimum": 0
  16429. }
  16430. },
  16431. "required": ["start"],
  16432. "additionalProperties": false
  16433. },
  16434. "metadata": {
  16435. "type": "object"
  16436. }
  16437. },
  16438. "required": ["id", "sessionID", "messageID", "type", "text"],
  16439. "additionalProperties": false
  16440. },
  16441. "SubtaskPart": {
  16442. "type": "object",
  16443. "properties": {
  16444. "id": {
  16445. "type": "string",
  16446. "pattern": "^prt"
  16447. },
  16448. "sessionID": {
  16449. "type": "string",
  16450. "pattern": "^ses"
  16451. },
  16452. "messageID": {
  16453. "type": "string",
  16454. "pattern": "^msg"
  16455. },
  16456. "type": {
  16457. "type": "string",
  16458. "enum": ["subtask"]
  16459. },
  16460. "prompt": {
  16461. "type": "string"
  16462. },
  16463. "description": {
  16464. "type": "string"
  16465. },
  16466. "agent": {
  16467. "type": "string"
  16468. },
  16469. "model": {
  16470. "type": "object",
  16471. "properties": {
  16472. "providerID": {
  16473. "type": "string"
  16474. },
  16475. "modelID": {
  16476. "type": "string"
  16477. }
  16478. },
  16479. "required": ["providerID", "modelID"],
  16480. "additionalProperties": false
  16481. },
  16482. "command": {
  16483. "type": "string"
  16484. }
  16485. },
  16486. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16487. "additionalProperties": false
  16488. },
  16489. "ReasoningPart": {
  16490. "type": "object",
  16491. "properties": {
  16492. "id": {
  16493. "type": "string",
  16494. "pattern": "^prt"
  16495. },
  16496. "sessionID": {
  16497. "type": "string",
  16498. "pattern": "^ses"
  16499. },
  16500. "messageID": {
  16501. "type": "string",
  16502. "pattern": "^msg"
  16503. },
  16504. "type": {
  16505. "type": "string",
  16506. "enum": ["reasoning"]
  16507. },
  16508. "text": {
  16509. "type": "string"
  16510. },
  16511. "metadata": {
  16512. "type": "object"
  16513. },
  16514. "time": {
  16515. "type": "object",
  16516. "properties": {
  16517. "start": {
  16518. "type": "integer",
  16519. "minimum": 0
  16520. },
  16521. "end": {
  16522. "type": "integer",
  16523. "minimum": 0
  16524. }
  16525. },
  16526. "required": ["start"],
  16527. "additionalProperties": false
  16528. }
  16529. },
  16530. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16531. "additionalProperties": false
  16532. },
  16533. "FilePartSourceText": {
  16534. "type": "object",
  16535. "properties": {
  16536. "value": {
  16537. "type": "string"
  16538. },
  16539. "start": {
  16540. "type": "number"
  16541. },
  16542. "end": {
  16543. "type": "number"
  16544. }
  16545. },
  16546. "required": ["value", "start", "end"],
  16547. "additionalProperties": false
  16548. },
  16549. "FileSource": {
  16550. "type": "object",
  16551. "properties": {
  16552. "text": {
  16553. "$ref": "#/components/schemas/FilePartSourceText"
  16554. },
  16555. "type": {
  16556. "type": "string",
  16557. "enum": ["file"]
  16558. },
  16559. "path": {
  16560. "type": "string"
  16561. }
  16562. },
  16563. "required": ["text", "type", "path"],
  16564. "additionalProperties": false
  16565. },
  16566. "Range": {
  16567. "type": "object",
  16568. "properties": {
  16569. "start": {
  16570. "type": "object",
  16571. "properties": {
  16572. "line": {
  16573. "type": "integer",
  16574. "minimum": 0
  16575. },
  16576. "character": {
  16577. "type": "integer",
  16578. "minimum": 0
  16579. }
  16580. },
  16581. "required": ["line", "character"],
  16582. "additionalProperties": false
  16583. },
  16584. "end": {
  16585. "type": "object",
  16586. "properties": {
  16587. "line": {
  16588. "type": "integer",
  16589. "minimum": 0
  16590. },
  16591. "character": {
  16592. "type": "integer",
  16593. "minimum": 0
  16594. }
  16595. },
  16596. "required": ["line", "character"],
  16597. "additionalProperties": false
  16598. }
  16599. },
  16600. "required": ["start", "end"],
  16601. "additionalProperties": false
  16602. },
  16603. "SymbolSource": {
  16604. "type": "object",
  16605. "properties": {
  16606. "text": {
  16607. "$ref": "#/components/schemas/FilePartSourceText"
  16608. },
  16609. "type": {
  16610. "type": "string",
  16611. "enum": ["symbol"]
  16612. },
  16613. "path": {
  16614. "type": "string"
  16615. },
  16616. "range": {
  16617. "$ref": "#/components/schemas/Range"
  16618. },
  16619. "name": {
  16620. "type": "string"
  16621. },
  16622. "kind": {
  16623. "type": "integer",
  16624. "minimum": 0
  16625. }
  16626. },
  16627. "required": ["text", "type", "path", "range", "name", "kind"],
  16628. "additionalProperties": false
  16629. },
  16630. "ResourceSource": {
  16631. "type": "object",
  16632. "properties": {
  16633. "text": {
  16634. "$ref": "#/components/schemas/FilePartSourceText"
  16635. },
  16636. "type": {
  16637. "type": "string",
  16638. "enum": ["resource"]
  16639. },
  16640. "clientName": {
  16641. "type": "string"
  16642. },
  16643. "uri": {
  16644. "type": "string"
  16645. }
  16646. },
  16647. "required": ["text", "type", "clientName", "uri"],
  16648. "additionalProperties": false
  16649. },
  16650. "FilePartSource": {
  16651. "anyOf": [
  16652. {
  16653. "$ref": "#/components/schemas/FileSource"
  16654. },
  16655. {
  16656. "$ref": "#/components/schemas/SymbolSource"
  16657. },
  16658. {
  16659. "$ref": "#/components/schemas/ResourceSource"
  16660. }
  16661. ]
  16662. },
  16663. "FilePart": {
  16664. "type": "object",
  16665. "properties": {
  16666. "id": {
  16667. "type": "string",
  16668. "pattern": "^prt"
  16669. },
  16670. "sessionID": {
  16671. "type": "string",
  16672. "pattern": "^ses"
  16673. },
  16674. "messageID": {
  16675. "type": "string",
  16676. "pattern": "^msg"
  16677. },
  16678. "type": {
  16679. "type": "string",
  16680. "enum": ["file"]
  16681. },
  16682. "mime": {
  16683. "type": "string"
  16684. },
  16685. "filename": {
  16686. "type": "string"
  16687. },
  16688. "url": {
  16689. "type": "string"
  16690. },
  16691. "source": {
  16692. "$ref": "#/components/schemas/FilePartSource"
  16693. }
  16694. },
  16695. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16696. "additionalProperties": false
  16697. },
  16698. "ToolStatePending": {
  16699. "type": "object",
  16700. "properties": {
  16701. "status": {
  16702. "type": "string",
  16703. "enum": ["pending"]
  16704. },
  16705. "input": {
  16706. "type": "object"
  16707. },
  16708. "raw": {
  16709. "type": "string"
  16710. }
  16711. },
  16712. "required": ["status", "input", "raw"],
  16713. "additionalProperties": false
  16714. },
  16715. "ToolStateRunning": {
  16716. "type": "object",
  16717. "properties": {
  16718. "status": {
  16719. "type": "string",
  16720. "enum": ["running"]
  16721. },
  16722. "input": {
  16723. "type": "object"
  16724. },
  16725. "title": {
  16726. "type": "string"
  16727. },
  16728. "metadata": {
  16729. "type": "object"
  16730. },
  16731. "time": {
  16732. "type": "object",
  16733. "properties": {
  16734. "start": {
  16735. "type": "integer",
  16736. "minimum": 0
  16737. }
  16738. },
  16739. "required": ["start"],
  16740. "additionalProperties": false
  16741. }
  16742. },
  16743. "required": ["status", "input", "time"],
  16744. "additionalProperties": false
  16745. },
  16746. "ToolStateCompleted": {
  16747. "type": "object",
  16748. "properties": {
  16749. "status": {
  16750. "type": "string",
  16751. "enum": ["completed"]
  16752. },
  16753. "input": {
  16754. "type": "object"
  16755. },
  16756. "output": {
  16757. "type": "string"
  16758. },
  16759. "title": {
  16760. "type": "string"
  16761. },
  16762. "metadata": {
  16763. "type": "object"
  16764. },
  16765. "time": {
  16766. "type": "object",
  16767. "properties": {
  16768. "start": {
  16769. "type": "integer",
  16770. "minimum": 0
  16771. },
  16772. "end": {
  16773. "type": "integer",
  16774. "minimum": 0
  16775. },
  16776. "compacted": {
  16777. "type": "integer",
  16778. "minimum": 0
  16779. }
  16780. },
  16781. "required": ["start", "end"],
  16782. "additionalProperties": false
  16783. },
  16784. "attachments": {
  16785. "type": "array",
  16786. "items": {
  16787. "$ref": "#/components/schemas/FilePart"
  16788. }
  16789. }
  16790. },
  16791. "required": ["status", "input", "output", "title", "metadata", "time"],
  16792. "additionalProperties": false
  16793. },
  16794. "ToolStateError": {
  16795. "type": "object",
  16796. "properties": {
  16797. "status": {
  16798. "type": "string",
  16799. "enum": ["error"]
  16800. },
  16801. "input": {
  16802. "type": "object"
  16803. },
  16804. "error": {
  16805. "type": "string"
  16806. },
  16807. "metadata": {
  16808. "type": "object"
  16809. },
  16810. "time": {
  16811. "type": "object",
  16812. "properties": {
  16813. "start": {
  16814. "type": "integer",
  16815. "minimum": 0
  16816. },
  16817. "end": {
  16818. "type": "integer",
  16819. "minimum": 0
  16820. }
  16821. },
  16822. "required": ["start", "end"],
  16823. "additionalProperties": false
  16824. }
  16825. },
  16826. "required": ["status", "input", "error", "time"],
  16827. "additionalProperties": false
  16828. },
  16829. "ToolState": {
  16830. "anyOf": [
  16831. {
  16832. "$ref": "#/components/schemas/ToolStatePending"
  16833. },
  16834. {
  16835. "$ref": "#/components/schemas/ToolStateRunning"
  16836. },
  16837. {
  16838. "$ref": "#/components/schemas/ToolStateCompleted"
  16839. },
  16840. {
  16841. "$ref": "#/components/schemas/ToolStateError"
  16842. }
  16843. ]
  16844. },
  16845. "ToolPart": {
  16846. "type": "object",
  16847. "properties": {
  16848. "id": {
  16849. "type": "string",
  16850. "pattern": "^prt"
  16851. },
  16852. "sessionID": {
  16853. "type": "string",
  16854. "pattern": "^ses"
  16855. },
  16856. "messageID": {
  16857. "type": "string",
  16858. "pattern": "^msg"
  16859. },
  16860. "type": {
  16861. "type": "string",
  16862. "enum": ["tool"]
  16863. },
  16864. "callID": {
  16865. "type": "string"
  16866. },
  16867. "tool": {
  16868. "type": "string"
  16869. },
  16870. "state": {
  16871. "$ref": "#/components/schemas/ToolState"
  16872. },
  16873. "metadata": {
  16874. "type": "object"
  16875. }
  16876. },
  16877. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16878. "additionalProperties": false
  16879. },
  16880. "StepStartPart": {
  16881. "type": "object",
  16882. "properties": {
  16883. "id": {
  16884. "type": "string",
  16885. "pattern": "^prt"
  16886. },
  16887. "sessionID": {
  16888. "type": "string",
  16889. "pattern": "^ses"
  16890. },
  16891. "messageID": {
  16892. "type": "string",
  16893. "pattern": "^msg"
  16894. },
  16895. "type": {
  16896. "type": "string",
  16897. "enum": ["step-start"]
  16898. },
  16899. "snapshot": {
  16900. "type": "string"
  16901. }
  16902. },
  16903. "required": ["id", "sessionID", "messageID", "type"],
  16904. "additionalProperties": false
  16905. },
  16906. "StepFinishPart": {
  16907. "type": "object",
  16908. "properties": {
  16909. "id": {
  16910. "type": "string",
  16911. "pattern": "^prt"
  16912. },
  16913. "sessionID": {
  16914. "type": "string",
  16915. "pattern": "^ses"
  16916. },
  16917. "messageID": {
  16918. "type": "string",
  16919. "pattern": "^msg"
  16920. },
  16921. "type": {
  16922. "type": "string",
  16923. "enum": ["step-finish"]
  16924. },
  16925. "reason": {
  16926. "type": "string"
  16927. },
  16928. "snapshot": {
  16929. "type": "string"
  16930. },
  16931. "cost": {
  16932. "type": "number"
  16933. },
  16934. "tokens": {
  16935. "type": "object",
  16936. "properties": {
  16937. "total": {
  16938. "type": "number"
  16939. },
  16940. "input": {
  16941. "type": "number"
  16942. },
  16943. "output": {
  16944. "type": "number"
  16945. },
  16946. "reasoning": {
  16947. "type": "number"
  16948. },
  16949. "cache": {
  16950. "type": "object",
  16951. "properties": {
  16952. "read": {
  16953. "type": "number"
  16954. },
  16955. "write": {
  16956. "type": "number"
  16957. }
  16958. },
  16959. "required": ["read", "write"],
  16960. "additionalProperties": false
  16961. }
  16962. },
  16963. "required": ["input", "output", "reasoning", "cache"],
  16964. "additionalProperties": false
  16965. }
  16966. },
  16967. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16968. "additionalProperties": false
  16969. },
  16970. "SnapshotPart": {
  16971. "type": "object",
  16972. "properties": {
  16973. "id": {
  16974. "type": "string",
  16975. "pattern": "^prt"
  16976. },
  16977. "sessionID": {
  16978. "type": "string",
  16979. "pattern": "^ses"
  16980. },
  16981. "messageID": {
  16982. "type": "string",
  16983. "pattern": "^msg"
  16984. },
  16985. "type": {
  16986. "type": "string",
  16987. "enum": ["snapshot"]
  16988. },
  16989. "snapshot": {
  16990. "type": "string"
  16991. }
  16992. },
  16993. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16994. "additionalProperties": false
  16995. },
  16996. "PatchPart": {
  16997. "type": "object",
  16998. "properties": {
  16999. "id": {
  17000. "type": "string",
  17001. "pattern": "^prt"
  17002. },
  17003. "sessionID": {
  17004. "type": "string",
  17005. "pattern": "^ses"
  17006. },
  17007. "messageID": {
  17008. "type": "string",
  17009. "pattern": "^msg"
  17010. },
  17011. "type": {
  17012. "type": "string",
  17013. "enum": ["patch"]
  17014. },
  17015. "hash": {
  17016. "type": "string"
  17017. },
  17018. "files": {
  17019. "type": "array",
  17020. "items": {
  17021. "type": "string"
  17022. }
  17023. }
  17024. },
  17025. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  17026. "additionalProperties": false
  17027. },
  17028. "AgentPart": {
  17029. "type": "object",
  17030. "properties": {
  17031. "id": {
  17032. "type": "string",
  17033. "pattern": "^prt"
  17034. },
  17035. "sessionID": {
  17036. "type": "string",
  17037. "pattern": "^ses"
  17038. },
  17039. "messageID": {
  17040. "type": "string",
  17041. "pattern": "^msg"
  17042. },
  17043. "type": {
  17044. "type": "string",
  17045. "enum": ["agent"]
  17046. },
  17047. "name": {
  17048. "type": "string"
  17049. },
  17050. "source": {
  17051. "type": "object",
  17052. "properties": {
  17053. "value": {
  17054. "type": "string"
  17055. },
  17056. "start": {
  17057. "type": "integer",
  17058. "minimum": 0
  17059. },
  17060. "end": {
  17061. "type": "integer",
  17062. "minimum": 0
  17063. }
  17064. },
  17065. "required": ["value", "start", "end"],
  17066. "additionalProperties": false
  17067. }
  17068. },
  17069. "required": ["id", "sessionID", "messageID", "type", "name"],
  17070. "additionalProperties": false
  17071. },
  17072. "RetryPart": {
  17073. "type": "object",
  17074. "properties": {
  17075. "id": {
  17076. "type": "string",
  17077. "pattern": "^prt"
  17078. },
  17079. "sessionID": {
  17080. "type": "string",
  17081. "pattern": "^ses"
  17082. },
  17083. "messageID": {
  17084. "type": "string",
  17085. "pattern": "^msg"
  17086. },
  17087. "type": {
  17088. "type": "string",
  17089. "enum": ["retry"]
  17090. },
  17091. "attempt": {
  17092. "type": "integer",
  17093. "minimum": 0
  17094. },
  17095. "error": {
  17096. "$ref": "#/components/schemas/APIError"
  17097. },
  17098. "time": {
  17099. "type": "object",
  17100. "properties": {
  17101. "created": {
  17102. "type": "integer",
  17103. "minimum": 0
  17104. }
  17105. },
  17106. "required": ["created"],
  17107. "additionalProperties": false
  17108. }
  17109. },
  17110. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  17111. "additionalProperties": false
  17112. },
  17113. "CompactionPart": {
  17114. "type": "object",
  17115. "properties": {
  17116. "id": {
  17117. "type": "string",
  17118. "pattern": "^prt"
  17119. },
  17120. "sessionID": {
  17121. "type": "string",
  17122. "pattern": "^ses"
  17123. },
  17124. "messageID": {
  17125. "type": "string",
  17126. "pattern": "^msg"
  17127. },
  17128. "type": {
  17129. "type": "string",
  17130. "enum": ["compaction"]
  17131. },
  17132. "auto": {
  17133. "type": "boolean"
  17134. },
  17135. "overflow": {
  17136. "type": "boolean"
  17137. },
  17138. "tail_start_id": {
  17139. "type": "string",
  17140. "pattern": "^msg"
  17141. }
  17142. },
  17143. "required": ["id", "sessionID", "messageID", "type", "auto"],
  17144. "additionalProperties": false
  17145. },
  17146. "Part": {
  17147. "anyOf": [
  17148. {
  17149. "$ref": "#/components/schemas/TextPart"
  17150. },
  17151. {
  17152. "$ref": "#/components/schemas/SubtaskPart"
  17153. },
  17154. {
  17155. "$ref": "#/components/schemas/ReasoningPart"
  17156. },
  17157. {
  17158. "$ref": "#/components/schemas/FilePart"
  17159. },
  17160. {
  17161. "$ref": "#/components/schemas/ToolPart"
  17162. },
  17163. {
  17164. "$ref": "#/components/schemas/StepStartPart"
  17165. },
  17166. {
  17167. "$ref": "#/components/schemas/StepFinishPart"
  17168. },
  17169. {
  17170. "$ref": "#/components/schemas/SnapshotPart"
  17171. },
  17172. {
  17173. "$ref": "#/components/schemas/PatchPart"
  17174. },
  17175. {
  17176. "$ref": "#/components/schemas/AgentPart"
  17177. },
  17178. {
  17179. "$ref": "#/components/schemas/RetryPart"
  17180. },
  17181. {
  17182. "$ref": "#/components/schemas/CompactionPart"
  17183. }
  17184. ]
  17185. },
  17186. "Prompt": {
  17187. "type": "object",
  17188. "properties": {
  17189. "text": {
  17190. "type": "string"
  17191. },
  17192. "files": {
  17193. "type": "array",
  17194. "items": {
  17195. "$ref": "#/components/schemas/PromptFileAttachment"
  17196. }
  17197. },
  17198. "agents": {
  17199. "type": "array",
  17200. "items": {
  17201. "$ref": "#/components/schemas/PromptAgentAttachment"
  17202. }
  17203. }
  17204. },
  17205. "required": ["text"],
  17206. "additionalProperties": false
  17207. },
  17208. "Pty": {
  17209. "type": "object",
  17210. "properties": {
  17211. "id": {
  17212. "type": "string",
  17213. "pattern": "^pty"
  17214. },
  17215. "title": {
  17216. "type": "string"
  17217. },
  17218. "command": {
  17219. "type": "string"
  17220. },
  17221. "args": {
  17222. "type": "array",
  17223. "items": {
  17224. "type": "string"
  17225. }
  17226. },
  17227. "cwd": {
  17228. "type": "string"
  17229. },
  17230. "status": {
  17231. "type": "string",
  17232. "enum": ["running", "exited"]
  17233. },
  17234. "pid": {
  17235. "type": "integer",
  17236. "minimum": 0
  17237. },
  17238. "exitCode": {
  17239. "type": "integer",
  17240. "minimum": 0
  17241. }
  17242. },
  17243. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  17244. "additionalProperties": false
  17245. },
  17246. "Todo": {
  17247. "type": "object",
  17248. "properties": {
  17249. "content": {
  17250. "type": "string",
  17251. "description": "Brief description of the task"
  17252. },
  17253. "status": {
  17254. "type": "string",
  17255. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  17256. },
  17257. "priority": {
  17258. "type": "string",
  17259. "description": "Priority level of the task: high, medium, low"
  17260. }
  17261. },
  17262. "required": ["content", "status", "priority"],
  17263. "additionalProperties": false
  17264. },
  17265. "SessionStatus": {
  17266. "anyOf": [
  17267. {
  17268. "type": "object",
  17269. "properties": {
  17270. "type": {
  17271. "type": "string",
  17272. "enum": ["idle"]
  17273. }
  17274. },
  17275. "required": ["type"],
  17276. "additionalProperties": false
  17277. },
  17278. {
  17279. "type": "object",
  17280. "properties": {
  17281. "type": {
  17282. "type": "string",
  17283. "enum": ["retry"]
  17284. },
  17285. "attempt": {
  17286. "type": "integer",
  17287. "minimum": 0
  17288. },
  17289. "message": {
  17290. "type": "string"
  17291. },
  17292. "action": {
  17293. "type": "object",
  17294. "properties": {
  17295. "reason": {
  17296. "type": "string"
  17297. },
  17298. "provider": {
  17299. "type": "string"
  17300. },
  17301. "title": {
  17302. "type": "string"
  17303. },
  17304. "message": {
  17305. "type": "string"
  17306. },
  17307. "label": {
  17308. "type": "string"
  17309. },
  17310. "link": {
  17311. "type": "string"
  17312. }
  17313. },
  17314. "required": ["reason", "provider", "title", "message", "label"],
  17315. "additionalProperties": false
  17316. },
  17317. "next": {
  17318. "type": "integer",
  17319. "minimum": 0
  17320. }
  17321. },
  17322. "required": ["type", "attempt", "message", "next"],
  17323. "additionalProperties": false
  17324. },
  17325. {
  17326. "type": "object",
  17327. "properties": {
  17328. "type": {
  17329. "type": "string",
  17330. "enum": ["busy"]
  17331. }
  17332. },
  17333. "required": ["type"],
  17334. "additionalProperties": false
  17335. }
  17336. ]
  17337. },
  17338. "QuestionOption": {
  17339. "type": "object",
  17340. "properties": {
  17341. "label": {
  17342. "type": "string",
  17343. "description": "Display text (1-5 words, concise)"
  17344. },
  17345. "description": {
  17346. "type": "string",
  17347. "description": "Explanation of choice"
  17348. }
  17349. },
  17350. "required": ["label", "description"],
  17351. "additionalProperties": false
  17352. },
  17353. "QuestionInfo": {
  17354. "type": "object",
  17355. "properties": {
  17356. "question": {
  17357. "type": "string",
  17358. "description": "Complete question"
  17359. },
  17360. "header": {
  17361. "type": "string",
  17362. "description": "Very short label (max 30 chars)"
  17363. },
  17364. "options": {
  17365. "type": "array",
  17366. "items": {
  17367. "$ref": "#/components/schemas/QuestionOption"
  17368. },
  17369. "description": "Available choices"
  17370. },
  17371. "multiple": {
  17372. "type": "boolean"
  17373. },
  17374. "custom": {
  17375. "type": "boolean"
  17376. }
  17377. },
  17378. "required": ["question", "header", "options"],
  17379. "additionalProperties": false
  17380. },
  17381. "QuestionTool": {
  17382. "type": "object",
  17383. "properties": {
  17384. "messageID": {
  17385. "type": "string",
  17386. "pattern": "^msg"
  17387. },
  17388. "callID": {
  17389. "type": "string"
  17390. }
  17391. },
  17392. "required": ["messageID", "callID"],
  17393. "additionalProperties": false
  17394. },
  17395. "QuestionAnswer": {
  17396. "type": "array",
  17397. "items": {
  17398. "type": "string"
  17399. }
  17400. },
  17401. "GlobalEvent": {
  17402. "type": "object",
  17403. "properties": {
  17404. "directory": {
  17405. "type": "string"
  17406. },
  17407. "project": {
  17408. "type": "string"
  17409. },
  17410. "workspace": {
  17411. "type": "string"
  17412. },
  17413. "payload": {
  17414. "anyOf": [
  17415. {
  17416. "type": "object",
  17417. "properties": {
  17418. "id": {
  17419. "type": "string",
  17420. "pattern": "^evt_"
  17421. },
  17422. "type": {
  17423. "type": "string",
  17424. "enum": ["models-dev.refreshed"]
  17425. },
  17426. "properties": {
  17427. "type": "object",
  17428. "properties": {}
  17429. }
  17430. },
  17431. "required": ["id", "type", "properties"],
  17432. "additionalProperties": false
  17433. },
  17434. {
  17435. "type": "object",
  17436. "properties": {
  17437. "id": {
  17438. "type": "string",
  17439. "pattern": "^evt_"
  17440. },
  17441. "type": {
  17442. "type": "string",
  17443. "enum": ["integration.updated"]
  17444. },
  17445. "properties": {
  17446. "type": "object",
  17447. "properties": {}
  17448. }
  17449. },
  17450. "required": ["id", "type", "properties"],
  17451. "additionalProperties": false
  17452. },
  17453. {
  17454. "type": "object",
  17455. "properties": {
  17456. "id": {
  17457. "type": "string",
  17458. "pattern": "^evt_"
  17459. },
  17460. "type": {
  17461. "type": "string",
  17462. "enum": ["integration.connection.updated"]
  17463. },
  17464. "properties": {
  17465. "type": "object",
  17466. "properties": {
  17467. "integrationID": {
  17468. "type": "string"
  17469. }
  17470. },
  17471. "required": ["integrationID"],
  17472. "additionalProperties": false
  17473. }
  17474. },
  17475. "required": ["id", "type", "properties"],
  17476. "additionalProperties": false
  17477. },
  17478. {
  17479. "type": "object",
  17480. "properties": {
  17481. "id": {
  17482. "type": "string",
  17483. "pattern": "^evt_"
  17484. },
  17485. "type": {
  17486. "type": "string",
  17487. "enum": ["catalog.updated"]
  17488. },
  17489. "properties": {
  17490. "type": "object",
  17491. "properties": {}
  17492. }
  17493. },
  17494. "required": ["id", "type", "properties"],
  17495. "additionalProperties": false
  17496. },
  17497. {
  17498. "type": "object",
  17499. "properties": {
  17500. "id": {
  17501. "type": "string",
  17502. "pattern": "^evt_"
  17503. },
  17504. "type": {
  17505. "type": "string",
  17506. "enum": ["session.created"]
  17507. },
  17508. "properties": {
  17509. "type": "object",
  17510. "properties": {
  17511. "sessionID": {
  17512. "type": "string",
  17513. "pattern": "^ses"
  17514. },
  17515. "info": {
  17516. "$ref": "#/components/schemas/Session"
  17517. }
  17518. },
  17519. "required": ["sessionID", "info"],
  17520. "additionalProperties": false
  17521. }
  17522. },
  17523. "required": ["id", "type", "properties"],
  17524. "additionalProperties": false
  17525. },
  17526. {
  17527. "type": "object",
  17528. "properties": {
  17529. "id": {
  17530. "type": "string",
  17531. "pattern": "^evt_"
  17532. },
  17533. "type": {
  17534. "type": "string",
  17535. "enum": ["session.updated"]
  17536. },
  17537. "properties": {
  17538. "type": "object",
  17539. "properties": {
  17540. "sessionID": {
  17541. "type": "string",
  17542. "pattern": "^ses"
  17543. },
  17544. "info": {
  17545. "$ref": "#/components/schemas/Session"
  17546. }
  17547. },
  17548. "required": ["sessionID", "info"],
  17549. "additionalProperties": false
  17550. }
  17551. },
  17552. "required": ["id", "type", "properties"],
  17553. "additionalProperties": false
  17554. },
  17555. {
  17556. "type": "object",
  17557. "properties": {
  17558. "id": {
  17559. "type": "string",
  17560. "pattern": "^evt_"
  17561. },
  17562. "type": {
  17563. "type": "string",
  17564. "enum": ["session.deleted"]
  17565. },
  17566. "properties": {
  17567. "type": "object",
  17568. "properties": {
  17569. "sessionID": {
  17570. "type": "string",
  17571. "pattern": "^ses"
  17572. },
  17573. "info": {
  17574. "$ref": "#/components/schemas/Session"
  17575. }
  17576. },
  17577. "required": ["sessionID", "info"],
  17578. "additionalProperties": false
  17579. }
  17580. },
  17581. "required": ["id", "type", "properties"],
  17582. "additionalProperties": false
  17583. },
  17584. {
  17585. "type": "object",
  17586. "properties": {
  17587. "id": {
  17588. "type": "string",
  17589. "pattern": "^evt_"
  17590. },
  17591. "type": {
  17592. "type": "string",
  17593. "enum": ["message.updated"]
  17594. },
  17595. "properties": {
  17596. "type": "object",
  17597. "properties": {
  17598. "sessionID": {
  17599. "type": "string",
  17600. "pattern": "^ses"
  17601. },
  17602. "info": {
  17603. "$ref": "#/components/schemas/Message"
  17604. }
  17605. },
  17606. "required": ["sessionID", "info"],
  17607. "additionalProperties": false
  17608. }
  17609. },
  17610. "required": ["id", "type", "properties"],
  17611. "additionalProperties": false
  17612. },
  17613. {
  17614. "type": "object",
  17615. "properties": {
  17616. "id": {
  17617. "type": "string",
  17618. "pattern": "^evt_"
  17619. },
  17620. "type": {
  17621. "type": "string",
  17622. "enum": ["message.removed"]
  17623. },
  17624. "properties": {
  17625. "type": "object",
  17626. "properties": {
  17627. "sessionID": {
  17628. "type": "string",
  17629. "pattern": "^ses"
  17630. },
  17631. "messageID": {
  17632. "type": "string",
  17633. "pattern": "^msg"
  17634. }
  17635. },
  17636. "required": ["sessionID", "messageID"],
  17637. "additionalProperties": false
  17638. }
  17639. },
  17640. "required": ["id", "type", "properties"],
  17641. "additionalProperties": false
  17642. },
  17643. {
  17644. "type": "object",
  17645. "properties": {
  17646. "id": {
  17647. "type": "string",
  17648. "pattern": "^evt_"
  17649. },
  17650. "type": {
  17651. "type": "string",
  17652. "enum": ["message.part.updated"]
  17653. },
  17654. "properties": {
  17655. "type": "object",
  17656. "properties": {
  17657. "sessionID": {
  17658. "type": "string",
  17659. "pattern": "^ses"
  17660. },
  17661. "part": {
  17662. "$ref": "#/components/schemas/Part"
  17663. },
  17664. "time": {
  17665. "type": "number"
  17666. }
  17667. },
  17668. "required": ["sessionID", "part", "time"],
  17669. "additionalProperties": false
  17670. }
  17671. },
  17672. "required": ["id", "type", "properties"],
  17673. "additionalProperties": false
  17674. },
  17675. {
  17676. "type": "object",
  17677. "properties": {
  17678. "id": {
  17679. "type": "string",
  17680. "pattern": "^evt_"
  17681. },
  17682. "type": {
  17683. "type": "string",
  17684. "enum": ["message.part.removed"]
  17685. },
  17686. "properties": {
  17687. "type": "object",
  17688. "properties": {
  17689. "sessionID": {
  17690. "type": "string",
  17691. "pattern": "^ses"
  17692. },
  17693. "messageID": {
  17694. "type": "string",
  17695. "pattern": "^msg"
  17696. },
  17697. "partID": {
  17698. "type": "string",
  17699. "pattern": "^prt"
  17700. }
  17701. },
  17702. "required": ["sessionID", "messageID", "partID"],
  17703. "additionalProperties": false
  17704. }
  17705. },
  17706. "required": ["id", "type", "properties"],
  17707. "additionalProperties": false
  17708. },
  17709. {
  17710. "type": "object",
  17711. "properties": {
  17712. "id": {
  17713. "type": "string",
  17714. "pattern": "^evt_"
  17715. },
  17716. "type": {
  17717. "type": "string",
  17718. "enum": ["session.next.agent.switched"]
  17719. },
  17720. "properties": {
  17721. "type": "object",
  17722. "properties": {
  17723. "timestamp": {
  17724. "type": "number"
  17725. },
  17726. "sessionID": {
  17727. "type": "string",
  17728. "pattern": "^ses"
  17729. },
  17730. "messageID": {
  17731. "type": "string",
  17732. "pattern": "^msg_"
  17733. },
  17734. "agent": {
  17735. "type": "string"
  17736. }
  17737. },
  17738. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17739. "additionalProperties": false
  17740. }
  17741. },
  17742. "required": ["id", "type", "properties"],
  17743. "additionalProperties": false
  17744. },
  17745. {
  17746. "type": "object",
  17747. "properties": {
  17748. "id": {
  17749. "type": "string",
  17750. "pattern": "^evt_"
  17751. },
  17752. "type": {
  17753. "type": "string",
  17754. "enum": ["session.next.model.switched"]
  17755. },
  17756. "properties": {
  17757. "type": "object",
  17758. "properties": {
  17759. "timestamp": {
  17760. "type": "number"
  17761. },
  17762. "sessionID": {
  17763. "type": "string",
  17764. "pattern": "^ses"
  17765. },
  17766. "messageID": {
  17767. "type": "string",
  17768. "pattern": "^msg_"
  17769. },
  17770. "model": {
  17771. "$ref": "#/components/schemas/ModelRef"
  17772. }
  17773. },
  17774. "required": ["timestamp", "sessionID", "messageID", "model"],
  17775. "additionalProperties": false
  17776. }
  17777. },
  17778. "required": ["id", "type", "properties"],
  17779. "additionalProperties": false
  17780. },
  17781. {
  17782. "type": "object",
  17783. "properties": {
  17784. "id": {
  17785. "type": "string",
  17786. "pattern": "^evt_"
  17787. },
  17788. "type": {
  17789. "type": "string",
  17790. "enum": ["session.next.moved"]
  17791. },
  17792. "properties": {
  17793. "type": "object",
  17794. "properties": {
  17795. "timestamp": {
  17796. "type": "number"
  17797. },
  17798. "sessionID": {
  17799. "type": "string",
  17800. "pattern": "^ses"
  17801. },
  17802. "location": {
  17803. "$ref": "#/components/schemas/LocationRef"
  17804. },
  17805. "subdirectory": {
  17806. "type": "string"
  17807. }
  17808. },
  17809. "required": ["timestamp", "sessionID", "location"],
  17810. "additionalProperties": false
  17811. }
  17812. },
  17813. "required": ["id", "type", "properties"],
  17814. "additionalProperties": false
  17815. },
  17816. {
  17817. "type": "object",
  17818. "properties": {
  17819. "id": {
  17820. "type": "string",
  17821. "pattern": "^evt_"
  17822. },
  17823. "type": {
  17824. "type": "string",
  17825. "enum": ["session.next.prompted"]
  17826. },
  17827. "properties": {
  17828. "type": "object",
  17829. "properties": {
  17830. "timestamp": {
  17831. "type": "number"
  17832. },
  17833. "sessionID": {
  17834. "type": "string",
  17835. "pattern": "^ses"
  17836. },
  17837. "messageID": {
  17838. "type": "string",
  17839. "pattern": "^msg_"
  17840. },
  17841. "prompt": {
  17842. "$ref": "#/components/schemas/Prompt"
  17843. },
  17844. "delivery": {
  17845. "type": "string",
  17846. "enum": ["steer", "queue"]
  17847. }
  17848. },
  17849. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17850. "additionalProperties": false
  17851. }
  17852. },
  17853. "required": ["id", "type", "properties"],
  17854. "additionalProperties": false
  17855. },
  17856. {
  17857. "type": "object",
  17858. "properties": {
  17859. "id": {
  17860. "type": "string",
  17861. "pattern": "^evt_"
  17862. },
  17863. "type": {
  17864. "type": "string",
  17865. "enum": ["session.next.prompt.admitted"]
  17866. },
  17867. "properties": {
  17868. "type": "object",
  17869. "properties": {
  17870. "timestamp": {
  17871. "type": "number"
  17872. },
  17873. "sessionID": {
  17874. "type": "string",
  17875. "pattern": "^ses"
  17876. },
  17877. "messageID": {
  17878. "type": "string",
  17879. "pattern": "^msg_"
  17880. },
  17881. "prompt": {
  17882. "$ref": "#/components/schemas/Prompt"
  17883. },
  17884. "delivery": {
  17885. "type": "string",
  17886. "enum": ["steer", "queue"]
  17887. }
  17888. },
  17889. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17890. "additionalProperties": false
  17891. }
  17892. },
  17893. "required": ["id", "type", "properties"],
  17894. "additionalProperties": false
  17895. },
  17896. {
  17897. "type": "object",
  17898. "properties": {
  17899. "id": {
  17900. "type": "string",
  17901. "pattern": "^evt_"
  17902. },
  17903. "type": {
  17904. "type": "string",
  17905. "enum": ["session.next.context.updated"]
  17906. },
  17907. "properties": {
  17908. "type": "object",
  17909. "properties": {
  17910. "timestamp": {
  17911. "type": "number"
  17912. },
  17913. "sessionID": {
  17914. "type": "string",
  17915. "pattern": "^ses"
  17916. },
  17917. "messageID": {
  17918. "type": "string",
  17919. "pattern": "^msg_"
  17920. },
  17921. "text": {
  17922. "type": "string"
  17923. }
  17924. },
  17925. "required": ["timestamp", "sessionID", "messageID", "text"],
  17926. "additionalProperties": false
  17927. }
  17928. },
  17929. "required": ["id", "type", "properties"],
  17930. "additionalProperties": false
  17931. },
  17932. {
  17933. "type": "object",
  17934. "properties": {
  17935. "id": {
  17936. "type": "string",
  17937. "pattern": "^evt_"
  17938. },
  17939. "type": {
  17940. "type": "string",
  17941. "enum": ["session.next.synthetic"]
  17942. },
  17943. "properties": {
  17944. "type": "object",
  17945. "properties": {
  17946. "timestamp": {
  17947. "type": "number"
  17948. },
  17949. "sessionID": {
  17950. "type": "string",
  17951. "pattern": "^ses"
  17952. },
  17953. "messageID": {
  17954. "type": "string",
  17955. "pattern": "^msg_"
  17956. },
  17957. "text": {
  17958. "type": "string"
  17959. }
  17960. },
  17961. "required": ["timestamp", "sessionID", "messageID", "text"],
  17962. "additionalProperties": false
  17963. }
  17964. },
  17965. "required": ["id", "type", "properties"],
  17966. "additionalProperties": false
  17967. },
  17968. {
  17969. "type": "object",
  17970. "properties": {
  17971. "id": {
  17972. "type": "string",
  17973. "pattern": "^evt_"
  17974. },
  17975. "type": {
  17976. "type": "string",
  17977. "enum": ["session.next.shell.started"]
  17978. },
  17979. "properties": {
  17980. "type": "object",
  17981. "properties": {
  17982. "timestamp": {
  17983. "type": "number"
  17984. },
  17985. "sessionID": {
  17986. "type": "string",
  17987. "pattern": "^ses"
  17988. },
  17989. "messageID": {
  17990. "type": "string",
  17991. "pattern": "^msg_"
  17992. },
  17993. "callID": {
  17994. "type": "string"
  17995. },
  17996. "command": {
  17997. "type": "string"
  17998. }
  17999. },
  18000. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  18001. "additionalProperties": false
  18002. }
  18003. },
  18004. "required": ["id", "type", "properties"],
  18005. "additionalProperties": false
  18006. },
  18007. {
  18008. "type": "object",
  18009. "properties": {
  18010. "id": {
  18011. "type": "string",
  18012. "pattern": "^evt_"
  18013. },
  18014. "type": {
  18015. "type": "string",
  18016. "enum": ["session.next.shell.ended"]
  18017. },
  18018. "properties": {
  18019. "type": "object",
  18020. "properties": {
  18021. "timestamp": {
  18022. "type": "number"
  18023. },
  18024. "sessionID": {
  18025. "type": "string",
  18026. "pattern": "^ses"
  18027. },
  18028. "callID": {
  18029. "type": "string"
  18030. },
  18031. "output": {
  18032. "type": "string"
  18033. }
  18034. },
  18035. "required": ["timestamp", "sessionID", "callID", "output"],
  18036. "additionalProperties": false
  18037. }
  18038. },
  18039. "required": ["id", "type", "properties"],
  18040. "additionalProperties": false
  18041. },
  18042. {
  18043. "type": "object",
  18044. "properties": {
  18045. "id": {
  18046. "type": "string",
  18047. "pattern": "^evt_"
  18048. },
  18049. "type": {
  18050. "type": "string",
  18051. "enum": ["session.next.step.started"]
  18052. },
  18053. "properties": {
  18054. "type": "object",
  18055. "properties": {
  18056. "timestamp": {
  18057. "type": "number"
  18058. },
  18059. "sessionID": {
  18060. "type": "string",
  18061. "pattern": "^ses"
  18062. },
  18063. "assistantMessageID": {
  18064. "type": "string",
  18065. "pattern": "^msg_"
  18066. },
  18067. "agent": {
  18068. "type": "string"
  18069. },
  18070. "model": {
  18071. "$ref": "#/components/schemas/ModelRef"
  18072. },
  18073. "snapshot": {
  18074. "type": "string"
  18075. }
  18076. },
  18077. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  18078. "additionalProperties": false
  18079. }
  18080. },
  18081. "required": ["id", "type", "properties"],
  18082. "additionalProperties": false
  18083. },
  18084. {
  18085. "type": "object",
  18086. "properties": {
  18087. "id": {
  18088. "type": "string",
  18089. "pattern": "^evt_"
  18090. },
  18091. "type": {
  18092. "type": "string",
  18093. "enum": ["session.next.step.ended"]
  18094. },
  18095. "properties": {
  18096. "type": "object",
  18097. "properties": {
  18098. "timestamp": {
  18099. "type": "number"
  18100. },
  18101. "sessionID": {
  18102. "type": "string",
  18103. "pattern": "^ses"
  18104. },
  18105. "assistantMessageID": {
  18106. "type": "string",
  18107. "pattern": "^msg_"
  18108. },
  18109. "finish": {
  18110. "type": "string"
  18111. },
  18112. "cost": {
  18113. "type": "number"
  18114. },
  18115. "tokens": {
  18116. "type": "object",
  18117. "properties": {
  18118. "input": {
  18119. "type": "number"
  18120. },
  18121. "output": {
  18122. "type": "number"
  18123. },
  18124. "reasoning": {
  18125. "type": "number"
  18126. },
  18127. "cache": {
  18128. "type": "object",
  18129. "properties": {
  18130. "read": {
  18131. "type": "number"
  18132. },
  18133. "write": {
  18134. "type": "number"
  18135. }
  18136. },
  18137. "required": ["read", "write"],
  18138. "additionalProperties": false
  18139. }
  18140. },
  18141. "required": ["input", "output", "reasoning", "cache"],
  18142. "additionalProperties": false
  18143. },
  18144. "snapshot": {
  18145. "type": "string"
  18146. },
  18147. "files": {
  18148. "type": "array",
  18149. "items": {
  18150. "type": "string"
  18151. }
  18152. }
  18153. },
  18154. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  18155. "additionalProperties": false
  18156. }
  18157. },
  18158. "required": ["id", "type", "properties"],
  18159. "additionalProperties": false
  18160. },
  18161. {
  18162. "type": "object",
  18163. "properties": {
  18164. "id": {
  18165. "type": "string",
  18166. "pattern": "^evt_"
  18167. },
  18168. "type": {
  18169. "type": "string",
  18170. "enum": ["session.next.step.failed"]
  18171. },
  18172. "properties": {
  18173. "type": "object",
  18174. "properties": {
  18175. "timestamp": {
  18176. "type": "number"
  18177. },
  18178. "sessionID": {
  18179. "type": "string",
  18180. "pattern": "^ses"
  18181. },
  18182. "assistantMessageID": {
  18183. "type": "string",
  18184. "pattern": "^msg_"
  18185. },
  18186. "error": {
  18187. "$ref": "#/components/schemas/SessionErrorUnknown"
  18188. }
  18189. },
  18190. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  18191. "additionalProperties": false
  18192. }
  18193. },
  18194. "required": ["id", "type", "properties"],
  18195. "additionalProperties": false
  18196. },
  18197. {
  18198. "type": "object",
  18199. "properties": {
  18200. "id": {
  18201. "type": "string",
  18202. "pattern": "^evt_"
  18203. },
  18204. "type": {
  18205. "type": "string",
  18206. "enum": ["session.next.text.started"]
  18207. },
  18208. "properties": {
  18209. "type": "object",
  18210. "properties": {
  18211. "timestamp": {
  18212. "type": "number"
  18213. },
  18214. "sessionID": {
  18215. "type": "string",
  18216. "pattern": "^ses"
  18217. },
  18218. "assistantMessageID": {
  18219. "type": "string",
  18220. "pattern": "^msg_"
  18221. },
  18222. "textID": {
  18223. "type": "string"
  18224. }
  18225. },
  18226. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  18227. "additionalProperties": false
  18228. }
  18229. },
  18230. "required": ["id", "type", "properties"],
  18231. "additionalProperties": false
  18232. },
  18233. {
  18234. "type": "object",
  18235. "properties": {
  18236. "id": {
  18237. "type": "string",
  18238. "pattern": "^evt_"
  18239. },
  18240. "type": {
  18241. "type": "string",
  18242. "enum": ["session.next.text.delta"]
  18243. },
  18244. "properties": {
  18245. "type": "object",
  18246. "properties": {
  18247. "timestamp": {
  18248. "type": "number"
  18249. },
  18250. "sessionID": {
  18251. "type": "string",
  18252. "pattern": "^ses"
  18253. },
  18254. "assistantMessageID": {
  18255. "type": "string",
  18256. "pattern": "^msg_"
  18257. },
  18258. "textID": {
  18259. "type": "string"
  18260. },
  18261. "delta": {
  18262. "type": "string"
  18263. }
  18264. },
  18265. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  18266. "additionalProperties": false
  18267. }
  18268. },
  18269. "required": ["id", "type", "properties"],
  18270. "additionalProperties": false
  18271. },
  18272. {
  18273. "type": "object",
  18274. "properties": {
  18275. "id": {
  18276. "type": "string",
  18277. "pattern": "^evt_"
  18278. },
  18279. "type": {
  18280. "type": "string",
  18281. "enum": ["session.next.text.ended"]
  18282. },
  18283. "properties": {
  18284. "type": "object",
  18285. "properties": {
  18286. "timestamp": {
  18287. "type": "number"
  18288. },
  18289. "sessionID": {
  18290. "type": "string",
  18291. "pattern": "^ses"
  18292. },
  18293. "assistantMessageID": {
  18294. "type": "string",
  18295. "pattern": "^msg_"
  18296. },
  18297. "textID": {
  18298. "type": "string"
  18299. },
  18300. "text": {
  18301. "type": "string"
  18302. }
  18303. },
  18304. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  18305. "additionalProperties": false
  18306. }
  18307. },
  18308. "required": ["id", "type", "properties"],
  18309. "additionalProperties": false
  18310. },
  18311. {
  18312. "type": "object",
  18313. "properties": {
  18314. "id": {
  18315. "type": "string",
  18316. "pattern": "^evt_"
  18317. },
  18318. "type": {
  18319. "type": "string",
  18320. "enum": ["session.next.reasoning.started"]
  18321. },
  18322. "properties": {
  18323. "type": "object",
  18324. "properties": {
  18325. "timestamp": {
  18326. "type": "number"
  18327. },
  18328. "sessionID": {
  18329. "type": "string",
  18330. "pattern": "^ses"
  18331. },
  18332. "assistantMessageID": {
  18333. "type": "string",
  18334. "pattern": "^msg_"
  18335. },
  18336. "reasoningID": {
  18337. "type": "string"
  18338. },
  18339. "providerMetadata": {
  18340. "$ref": "#/components/schemas/LLMProviderMetadata"
  18341. }
  18342. },
  18343. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  18344. "additionalProperties": false
  18345. }
  18346. },
  18347. "required": ["id", "type", "properties"],
  18348. "additionalProperties": false
  18349. },
  18350. {
  18351. "type": "object",
  18352. "properties": {
  18353. "id": {
  18354. "type": "string",
  18355. "pattern": "^evt_"
  18356. },
  18357. "type": {
  18358. "type": "string",
  18359. "enum": ["session.next.reasoning.delta"]
  18360. },
  18361. "properties": {
  18362. "type": "object",
  18363. "properties": {
  18364. "timestamp": {
  18365. "type": "number"
  18366. },
  18367. "sessionID": {
  18368. "type": "string",
  18369. "pattern": "^ses"
  18370. },
  18371. "assistantMessageID": {
  18372. "type": "string",
  18373. "pattern": "^msg_"
  18374. },
  18375. "reasoningID": {
  18376. "type": "string"
  18377. },
  18378. "delta": {
  18379. "type": "string"
  18380. }
  18381. },
  18382. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18383. "additionalProperties": false
  18384. }
  18385. },
  18386. "required": ["id", "type", "properties"],
  18387. "additionalProperties": false
  18388. },
  18389. {
  18390. "type": "object",
  18391. "properties": {
  18392. "id": {
  18393. "type": "string",
  18394. "pattern": "^evt_"
  18395. },
  18396. "type": {
  18397. "type": "string",
  18398. "enum": ["session.next.reasoning.ended"]
  18399. },
  18400. "properties": {
  18401. "type": "object",
  18402. "properties": {
  18403. "timestamp": {
  18404. "type": "number"
  18405. },
  18406. "sessionID": {
  18407. "type": "string",
  18408. "pattern": "^ses"
  18409. },
  18410. "assistantMessageID": {
  18411. "type": "string",
  18412. "pattern": "^msg_"
  18413. },
  18414. "reasoningID": {
  18415. "type": "string"
  18416. },
  18417. "text": {
  18418. "type": "string"
  18419. },
  18420. "providerMetadata": {
  18421. "$ref": "#/components/schemas/LLMProviderMetadata"
  18422. }
  18423. },
  18424. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  18425. "additionalProperties": false
  18426. }
  18427. },
  18428. "required": ["id", "type", "properties"],
  18429. "additionalProperties": false
  18430. },
  18431. {
  18432. "type": "object",
  18433. "properties": {
  18434. "id": {
  18435. "type": "string",
  18436. "pattern": "^evt_"
  18437. },
  18438. "type": {
  18439. "type": "string",
  18440. "enum": ["session.next.tool.input.started"]
  18441. },
  18442. "properties": {
  18443. "type": "object",
  18444. "properties": {
  18445. "timestamp": {
  18446. "type": "number"
  18447. },
  18448. "sessionID": {
  18449. "type": "string",
  18450. "pattern": "^ses"
  18451. },
  18452. "assistantMessageID": {
  18453. "type": "string",
  18454. "pattern": "^msg_"
  18455. },
  18456. "callID": {
  18457. "type": "string"
  18458. },
  18459. "name": {
  18460. "type": "string"
  18461. }
  18462. },
  18463. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18464. "additionalProperties": false
  18465. }
  18466. },
  18467. "required": ["id", "type", "properties"],
  18468. "additionalProperties": false
  18469. },
  18470. {
  18471. "type": "object",
  18472. "properties": {
  18473. "id": {
  18474. "type": "string",
  18475. "pattern": "^evt_"
  18476. },
  18477. "type": {
  18478. "type": "string",
  18479. "enum": ["session.next.tool.input.delta"]
  18480. },
  18481. "properties": {
  18482. "type": "object",
  18483. "properties": {
  18484. "timestamp": {
  18485. "type": "number"
  18486. },
  18487. "sessionID": {
  18488. "type": "string",
  18489. "pattern": "^ses"
  18490. },
  18491. "assistantMessageID": {
  18492. "type": "string",
  18493. "pattern": "^msg_"
  18494. },
  18495. "callID": {
  18496. "type": "string"
  18497. },
  18498. "delta": {
  18499. "type": "string"
  18500. }
  18501. },
  18502. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18503. "additionalProperties": false
  18504. }
  18505. },
  18506. "required": ["id", "type", "properties"],
  18507. "additionalProperties": false
  18508. },
  18509. {
  18510. "type": "object",
  18511. "properties": {
  18512. "id": {
  18513. "type": "string",
  18514. "pattern": "^evt_"
  18515. },
  18516. "type": {
  18517. "type": "string",
  18518. "enum": ["session.next.tool.input.ended"]
  18519. },
  18520. "properties": {
  18521. "type": "object",
  18522. "properties": {
  18523. "timestamp": {
  18524. "type": "number"
  18525. },
  18526. "sessionID": {
  18527. "type": "string",
  18528. "pattern": "^ses"
  18529. },
  18530. "assistantMessageID": {
  18531. "type": "string",
  18532. "pattern": "^msg_"
  18533. },
  18534. "callID": {
  18535. "type": "string"
  18536. },
  18537. "text": {
  18538. "type": "string"
  18539. }
  18540. },
  18541. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18542. "additionalProperties": false
  18543. }
  18544. },
  18545. "required": ["id", "type", "properties"],
  18546. "additionalProperties": false
  18547. },
  18548. {
  18549. "type": "object",
  18550. "properties": {
  18551. "id": {
  18552. "type": "string",
  18553. "pattern": "^evt_"
  18554. },
  18555. "type": {
  18556. "type": "string",
  18557. "enum": ["session.next.tool.called"]
  18558. },
  18559. "properties": {
  18560. "type": "object",
  18561. "properties": {
  18562. "timestamp": {
  18563. "type": "number"
  18564. },
  18565. "sessionID": {
  18566. "type": "string",
  18567. "pattern": "^ses"
  18568. },
  18569. "assistantMessageID": {
  18570. "type": "string",
  18571. "pattern": "^msg_"
  18572. },
  18573. "callID": {
  18574. "type": "string"
  18575. },
  18576. "tool": {
  18577. "type": "string"
  18578. },
  18579. "input": {
  18580. "type": "object"
  18581. },
  18582. "provider": {
  18583. "type": "object",
  18584. "properties": {
  18585. "executed": {
  18586. "type": "boolean"
  18587. },
  18588. "metadata": {
  18589. "$ref": "#/components/schemas/LLMProviderMetadata"
  18590. }
  18591. },
  18592. "required": ["executed"],
  18593. "additionalProperties": false
  18594. }
  18595. },
  18596. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18597. "additionalProperties": false
  18598. }
  18599. },
  18600. "required": ["id", "type", "properties"],
  18601. "additionalProperties": false
  18602. },
  18603. {
  18604. "type": "object",
  18605. "properties": {
  18606. "id": {
  18607. "type": "string",
  18608. "pattern": "^evt_"
  18609. },
  18610. "type": {
  18611. "type": "string",
  18612. "enum": ["session.next.tool.progress"]
  18613. },
  18614. "properties": {
  18615. "type": "object",
  18616. "properties": {
  18617. "timestamp": {
  18618. "type": "number"
  18619. },
  18620. "sessionID": {
  18621. "type": "string",
  18622. "pattern": "^ses"
  18623. },
  18624. "assistantMessageID": {
  18625. "type": "string",
  18626. "pattern": "^msg_"
  18627. },
  18628. "callID": {
  18629. "type": "string"
  18630. },
  18631. "structured": {
  18632. "type": "object"
  18633. },
  18634. "content": {
  18635. "type": "array",
  18636. "items": {
  18637. "$ref": "#/components/schemas/LLMToolContent"
  18638. }
  18639. }
  18640. },
  18641. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18642. "additionalProperties": false
  18643. }
  18644. },
  18645. "required": ["id", "type", "properties"],
  18646. "additionalProperties": false
  18647. },
  18648. {
  18649. "type": "object",
  18650. "properties": {
  18651. "id": {
  18652. "type": "string",
  18653. "pattern": "^evt_"
  18654. },
  18655. "type": {
  18656. "type": "string",
  18657. "enum": ["session.next.tool.success"]
  18658. },
  18659. "properties": {
  18660. "type": "object",
  18661. "properties": {
  18662. "timestamp": {
  18663. "type": "number"
  18664. },
  18665. "sessionID": {
  18666. "type": "string",
  18667. "pattern": "^ses"
  18668. },
  18669. "assistantMessageID": {
  18670. "type": "string",
  18671. "pattern": "^msg_"
  18672. },
  18673. "callID": {
  18674. "type": "string"
  18675. },
  18676. "structured": {
  18677. "type": "object"
  18678. },
  18679. "content": {
  18680. "type": "array",
  18681. "items": {
  18682. "$ref": "#/components/schemas/LLMToolContent"
  18683. }
  18684. },
  18685. "outputPaths": {
  18686. "type": "array",
  18687. "items": {
  18688. "type": "string"
  18689. }
  18690. },
  18691. "result": {},
  18692. "provider": {
  18693. "type": "object",
  18694. "properties": {
  18695. "executed": {
  18696. "type": "boolean"
  18697. },
  18698. "metadata": {
  18699. "$ref": "#/components/schemas/LLMProviderMetadata"
  18700. }
  18701. },
  18702. "required": ["executed"],
  18703. "additionalProperties": false
  18704. }
  18705. },
  18706. "required": [
  18707. "timestamp",
  18708. "sessionID",
  18709. "assistantMessageID",
  18710. "callID",
  18711. "structured",
  18712. "content",
  18713. "provider"
  18714. ],
  18715. "additionalProperties": false
  18716. }
  18717. },
  18718. "required": ["id", "type", "properties"],
  18719. "additionalProperties": false
  18720. },
  18721. {
  18722. "type": "object",
  18723. "properties": {
  18724. "id": {
  18725. "type": "string",
  18726. "pattern": "^evt_"
  18727. },
  18728. "type": {
  18729. "type": "string",
  18730. "enum": ["session.next.tool.failed"]
  18731. },
  18732. "properties": {
  18733. "type": "object",
  18734. "properties": {
  18735. "timestamp": {
  18736. "type": "number"
  18737. },
  18738. "sessionID": {
  18739. "type": "string",
  18740. "pattern": "^ses"
  18741. },
  18742. "assistantMessageID": {
  18743. "type": "string",
  18744. "pattern": "^msg_"
  18745. },
  18746. "callID": {
  18747. "type": "string"
  18748. },
  18749. "error": {
  18750. "$ref": "#/components/schemas/SessionErrorUnknown"
  18751. },
  18752. "result": {},
  18753. "provider": {
  18754. "type": "object",
  18755. "properties": {
  18756. "executed": {
  18757. "type": "boolean"
  18758. },
  18759. "metadata": {
  18760. "$ref": "#/components/schemas/LLMProviderMetadata"
  18761. }
  18762. },
  18763. "required": ["executed"],
  18764. "additionalProperties": false
  18765. }
  18766. },
  18767. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18768. "additionalProperties": false
  18769. }
  18770. },
  18771. "required": ["id", "type", "properties"],
  18772. "additionalProperties": false
  18773. },
  18774. {
  18775. "type": "object",
  18776. "properties": {
  18777. "id": {
  18778. "type": "string",
  18779. "pattern": "^evt_"
  18780. },
  18781. "type": {
  18782. "type": "string",
  18783. "enum": ["session.next.retried"]
  18784. },
  18785. "properties": {
  18786. "type": "object",
  18787. "properties": {
  18788. "timestamp": {
  18789. "type": "number"
  18790. },
  18791. "sessionID": {
  18792. "type": "string",
  18793. "pattern": "^ses"
  18794. },
  18795. "attempt": {
  18796. "type": "number"
  18797. },
  18798. "error": {
  18799. "$ref": "#/components/schemas/SessionNextRetry_error"
  18800. }
  18801. },
  18802. "required": ["timestamp", "sessionID", "attempt", "error"],
  18803. "additionalProperties": false
  18804. }
  18805. },
  18806. "required": ["id", "type", "properties"],
  18807. "additionalProperties": false
  18808. },
  18809. {
  18810. "type": "object",
  18811. "properties": {
  18812. "id": {
  18813. "type": "string",
  18814. "pattern": "^evt_"
  18815. },
  18816. "type": {
  18817. "type": "string",
  18818. "enum": ["session.next.compaction.started"]
  18819. },
  18820. "properties": {
  18821. "type": "object",
  18822. "properties": {
  18823. "timestamp": {
  18824. "type": "number"
  18825. },
  18826. "sessionID": {
  18827. "type": "string",
  18828. "pattern": "^ses"
  18829. },
  18830. "messageID": {
  18831. "type": "string",
  18832. "pattern": "^msg_"
  18833. },
  18834. "reason": {
  18835. "type": "string",
  18836. "enum": ["auto", "manual"]
  18837. }
  18838. },
  18839. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18840. "additionalProperties": false
  18841. }
  18842. },
  18843. "required": ["id", "type", "properties"],
  18844. "additionalProperties": false
  18845. },
  18846. {
  18847. "type": "object",
  18848. "properties": {
  18849. "id": {
  18850. "type": "string",
  18851. "pattern": "^evt_"
  18852. },
  18853. "type": {
  18854. "type": "string",
  18855. "enum": ["session.next.compaction.delta"]
  18856. },
  18857. "properties": {
  18858. "type": "object",
  18859. "properties": {
  18860. "timestamp": {
  18861. "type": "number"
  18862. },
  18863. "sessionID": {
  18864. "type": "string",
  18865. "pattern": "^ses"
  18866. },
  18867. "messageID": {
  18868. "type": "string",
  18869. "pattern": "^msg_"
  18870. },
  18871. "text": {
  18872. "type": "string"
  18873. }
  18874. },
  18875. "required": ["timestamp", "sessionID", "messageID", "text"],
  18876. "additionalProperties": false
  18877. }
  18878. },
  18879. "required": ["id", "type", "properties"],
  18880. "additionalProperties": false
  18881. },
  18882. {
  18883. "type": "object",
  18884. "properties": {
  18885. "id": {
  18886. "type": "string",
  18887. "pattern": "^evt_"
  18888. },
  18889. "type": {
  18890. "type": "string",
  18891. "enum": ["session.next.compaction.ended"]
  18892. },
  18893. "properties": {
  18894. "type": "object",
  18895. "properties": {
  18896. "timestamp": {
  18897. "type": "number"
  18898. },
  18899. "sessionID": {
  18900. "type": "string",
  18901. "pattern": "^ses"
  18902. },
  18903. "messageID": {
  18904. "type": "string",
  18905. "pattern": "^msg_"
  18906. },
  18907. "reason": {
  18908. "type": "string",
  18909. "enum": ["auto", "manual"]
  18910. },
  18911. "text": {
  18912. "type": "string"
  18913. },
  18914. "recent": {
  18915. "type": "string"
  18916. }
  18917. },
  18918. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18919. "additionalProperties": false
  18920. }
  18921. },
  18922. "required": ["id", "type", "properties"],
  18923. "additionalProperties": false
  18924. },
  18925. {
  18926. "type": "object",
  18927. "properties": {
  18928. "id": {
  18929. "type": "string",
  18930. "pattern": "^evt_"
  18931. },
  18932. "type": {
  18933. "type": "string",
  18934. "enum": ["session.next.revert.staged"]
  18935. },
  18936. "properties": {
  18937. "type": "object",
  18938. "properties": {
  18939. "timestamp": {
  18940. "type": "number"
  18941. },
  18942. "sessionID": {
  18943. "type": "string",
  18944. "pattern": "^ses"
  18945. },
  18946. "revert": {
  18947. "$ref": "#/components/schemas/RevertState"
  18948. }
  18949. },
  18950. "required": ["timestamp", "sessionID", "revert"],
  18951. "additionalProperties": false
  18952. }
  18953. },
  18954. "required": ["id", "type", "properties"],
  18955. "additionalProperties": false
  18956. },
  18957. {
  18958. "type": "object",
  18959. "properties": {
  18960. "id": {
  18961. "type": "string",
  18962. "pattern": "^evt_"
  18963. },
  18964. "type": {
  18965. "type": "string",
  18966. "enum": ["session.next.revert.cleared"]
  18967. },
  18968. "properties": {
  18969. "type": "object",
  18970. "properties": {
  18971. "timestamp": {
  18972. "type": "number"
  18973. },
  18974. "sessionID": {
  18975. "type": "string",
  18976. "pattern": "^ses"
  18977. }
  18978. },
  18979. "required": ["timestamp", "sessionID"],
  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.next.revert.committed"]
  18996. },
  18997. "properties": {
  18998. "type": "object",
  18999. "properties": {
  19000. "timestamp": {
  19001. "type": "number"
  19002. },
  19003. "sessionID": {
  19004. "type": "string",
  19005. "pattern": "^ses"
  19006. },
  19007. "messageID": {
  19008. "type": "string",
  19009. "pattern": "^msg_"
  19010. }
  19011. },
  19012. "required": ["timestamp", "sessionID", "messageID"],
  19013. "additionalProperties": false
  19014. }
  19015. },
  19016. "required": ["id", "type", "properties"],
  19017. "additionalProperties": false
  19018. },
  19019. {
  19020. "type": "object",
  19021. "properties": {
  19022. "id": {
  19023. "type": "string",
  19024. "pattern": "^evt_"
  19025. },
  19026. "type": {
  19027. "type": "string",
  19028. "enum": ["message.part.delta"]
  19029. },
  19030. "properties": {
  19031. "type": "object",
  19032. "properties": {
  19033. "sessionID": {
  19034. "type": "string",
  19035. "pattern": "^ses"
  19036. },
  19037. "messageID": {
  19038. "type": "string",
  19039. "pattern": "^msg"
  19040. },
  19041. "partID": {
  19042. "type": "string",
  19043. "pattern": "^prt"
  19044. },
  19045. "field": {
  19046. "type": "string"
  19047. },
  19048. "delta": {
  19049. "type": "string"
  19050. }
  19051. },
  19052. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  19053. "additionalProperties": false
  19054. }
  19055. },
  19056. "required": ["id", "type", "properties"],
  19057. "additionalProperties": false
  19058. },
  19059. {
  19060. "type": "object",
  19061. "properties": {
  19062. "id": {
  19063. "type": "string",
  19064. "pattern": "^evt_"
  19065. },
  19066. "type": {
  19067. "type": "string",
  19068. "enum": ["session.diff"]
  19069. },
  19070. "properties": {
  19071. "type": "object",
  19072. "properties": {
  19073. "sessionID": {
  19074. "type": "string",
  19075. "pattern": "^ses"
  19076. },
  19077. "diff": {
  19078. "type": "array",
  19079. "items": {
  19080. "$ref": "#/components/schemas/SnapshotFileDiff"
  19081. }
  19082. }
  19083. },
  19084. "required": ["sessionID", "diff"],
  19085. "additionalProperties": false
  19086. }
  19087. },
  19088. "required": ["id", "type", "properties"],
  19089. "additionalProperties": false
  19090. },
  19091. {
  19092. "type": "object",
  19093. "properties": {
  19094. "id": {
  19095. "type": "string",
  19096. "pattern": "^evt_"
  19097. },
  19098. "type": {
  19099. "type": "string",
  19100. "enum": ["session.error"]
  19101. },
  19102. "properties": {
  19103. "type": "object",
  19104. "properties": {
  19105. "sessionID": {
  19106. "type": "string",
  19107. "pattern": "^ses"
  19108. },
  19109. "error": {
  19110. "anyOf": [
  19111. {
  19112. "$ref": "#/components/schemas/ProviderAuthError"
  19113. },
  19114. {
  19115. "$ref": "#/components/schemas/UnknownError"
  19116. },
  19117. {
  19118. "$ref": "#/components/schemas/MessageOutputLengthError"
  19119. },
  19120. {
  19121. "$ref": "#/components/schemas/MessageAbortedError"
  19122. },
  19123. {
  19124. "$ref": "#/components/schemas/StructuredOutputError"
  19125. },
  19126. {
  19127. "$ref": "#/components/schemas/ContextOverflowError"
  19128. },
  19129. {
  19130. "$ref": "#/components/schemas/ContentFilterError"
  19131. },
  19132. {
  19133. "$ref": "#/components/schemas/APIError"
  19134. }
  19135. ]
  19136. }
  19137. },
  19138. "additionalProperties": false
  19139. }
  19140. },
  19141. "required": ["id", "type", "properties"],
  19142. "additionalProperties": false
  19143. },
  19144. {
  19145. "type": "object",
  19146. "properties": {
  19147. "id": {
  19148. "type": "string",
  19149. "pattern": "^evt_"
  19150. },
  19151. "type": {
  19152. "type": "string",
  19153. "enum": ["installation.updated"]
  19154. },
  19155. "properties": {
  19156. "type": "object",
  19157. "properties": {
  19158. "version": {
  19159. "type": "string"
  19160. }
  19161. },
  19162. "required": ["version"],
  19163. "additionalProperties": false
  19164. }
  19165. },
  19166. "required": ["id", "type", "properties"],
  19167. "additionalProperties": false
  19168. },
  19169. {
  19170. "type": "object",
  19171. "properties": {
  19172. "id": {
  19173. "type": "string",
  19174. "pattern": "^evt_"
  19175. },
  19176. "type": {
  19177. "type": "string",
  19178. "enum": ["installation.update-available"]
  19179. },
  19180. "properties": {
  19181. "type": "object",
  19182. "properties": {
  19183. "version": {
  19184. "type": "string"
  19185. }
  19186. },
  19187. "required": ["version"],
  19188. "additionalProperties": false
  19189. }
  19190. },
  19191. "required": ["id", "type", "properties"],
  19192. "additionalProperties": false
  19193. },
  19194. {
  19195. "type": "object",
  19196. "properties": {
  19197. "id": {
  19198. "type": "string",
  19199. "pattern": "^evt_"
  19200. },
  19201. "type": {
  19202. "type": "string",
  19203. "enum": ["file.edited"]
  19204. },
  19205. "properties": {
  19206. "type": "object",
  19207. "properties": {
  19208. "file": {
  19209. "type": "string"
  19210. }
  19211. },
  19212. "required": ["file"],
  19213. "additionalProperties": false
  19214. }
  19215. },
  19216. "required": ["id", "type", "properties"],
  19217. "additionalProperties": false
  19218. },
  19219. {
  19220. "type": "object",
  19221. "properties": {
  19222. "id": {
  19223. "type": "string",
  19224. "pattern": "^evt_"
  19225. },
  19226. "type": {
  19227. "type": "string",
  19228. "enum": ["reference.updated"]
  19229. },
  19230. "properties": {
  19231. "type": "object",
  19232. "properties": {}
  19233. }
  19234. },
  19235. "required": ["id", "type", "properties"],
  19236. "additionalProperties": false
  19237. },
  19238. {
  19239. "type": "object",
  19240. "properties": {
  19241. "id": {
  19242. "type": "string",
  19243. "pattern": "^evt_"
  19244. },
  19245. "type": {
  19246. "type": "string",
  19247. "enum": ["permission.v2.asked"]
  19248. },
  19249. "properties": {
  19250. "type": "object",
  19251. "properties": {
  19252. "id": {
  19253. "type": "string",
  19254. "pattern": "^per"
  19255. },
  19256. "sessionID": {
  19257. "type": "string",
  19258. "pattern": "^ses"
  19259. },
  19260. "action": {
  19261. "type": "string"
  19262. },
  19263. "resources": {
  19264. "type": "array",
  19265. "items": {
  19266. "type": "string"
  19267. }
  19268. },
  19269. "save": {
  19270. "type": "array",
  19271. "items": {
  19272. "type": "string"
  19273. }
  19274. },
  19275. "metadata": {
  19276. "type": "object"
  19277. },
  19278. "source": {
  19279. "$ref": "#/components/schemas/PermissionV2Source"
  19280. }
  19281. },
  19282. "required": ["id", "sessionID", "action", "resources"],
  19283. "additionalProperties": false
  19284. }
  19285. },
  19286. "required": ["id", "type", "properties"],
  19287. "additionalProperties": false
  19288. },
  19289. {
  19290. "type": "object",
  19291. "properties": {
  19292. "id": {
  19293. "type": "string",
  19294. "pattern": "^evt_"
  19295. },
  19296. "type": {
  19297. "type": "string",
  19298. "enum": ["permission.v2.replied"]
  19299. },
  19300. "properties": {
  19301. "type": "object",
  19302. "properties": {
  19303. "sessionID": {
  19304. "type": "string",
  19305. "pattern": "^ses"
  19306. },
  19307. "requestID": {
  19308. "type": "string",
  19309. "pattern": "^per"
  19310. },
  19311. "reply": {
  19312. "$ref": "#/components/schemas/PermissionV2Reply"
  19313. }
  19314. },
  19315. "required": ["sessionID", "requestID", "reply"],
  19316. "additionalProperties": false
  19317. }
  19318. },
  19319. "required": ["id", "type", "properties"],
  19320. "additionalProperties": false
  19321. },
  19322. {
  19323. "type": "object",
  19324. "properties": {
  19325. "id": {
  19326. "type": "string",
  19327. "pattern": "^evt_"
  19328. },
  19329. "type": {
  19330. "type": "string",
  19331. "enum": ["plugin.added"]
  19332. },
  19333. "properties": {
  19334. "type": "object",
  19335. "properties": {
  19336. "id": {
  19337. "type": "string"
  19338. }
  19339. },
  19340. "required": ["id"],
  19341. "additionalProperties": false
  19342. }
  19343. },
  19344. "required": ["id", "type", "properties"],
  19345. "additionalProperties": false
  19346. },
  19347. {
  19348. "type": "object",
  19349. "properties": {
  19350. "id": {
  19351. "type": "string",
  19352. "pattern": "^evt_"
  19353. },
  19354. "type": {
  19355. "type": "string",
  19356. "enum": ["project.directories.updated"]
  19357. },
  19358. "properties": {
  19359. "type": "object",
  19360. "properties": {
  19361. "projectID": {
  19362. "type": "string"
  19363. }
  19364. },
  19365. "required": ["projectID"],
  19366. "additionalProperties": false
  19367. }
  19368. },
  19369. "required": ["id", "type", "properties"],
  19370. "additionalProperties": false
  19371. },
  19372. {
  19373. "type": "object",
  19374. "properties": {
  19375. "id": {
  19376. "type": "string",
  19377. "pattern": "^evt_"
  19378. },
  19379. "type": {
  19380. "type": "string",
  19381. "enum": ["file.watcher.updated"]
  19382. },
  19383. "properties": {
  19384. "type": "object",
  19385. "properties": {
  19386. "file": {
  19387. "type": "string"
  19388. },
  19389. "event": {
  19390. "type": "string",
  19391. "enum": ["add", "change", "unlink"]
  19392. }
  19393. },
  19394. "required": ["file", "event"],
  19395. "additionalProperties": false
  19396. }
  19397. },
  19398. "required": ["id", "type", "properties"],
  19399. "additionalProperties": false
  19400. },
  19401. {
  19402. "type": "object",
  19403. "properties": {
  19404. "id": {
  19405. "type": "string",
  19406. "pattern": "^evt_"
  19407. },
  19408. "type": {
  19409. "type": "string",
  19410. "enum": ["pty.created"]
  19411. },
  19412. "properties": {
  19413. "type": "object",
  19414. "properties": {
  19415. "info": {
  19416. "$ref": "#/components/schemas/Pty"
  19417. }
  19418. },
  19419. "required": ["info"],
  19420. "additionalProperties": false
  19421. }
  19422. },
  19423. "required": ["id", "type", "properties"],
  19424. "additionalProperties": false
  19425. },
  19426. {
  19427. "type": "object",
  19428. "properties": {
  19429. "id": {
  19430. "type": "string",
  19431. "pattern": "^evt_"
  19432. },
  19433. "type": {
  19434. "type": "string",
  19435. "enum": ["pty.updated"]
  19436. },
  19437. "properties": {
  19438. "type": "object",
  19439. "properties": {
  19440. "info": {
  19441. "$ref": "#/components/schemas/Pty"
  19442. }
  19443. },
  19444. "required": ["info"],
  19445. "additionalProperties": false
  19446. }
  19447. },
  19448. "required": ["id", "type", "properties"],
  19449. "additionalProperties": false
  19450. },
  19451. {
  19452. "type": "object",
  19453. "properties": {
  19454. "id": {
  19455. "type": "string",
  19456. "pattern": "^evt_"
  19457. },
  19458. "type": {
  19459. "type": "string",
  19460. "enum": ["pty.exited"]
  19461. },
  19462. "properties": {
  19463. "type": "object",
  19464. "properties": {
  19465. "id": {
  19466. "type": "string",
  19467. "pattern": "^pty"
  19468. },
  19469. "exitCode": {
  19470. "type": "integer",
  19471. "minimum": 0
  19472. }
  19473. },
  19474. "required": ["id", "exitCode"],
  19475. "additionalProperties": false
  19476. }
  19477. },
  19478. "required": ["id", "type", "properties"],
  19479. "additionalProperties": false
  19480. },
  19481. {
  19482. "type": "object",
  19483. "properties": {
  19484. "id": {
  19485. "type": "string",
  19486. "pattern": "^evt_"
  19487. },
  19488. "type": {
  19489. "type": "string",
  19490. "enum": ["pty.deleted"]
  19491. },
  19492. "properties": {
  19493. "type": "object",
  19494. "properties": {
  19495. "id": {
  19496. "type": "string",
  19497. "pattern": "^pty"
  19498. }
  19499. },
  19500. "required": ["id"],
  19501. "additionalProperties": false
  19502. }
  19503. },
  19504. "required": ["id", "type", "properties"],
  19505. "additionalProperties": false
  19506. },
  19507. {
  19508. "type": "object",
  19509. "properties": {
  19510. "id": {
  19511. "type": "string",
  19512. "pattern": "^evt_"
  19513. },
  19514. "type": {
  19515. "type": "string",
  19516. "enum": ["question.v2.asked"]
  19517. },
  19518. "properties": {
  19519. "type": "object",
  19520. "properties": {
  19521. "id": {
  19522. "type": "string",
  19523. "pattern": "^que"
  19524. },
  19525. "sessionID": {
  19526. "type": "string",
  19527. "pattern": "^ses"
  19528. },
  19529. "questions": {
  19530. "type": "array",
  19531. "items": {
  19532. "$ref": "#/components/schemas/QuestionV2Info"
  19533. },
  19534. "description": "Questions to ask"
  19535. },
  19536. "tool": {
  19537. "$ref": "#/components/schemas/QuestionV2Tool"
  19538. }
  19539. },
  19540. "required": ["id", "sessionID", "questions"],
  19541. "additionalProperties": false
  19542. }
  19543. },
  19544. "required": ["id", "type", "properties"],
  19545. "additionalProperties": false
  19546. },
  19547. {
  19548. "type": "object",
  19549. "properties": {
  19550. "id": {
  19551. "type": "string",
  19552. "pattern": "^evt_"
  19553. },
  19554. "type": {
  19555. "type": "string",
  19556. "enum": ["question.v2.replied"]
  19557. },
  19558. "properties": {
  19559. "type": "object",
  19560. "properties": {
  19561. "sessionID": {
  19562. "type": "string",
  19563. "pattern": "^ses"
  19564. },
  19565. "requestID": {
  19566. "type": "string",
  19567. "pattern": "^que"
  19568. },
  19569. "answers": {
  19570. "type": "array",
  19571. "items": {
  19572. "$ref": "#/components/schemas/QuestionV2Answer"
  19573. }
  19574. }
  19575. },
  19576. "required": ["sessionID", "requestID", "answers"],
  19577. "additionalProperties": false
  19578. }
  19579. },
  19580. "required": ["id", "type", "properties"],
  19581. "additionalProperties": false
  19582. },
  19583. {
  19584. "type": "object",
  19585. "properties": {
  19586. "id": {
  19587. "type": "string",
  19588. "pattern": "^evt_"
  19589. },
  19590. "type": {
  19591. "type": "string",
  19592. "enum": ["question.v2.rejected"]
  19593. },
  19594. "properties": {
  19595. "type": "object",
  19596. "properties": {
  19597. "sessionID": {
  19598. "type": "string",
  19599. "pattern": "^ses"
  19600. },
  19601. "requestID": {
  19602. "type": "string",
  19603. "pattern": "^que"
  19604. }
  19605. },
  19606. "required": ["sessionID", "requestID"],
  19607. "additionalProperties": false
  19608. }
  19609. },
  19610. "required": ["id", "type", "properties"],
  19611. "additionalProperties": false
  19612. },
  19613. {
  19614. "type": "object",
  19615. "properties": {
  19616. "id": {
  19617. "type": "string",
  19618. "pattern": "^evt_"
  19619. },
  19620. "type": {
  19621. "type": "string",
  19622. "enum": ["todo.updated"]
  19623. },
  19624. "properties": {
  19625. "type": "object",
  19626. "properties": {
  19627. "sessionID": {
  19628. "type": "string",
  19629. "pattern": "^ses"
  19630. },
  19631. "todos": {
  19632. "type": "array",
  19633. "items": {
  19634. "$ref": "#/components/schemas/Todo"
  19635. }
  19636. }
  19637. },
  19638. "required": ["sessionID", "todos"],
  19639. "additionalProperties": false
  19640. }
  19641. },
  19642. "required": ["id", "type", "properties"],
  19643. "additionalProperties": false
  19644. },
  19645. {
  19646. "type": "object",
  19647. "properties": {
  19648. "id": {
  19649. "type": "string",
  19650. "pattern": "^evt_"
  19651. },
  19652. "type": {
  19653. "type": "string",
  19654. "enum": ["lsp.updated"]
  19655. },
  19656. "properties": {
  19657. "type": "object",
  19658. "properties": {}
  19659. }
  19660. },
  19661. "required": ["id", "type", "properties"],
  19662. "additionalProperties": false
  19663. },
  19664. {
  19665. "type": "object",
  19666. "properties": {
  19667. "id": {
  19668. "type": "string",
  19669. "pattern": "^evt_"
  19670. },
  19671. "type": {
  19672. "type": "string",
  19673. "enum": ["permission.asked"]
  19674. },
  19675. "properties": {
  19676. "type": "object",
  19677. "properties": {
  19678. "id": {
  19679. "type": "string",
  19680. "pattern": "^per"
  19681. },
  19682. "sessionID": {
  19683. "type": "string",
  19684. "pattern": "^ses"
  19685. },
  19686. "permission": {
  19687. "type": "string"
  19688. },
  19689. "patterns": {
  19690. "type": "array",
  19691. "items": {
  19692. "type": "string"
  19693. }
  19694. },
  19695. "metadata": {
  19696. "type": "object"
  19697. },
  19698. "always": {
  19699. "type": "array",
  19700. "items": {
  19701. "type": "string"
  19702. }
  19703. },
  19704. "tool": {
  19705. "type": "object",
  19706. "properties": {
  19707. "messageID": {
  19708. "type": "string"
  19709. },
  19710. "callID": {
  19711. "type": "string"
  19712. }
  19713. },
  19714. "required": ["messageID", "callID"],
  19715. "additionalProperties": false
  19716. }
  19717. },
  19718. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19719. "additionalProperties": false
  19720. }
  19721. },
  19722. "required": ["id", "type", "properties"],
  19723. "additionalProperties": false
  19724. },
  19725. {
  19726. "type": "object",
  19727. "properties": {
  19728. "id": {
  19729. "type": "string",
  19730. "pattern": "^evt_"
  19731. },
  19732. "type": {
  19733. "type": "string",
  19734. "enum": ["permission.replied"]
  19735. },
  19736. "properties": {
  19737. "type": "object",
  19738. "properties": {
  19739. "sessionID": {
  19740. "type": "string",
  19741. "pattern": "^ses"
  19742. },
  19743. "requestID": {
  19744. "type": "string",
  19745. "pattern": "^per"
  19746. },
  19747. "reply": {
  19748. "type": "string",
  19749. "enum": ["once", "always", "reject"]
  19750. }
  19751. },
  19752. "required": ["sessionID", "requestID", "reply"],
  19753. "additionalProperties": false
  19754. }
  19755. },
  19756. "required": ["id", "type", "properties"],
  19757. "additionalProperties": false
  19758. },
  19759. {
  19760. "type": "object",
  19761. "properties": {
  19762. "id": {
  19763. "type": "string",
  19764. "pattern": "^evt_"
  19765. },
  19766. "type": {
  19767. "type": "string",
  19768. "enum": ["tui.prompt.append"]
  19769. },
  19770. "properties": {
  19771. "type": "object",
  19772. "properties": {
  19773. "text": {
  19774. "type": "string"
  19775. }
  19776. },
  19777. "required": ["text"],
  19778. "additionalProperties": false
  19779. }
  19780. },
  19781. "required": ["id", "type", "properties"],
  19782. "additionalProperties": false
  19783. },
  19784. {
  19785. "type": "object",
  19786. "properties": {
  19787. "id": {
  19788. "type": "string",
  19789. "pattern": "^evt_"
  19790. },
  19791. "type": {
  19792. "type": "string",
  19793. "enum": ["tui.command.execute"]
  19794. },
  19795. "properties": {
  19796. "type": "object",
  19797. "properties": {
  19798. "command": {
  19799. "anyOf": [
  19800. {
  19801. "type": "string",
  19802. "enum": [
  19803. "session.list",
  19804. "session.new",
  19805. "session.share",
  19806. "session.interrupt",
  19807. "session.compact",
  19808. "session.page.up",
  19809. "session.page.down",
  19810. "session.line.up",
  19811. "session.line.down",
  19812. "session.half.page.up",
  19813. "session.half.page.down",
  19814. "session.first",
  19815. "session.last",
  19816. "prompt.clear",
  19817. "prompt.submit",
  19818. "agent.cycle"
  19819. ]
  19820. },
  19821. {
  19822. "type": "string"
  19823. }
  19824. ]
  19825. }
  19826. },
  19827. "required": ["command"],
  19828. "additionalProperties": false
  19829. }
  19830. },
  19831. "required": ["id", "type", "properties"],
  19832. "additionalProperties": false
  19833. },
  19834. {
  19835. "type": "object",
  19836. "properties": {
  19837. "id": {
  19838. "type": "string",
  19839. "pattern": "^evt_"
  19840. },
  19841. "type": {
  19842. "type": "string",
  19843. "enum": ["tui.toast.show"]
  19844. },
  19845. "properties": {
  19846. "type": "object",
  19847. "properties": {
  19848. "title": {
  19849. "type": "string"
  19850. },
  19851. "message": {
  19852. "type": "string"
  19853. },
  19854. "variant": {
  19855. "type": "string",
  19856. "enum": ["info", "success", "warning", "error"]
  19857. },
  19858. "duration": {
  19859. "type": "integer",
  19860. "exclusiveMinimum": 0
  19861. }
  19862. },
  19863. "required": ["message", "variant"],
  19864. "additionalProperties": false
  19865. }
  19866. },
  19867. "required": ["id", "type", "properties"],
  19868. "additionalProperties": false
  19869. },
  19870. {
  19871. "type": "object",
  19872. "properties": {
  19873. "id": {
  19874. "type": "string",
  19875. "pattern": "^evt_"
  19876. },
  19877. "type": {
  19878. "type": "string",
  19879. "enum": ["tui.session.select"]
  19880. },
  19881. "properties": {
  19882. "type": "object",
  19883. "properties": {
  19884. "sessionID": {
  19885. "type": "string",
  19886. "pattern": "^ses",
  19887. "description": "Session ID to navigate to"
  19888. }
  19889. },
  19890. "required": ["sessionID"],
  19891. "additionalProperties": false
  19892. }
  19893. },
  19894. "required": ["id", "type", "properties"],
  19895. "additionalProperties": false
  19896. },
  19897. {
  19898. "type": "object",
  19899. "properties": {
  19900. "id": {
  19901. "type": "string",
  19902. "pattern": "^evt_"
  19903. },
  19904. "type": {
  19905. "type": "string",
  19906. "enum": ["mcp.tools.changed"]
  19907. },
  19908. "properties": {
  19909. "type": "object",
  19910. "properties": {
  19911. "server": {
  19912. "type": "string"
  19913. }
  19914. },
  19915. "required": ["server"],
  19916. "additionalProperties": false
  19917. }
  19918. },
  19919. "required": ["id", "type", "properties"],
  19920. "additionalProperties": false
  19921. },
  19922. {
  19923. "type": "object",
  19924. "properties": {
  19925. "id": {
  19926. "type": "string",
  19927. "pattern": "^evt_"
  19928. },
  19929. "type": {
  19930. "type": "string",
  19931. "enum": ["mcp.browser.open.failed"]
  19932. },
  19933. "properties": {
  19934. "type": "object",
  19935. "properties": {
  19936. "mcpName": {
  19937. "type": "string"
  19938. },
  19939. "url": {
  19940. "type": "string"
  19941. }
  19942. },
  19943. "required": ["mcpName", "url"],
  19944. "additionalProperties": false
  19945. }
  19946. },
  19947. "required": ["id", "type", "properties"],
  19948. "additionalProperties": false
  19949. },
  19950. {
  19951. "type": "object",
  19952. "properties": {
  19953. "id": {
  19954. "type": "string",
  19955. "pattern": "^evt_"
  19956. },
  19957. "type": {
  19958. "type": "string",
  19959. "enum": ["command.executed"]
  19960. },
  19961. "properties": {
  19962. "type": "object",
  19963. "properties": {
  19964. "name": {
  19965. "type": "string"
  19966. },
  19967. "sessionID": {
  19968. "type": "string",
  19969. "pattern": "^ses"
  19970. },
  19971. "arguments": {
  19972. "type": "string"
  19973. },
  19974. "messageID": {
  19975. "type": "string",
  19976. "pattern": "^msg"
  19977. }
  19978. },
  19979. "required": ["name", "sessionID", "arguments", "messageID"],
  19980. "additionalProperties": false
  19981. }
  19982. },
  19983. "required": ["id", "type", "properties"],
  19984. "additionalProperties": false
  19985. },
  19986. {
  19987. "type": "object",
  19988. "properties": {
  19989. "id": {
  19990. "type": "string",
  19991. "pattern": "^evt_"
  19992. },
  19993. "type": {
  19994. "type": "string",
  19995. "enum": ["project.updated"]
  19996. },
  19997. "properties": {
  19998. "type": "object",
  19999. "properties": {
  20000. "id": {
  20001. "type": "string"
  20002. },
  20003. "worktree": {
  20004. "type": "string"
  20005. },
  20006. "vcs": {
  20007. "$ref": "#/components/schemas/ProjectVcs"
  20008. },
  20009. "name": {
  20010. "type": "string"
  20011. },
  20012. "icon": {
  20013. "$ref": "#/components/schemas/ProjectIcon"
  20014. },
  20015. "commands": {
  20016. "$ref": "#/components/schemas/ProjectCommands"
  20017. },
  20018. "time": {
  20019. "$ref": "#/components/schemas/ProjectTime"
  20020. },
  20021. "sandboxes": {
  20022. "type": "array",
  20023. "items": {
  20024. "type": "string"
  20025. }
  20026. }
  20027. },
  20028. "required": ["id", "worktree", "time", "sandboxes"],
  20029. "additionalProperties": false
  20030. }
  20031. },
  20032. "required": ["id", "type", "properties"],
  20033. "additionalProperties": false
  20034. },
  20035. {
  20036. "type": "object",
  20037. "properties": {
  20038. "id": {
  20039. "type": "string",
  20040. "pattern": "^evt_"
  20041. },
  20042. "type": {
  20043. "type": "string",
  20044. "enum": ["session.status"]
  20045. },
  20046. "properties": {
  20047. "type": "object",
  20048. "properties": {
  20049. "sessionID": {
  20050. "type": "string",
  20051. "pattern": "^ses"
  20052. },
  20053. "status": {
  20054. "$ref": "#/components/schemas/SessionStatus"
  20055. }
  20056. },
  20057. "required": ["sessionID", "status"],
  20058. "additionalProperties": false
  20059. }
  20060. },
  20061. "required": ["id", "type", "properties"],
  20062. "additionalProperties": false
  20063. },
  20064. {
  20065. "type": "object",
  20066. "properties": {
  20067. "id": {
  20068. "type": "string",
  20069. "pattern": "^evt_"
  20070. },
  20071. "type": {
  20072. "type": "string",
  20073. "enum": ["session.idle"]
  20074. },
  20075. "properties": {
  20076. "type": "object",
  20077. "properties": {
  20078. "sessionID": {
  20079. "type": "string",
  20080. "pattern": "^ses"
  20081. }
  20082. },
  20083. "required": ["sessionID"],
  20084. "additionalProperties": false
  20085. }
  20086. },
  20087. "required": ["id", "type", "properties"],
  20088. "additionalProperties": false
  20089. },
  20090. {
  20091. "type": "object",
  20092. "properties": {
  20093. "id": {
  20094. "type": "string",
  20095. "pattern": "^evt_"
  20096. },
  20097. "type": {
  20098. "type": "string",
  20099. "enum": ["question.asked"]
  20100. },
  20101. "properties": {
  20102. "type": "object",
  20103. "properties": {
  20104. "id": {
  20105. "type": "string",
  20106. "pattern": "^que"
  20107. },
  20108. "sessionID": {
  20109. "type": "string",
  20110. "pattern": "^ses"
  20111. },
  20112. "questions": {
  20113. "type": "array",
  20114. "items": {
  20115. "$ref": "#/components/schemas/QuestionInfo"
  20116. },
  20117. "description": "Questions to ask"
  20118. },
  20119. "tool": {
  20120. "$ref": "#/components/schemas/QuestionTool"
  20121. }
  20122. },
  20123. "required": ["id", "sessionID", "questions"],
  20124. "additionalProperties": false
  20125. }
  20126. },
  20127. "required": ["id", "type", "properties"],
  20128. "additionalProperties": false
  20129. },
  20130. {
  20131. "type": "object",
  20132. "properties": {
  20133. "id": {
  20134. "type": "string",
  20135. "pattern": "^evt_"
  20136. },
  20137. "type": {
  20138. "type": "string",
  20139. "enum": ["question.replied"]
  20140. },
  20141. "properties": {
  20142. "type": "object",
  20143. "properties": {
  20144. "sessionID": {
  20145. "type": "string",
  20146. "pattern": "^ses"
  20147. },
  20148. "requestID": {
  20149. "type": "string",
  20150. "pattern": "^que"
  20151. },
  20152. "answers": {
  20153. "type": "array",
  20154. "items": {
  20155. "$ref": "#/components/schemas/QuestionAnswer"
  20156. }
  20157. }
  20158. },
  20159. "required": ["sessionID", "requestID", "answers"],
  20160. "additionalProperties": false
  20161. }
  20162. },
  20163. "required": ["id", "type", "properties"],
  20164. "additionalProperties": false
  20165. },
  20166. {
  20167. "type": "object",
  20168. "properties": {
  20169. "id": {
  20170. "type": "string",
  20171. "pattern": "^evt_"
  20172. },
  20173. "type": {
  20174. "type": "string",
  20175. "enum": ["question.rejected"]
  20176. },
  20177. "properties": {
  20178. "type": "object",
  20179. "properties": {
  20180. "sessionID": {
  20181. "type": "string",
  20182. "pattern": "^ses"
  20183. },
  20184. "requestID": {
  20185. "type": "string",
  20186. "pattern": "^que"
  20187. }
  20188. },
  20189. "required": ["sessionID", "requestID"],
  20190. "additionalProperties": false
  20191. }
  20192. },
  20193. "required": ["id", "type", "properties"],
  20194. "additionalProperties": false
  20195. },
  20196. {
  20197. "type": "object",
  20198. "properties": {
  20199. "id": {
  20200. "type": "string",
  20201. "pattern": "^evt_"
  20202. },
  20203. "type": {
  20204. "type": "string",
  20205. "enum": ["session.compacted"]
  20206. },
  20207. "properties": {
  20208. "type": "object",
  20209. "properties": {
  20210. "sessionID": {
  20211. "type": "string",
  20212. "pattern": "^ses"
  20213. }
  20214. },
  20215. "required": ["sessionID"],
  20216. "additionalProperties": false
  20217. }
  20218. },
  20219. "required": ["id", "type", "properties"],
  20220. "additionalProperties": false
  20221. },
  20222. {
  20223. "type": "object",
  20224. "properties": {
  20225. "id": {
  20226. "type": "string",
  20227. "pattern": "^evt_"
  20228. },
  20229. "type": {
  20230. "type": "string",
  20231. "enum": ["vcs.branch.updated"]
  20232. },
  20233. "properties": {
  20234. "type": "object",
  20235. "properties": {
  20236. "branch": {
  20237. "type": "string"
  20238. }
  20239. },
  20240. "additionalProperties": false
  20241. }
  20242. },
  20243. "required": ["id", "type", "properties"],
  20244. "additionalProperties": false
  20245. },
  20246. {
  20247. "type": "object",
  20248. "properties": {
  20249. "id": {
  20250. "type": "string",
  20251. "pattern": "^evt_"
  20252. },
  20253. "type": {
  20254. "type": "string",
  20255. "enum": ["workspace.ready"]
  20256. },
  20257. "properties": {
  20258. "type": "object",
  20259. "properties": {
  20260. "name": {
  20261. "type": "string"
  20262. }
  20263. },
  20264. "required": ["name"],
  20265. "additionalProperties": false
  20266. }
  20267. },
  20268. "required": ["id", "type", "properties"],
  20269. "additionalProperties": false
  20270. },
  20271. {
  20272. "type": "object",
  20273. "properties": {
  20274. "id": {
  20275. "type": "string",
  20276. "pattern": "^evt_"
  20277. },
  20278. "type": {
  20279. "type": "string",
  20280. "enum": ["workspace.failed"]
  20281. },
  20282. "properties": {
  20283. "type": "object",
  20284. "properties": {
  20285. "message": {
  20286. "type": "string"
  20287. }
  20288. },
  20289. "required": ["message"],
  20290. "additionalProperties": false
  20291. }
  20292. },
  20293. "required": ["id", "type", "properties"],
  20294. "additionalProperties": false
  20295. },
  20296. {
  20297. "type": "object",
  20298. "properties": {
  20299. "id": {
  20300. "type": "string",
  20301. "pattern": "^evt_"
  20302. },
  20303. "type": {
  20304. "type": "string",
  20305. "enum": ["workspace.status"]
  20306. },
  20307. "properties": {
  20308. "type": "object",
  20309. "properties": {
  20310. "workspaceID": {
  20311. "type": "string",
  20312. "pattern": "^wrk"
  20313. },
  20314. "status": {
  20315. "type": "string",
  20316. "enum": ["connected", "connecting", "disconnected", "error"]
  20317. }
  20318. },
  20319. "required": ["workspaceID", "status"],
  20320. "additionalProperties": false
  20321. }
  20322. },
  20323. "required": ["id", "type", "properties"],
  20324. "additionalProperties": false
  20325. },
  20326. {
  20327. "type": "object",
  20328. "properties": {
  20329. "id": {
  20330. "type": "string",
  20331. "pattern": "^evt_"
  20332. },
  20333. "type": {
  20334. "type": "string",
  20335. "enum": ["worktree.ready"]
  20336. },
  20337. "properties": {
  20338. "type": "object",
  20339. "properties": {
  20340. "name": {
  20341. "type": "string"
  20342. },
  20343. "branch": {
  20344. "type": "string"
  20345. }
  20346. },
  20347. "required": ["name"],
  20348. "additionalProperties": false
  20349. }
  20350. },
  20351. "required": ["id", "type", "properties"],
  20352. "additionalProperties": false
  20353. },
  20354. {
  20355. "type": "object",
  20356. "properties": {
  20357. "id": {
  20358. "type": "string",
  20359. "pattern": "^evt_"
  20360. },
  20361. "type": {
  20362. "type": "string",
  20363. "enum": ["worktree.failed"]
  20364. },
  20365. "properties": {
  20366. "type": "object",
  20367. "properties": {
  20368. "message": {
  20369. "type": "string"
  20370. }
  20371. },
  20372. "required": ["message"],
  20373. "additionalProperties": false
  20374. }
  20375. },
  20376. "required": ["id", "type", "properties"],
  20377. "additionalProperties": false
  20378. },
  20379. {
  20380. "type": "object",
  20381. "properties": {
  20382. "id": {
  20383. "type": "string",
  20384. "pattern": "^evt_"
  20385. },
  20386. "type": {
  20387. "type": "string",
  20388. "enum": ["server.connected"]
  20389. },
  20390. "properties": {
  20391. "type": "object",
  20392. "properties": {}
  20393. }
  20394. },
  20395. "required": ["id", "type", "properties"],
  20396. "additionalProperties": false
  20397. },
  20398. {
  20399. "type": "object",
  20400. "properties": {
  20401. "id": {
  20402. "type": "string",
  20403. "pattern": "^evt_"
  20404. },
  20405. "type": {
  20406. "type": "string",
  20407. "enum": ["global.disposed"]
  20408. },
  20409. "properties": {
  20410. "type": "object",
  20411. "properties": {}
  20412. }
  20413. },
  20414. "required": ["id", "type", "properties"],
  20415. "additionalProperties": false
  20416. },
  20417. {
  20418. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20419. },
  20420. {
  20421. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20422. },
  20423. {
  20424. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20425. },
  20426. {
  20427. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20428. },
  20429. {
  20430. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20431. },
  20432. {
  20433. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20434. },
  20435. {
  20436. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20437. },
  20438. {
  20439. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20440. },
  20441. {
  20442. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20443. },
  20444. {
  20445. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20446. },
  20447. {
  20448. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20449. },
  20450. {
  20451. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20452. },
  20453. {
  20454. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20455. },
  20456. {
  20457. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20458. },
  20459. {
  20460. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20461. },
  20462. {
  20463. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20464. },
  20465. {
  20466. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20467. },
  20468. {
  20469. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20470. },
  20471. {
  20472. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20473. },
  20474. {
  20475. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20476. },
  20477. {
  20478. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20479. },
  20480. {
  20481. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20482. },
  20483. {
  20484. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20485. },
  20486. {
  20487. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20488. },
  20489. {
  20490. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20491. },
  20492. {
  20493. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20494. },
  20495. {
  20496. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20497. },
  20498. {
  20499. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20500. },
  20501. {
  20502. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20503. },
  20504. {
  20505. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20506. },
  20507. {
  20508. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20509. },
  20510. {
  20511. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20512. },
  20513. {
  20514. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20515. },
  20516. {
  20517. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20518. },
  20519. {
  20520. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20521. },
  20522. {
  20523. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20524. }
  20525. ]
  20526. }
  20527. },
  20528. "required": ["directory", "payload"],
  20529. "additionalProperties": false
  20530. },
  20531. "LogLevel": {
  20532. "type": "string",
  20533. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20534. "description": "Log level"
  20535. },
  20536. "ServerConfig": {
  20537. "type": "object",
  20538. "properties": {
  20539. "port": {
  20540. "type": "integer",
  20541. "exclusiveMinimum": 0
  20542. },
  20543. "hostname": {
  20544. "type": "string"
  20545. },
  20546. "mdns": {
  20547. "type": "boolean"
  20548. },
  20549. "mdnsDomain": {
  20550. "type": "string"
  20551. },
  20552. "cors": {
  20553. "type": "array",
  20554. "items": {
  20555. "type": "string"
  20556. }
  20557. }
  20558. },
  20559. "additionalProperties": false,
  20560. "description": "Server configuration for opencode serve and web commands"
  20561. },
  20562. "PermissionActionConfig": {
  20563. "type": "string",
  20564. "enum": ["ask", "allow", "deny"]
  20565. },
  20566. "PermissionObjectConfig": {
  20567. "type": "object",
  20568. "additionalProperties": {
  20569. "$ref": "#/components/schemas/PermissionActionConfig"
  20570. }
  20571. },
  20572. "PermissionRuleConfig": {
  20573. "anyOf": [
  20574. {
  20575. "$ref": "#/components/schemas/PermissionActionConfig"
  20576. },
  20577. {
  20578. "$ref": "#/components/schemas/PermissionObjectConfig"
  20579. }
  20580. ]
  20581. },
  20582. "PermissionConfig": {
  20583. "anyOf": [
  20584. {
  20585. "$ref": "#/components/schemas/PermissionActionConfig"
  20586. },
  20587. {
  20588. "type": "object",
  20589. "properties": {
  20590. "read": {
  20591. "$ref": "#/components/schemas/PermissionRuleConfig"
  20592. },
  20593. "edit": {
  20594. "$ref": "#/components/schemas/PermissionRuleConfig"
  20595. },
  20596. "glob": {
  20597. "$ref": "#/components/schemas/PermissionRuleConfig"
  20598. },
  20599. "grep": {
  20600. "$ref": "#/components/schemas/PermissionRuleConfig"
  20601. },
  20602. "list": {
  20603. "$ref": "#/components/schemas/PermissionRuleConfig"
  20604. },
  20605. "bash": {
  20606. "$ref": "#/components/schemas/PermissionRuleConfig"
  20607. },
  20608. "task": {
  20609. "$ref": "#/components/schemas/PermissionRuleConfig"
  20610. },
  20611. "external_directory": {
  20612. "$ref": "#/components/schemas/PermissionRuleConfig"
  20613. },
  20614. "todowrite": {
  20615. "$ref": "#/components/schemas/PermissionActionConfig"
  20616. },
  20617. "question": {
  20618. "$ref": "#/components/schemas/PermissionActionConfig"
  20619. },
  20620. "webfetch": {
  20621. "$ref": "#/components/schemas/PermissionActionConfig"
  20622. },
  20623. "websearch": {
  20624. "$ref": "#/components/schemas/PermissionActionConfig"
  20625. },
  20626. "lsp": {
  20627. "$ref": "#/components/schemas/PermissionRuleConfig"
  20628. },
  20629. "doom_loop": {
  20630. "$ref": "#/components/schemas/PermissionActionConfig"
  20631. },
  20632. "skill": {
  20633. "$ref": "#/components/schemas/PermissionRuleConfig"
  20634. }
  20635. },
  20636. "additionalProperties": {
  20637. "$ref": "#/components/schemas/PermissionRuleConfig"
  20638. }
  20639. }
  20640. ]
  20641. },
  20642. "AgentConfig": {
  20643. "type": "object",
  20644. "properties": {
  20645. "model": {
  20646. "type": "string"
  20647. },
  20648. "variant": {
  20649. "type": "string"
  20650. },
  20651. "temperature": {
  20652. "type": "number"
  20653. },
  20654. "top_p": {
  20655. "type": "number"
  20656. },
  20657. "prompt": {
  20658. "type": "string"
  20659. },
  20660. "tools": {
  20661. "type": "object",
  20662. "additionalProperties": {
  20663. "type": "boolean"
  20664. }
  20665. },
  20666. "disable": {
  20667. "type": "boolean"
  20668. },
  20669. "description": {
  20670. "type": "string"
  20671. },
  20672. "mode": {
  20673. "type": "string",
  20674. "enum": ["subagent", "primary", "all"]
  20675. },
  20676. "hidden": {
  20677. "type": "boolean"
  20678. },
  20679. "options": {
  20680. "type": "object"
  20681. },
  20682. "color": {
  20683. "anyOf": [
  20684. {
  20685. "type": "string",
  20686. "pattern": "^#[0-9a-fA-F]{6}$"
  20687. },
  20688. {
  20689. "type": "string",
  20690. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20691. }
  20692. ],
  20693. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20694. },
  20695. "steps": {
  20696. "type": "integer",
  20697. "exclusiveMinimum": 0
  20698. },
  20699. "maxSteps": {
  20700. "type": "integer",
  20701. "exclusiveMinimum": 0
  20702. },
  20703. "permission": {
  20704. "$ref": "#/components/schemas/PermissionConfig"
  20705. }
  20706. },
  20707. "additionalProperties": {}
  20708. },
  20709. "ProviderConfig": {
  20710. "type": "object",
  20711. "properties": {
  20712. "api": {
  20713. "type": "string"
  20714. },
  20715. "name": {
  20716. "type": "string"
  20717. },
  20718. "env": {
  20719. "type": "array",
  20720. "items": {
  20721. "type": "string"
  20722. }
  20723. },
  20724. "id": {
  20725. "type": "string"
  20726. },
  20727. "npm": {
  20728. "type": "string"
  20729. },
  20730. "whitelist": {
  20731. "type": "array",
  20732. "items": {
  20733. "type": "string"
  20734. }
  20735. },
  20736. "blacklist": {
  20737. "type": "array",
  20738. "items": {
  20739. "type": "string"
  20740. }
  20741. },
  20742. "options": {
  20743. "type": "object",
  20744. "properties": {
  20745. "apiKey": {
  20746. "type": "string"
  20747. },
  20748. "baseURL": {
  20749. "type": "string"
  20750. },
  20751. "enterpriseUrl": {
  20752. "type": "string"
  20753. },
  20754. "setCacheKey": {
  20755. "type": "boolean"
  20756. },
  20757. "timeout": {
  20758. "anyOf": [
  20759. {
  20760. "type": "integer",
  20761. "exclusiveMinimum": 0
  20762. },
  20763. {
  20764. "type": "boolean",
  20765. "enum": [false]
  20766. }
  20767. ],
  20768. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20769. },
  20770. "headerTimeout": {
  20771. "anyOf": [
  20772. {
  20773. "type": "integer",
  20774. "exclusiveMinimum": 0
  20775. },
  20776. {
  20777. "type": "boolean",
  20778. "enum": [false]
  20779. }
  20780. ],
  20781. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20782. },
  20783. "chunkTimeout": {
  20784. "type": "integer",
  20785. "exclusiveMinimum": 0
  20786. }
  20787. },
  20788. "additionalProperties": {}
  20789. },
  20790. "models": {
  20791. "type": "object",
  20792. "additionalProperties": {
  20793. "type": "object",
  20794. "properties": {
  20795. "id": {
  20796. "type": "string"
  20797. },
  20798. "name": {
  20799. "type": "string"
  20800. },
  20801. "family": {
  20802. "type": "string"
  20803. },
  20804. "release_date": {
  20805. "type": "string"
  20806. },
  20807. "attachment": {
  20808. "type": "boolean"
  20809. },
  20810. "reasoning": {
  20811. "type": "boolean"
  20812. },
  20813. "temperature": {
  20814. "type": "boolean"
  20815. },
  20816. "tool_call": {
  20817. "type": "boolean"
  20818. },
  20819. "interleaved": {
  20820. "anyOf": [
  20821. {
  20822. "type": "boolean",
  20823. "enum": [true]
  20824. },
  20825. {
  20826. "type": "object",
  20827. "properties": {
  20828. "field": {
  20829. "type": "string",
  20830. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20831. }
  20832. },
  20833. "required": ["field"],
  20834. "additionalProperties": false
  20835. }
  20836. ]
  20837. },
  20838. "cost": {
  20839. "type": "object",
  20840. "properties": {
  20841. "input": {
  20842. "type": "number"
  20843. },
  20844. "output": {
  20845. "type": "number"
  20846. },
  20847. "cache_read": {
  20848. "type": "number"
  20849. },
  20850. "cache_write": {
  20851. "type": "number"
  20852. },
  20853. "context_over_200k": {
  20854. "type": "object",
  20855. "properties": {
  20856. "input": {
  20857. "type": "number"
  20858. },
  20859. "output": {
  20860. "type": "number"
  20861. },
  20862. "cache_read": {
  20863. "type": "number"
  20864. },
  20865. "cache_write": {
  20866. "type": "number"
  20867. }
  20868. },
  20869. "required": ["input", "output"],
  20870. "additionalProperties": false
  20871. }
  20872. },
  20873. "required": ["input", "output"],
  20874. "additionalProperties": false
  20875. },
  20876. "limit": {
  20877. "type": "object",
  20878. "properties": {
  20879. "context": {
  20880. "type": "number"
  20881. },
  20882. "input": {
  20883. "type": "number"
  20884. },
  20885. "output": {
  20886. "type": "number"
  20887. }
  20888. },
  20889. "required": ["context", "output"],
  20890. "additionalProperties": false
  20891. },
  20892. "modalities": {
  20893. "type": "object",
  20894. "properties": {
  20895. "input": {
  20896. "type": "array",
  20897. "items": {
  20898. "type": "string",
  20899. "enum": ["text", "audio", "image", "video", "pdf"]
  20900. }
  20901. },
  20902. "output": {
  20903. "type": "array",
  20904. "items": {
  20905. "type": "string",
  20906. "enum": ["text", "audio", "image", "video", "pdf"]
  20907. }
  20908. }
  20909. },
  20910. "additionalProperties": false
  20911. },
  20912. "experimental": {
  20913. "type": "boolean"
  20914. },
  20915. "status": {
  20916. "type": "string",
  20917. "enum": ["alpha", "beta", "deprecated", "active"]
  20918. },
  20919. "provider": {
  20920. "type": "object",
  20921. "properties": {
  20922. "npm": {
  20923. "type": "string"
  20924. },
  20925. "api": {
  20926. "type": "string"
  20927. }
  20928. },
  20929. "additionalProperties": false
  20930. },
  20931. "options": {
  20932. "type": "object"
  20933. },
  20934. "headers": {
  20935. "type": "object",
  20936. "additionalProperties": {
  20937. "type": "string"
  20938. }
  20939. },
  20940. "variants": {
  20941. "type": "object",
  20942. "additionalProperties": {
  20943. "type": "object",
  20944. "properties": {
  20945. "disabled": {
  20946. "type": "boolean"
  20947. }
  20948. },
  20949. "additionalProperties": {}
  20950. },
  20951. "description": "Variant-specific configuration"
  20952. }
  20953. },
  20954. "additionalProperties": false
  20955. }
  20956. }
  20957. },
  20958. "additionalProperties": false
  20959. },
  20960. "McpLocalConfig": {
  20961. "type": "object",
  20962. "properties": {
  20963. "type": {
  20964. "type": "string",
  20965. "enum": ["local"],
  20966. "description": "Type of MCP server connection"
  20967. },
  20968. "command": {
  20969. "type": "array",
  20970. "items": {
  20971. "type": "string"
  20972. },
  20973. "description": "Command and arguments to run the MCP server"
  20974. },
  20975. "cwd": {
  20976. "type": "string"
  20977. },
  20978. "environment": {
  20979. "type": "object",
  20980. "additionalProperties": {
  20981. "type": "string"
  20982. }
  20983. },
  20984. "enabled": {
  20985. "type": "boolean"
  20986. },
  20987. "timeout": {
  20988. "type": "integer",
  20989. "exclusiveMinimum": 0
  20990. }
  20991. },
  20992. "required": ["type", "command"],
  20993. "additionalProperties": false
  20994. },
  20995. "McpOAuthConfig": {
  20996. "type": "object",
  20997. "properties": {
  20998. "clientId": {
  20999. "type": "string"
  21000. },
  21001. "clientSecret": {
  21002. "type": "string"
  21003. },
  21004. "scope": {
  21005. "type": "string"
  21006. },
  21007. "callbackPort": {
  21008. "type": "integer",
  21009. "minimum": 1,
  21010. "maximum": 65535
  21011. },
  21012. "redirectUri": {
  21013. "type": "string"
  21014. }
  21015. },
  21016. "additionalProperties": false
  21017. },
  21018. "McpRemoteConfig": {
  21019. "type": "object",
  21020. "properties": {
  21021. "type": {
  21022. "type": "string",
  21023. "enum": ["remote"],
  21024. "description": "Type of MCP server connection"
  21025. },
  21026. "url": {
  21027. "type": "string",
  21028. "description": "URL of the remote MCP server"
  21029. },
  21030. "enabled": {
  21031. "type": "boolean"
  21032. },
  21033. "headers": {
  21034. "type": "object",
  21035. "additionalProperties": {
  21036. "type": "string"
  21037. }
  21038. },
  21039. "oauth": {
  21040. "anyOf": [
  21041. {
  21042. "$ref": "#/components/schemas/McpOAuthConfig"
  21043. },
  21044. {
  21045. "type": "boolean",
  21046. "enum": [false]
  21047. }
  21048. ],
  21049. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  21050. },
  21051. "timeout": {
  21052. "type": "integer",
  21053. "exclusiveMinimum": 0
  21054. }
  21055. },
  21056. "required": ["type", "url"],
  21057. "additionalProperties": false
  21058. },
  21059. "LayoutConfig": {
  21060. "type": "string",
  21061. "enum": ["auto", "stretch"],
  21062. "description": "@deprecated Always uses stretch layout."
  21063. },
  21064. "ImageAttachmentConfig": {
  21065. "type": "object",
  21066. "properties": {
  21067. "auto_resize": {
  21068. "type": "boolean"
  21069. },
  21070. "max_width": {
  21071. "type": "integer",
  21072. "exclusiveMinimum": 0
  21073. },
  21074. "max_height": {
  21075. "type": "integer",
  21076. "exclusiveMinimum": 0
  21077. },
  21078. "max_base64_bytes": {
  21079. "type": "integer",
  21080. "exclusiveMinimum": 0
  21081. }
  21082. },
  21083. "additionalProperties": false
  21084. },
  21085. "AttachmentConfig": {
  21086. "type": "object",
  21087. "properties": {
  21088. "image": {
  21089. "$ref": "#/components/schemas/ImageAttachmentConfig"
  21090. }
  21091. },
  21092. "additionalProperties": false
  21093. },
  21094. "Config": {
  21095. "type": "object",
  21096. "properties": {
  21097. "$schema": {
  21098. "type": "string"
  21099. },
  21100. "shell": {
  21101. "type": "string"
  21102. },
  21103. "logLevel": {
  21104. "$ref": "#/components/schemas/LogLevel"
  21105. },
  21106. "server": {
  21107. "$ref": "#/components/schemas/ServerConfig"
  21108. },
  21109. "command": {
  21110. "type": "object",
  21111. "additionalProperties": {
  21112. "type": "object",
  21113. "properties": {
  21114. "template": {
  21115. "type": "string"
  21116. },
  21117. "description": {
  21118. "type": "string"
  21119. },
  21120. "agent": {
  21121. "type": "string"
  21122. },
  21123. "model": {
  21124. "type": "string"
  21125. },
  21126. "variant": {
  21127. "type": "string"
  21128. },
  21129. "subtask": {
  21130. "type": "boolean"
  21131. }
  21132. },
  21133. "required": ["template"],
  21134. "additionalProperties": false
  21135. }
  21136. },
  21137. "skills": {
  21138. "type": "object",
  21139. "properties": {
  21140. "paths": {
  21141. "type": "array",
  21142. "items": {
  21143. "type": "string"
  21144. }
  21145. },
  21146. "urls": {
  21147. "type": "array",
  21148. "items": {
  21149. "type": "string"
  21150. }
  21151. }
  21152. },
  21153. "additionalProperties": false
  21154. },
  21155. "references": {
  21156. "type": "object",
  21157. "additionalProperties": {
  21158. "anyOf": [
  21159. {
  21160. "type": "string"
  21161. },
  21162. {
  21163. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21164. },
  21165. {
  21166. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21167. }
  21168. ]
  21169. }
  21170. },
  21171. "reference": {
  21172. "type": "object",
  21173. "additionalProperties": {
  21174. "anyOf": [
  21175. {
  21176. "type": "string"
  21177. },
  21178. {
  21179. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21180. },
  21181. {
  21182. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21183. }
  21184. ]
  21185. }
  21186. },
  21187. "watcher": {
  21188. "type": "object",
  21189. "properties": {
  21190. "ignore": {
  21191. "type": "array",
  21192. "items": {
  21193. "type": "string"
  21194. }
  21195. }
  21196. },
  21197. "additionalProperties": false
  21198. },
  21199. "snapshot": {
  21200. "type": "boolean"
  21201. },
  21202. "plugin": {
  21203. "type": "array",
  21204. "items": {
  21205. "anyOf": [
  21206. {
  21207. "type": "string"
  21208. },
  21209. {
  21210. "type": "array",
  21211. "prefixItems": [
  21212. {
  21213. "type": "string"
  21214. },
  21215. {
  21216. "type": "object"
  21217. }
  21218. ],
  21219. "maxItems": 2,
  21220. "minItems": 2
  21221. }
  21222. ]
  21223. }
  21224. },
  21225. "share": {
  21226. "type": "string",
  21227. "enum": ["manual", "auto", "disabled"]
  21228. },
  21229. "autoshare": {
  21230. "type": "boolean"
  21231. },
  21232. "autoupdate": {
  21233. "anyOf": [
  21234. {
  21235. "type": "boolean"
  21236. },
  21237. {
  21238. "type": "string",
  21239. "enum": ["notify"]
  21240. }
  21241. ],
  21242. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21243. },
  21244. "disabled_providers": {
  21245. "type": "array",
  21246. "items": {
  21247. "type": "string"
  21248. }
  21249. },
  21250. "enabled_providers": {
  21251. "type": "array",
  21252. "items": {
  21253. "type": "string"
  21254. }
  21255. },
  21256. "model": {
  21257. "type": "string"
  21258. },
  21259. "small_model": {
  21260. "type": "string"
  21261. },
  21262. "default_agent": {
  21263. "type": "string"
  21264. },
  21265. "username": {
  21266. "type": "string"
  21267. },
  21268. "mode": {
  21269. "type": "object",
  21270. "properties": {
  21271. "build": {
  21272. "$ref": "#/components/schemas/AgentConfig"
  21273. },
  21274. "plan": {
  21275. "$ref": "#/components/schemas/AgentConfig"
  21276. }
  21277. },
  21278. "additionalProperties": {
  21279. "$ref": "#/components/schemas/AgentConfig"
  21280. }
  21281. },
  21282. "agent": {
  21283. "type": "object",
  21284. "properties": {
  21285. "plan": {
  21286. "$ref": "#/components/schemas/AgentConfig"
  21287. },
  21288. "build": {
  21289. "$ref": "#/components/schemas/AgentConfig"
  21290. },
  21291. "general": {
  21292. "$ref": "#/components/schemas/AgentConfig"
  21293. },
  21294. "explore": {
  21295. "$ref": "#/components/schemas/AgentConfig"
  21296. },
  21297. "title": {
  21298. "$ref": "#/components/schemas/AgentConfig"
  21299. },
  21300. "summary": {
  21301. "$ref": "#/components/schemas/AgentConfig"
  21302. },
  21303. "compaction": {
  21304. "$ref": "#/components/schemas/AgentConfig"
  21305. }
  21306. },
  21307. "additionalProperties": {
  21308. "$ref": "#/components/schemas/AgentConfig"
  21309. }
  21310. },
  21311. "provider": {
  21312. "type": "object",
  21313. "additionalProperties": {
  21314. "$ref": "#/components/schemas/ProviderConfig"
  21315. }
  21316. },
  21317. "mcp": {
  21318. "type": "object",
  21319. "additionalProperties": {
  21320. "anyOf": [
  21321. {
  21322. "$ref": "#/components/schemas/McpLocalConfig"
  21323. },
  21324. {
  21325. "$ref": "#/components/schemas/McpRemoteConfig"
  21326. },
  21327. {
  21328. "type": "object",
  21329. "properties": {
  21330. "enabled": {
  21331. "type": "boolean"
  21332. }
  21333. },
  21334. "required": ["enabled"],
  21335. "additionalProperties": false
  21336. }
  21337. ]
  21338. }
  21339. },
  21340. "formatter": {
  21341. "anyOf": [
  21342. {
  21343. "type": "boolean"
  21344. },
  21345. {
  21346. "type": "object",
  21347. "additionalProperties": {
  21348. "type": "object",
  21349. "properties": {
  21350. "disabled": {
  21351. "type": "boolean"
  21352. },
  21353. "command": {
  21354. "type": "array",
  21355. "items": {
  21356. "type": "string"
  21357. }
  21358. },
  21359. "environment": {
  21360. "type": "object",
  21361. "additionalProperties": {
  21362. "type": "string"
  21363. }
  21364. },
  21365. "extensions": {
  21366. "type": "array",
  21367. "items": {
  21368. "type": "string"
  21369. }
  21370. }
  21371. },
  21372. "additionalProperties": false
  21373. }
  21374. }
  21375. ],
  21376. "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."
  21377. },
  21378. "lsp": {
  21379. "anyOf": [
  21380. {
  21381. "type": "boolean"
  21382. },
  21383. {
  21384. "type": "object",
  21385. "additionalProperties": {
  21386. "anyOf": [
  21387. {
  21388. "type": "object",
  21389. "properties": {
  21390. "disabled": {
  21391. "type": "boolean",
  21392. "enum": [true]
  21393. }
  21394. },
  21395. "required": ["disabled"],
  21396. "additionalProperties": false
  21397. },
  21398. {
  21399. "type": "object",
  21400. "properties": {
  21401. "command": {
  21402. "type": "array",
  21403. "items": {
  21404. "type": "string"
  21405. }
  21406. },
  21407. "extensions": {
  21408. "type": "array",
  21409. "items": {
  21410. "type": "string"
  21411. }
  21412. },
  21413. "disabled": {
  21414. "type": "boolean"
  21415. },
  21416. "env": {
  21417. "type": "object",
  21418. "additionalProperties": {
  21419. "type": "string"
  21420. }
  21421. },
  21422. "initialization": {
  21423. "type": "object"
  21424. }
  21425. },
  21426. "required": ["command"],
  21427. "additionalProperties": false
  21428. }
  21429. ]
  21430. }
  21431. }
  21432. ],
  21433. "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."
  21434. },
  21435. "instructions": {
  21436. "type": "array",
  21437. "items": {
  21438. "type": "string"
  21439. }
  21440. },
  21441. "layout": {
  21442. "$ref": "#/components/schemas/LayoutConfig"
  21443. },
  21444. "permission": {
  21445. "$ref": "#/components/schemas/PermissionConfig"
  21446. },
  21447. "tools": {
  21448. "type": "object",
  21449. "additionalProperties": {
  21450. "type": "boolean"
  21451. }
  21452. },
  21453. "attachment": {
  21454. "$ref": "#/components/schemas/AttachmentConfig"
  21455. },
  21456. "enterprise": {
  21457. "type": "object",
  21458. "properties": {
  21459. "url": {
  21460. "type": "string"
  21461. }
  21462. },
  21463. "additionalProperties": false
  21464. },
  21465. "tool_output": {
  21466. "type": "object",
  21467. "properties": {
  21468. "max_lines": {
  21469. "type": "integer",
  21470. "exclusiveMinimum": 0
  21471. },
  21472. "max_bytes": {
  21473. "type": "integer",
  21474. "exclusiveMinimum": 0
  21475. }
  21476. },
  21477. "additionalProperties": false
  21478. },
  21479. "compaction": {
  21480. "type": "object",
  21481. "properties": {
  21482. "auto": {
  21483. "type": "boolean"
  21484. },
  21485. "prune": {
  21486. "type": "boolean"
  21487. },
  21488. "tail_turns": {
  21489. "type": "integer",
  21490. "minimum": 0
  21491. },
  21492. "preserve_recent_tokens": {
  21493. "type": "integer",
  21494. "minimum": 0
  21495. },
  21496. "reserved": {
  21497. "type": "integer",
  21498. "minimum": 0
  21499. }
  21500. },
  21501. "additionalProperties": false
  21502. },
  21503. "experimental": {
  21504. "type": "object",
  21505. "properties": {
  21506. "disable_paste_summary": {
  21507. "type": "boolean"
  21508. },
  21509. "batch_tool": {
  21510. "type": "boolean"
  21511. },
  21512. "openTelemetry": {
  21513. "type": "boolean"
  21514. },
  21515. "primary_tools": {
  21516. "type": "array",
  21517. "items": {
  21518. "type": "string"
  21519. }
  21520. },
  21521. "continue_loop_on_deny": {
  21522. "type": "boolean"
  21523. },
  21524. "mcp_timeout": {
  21525. "type": "integer",
  21526. "exclusiveMinimum": 0
  21527. },
  21528. "policies": {
  21529. "type": "array",
  21530. "items": {
  21531. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21532. }
  21533. }
  21534. },
  21535. "additionalProperties": false
  21536. }
  21537. },
  21538. "additionalProperties": false
  21539. },
  21540. "Model": {
  21541. "type": "object",
  21542. "properties": {
  21543. "id": {
  21544. "type": "string"
  21545. },
  21546. "providerID": {
  21547. "type": "string"
  21548. },
  21549. "api": {
  21550. "type": "object",
  21551. "properties": {
  21552. "id": {
  21553. "type": "string"
  21554. },
  21555. "url": {
  21556. "type": "string"
  21557. },
  21558. "npm": {
  21559. "type": "string"
  21560. }
  21561. },
  21562. "required": ["id", "url", "npm"],
  21563. "additionalProperties": false
  21564. },
  21565. "name": {
  21566. "type": "string"
  21567. },
  21568. "family": {
  21569. "type": "string"
  21570. },
  21571. "capabilities": {
  21572. "type": "object",
  21573. "properties": {
  21574. "temperature": {
  21575. "type": "boolean"
  21576. },
  21577. "reasoning": {
  21578. "type": "boolean"
  21579. },
  21580. "attachment": {
  21581. "type": "boolean"
  21582. },
  21583. "toolcall": {
  21584. "type": "boolean"
  21585. },
  21586. "input": {
  21587. "type": "object",
  21588. "properties": {
  21589. "text": {
  21590. "type": "boolean"
  21591. },
  21592. "audio": {
  21593. "type": "boolean"
  21594. },
  21595. "image": {
  21596. "type": "boolean"
  21597. },
  21598. "video": {
  21599. "type": "boolean"
  21600. },
  21601. "pdf": {
  21602. "type": "boolean"
  21603. }
  21604. },
  21605. "required": ["text", "audio", "image", "video", "pdf"],
  21606. "additionalProperties": false
  21607. },
  21608. "output": {
  21609. "type": "object",
  21610. "properties": {
  21611. "text": {
  21612. "type": "boolean"
  21613. },
  21614. "audio": {
  21615. "type": "boolean"
  21616. },
  21617. "image": {
  21618. "type": "boolean"
  21619. },
  21620. "video": {
  21621. "type": "boolean"
  21622. },
  21623. "pdf": {
  21624. "type": "boolean"
  21625. }
  21626. },
  21627. "required": ["text", "audio", "image", "video", "pdf"],
  21628. "additionalProperties": false
  21629. },
  21630. "interleaved": {
  21631. "anyOf": [
  21632. {
  21633. "type": "boolean"
  21634. },
  21635. {
  21636. "type": "object",
  21637. "properties": {
  21638. "field": {
  21639. "type": "string",
  21640. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21641. }
  21642. },
  21643. "required": ["field"],
  21644. "additionalProperties": false
  21645. }
  21646. ]
  21647. }
  21648. },
  21649. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21650. "additionalProperties": false
  21651. },
  21652. "cost": {
  21653. "type": "object",
  21654. "properties": {
  21655. "input": {
  21656. "type": "number"
  21657. },
  21658. "output": {
  21659. "type": "number"
  21660. },
  21661. "cache": {
  21662. "type": "object",
  21663. "properties": {
  21664. "read": {
  21665. "type": "number"
  21666. },
  21667. "write": {
  21668. "type": "number"
  21669. }
  21670. },
  21671. "required": ["read", "write"],
  21672. "additionalProperties": false
  21673. },
  21674. "tiers": {
  21675. "type": "array",
  21676. "items": {
  21677. "type": "object",
  21678. "properties": {
  21679. "input": {
  21680. "type": "number"
  21681. },
  21682. "output": {
  21683. "type": "number"
  21684. },
  21685. "cache": {
  21686. "type": "object",
  21687. "properties": {
  21688. "read": {
  21689. "type": "number"
  21690. },
  21691. "write": {
  21692. "type": "number"
  21693. }
  21694. },
  21695. "required": ["read", "write"],
  21696. "additionalProperties": false
  21697. },
  21698. "tier": {
  21699. "type": "object",
  21700. "properties": {
  21701. "type": {
  21702. "type": "string",
  21703. "enum": ["context"]
  21704. },
  21705. "size": {
  21706. "type": "number"
  21707. }
  21708. },
  21709. "required": ["type", "size"],
  21710. "additionalProperties": false
  21711. }
  21712. },
  21713. "required": ["input", "output", "cache", "tier"],
  21714. "additionalProperties": false
  21715. }
  21716. },
  21717. "experimentalOver200K": {
  21718. "type": "object",
  21719. "properties": {
  21720. "input": {
  21721. "type": "number"
  21722. },
  21723. "output": {
  21724. "type": "number"
  21725. },
  21726. "cache": {
  21727. "type": "object",
  21728. "properties": {
  21729. "read": {
  21730. "type": "number"
  21731. },
  21732. "write": {
  21733. "type": "number"
  21734. }
  21735. },
  21736. "required": ["read", "write"],
  21737. "additionalProperties": false
  21738. }
  21739. },
  21740. "required": ["input", "output", "cache"],
  21741. "additionalProperties": false
  21742. }
  21743. },
  21744. "required": ["input", "output", "cache"],
  21745. "additionalProperties": false
  21746. },
  21747. "limit": {
  21748. "type": "object",
  21749. "properties": {
  21750. "context": {
  21751. "type": "number"
  21752. },
  21753. "input": {
  21754. "type": "number"
  21755. },
  21756. "output": {
  21757. "type": "number"
  21758. }
  21759. },
  21760. "required": ["context", "output"],
  21761. "additionalProperties": false
  21762. },
  21763. "status": {
  21764. "type": "string",
  21765. "enum": ["alpha", "beta", "deprecated", "active"]
  21766. },
  21767. "options": {
  21768. "type": "object"
  21769. },
  21770. "headers": {
  21771. "type": "object",
  21772. "additionalProperties": {
  21773. "type": "string"
  21774. }
  21775. },
  21776. "release_date": {
  21777. "type": "string"
  21778. },
  21779. "variants": {
  21780. "type": "object",
  21781. "additionalProperties": {
  21782. "type": "object"
  21783. }
  21784. }
  21785. },
  21786. "required": [
  21787. "id",
  21788. "providerID",
  21789. "api",
  21790. "name",
  21791. "capabilities",
  21792. "cost",
  21793. "limit",
  21794. "status",
  21795. "options",
  21796. "headers",
  21797. "release_date"
  21798. ],
  21799. "additionalProperties": false
  21800. },
  21801. "Provider": {
  21802. "type": "object",
  21803. "properties": {
  21804. "id": {
  21805. "type": "string"
  21806. },
  21807. "name": {
  21808. "type": "string"
  21809. },
  21810. "source": {
  21811. "type": "string",
  21812. "enum": ["env", "config", "custom", "api"]
  21813. },
  21814. "env": {
  21815. "type": "array",
  21816. "items": {
  21817. "type": "string"
  21818. }
  21819. },
  21820. "key": {
  21821. "type": "string"
  21822. },
  21823. "options": {
  21824. "type": "object"
  21825. },
  21826. "models": {
  21827. "type": "object",
  21828. "additionalProperties": {
  21829. "$ref": "#/components/schemas/Model"
  21830. }
  21831. }
  21832. },
  21833. "required": ["id", "name", "source", "env", "options", "models"],
  21834. "additionalProperties": false
  21835. },
  21836. "ExperimentalCapabilities": {
  21837. "type": "object",
  21838. "properties": {
  21839. "backgroundSubagents": {
  21840. "type": "boolean"
  21841. }
  21842. },
  21843. "required": ["backgroundSubagents"],
  21844. "additionalProperties": false
  21845. },
  21846. "ConsoleState": {
  21847. "type": "object",
  21848. "properties": {
  21849. "consoleManagedProviders": {
  21850. "type": "array",
  21851. "items": {
  21852. "type": "string"
  21853. }
  21854. },
  21855. "activeOrgName": {
  21856. "type": "string"
  21857. },
  21858. "switchableOrgCount": {
  21859. "type": "integer",
  21860. "minimum": 0
  21861. }
  21862. },
  21863. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21864. "additionalProperties": false
  21865. },
  21866. "effect_HttpApiError_InternalServerError": {
  21867. "type": "object",
  21868. "properties": {
  21869. "_tag": {
  21870. "type": "string",
  21871. "enum": ["InternalServerError"]
  21872. }
  21873. },
  21874. "required": ["_tag"],
  21875. "additionalProperties": false
  21876. },
  21877. "ToolListItem": {
  21878. "type": "object",
  21879. "properties": {
  21880. "id": {
  21881. "type": "string"
  21882. },
  21883. "description": {
  21884. "type": "string"
  21885. },
  21886. "parameters": {}
  21887. },
  21888. "required": ["id", "description", "parameters"],
  21889. "additionalProperties": false
  21890. },
  21891. "ToolList": {
  21892. "type": "array",
  21893. "items": {
  21894. "$ref": "#/components/schemas/ToolListItem"
  21895. }
  21896. },
  21897. "ToolIDs": {
  21898. "type": "array",
  21899. "items": {
  21900. "type": "string"
  21901. }
  21902. },
  21903. "WorktreeError": {
  21904. "type": "object",
  21905. "properties": {
  21906. "name": {
  21907. "type": "string",
  21908. "enum": [
  21909. "WorktreeNotGitError",
  21910. "WorktreeNameGenerationFailedError",
  21911. "WorktreeCreateFailedError",
  21912. "WorktreeStartCommandFailedError",
  21913. "WorktreeRemoveFailedError",
  21914. "WorktreeResetFailedError",
  21915. "WorktreeListFailedError"
  21916. ]
  21917. },
  21918. "data": {
  21919. "type": "object",
  21920. "properties": {
  21921. "message": {
  21922. "type": "string"
  21923. }
  21924. },
  21925. "required": ["message"],
  21926. "additionalProperties": false
  21927. }
  21928. },
  21929. "required": ["name", "data"],
  21930. "additionalProperties": false
  21931. },
  21932. "WorktreeCreateInput": {
  21933. "type": "object",
  21934. "properties": {
  21935. "name": {
  21936. "type": "string"
  21937. },
  21938. "startCommand": {
  21939. "type": "string",
  21940. "description": "Additional startup script to run after the project's start command"
  21941. }
  21942. },
  21943. "additionalProperties": false
  21944. },
  21945. "Worktree": {
  21946. "type": "object",
  21947. "properties": {
  21948. "name": {
  21949. "type": "string"
  21950. },
  21951. "branch": {
  21952. "type": "string"
  21953. },
  21954. "directory": {
  21955. "type": "string"
  21956. }
  21957. },
  21958. "required": ["name", "directory"],
  21959. "additionalProperties": false
  21960. },
  21961. "WorktreeRemoveInput": {
  21962. "type": "object",
  21963. "properties": {
  21964. "directory": {
  21965. "type": "string"
  21966. }
  21967. },
  21968. "required": ["directory"],
  21969. "additionalProperties": false
  21970. },
  21971. "WorktreeResetInput": {
  21972. "type": "object",
  21973. "properties": {
  21974. "directory": {
  21975. "type": "string"
  21976. }
  21977. },
  21978. "required": ["directory"],
  21979. "additionalProperties": false
  21980. },
  21981. "ProjectSummary": {
  21982. "type": "object",
  21983. "properties": {
  21984. "id": {
  21985. "type": "string"
  21986. },
  21987. "name": {
  21988. "type": "string"
  21989. },
  21990. "worktree": {
  21991. "type": "string"
  21992. }
  21993. },
  21994. "required": ["id", "worktree"],
  21995. "additionalProperties": false
  21996. },
  21997. "GlobalSession": {
  21998. "type": "object",
  21999. "properties": {
  22000. "id": {
  22001. "type": "string",
  22002. "pattern": "^ses"
  22003. },
  22004. "slug": {
  22005. "type": "string"
  22006. },
  22007. "projectID": {
  22008. "type": "string"
  22009. },
  22010. "workspaceID": {
  22011. "type": "string",
  22012. "pattern": "^wrk"
  22013. },
  22014. "directory": {
  22015. "type": "string"
  22016. },
  22017. "path": {
  22018. "type": "string"
  22019. },
  22020. "parentID": {
  22021. "type": "string",
  22022. "pattern": "^ses"
  22023. },
  22024. "summary": {
  22025. "type": "object",
  22026. "properties": {
  22027. "additions": {
  22028. "type": "number"
  22029. },
  22030. "deletions": {
  22031. "type": "number"
  22032. },
  22033. "files": {
  22034. "type": "number"
  22035. },
  22036. "diffs": {
  22037. "type": "array",
  22038. "items": {
  22039. "$ref": "#/components/schemas/SnapshotFileDiff"
  22040. }
  22041. }
  22042. },
  22043. "required": ["additions", "deletions", "files"],
  22044. "additionalProperties": false
  22045. },
  22046. "cost": {
  22047. "type": "number"
  22048. },
  22049. "tokens": {
  22050. "type": "object",
  22051. "properties": {
  22052. "input": {
  22053. "type": "number"
  22054. },
  22055. "output": {
  22056. "type": "number"
  22057. },
  22058. "reasoning": {
  22059. "type": "number"
  22060. },
  22061. "cache": {
  22062. "type": "object",
  22063. "properties": {
  22064. "read": {
  22065. "type": "number"
  22066. },
  22067. "write": {
  22068. "type": "number"
  22069. }
  22070. },
  22071. "required": ["read", "write"],
  22072. "additionalProperties": false
  22073. }
  22074. },
  22075. "required": ["input", "output", "reasoning", "cache"],
  22076. "additionalProperties": false
  22077. },
  22078. "share": {
  22079. "type": "object",
  22080. "properties": {
  22081. "url": {
  22082. "type": "string"
  22083. }
  22084. },
  22085. "required": ["url"],
  22086. "additionalProperties": false
  22087. },
  22088. "title": {
  22089. "type": "string"
  22090. },
  22091. "agent": {
  22092. "type": "string"
  22093. },
  22094. "model": {
  22095. "type": "object",
  22096. "properties": {
  22097. "id": {
  22098. "type": "string"
  22099. },
  22100. "providerID": {
  22101. "type": "string"
  22102. },
  22103. "variant": {
  22104. "type": "string"
  22105. }
  22106. },
  22107. "required": ["id", "providerID"],
  22108. "additionalProperties": false
  22109. },
  22110. "version": {
  22111. "type": "string"
  22112. },
  22113. "metadata": {
  22114. "type": "object"
  22115. },
  22116. "time": {
  22117. "type": "object",
  22118. "properties": {
  22119. "created": {
  22120. "type": "integer",
  22121. "minimum": 0
  22122. },
  22123. "updated": {
  22124. "type": "integer",
  22125. "minimum": 0
  22126. },
  22127. "compacting": {
  22128. "type": "integer",
  22129. "minimum": 0
  22130. },
  22131. "archived": {
  22132. "type": "number"
  22133. }
  22134. },
  22135. "required": ["created", "updated"],
  22136. "additionalProperties": false
  22137. },
  22138. "permission": {
  22139. "$ref": "#/components/schemas/PermissionRuleset"
  22140. },
  22141. "revert": {
  22142. "type": "object",
  22143. "properties": {
  22144. "messageID": {
  22145. "type": "string",
  22146. "pattern": "^msg"
  22147. },
  22148. "partID": {
  22149. "type": "string",
  22150. "pattern": "^prt"
  22151. },
  22152. "snapshot": {
  22153. "type": "string"
  22154. },
  22155. "diff": {
  22156. "type": "string"
  22157. }
  22158. },
  22159. "required": ["messageID"],
  22160. "additionalProperties": false
  22161. },
  22162. "project": {
  22163. "anyOf": [
  22164. {
  22165. "$ref": "#/components/schemas/ProjectSummary"
  22166. },
  22167. {
  22168. "type": "null"
  22169. }
  22170. ]
  22171. }
  22172. },
  22173. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22174. "additionalProperties": false
  22175. },
  22176. "McpResource": {
  22177. "type": "object",
  22178. "properties": {
  22179. "name": {
  22180. "type": "string"
  22181. },
  22182. "uri": {
  22183. "type": "string"
  22184. },
  22185. "description": {
  22186. "type": "string"
  22187. },
  22188. "mimeType": {
  22189. "type": "string"
  22190. },
  22191. "client": {
  22192. "type": "string"
  22193. }
  22194. },
  22195. "required": ["name", "uri", "client"],
  22196. "additionalProperties": false
  22197. },
  22198. "Symbol": {
  22199. "type": "object",
  22200. "properties": {
  22201. "name": {
  22202. "type": "string"
  22203. },
  22204. "kind": {
  22205. "type": "integer",
  22206. "minimum": 0
  22207. },
  22208. "location": {
  22209. "type": "object",
  22210. "properties": {
  22211. "uri": {
  22212. "type": "string"
  22213. },
  22214. "range": {
  22215. "$ref": "#/components/schemas/Range"
  22216. }
  22217. },
  22218. "required": ["uri", "range"],
  22219. "additionalProperties": false
  22220. }
  22221. },
  22222. "required": ["name", "kind", "location"],
  22223. "additionalProperties": false
  22224. },
  22225. "FileNode": {
  22226. "type": "object",
  22227. "properties": {
  22228. "name": {
  22229. "type": "string"
  22230. },
  22231. "path": {
  22232. "type": "string"
  22233. },
  22234. "absolute": {
  22235. "type": "string"
  22236. },
  22237. "type": {
  22238. "type": "string",
  22239. "enum": ["file", "directory"]
  22240. },
  22241. "ignored": {
  22242. "type": "boolean"
  22243. }
  22244. },
  22245. "required": ["name", "path", "absolute", "type", "ignored"],
  22246. "additionalProperties": false
  22247. },
  22248. "FileContent": {
  22249. "type": "object",
  22250. "properties": {
  22251. "type": {
  22252. "type": "string",
  22253. "enum": ["text", "binary"]
  22254. },
  22255. "content": {
  22256. "type": "string"
  22257. },
  22258. "diff": {
  22259. "type": "string"
  22260. },
  22261. "patch": {
  22262. "type": "object",
  22263. "properties": {
  22264. "oldFileName": {
  22265. "type": "string"
  22266. },
  22267. "newFileName": {
  22268. "type": "string"
  22269. },
  22270. "oldHeader": {
  22271. "type": "string"
  22272. },
  22273. "newHeader": {
  22274. "type": "string"
  22275. },
  22276. "hunks": {
  22277. "type": "array",
  22278. "items": {
  22279. "type": "object",
  22280. "properties": {
  22281. "oldStart": {
  22282. "type": "integer",
  22283. "minimum": 0
  22284. },
  22285. "oldLines": {
  22286. "type": "integer",
  22287. "minimum": 0
  22288. },
  22289. "newStart": {
  22290. "type": "integer",
  22291. "minimum": 0
  22292. },
  22293. "newLines": {
  22294. "type": "integer",
  22295. "minimum": 0
  22296. },
  22297. "lines": {
  22298. "type": "array",
  22299. "items": {
  22300. "type": "string"
  22301. }
  22302. }
  22303. },
  22304. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22305. "additionalProperties": false
  22306. }
  22307. },
  22308. "index": {
  22309. "type": "string"
  22310. }
  22311. },
  22312. "required": ["oldFileName", "newFileName", "hunks"],
  22313. "additionalProperties": false
  22314. },
  22315. "encoding": {
  22316. "type": "string",
  22317. "enum": ["base64"]
  22318. },
  22319. "mimeType": {
  22320. "type": "string"
  22321. }
  22322. },
  22323. "required": ["type", "content"],
  22324. "additionalProperties": false
  22325. },
  22326. "File": {
  22327. "type": "object",
  22328. "properties": {
  22329. "path": {
  22330. "type": "string"
  22331. },
  22332. "added": {
  22333. "type": "integer",
  22334. "minimum": 0
  22335. },
  22336. "removed": {
  22337. "type": "integer",
  22338. "minimum": 0
  22339. },
  22340. "status": {
  22341. "type": "string",
  22342. "enum": ["added", "deleted", "modified"]
  22343. }
  22344. },
  22345. "required": ["path", "added", "removed", "status"],
  22346. "additionalProperties": false
  22347. },
  22348. "Path": {
  22349. "type": "object",
  22350. "properties": {
  22351. "home": {
  22352. "type": "string"
  22353. },
  22354. "state": {
  22355. "type": "string"
  22356. },
  22357. "config": {
  22358. "type": "string"
  22359. },
  22360. "worktree": {
  22361. "type": "string"
  22362. },
  22363. "directory": {
  22364. "type": "string"
  22365. }
  22366. },
  22367. "required": ["home", "state", "config", "worktree", "directory"],
  22368. "additionalProperties": false
  22369. },
  22370. "VcsInfo": {
  22371. "type": "object",
  22372. "properties": {
  22373. "branch": {
  22374. "type": "string"
  22375. },
  22376. "default_branch": {
  22377. "type": "string"
  22378. }
  22379. },
  22380. "additionalProperties": false
  22381. },
  22382. "VcsFileStatus": {
  22383. "type": "object",
  22384. "properties": {
  22385. "file": {
  22386. "type": "string"
  22387. },
  22388. "additions": {
  22389. "type": "number"
  22390. },
  22391. "deletions": {
  22392. "type": "number"
  22393. },
  22394. "status": {
  22395. "type": "string",
  22396. "enum": ["added", "deleted", "modified"]
  22397. }
  22398. },
  22399. "required": ["file", "additions", "deletions", "status"],
  22400. "additionalProperties": false
  22401. },
  22402. "VcsFileDiff": {
  22403. "type": "object",
  22404. "properties": {
  22405. "file": {
  22406. "type": "string"
  22407. },
  22408. "patch": {
  22409. "type": "string"
  22410. },
  22411. "additions": {
  22412. "type": "number"
  22413. },
  22414. "deletions": {
  22415. "type": "number"
  22416. },
  22417. "status": {
  22418. "type": "string",
  22419. "enum": ["added", "deleted", "modified"]
  22420. }
  22421. },
  22422. "required": ["file", "additions", "deletions"],
  22423. "additionalProperties": false
  22424. },
  22425. "VcsApplyError": {
  22426. "type": "object",
  22427. "properties": {
  22428. "name": {
  22429. "type": "string",
  22430. "enum": ["VcsApplyError"]
  22431. },
  22432. "data": {
  22433. "type": "object",
  22434. "properties": {
  22435. "message": {
  22436. "type": "string"
  22437. },
  22438. "reason": {
  22439. "type": "string",
  22440. "enum": ["non-git", "not-clean"]
  22441. }
  22442. },
  22443. "required": ["message", "reason"],
  22444. "additionalProperties": false
  22445. }
  22446. },
  22447. "required": ["name", "data"],
  22448. "additionalProperties": false
  22449. },
  22450. "Command": {
  22451. "type": "object",
  22452. "properties": {
  22453. "name": {
  22454. "type": "string"
  22455. },
  22456. "description": {
  22457. "type": "string"
  22458. },
  22459. "agent": {
  22460. "type": "string"
  22461. },
  22462. "model": {
  22463. "type": "string"
  22464. },
  22465. "source": {
  22466. "type": "string",
  22467. "enum": ["command", "mcp", "skill"]
  22468. },
  22469. "template": {
  22470. "type": "string"
  22471. },
  22472. "subtask": {
  22473. "type": "boolean"
  22474. },
  22475. "hints": {
  22476. "type": "array",
  22477. "items": {
  22478. "type": "string"
  22479. }
  22480. }
  22481. },
  22482. "required": ["name", "template", "hints"],
  22483. "additionalProperties": false
  22484. },
  22485. "Agent": {
  22486. "type": "object",
  22487. "properties": {
  22488. "name": {
  22489. "type": "string"
  22490. },
  22491. "description": {
  22492. "type": "string"
  22493. },
  22494. "mode": {
  22495. "type": "string",
  22496. "enum": ["subagent", "primary", "all"]
  22497. },
  22498. "native": {
  22499. "type": "boolean"
  22500. },
  22501. "hidden": {
  22502. "type": "boolean"
  22503. },
  22504. "topP": {
  22505. "type": "number"
  22506. },
  22507. "temperature": {
  22508. "type": "number"
  22509. },
  22510. "color": {
  22511. "type": "string"
  22512. },
  22513. "permission": {
  22514. "$ref": "#/components/schemas/PermissionRuleset"
  22515. },
  22516. "model": {
  22517. "type": "object",
  22518. "properties": {
  22519. "modelID": {
  22520. "type": "string"
  22521. },
  22522. "providerID": {
  22523. "type": "string"
  22524. }
  22525. },
  22526. "required": ["modelID", "providerID"],
  22527. "additionalProperties": false
  22528. },
  22529. "variant": {
  22530. "type": "string"
  22531. },
  22532. "prompt": {
  22533. "type": "string"
  22534. },
  22535. "options": {
  22536. "type": "object"
  22537. },
  22538. "steps": {
  22539. "type": "number"
  22540. }
  22541. },
  22542. "required": ["name", "mode", "permission", "options"],
  22543. "additionalProperties": false
  22544. },
  22545. "LSPStatus": {
  22546. "type": "object",
  22547. "properties": {
  22548. "id": {
  22549. "type": "string"
  22550. },
  22551. "name": {
  22552. "type": "string"
  22553. },
  22554. "root": {
  22555. "type": "string"
  22556. },
  22557. "status": {
  22558. "type": "string",
  22559. "enum": ["connected", "error"]
  22560. }
  22561. },
  22562. "required": ["id", "name", "root", "status"],
  22563. "additionalProperties": false
  22564. },
  22565. "FormatterStatus": {
  22566. "type": "object",
  22567. "properties": {
  22568. "name": {
  22569. "type": "string"
  22570. },
  22571. "extensions": {
  22572. "type": "array",
  22573. "items": {
  22574. "type": "string"
  22575. }
  22576. },
  22577. "enabled": {
  22578. "type": "boolean"
  22579. }
  22580. },
  22581. "required": ["name", "extensions", "enabled"],
  22582. "additionalProperties": false
  22583. },
  22584. "MCPStatusConnected": {
  22585. "type": "object",
  22586. "properties": {
  22587. "status": {
  22588. "type": "string",
  22589. "enum": ["connected"]
  22590. }
  22591. },
  22592. "required": ["status"],
  22593. "additionalProperties": false
  22594. },
  22595. "MCPStatusDisabled": {
  22596. "type": "object",
  22597. "properties": {
  22598. "status": {
  22599. "type": "string",
  22600. "enum": ["disabled"]
  22601. }
  22602. },
  22603. "required": ["status"],
  22604. "additionalProperties": false
  22605. },
  22606. "MCPStatusFailed": {
  22607. "type": "object",
  22608. "properties": {
  22609. "status": {
  22610. "type": "string",
  22611. "enum": ["failed"]
  22612. },
  22613. "error": {
  22614. "type": "string"
  22615. }
  22616. },
  22617. "required": ["status", "error"],
  22618. "additionalProperties": false
  22619. },
  22620. "MCPStatusNeedsAuth": {
  22621. "type": "object",
  22622. "properties": {
  22623. "status": {
  22624. "type": "string",
  22625. "enum": ["needs_auth"]
  22626. }
  22627. },
  22628. "required": ["status"],
  22629. "additionalProperties": false
  22630. },
  22631. "MCPStatusNeedsClientRegistration": {
  22632. "type": "object",
  22633. "properties": {
  22634. "status": {
  22635. "type": "string",
  22636. "enum": ["needs_client_registration"]
  22637. },
  22638. "error": {
  22639. "type": "string"
  22640. }
  22641. },
  22642. "required": ["status", "error"],
  22643. "additionalProperties": false
  22644. },
  22645. "MCPStatus": {
  22646. "anyOf": [
  22647. {
  22648. "$ref": "#/components/schemas/MCPStatusConnected"
  22649. },
  22650. {
  22651. "$ref": "#/components/schemas/MCPStatusDisabled"
  22652. },
  22653. {
  22654. "$ref": "#/components/schemas/MCPStatusFailed"
  22655. },
  22656. {
  22657. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22658. },
  22659. {
  22660. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22661. }
  22662. ]
  22663. },
  22664. "McpUnsupportedOAuthError": {
  22665. "type": "object",
  22666. "properties": {
  22667. "error": {
  22668. "type": "string"
  22669. }
  22670. },
  22671. "required": ["error"],
  22672. "additionalProperties": false
  22673. },
  22674. "McpServerNotFoundError": {
  22675. "type": "object",
  22676. "properties": {
  22677. "_tag": {
  22678. "type": "string",
  22679. "enum": ["McpServerNotFoundError"]
  22680. },
  22681. "name": {
  22682. "type": "string"
  22683. },
  22684. "message": {
  22685. "type": "string"
  22686. }
  22687. },
  22688. "required": ["_tag", "name", "message"],
  22689. "additionalProperties": false
  22690. },
  22691. "Project": {
  22692. "type": "object",
  22693. "properties": {
  22694. "id": {
  22695. "type": "string"
  22696. },
  22697. "worktree": {
  22698. "type": "string"
  22699. },
  22700. "vcs": {
  22701. "$ref": "#/components/schemas/ProjectVcs"
  22702. },
  22703. "name": {
  22704. "type": "string"
  22705. },
  22706. "icon": {
  22707. "$ref": "#/components/schemas/ProjectIcon"
  22708. },
  22709. "commands": {
  22710. "$ref": "#/components/schemas/ProjectCommands"
  22711. },
  22712. "time": {
  22713. "$ref": "#/components/schemas/ProjectTime"
  22714. },
  22715. "sandboxes": {
  22716. "type": "array",
  22717. "items": {
  22718. "type": "string"
  22719. }
  22720. }
  22721. },
  22722. "required": ["id", "worktree", "time", "sandboxes"],
  22723. "additionalProperties": false
  22724. },
  22725. "ProjectNotFoundError": {
  22726. "type": "object",
  22727. "properties": {
  22728. "_tag": {
  22729. "type": "string",
  22730. "enum": ["ProjectNotFoundError"]
  22731. },
  22732. "projectID": {
  22733. "type": "string"
  22734. },
  22735. "message": {
  22736. "type": "string"
  22737. }
  22738. },
  22739. "required": ["_tag", "projectID", "message"],
  22740. "additionalProperties": false
  22741. },
  22742. "PtyNotFoundError": {
  22743. "type": "object",
  22744. "properties": {
  22745. "_tag": {
  22746. "type": "string",
  22747. "enum": ["PtyNotFoundError"]
  22748. },
  22749. "ptyID": {
  22750. "type": "string"
  22751. },
  22752. "message": {
  22753. "type": "string"
  22754. }
  22755. },
  22756. "required": ["_tag", "ptyID", "message"],
  22757. "additionalProperties": false
  22758. },
  22759. "PtyForbiddenError": {
  22760. "type": "object",
  22761. "properties": {
  22762. "_tag": {
  22763. "type": "string",
  22764. "enum": ["PtyForbiddenError"]
  22765. },
  22766. "message": {
  22767. "type": "string"
  22768. }
  22769. },
  22770. "required": ["_tag", "message"],
  22771. "additionalProperties": false
  22772. },
  22773. "QuestionRequest": {
  22774. "type": "object",
  22775. "properties": {
  22776. "id": {
  22777. "type": "string",
  22778. "pattern": "^que"
  22779. },
  22780. "sessionID": {
  22781. "type": "string",
  22782. "pattern": "^ses"
  22783. },
  22784. "questions": {
  22785. "type": "array",
  22786. "items": {
  22787. "$ref": "#/components/schemas/QuestionInfo"
  22788. },
  22789. "description": "Questions to ask"
  22790. },
  22791. "tool": {
  22792. "$ref": "#/components/schemas/QuestionTool"
  22793. }
  22794. },
  22795. "required": ["id", "sessionID", "questions"],
  22796. "additionalProperties": false
  22797. },
  22798. "QuestionNotFoundError": {
  22799. "type": "object",
  22800. "properties": {
  22801. "_tag": {
  22802. "type": "string",
  22803. "enum": ["QuestionNotFoundError"]
  22804. },
  22805. "requestID": {
  22806. "type": "string"
  22807. },
  22808. "message": {
  22809. "type": "string"
  22810. }
  22811. },
  22812. "required": ["_tag", "requestID", "message"],
  22813. "additionalProperties": false
  22814. },
  22815. "PermissionRequest": {
  22816. "type": "object",
  22817. "properties": {
  22818. "id": {
  22819. "type": "string",
  22820. "pattern": "^per"
  22821. },
  22822. "sessionID": {
  22823. "type": "string",
  22824. "pattern": "^ses"
  22825. },
  22826. "permission": {
  22827. "type": "string"
  22828. },
  22829. "patterns": {
  22830. "type": "array",
  22831. "items": {
  22832. "type": "string"
  22833. }
  22834. },
  22835. "metadata": {
  22836. "type": "object"
  22837. },
  22838. "always": {
  22839. "type": "array",
  22840. "items": {
  22841. "type": "string"
  22842. }
  22843. },
  22844. "tool": {
  22845. "type": "object",
  22846. "properties": {
  22847. "messageID": {
  22848. "type": "string"
  22849. },
  22850. "callID": {
  22851. "type": "string"
  22852. }
  22853. },
  22854. "required": ["messageID", "callID"],
  22855. "additionalProperties": false
  22856. }
  22857. },
  22858. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22859. "additionalProperties": false
  22860. },
  22861. "PermissionNotFoundError": {
  22862. "type": "object",
  22863. "properties": {
  22864. "_tag": {
  22865. "type": "string",
  22866. "enum": ["PermissionNotFoundError"]
  22867. },
  22868. "requestID": {
  22869. "type": "string"
  22870. },
  22871. "message": {
  22872. "type": "string"
  22873. }
  22874. },
  22875. "required": ["_tag", "requestID", "message"],
  22876. "additionalProperties": false
  22877. },
  22878. "ProviderAuthMethod": {
  22879. "type": "object",
  22880. "properties": {
  22881. "type": {
  22882. "type": "string",
  22883. "enum": ["oauth", "api"]
  22884. },
  22885. "label": {
  22886. "type": "string"
  22887. },
  22888. "prompts": {
  22889. "type": "array",
  22890. "items": {
  22891. "anyOf": [
  22892. {
  22893. "type": "object",
  22894. "properties": {
  22895. "type": {
  22896. "type": "string",
  22897. "enum": ["text"]
  22898. },
  22899. "key": {
  22900. "type": "string"
  22901. },
  22902. "message": {
  22903. "type": "string"
  22904. },
  22905. "placeholder": {
  22906. "type": "string"
  22907. },
  22908. "when": {
  22909. "type": "object",
  22910. "properties": {
  22911. "key": {
  22912. "type": "string"
  22913. },
  22914. "op": {
  22915. "type": "string",
  22916. "enum": ["eq", "neq"]
  22917. },
  22918. "value": {
  22919. "type": "string"
  22920. }
  22921. },
  22922. "required": ["key", "op", "value"],
  22923. "additionalProperties": false
  22924. }
  22925. },
  22926. "required": ["type", "key", "message"],
  22927. "additionalProperties": false
  22928. },
  22929. {
  22930. "type": "object",
  22931. "properties": {
  22932. "type": {
  22933. "type": "string",
  22934. "enum": ["select"]
  22935. },
  22936. "key": {
  22937. "type": "string"
  22938. },
  22939. "message": {
  22940. "type": "string"
  22941. },
  22942. "options": {
  22943. "type": "array",
  22944. "items": {
  22945. "type": "object",
  22946. "properties": {
  22947. "label": {
  22948. "type": "string"
  22949. },
  22950. "value": {
  22951. "type": "string"
  22952. },
  22953. "hint": {
  22954. "type": "string"
  22955. }
  22956. },
  22957. "required": ["label", "value"],
  22958. "additionalProperties": false
  22959. }
  22960. },
  22961. "when": {
  22962. "type": "object",
  22963. "properties": {
  22964. "key": {
  22965. "type": "string"
  22966. },
  22967. "op": {
  22968. "type": "string",
  22969. "enum": ["eq", "neq"]
  22970. },
  22971. "value": {
  22972. "type": "string"
  22973. }
  22974. },
  22975. "required": ["key", "op", "value"],
  22976. "additionalProperties": false
  22977. }
  22978. },
  22979. "required": ["type", "key", "message", "options"],
  22980. "additionalProperties": false
  22981. }
  22982. ]
  22983. }
  22984. }
  22985. },
  22986. "required": ["type", "label"],
  22987. "additionalProperties": false
  22988. },
  22989. "ProviderAuthAuthorization": {
  22990. "type": "object",
  22991. "properties": {
  22992. "url": {
  22993. "type": "string"
  22994. },
  22995. "method": {
  22996. "type": "string",
  22997. "enum": ["auto", "code"]
  22998. },
  22999. "instructions": {
  23000. "type": "string"
  23001. }
  23002. },
  23003. "required": ["url", "method", "instructions"],
  23004. "additionalProperties": false
  23005. },
  23006. "ProviderAuthError1": {
  23007. "type": "object",
  23008. "properties": {
  23009. "name": {
  23010. "type": "string",
  23011. "enum": [
  23012. "BadRequest",
  23013. "ProviderAuthOauthMissing",
  23014. "ProviderAuthOauthCodeMissing",
  23015. "ProviderAuthOauthCallbackFailed",
  23016. "ProviderAuthValidationFailed"
  23017. ]
  23018. },
  23019. "data": {
  23020. "type": "object",
  23021. "properties": {
  23022. "providerID": {
  23023. "type": "string"
  23024. },
  23025. "field": {
  23026. "type": "string"
  23027. },
  23028. "message": {
  23029. "type": "string"
  23030. },
  23031. "kind": {
  23032. "type": "string"
  23033. }
  23034. },
  23035. "additionalProperties": false
  23036. }
  23037. },
  23038. "required": ["name", "data"],
  23039. "additionalProperties": false
  23040. },
  23041. "NotFoundError": {
  23042. "type": "object",
  23043. "required": ["name", "data"],
  23044. "properties": {
  23045. "name": {
  23046. "type": "string",
  23047. "enum": ["NotFoundError"]
  23048. },
  23049. "data": {
  23050. "type": "object",
  23051. "required": ["message"],
  23052. "properties": {
  23053. "message": {
  23054. "type": "string"
  23055. }
  23056. }
  23057. }
  23058. }
  23059. },
  23060. "TextPartInput": {
  23061. "type": "object",
  23062. "properties": {
  23063. "id": {
  23064. "type": "string",
  23065. "pattern": "^prt"
  23066. },
  23067. "type": {
  23068. "type": "string",
  23069. "enum": ["text"]
  23070. },
  23071. "text": {
  23072. "type": "string"
  23073. },
  23074. "synthetic": {
  23075. "type": "boolean"
  23076. },
  23077. "ignored": {
  23078. "type": "boolean"
  23079. },
  23080. "time": {
  23081. "type": "object",
  23082. "properties": {
  23083. "start": {
  23084. "type": "integer",
  23085. "minimum": 0
  23086. },
  23087. "end": {
  23088. "type": "integer",
  23089. "minimum": 0
  23090. }
  23091. },
  23092. "required": ["start"],
  23093. "additionalProperties": false
  23094. },
  23095. "metadata": {
  23096. "type": "object"
  23097. }
  23098. },
  23099. "required": ["type", "text"],
  23100. "additionalProperties": false
  23101. },
  23102. "FilePartInput": {
  23103. "type": "object",
  23104. "properties": {
  23105. "id": {
  23106. "type": "string",
  23107. "pattern": "^prt"
  23108. },
  23109. "type": {
  23110. "type": "string",
  23111. "enum": ["file"]
  23112. },
  23113. "mime": {
  23114. "type": "string"
  23115. },
  23116. "filename": {
  23117. "type": "string"
  23118. },
  23119. "url": {
  23120. "type": "string"
  23121. },
  23122. "source": {
  23123. "$ref": "#/components/schemas/FilePartSource"
  23124. }
  23125. },
  23126. "required": ["type", "mime", "url"],
  23127. "additionalProperties": false
  23128. },
  23129. "AgentPartInput": {
  23130. "type": "object",
  23131. "properties": {
  23132. "id": {
  23133. "type": "string",
  23134. "pattern": "^prt"
  23135. },
  23136. "type": {
  23137. "type": "string",
  23138. "enum": ["agent"]
  23139. },
  23140. "name": {
  23141. "type": "string"
  23142. },
  23143. "source": {
  23144. "type": "object",
  23145. "properties": {
  23146. "value": {
  23147. "type": "string"
  23148. },
  23149. "start": {
  23150. "type": "integer",
  23151. "minimum": 0
  23152. },
  23153. "end": {
  23154. "type": "integer",
  23155. "minimum": 0
  23156. }
  23157. },
  23158. "required": ["value", "start", "end"],
  23159. "additionalProperties": false
  23160. }
  23161. },
  23162. "required": ["type", "name"],
  23163. "additionalProperties": false
  23164. },
  23165. "SubtaskPartInput": {
  23166. "type": "object",
  23167. "properties": {
  23168. "id": {
  23169. "type": "string",
  23170. "pattern": "^prt"
  23171. },
  23172. "type": {
  23173. "type": "string",
  23174. "enum": ["subtask"]
  23175. },
  23176. "prompt": {
  23177. "type": "string"
  23178. },
  23179. "description": {
  23180. "type": "string"
  23181. },
  23182. "agent": {
  23183. "type": "string"
  23184. },
  23185. "model": {
  23186. "type": "object",
  23187. "properties": {
  23188. "providerID": {
  23189. "type": "string"
  23190. },
  23191. "modelID": {
  23192. "type": "string"
  23193. }
  23194. },
  23195. "required": ["providerID", "modelID"],
  23196. "additionalProperties": false
  23197. },
  23198. "command": {
  23199. "type": "string"
  23200. }
  23201. },
  23202. "required": ["type", "prompt", "description", "agent"],
  23203. "additionalProperties": false
  23204. },
  23205. "SessionBusyError": {
  23206. "type": "object",
  23207. "properties": {
  23208. "_tag": {
  23209. "type": "string",
  23210. "enum": ["SessionBusyError"]
  23211. },
  23212. "sessionID": {
  23213. "type": "string"
  23214. },
  23215. "message": {
  23216. "type": "string"
  23217. }
  23218. },
  23219. "required": ["_tag", "sessionID", "message"],
  23220. "additionalProperties": false
  23221. },
  23222. "EventTuiPromptAppend": {
  23223. "type": "object",
  23224. "properties": {
  23225. "type": {
  23226. "type": "string",
  23227. "enum": ["tui.prompt.append"]
  23228. },
  23229. "properties": {
  23230. "type": "object",
  23231. "properties": {
  23232. "text": {
  23233. "type": "string"
  23234. }
  23235. },
  23236. "required": ["text"],
  23237. "additionalProperties": false
  23238. }
  23239. },
  23240. "required": ["type", "properties"],
  23241. "additionalProperties": false
  23242. },
  23243. "EventTuiCommandExecute": {
  23244. "type": "object",
  23245. "properties": {
  23246. "type": {
  23247. "type": "string",
  23248. "enum": ["tui.command.execute"]
  23249. },
  23250. "properties": {
  23251. "type": "object",
  23252. "properties": {
  23253. "command": {
  23254. "anyOf": [
  23255. {
  23256. "type": "string",
  23257. "enum": [
  23258. "session.list",
  23259. "session.new",
  23260. "session.share",
  23261. "session.interrupt",
  23262. "session.compact",
  23263. "session.page.up",
  23264. "session.page.down",
  23265. "session.line.up",
  23266. "session.line.down",
  23267. "session.half.page.up",
  23268. "session.half.page.down",
  23269. "session.first",
  23270. "session.last",
  23271. "prompt.clear",
  23272. "prompt.submit",
  23273. "agent.cycle"
  23274. ]
  23275. },
  23276. {
  23277. "type": "string"
  23278. }
  23279. ]
  23280. }
  23281. },
  23282. "required": ["command"],
  23283. "additionalProperties": false
  23284. }
  23285. },
  23286. "required": ["type", "properties"],
  23287. "additionalProperties": false
  23288. },
  23289. "EventTuiToastShow": {
  23290. "type": "object",
  23291. "properties": {
  23292. "type": {
  23293. "type": "string",
  23294. "enum": ["tui.toast.show"]
  23295. },
  23296. "properties": {
  23297. "type": "object",
  23298. "properties": {
  23299. "title": {
  23300. "type": "string"
  23301. },
  23302. "message": {
  23303. "type": "string"
  23304. },
  23305. "variant": {
  23306. "type": "string",
  23307. "enum": ["info", "success", "warning", "error"]
  23308. },
  23309. "duration": {
  23310. "type": "integer",
  23311. "exclusiveMinimum": 0
  23312. }
  23313. },
  23314. "required": ["message", "variant"],
  23315. "additionalProperties": false
  23316. }
  23317. },
  23318. "required": ["type", "properties"],
  23319. "additionalProperties": false
  23320. },
  23321. "EventTuiSessionSelect": {
  23322. "type": "object",
  23323. "properties": {
  23324. "type": {
  23325. "type": "string",
  23326. "enum": ["tui.session.select"]
  23327. },
  23328. "properties": {
  23329. "type": "object",
  23330. "properties": {
  23331. "sessionID": {
  23332. "type": "string",
  23333. "pattern": "^ses",
  23334. "description": "Session ID to navigate to"
  23335. }
  23336. },
  23337. "required": ["sessionID"],
  23338. "additionalProperties": false
  23339. }
  23340. },
  23341. "required": ["type", "properties"],
  23342. "additionalProperties": false
  23343. },
  23344. "Workspace": {
  23345. "type": "object",
  23346. "properties": {
  23347. "id": {
  23348. "type": "string",
  23349. "pattern": "^wrk"
  23350. },
  23351. "type": {
  23352. "type": "string"
  23353. },
  23354. "name": {
  23355. "type": "string"
  23356. },
  23357. "branch": {
  23358. "anyOf": [
  23359. {
  23360. "type": "string"
  23361. },
  23362. {
  23363. "type": "null"
  23364. }
  23365. ]
  23366. },
  23367. "directory": {
  23368. "anyOf": [
  23369. {
  23370. "type": "string"
  23371. },
  23372. {
  23373. "type": "null"
  23374. }
  23375. ]
  23376. },
  23377. "extra": {
  23378. "anyOf": [
  23379. {},
  23380. {
  23381. "type": "null"
  23382. }
  23383. ]
  23384. },
  23385. "projectID": {
  23386. "type": "string"
  23387. },
  23388. "timeUsed": {
  23389. "anyOf": [
  23390. {
  23391. "type": "number"
  23392. },
  23393. {
  23394. "type": "string",
  23395. "enum": ["NaN"]
  23396. },
  23397. {
  23398. "type": "string",
  23399. "enum": ["Infinity"]
  23400. },
  23401. {
  23402. "type": "string",
  23403. "enum": ["-Infinity"]
  23404. },
  23405. {
  23406. "type": "string",
  23407. "enum": ["Infinity", "-Infinity", "NaN"]
  23408. }
  23409. ]
  23410. }
  23411. },
  23412. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23413. "additionalProperties": false
  23414. },
  23415. "WorkspaceCreateError": {
  23416. "type": "object",
  23417. "properties": {
  23418. "name": {
  23419. "type": "string",
  23420. "enum": ["WorkspaceCreateError"]
  23421. },
  23422. "data": {
  23423. "type": "object",
  23424. "properties": {
  23425. "message": {
  23426. "type": "string"
  23427. }
  23428. },
  23429. "required": ["message"],
  23430. "additionalProperties": false
  23431. }
  23432. },
  23433. "required": ["name", "data"],
  23434. "additionalProperties": false
  23435. },
  23436. "WorkspaceWarpError": {
  23437. "type": "object",
  23438. "properties": {
  23439. "name": {
  23440. "type": "string",
  23441. "enum": ["WorkspaceWarpError"]
  23442. },
  23443. "data": {
  23444. "type": "object",
  23445. "properties": {
  23446. "message": {
  23447. "type": "string"
  23448. }
  23449. },
  23450. "required": ["message"],
  23451. "additionalProperties": false
  23452. }
  23453. },
  23454. "required": ["name", "data"],
  23455. "additionalProperties": false
  23456. },
  23457. "UnauthorizedError": {
  23458. "type": "object",
  23459. "properties": {
  23460. "_tag": {
  23461. "type": "string",
  23462. "enum": ["UnauthorizedError"]
  23463. },
  23464. "message": {
  23465. "type": "string"
  23466. }
  23467. },
  23468. "required": ["_tag", "message"],
  23469. "additionalProperties": false
  23470. },
  23471. "SessionsResponse": {
  23472. "type": "object",
  23473. "properties": {
  23474. "data": {
  23475. "type": "array",
  23476. "items": {
  23477. "$ref": "#/components/schemas/SessionV2Info"
  23478. }
  23479. },
  23480. "cursor": {
  23481. "type": "object",
  23482. "properties": {
  23483. "previous": {
  23484. "type": "string"
  23485. },
  23486. "next": {
  23487. "type": "string"
  23488. }
  23489. },
  23490. "additionalProperties": false
  23491. }
  23492. },
  23493. "required": ["data", "cursor"],
  23494. "additionalProperties": false
  23495. },
  23496. "InvalidCursorError": {
  23497. "type": "object",
  23498. "properties": {
  23499. "_tag": {
  23500. "type": "string",
  23501. "enum": ["InvalidCursorError"]
  23502. },
  23503. "message": {
  23504. "type": "string"
  23505. }
  23506. },
  23507. "required": ["_tag", "message"],
  23508. "additionalProperties": false
  23509. },
  23510. "SessionActive": {
  23511. "type": "object",
  23512. "properties": {
  23513. "type": {
  23514. "type": "string",
  23515. "enum": ["running"]
  23516. }
  23517. },
  23518. "required": ["type"],
  23519. "additionalProperties": false
  23520. },
  23521. "SessionNotFoundError": {
  23522. "type": "object",
  23523. "properties": {
  23524. "_tag": {
  23525. "type": "string",
  23526. "enum": ["SessionNotFoundError"]
  23527. },
  23528. "sessionID": {
  23529. "type": "string"
  23530. },
  23531. "message": {
  23532. "type": "string"
  23533. }
  23534. },
  23535. "required": ["_tag", "sessionID", "message"],
  23536. "additionalProperties": false
  23537. },
  23538. "PromptInput": {
  23539. "type": "object",
  23540. "properties": {
  23541. "text": {
  23542. "type": "string"
  23543. },
  23544. "files": {
  23545. "type": "array",
  23546. "items": {
  23547. "$ref": "#/components/schemas/PromptInputFileAttachment"
  23548. }
  23549. },
  23550. "agents": {
  23551. "type": "array",
  23552. "items": {
  23553. "$ref": "#/components/schemas/PromptAgentAttachment"
  23554. }
  23555. }
  23556. },
  23557. "required": ["text"],
  23558. "additionalProperties": false
  23559. },
  23560. "ConflictError": {
  23561. "type": "object",
  23562. "properties": {
  23563. "_tag": {
  23564. "type": "string",
  23565. "enum": ["ConflictError"]
  23566. },
  23567. "message": {
  23568. "type": "string"
  23569. },
  23570. "resource": {
  23571. "type": "string"
  23572. }
  23573. },
  23574. "required": ["_tag", "message"],
  23575. "additionalProperties": false
  23576. },
  23577. "ServiceUnavailableError": {
  23578. "type": "object",
  23579. "properties": {
  23580. "_tag": {
  23581. "type": "string",
  23582. "enum": ["ServiceUnavailableError"]
  23583. },
  23584. "message": {
  23585. "type": "string"
  23586. },
  23587. "service": {
  23588. "type": "string"
  23589. }
  23590. },
  23591. "required": ["_tag", "message"],
  23592. "additionalProperties": false
  23593. },
  23594. "MessageNotFoundError": {
  23595. "type": "object",
  23596. "properties": {
  23597. "_tag": {
  23598. "type": "string",
  23599. "enum": ["MessageNotFoundError"]
  23600. },
  23601. "sessionID": {
  23602. "type": "string"
  23603. },
  23604. "messageID": {
  23605. "type": "string"
  23606. },
  23607. "message": {
  23608. "type": "string"
  23609. }
  23610. },
  23611. "required": ["_tag", "sessionID", "messageID", "message"],
  23612. "additionalProperties": false
  23613. },
  23614. "UnknownError1": {
  23615. "type": "object",
  23616. "properties": {
  23617. "_tag": {
  23618. "type": "string",
  23619. "enum": ["UnknownError"]
  23620. },
  23621. "message": {
  23622. "type": "string"
  23623. },
  23624. "ref": {
  23625. "type": "string"
  23626. }
  23627. },
  23628. "required": ["_tag", "message"],
  23629. "additionalProperties": false
  23630. },
  23631. "SessionDurableEvent": {
  23632. "oneOf": [
  23633. {
  23634. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23635. },
  23636. {
  23637. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23638. },
  23639. {
  23640. "$ref": "#/components/schemas/SessionNextMoved"
  23641. },
  23642. {
  23643. "$ref": "#/components/schemas/SessionNextPrompted"
  23644. },
  23645. {
  23646. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23647. },
  23648. {
  23649. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23650. },
  23651. {
  23652. "$ref": "#/components/schemas/SessionNextSynthetic"
  23653. },
  23654. {
  23655. "$ref": "#/components/schemas/SessionNextShellStarted"
  23656. },
  23657. {
  23658. "$ref": "#/components/schemas/SessionNextShellEnded"
  23659. },
  23660. {
  23661. "$ref": "#/components/schemas/SessionNextStepStarted"
  23662. },
  23663. {
  23664. "$ref": "#/components/schemas/SessionNextStepEnded"
  23665. },
  23666. {
  23667. "$ref": "#/components/schemas/SessionNextStepFailed"
  23668. },
  23669. {
  23670. "$ref": "#/components/schemas/SessionNextTextStarted"
  23671. },
  23672. {
  23673. "$ref": "#/components/schemas/SessionNextTextEnded"
  23674. },
  23675. {
  23676. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23677. },
  23678. {
  23679. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23680. },
  23681. {
  23682. "$ref": "#/components/schemas/SessionNextToolCalled"
  23683. },
  23684. {
  23685. "$ref": "#/components/schemas/SessionNextToolProgress"
  23686. },
  23687. {
  23688. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23689. },
  23690. {
  23691. "$ref": "#/components/schemas/SessionNextToolFailed"
  23692. },
  23693. {
  23694. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23695. },
  23696. {
  23697. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23698. },
  23699. {
  23700. "$ref": "#/components/schemas/SessionNextRetried"
  23701. },
  23702. {
  23703. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23704. },
  23705. {
  23706. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23707. },
  23708. {
  23709. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23710. },
  23711. {
  23712. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23713. },
  23714. {
  23715. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23716. }
  23717. ]
  23718. },
  23719. "SessionHistory": {
  23720. "type": "object",
  23721. "properties": {
  23722. "data": {
  23723. "type": "array",
  23724. "items": {
  23725. "$ref": "#/components/schemas/SessionDurableEvent"
  23726. }
  23727. },
  23728. "hasMore": {
  23729. "type": "boolean"
  23730. }
  23731. },
  23732. "required": ["data", "hasMore"],
  23733. "additionalProperties": false
  23734. },
  23735. "SessionDurableEvent1": {
  23736. "type": "string",
  23737. "contentSchema": {
  23738. "$ref": "#/components/schemas/SessionDurableEvent"
  23739. },
  23740. "contentMediaType": "application/json"
  23741. },
  23742. "SessionMessagesResponse": {
  23743. "type": "object",
  23744. "properties": {
  23745. "data": {
  23746. "type": "array",
  23747. "items": {
  23748. "$ref": "#/components/schemas/SessionMessage"
  23749. }
  23750. },
  23751. "cursor": {
  23752. "type": "object",
  23753. "properties": {
  23754. "previous": {
  23755. "type": "string"
  23756. },
  23757. "next": {
  23758. "type": "string"
  23759. }
  23760. },
  23761. "additionalProperties": false
  23762. }
  23763. },
  23764. "required": ["data", "cursor"],
  23765. "additionalProperties": false
  23766. },
  23767. "ProviderNotFoundError": {
  23768. "type": "object",
  23769. "properties": {
  23770. "_tag": {
  23771. "type": "string",
  23772. "enum": ["ProviderNotFoundError"]
  23773. },
  23774. "providerID": {
  23775. "type": "string"
  23776. },
  23777. "message": {
  23778. "type": "string"
  23779. }
  23780. },
  23781. "required": ["_tag", "providerID", "message"],
  23782. "additionalProperties": false
  23783. },
  23784. "OutputFormat1": {
  23785. "anyOf": [
  23786. {
  23787. "type": "object",
  23788. "properties": {
  23789. "type": {
  23790. "type": "string",
  23791. "enum": ["text"]
  23792. }
  23793. },
  23794. "required": ["type"],
  23795. "additionalProperties": false
  23796. },
  23797. {
  23798. "type": "object",
  23799. "properties": {
  23800. "type": {
  23801. "type": "string",
  23802. "enum": ["json_schema"]
  23803. },
  23804. "schema": {
  23805. "$ref": "#/components/schemas/JSONSchema"
  23806. },
  23807. "retryCount": {
  23808. "type": "integer",
  23809. "minimum": 0
  23810. }
  23811. },
  23812. "required": ["type", "schema"],
  23813. "additionalProperties": false
  23814. }
  23815. ]
  23816. },
  23817. "session.status": {
  23818. "type": "object",
  23819. "properties": {
  23820. "id": {
  23821. "type": "string",
  23822. "pattern": "^evt_"
  23823. },
  23824. "metadata": {
  23825. "type": "object"
  23826. },
  23827. "type": {
  23828. "type": "string",
  23829. "enum": ["session.status"]
  23830. },
  23831. "durable": {
  23832. "type": "object",
  23833. "properties": {
  23834. "aggregateID": {
  23835. "type": "string"
  23836. },
  23837. "seq": {
  23838. "type": "integer"
  23839. },
  23840. "version": {
  23841. "type": "integer"
  23842. }
  23843. },
  23844. "required": ["aggregateID", "seq", "version"],
  23845. "additionalProperties": false
  23846. },
  23847. "location": {
  23848. "$ref": "#/components/schemas/LocationRef"
  23849. },
  23850. "data": {
  23851. "type": "object",
  23852. "properties": {
  23853. "sessionID": {
  23854. "type": "string",
  23855. "pattern": "^ses"
  23856. },
  23857. "status": {
  23858. "$ref": "#/components/schemas/SessionStatus"
  23859. }
  23860. },
  23861. "required": ["sessionID", "status"],
  23862. "additionalProperties": false
  23863. }
  23864. },
  23865. "required": ["id", "type", "data"],
  23866. "additionalProperties": false
  23867. },
  23868. "question.replied": {
  23869. "type": "object",
  23870. "properties": {
  23871. "id": {
  23872. "type": "string",
  23873. "pattern": "^evt_"
  23874. },
  23875. "metadata": {
  23876. "type": "object"
  23877. },
  23878. "type": {
  23879. "type": "string",
  23880. "enum": ["question.replied"]
  23881. },
  23882. "durable": {
  23883. "type": "object",
  23884. "properties": {
  23885. "aggregateID": {
  23886. "type": "string"
  23887. },
  23888. "seq": {
  23889. "type": "integer"
  23890. },
  23891. "version": {
  23892. "type": "integer"
  23893. }
  23894. },
  23895. "required": ["aggregateID", "seq", "version"],
  23896. "additionalProperties": false
  23897. },
  23898. "location": {
  23899. "$ref": "#/components/schemas/LocationRef"
  23900. },
  23901. "data": {
  23902. "type": "object",
  23903. "properties": {
  23904. "sessionID": {
  23905. "type": "string",
  23906. "pattern": "^ses"
  23907. },
  23908. "requestID": {
  23909. "type": "string",
  23910. "pattern": "^que"
  23911. },
  23912. "answers": {
  23913. "type": "array",
  23914. "items": {
  23915. "$ref": "#/components/schemas/QuestionAnswer"
  23916. }
  23917. }
  23918. },
  23919. "required": ["sessionID", "requestID", "answers"],
  23920. "additionalProperties": false
  23921. }
  23922. },
  23923. "required": ["id", "type", "data"],
  23924. "additionalProperties": false
  23925. },
  23926. "question.rejected": {
  23927. "type": "object",
  23928. "properties": {
  23929. "id": {
  23930. "type": "string",
  23931. "pattern": "^evt_"
  23932. },
  23933. "metadata": {
  23934. "type": "object"
  23935. },
  23936. "type": {
  23937. "type": "string",
  23938. "enum": ["question.rejected"]
  23939. },
  23940. "durable": {
  23941. "type": "object",
  23942. "properties": {
  23943. "aggregateID": {
  23944. "type": "string"
  23945. },
  23946. "seq": {
  23947. "type": "integer"
  23948. },
  23949. "version": {
  23950. "type": "integer"
  23951. }
  23952. },
  23953. "required": ["aggregateID", "seq", "version"],
  23954. "additionalProperties": false
  23955. },
  23956. "location": {
  23957. "$ref": "#/components/schemas/LocationRef"
  23958. },
  23959. "data": {
  23960. "type": "object",
  23961. "properties": {
  23962. "sessionID": {
  23963. "type": "string",
  23964. "pattern": "^ses"
  23965. },
  23966. "requestID": {
  23967. "type": "string",
  23968. "pattern": "^que"
  23969. }
  23970. },
  23971. "required": ["sessionID", "requestID"],
  23972. "additionalProperties": false
  23973. }
  23974. },
  23975. "required": ["id", "type", "data"],
  23976. "additionalProperties": false
  23977. },
  23978. "V2Event1": {
  23979. "anyOf": [
  23980. {
  23981. "$ref": "#/components/schemas/Models-devRefreshed"
  23982. },
  23983. {
  23984. "$ref": "#/components/schemas/IntegrationUpdated"
  23985. },
  23986. {
  23987. "$ref": "#/components/schemas/IntegrationConnectionUpdated"
  23988. },
  23989. {
  23990. "$ref": "#/components/schemas/CatalogUpdated"
  23991. },
  23992. {
  23993. "$ref": "#/components/schemas/SessionCreated"
  23994. },
  23995. {
  23996. "$ref": "#/components/schemas/SessionUpdated"
  23997. },
  23998. {
  23999. "$ref": "#/components/schemas/SessionDeleted"
  24000. },
  24001. {
  24002. "$ref": "#/components/schemas/MessageUpdated"
  24003. },
  24004. {
  24005. "$ref": "#/components/schemas/MessageRemoved"
  24006. },
  24007. {
  24008. "$ref": "#/components/schemas/MessagePartUpdated"
  24009. },
  24010. {
  24011. "$ref": "#/components/schemas/MessagePartRemoved"
  24012. },
  24013. {
  24014. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  24015. },
  24016. {
  24017. "$ref": "#/components/schemas/SessionNextModelSwitched"
  24018. },
  24019. {
  24020. "$ref": "#/components/schemas/SessionNextMoved"
  24021. },
  24022. {
  24023. "$ref": "#/components/schemas/SessionNextPrompted"
  24024. },
  24025. {
  24026. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  24027. },
  24028. {
  24029. "$ref": "#/components/schemas/SessionNextContextUpdated"
  24030. },
  24031. {
  24032. "$ref": "#/components/schemas/SessionNextSynthetic"
  24033. },
  24034. {
  24035. "$ref": "#/components/schemas/SessionNextShellStarted"
  24036. },
  24037. {
  24038. "$ref": "#/components/schemas/SessionNextShellEnded"
  24039. },
  24040. {
  24041. "$ref": "#/components/schemas/SessionNextStepStarted"
  24042. },
  24043. {
  24044. "$ref": "#/components/schemas/SessionNextStepEnded"
  24045. },
  24046. {
  24047. "$ref": "#/components/schemas/SessionNextStepFailed"
  24048. },
  24049. {
  24050. "$ref": "#/components/schemas/SessionNextTextStarted"
  24051. },
  24052. {
  24053. "$ref": "#/components/schemas/SessionNextTextDelta"
  24054. },
  24055. {
  24056. "$ref": "#/components/schemas/SessionNextTextEnded"
  24057. },
  24058. {
  24059. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  24060. },
  24061. {
  24062. "$ref": "#/components/schemas/SessionNextReasoningDelta"
  24063. },
  24064. {
  24065. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  24066. },
  24067. {
  24068. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  24069. },
  24070. {
  24071. "$ref": "#/components/schemas/SessionNextToolInputDelta"
  24072. },
  24073. {
  24074. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  24075. },
  24076. {
  24077. "$ref": "#/components/schemas/SessionNextToolCalled"
  24078. },
  24079. {
  24080. "$ref": "#/components/schemas/SessionNextToolProgress"
  24081. },
  24082. {
  24083. "$ref": "#/components/schemas/SessionNextToolSuccess"
  24084. },
  24085. {
  24086. "$ref": "#/components/schemas/SessionNextToolFailed"
  24087. },
  24088. {
  24089. "$ref": "#/components/schemas/SessionNextRetried"
  24090. },
  24091. {
  24092. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  24093. },
  24094. {
  24095. "$ref": "#/components/schemas/SessionNextCompactionDelta"
  24096. },
  24097. {
  24098. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  24099. },
  24100. {
  24101. "$ref": "#/components/schemas/SessionNextRevertStaged"
  24102. },
  24103. {
  24104. "$ref": "#/components/schemas/SessionNextRevertCleared"
  24105. },
  24106. {
  24107. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  24108. },
  24109. {
  24110. "$ref": "#/components/schemas/MessagePartDelta"
  24111. },
  24112. {
  24113. "$ref": "#/components/schemas/SessionDiff"
  24114. },
  24115. {
  24116. "$ref": "#/components/schemas/SessionError"
  24117. },
  24118. {
  24119. "$ref": "#/components/schemas/InstallationUpdated"
  24120. },
  24121. {
  24122. "$ref": "#/components/schemas/InstallationUpdate-available"
  24123. },
  24124. {
  24125. "$ref": "#/components/schemas/FileEdited"
  24126. },
  24127. {
  24128. "$ref": "#/components/schemas/ReferenceUpdated"
  24129. },
  24130. {
  24131. "$ref": "#/components/schemas/PermissionV2Asked"
  24132. },
  24133. {
  24134. "$ref": "#/components/schemas/PermissionV2Replied"
  24135. },
  24136. {
  24137. "$ref": "#/components/schemas/PluginAdded"
  24138. },
  24139. {
  24140. "$ref": "#/components/schemas/ProjectDirectoriesUpdated"
  24141. },
  24142. {
  24143. "$ref": "#/components/schemas/FileWatcherUpdated"
  24144. },
  24145. {
  24146. "$ref": "#/components/schemas/PtyCreated"
  24147. },
  24148. {
  24149. "$ref": "#/components/schemas/PtyUpdated"
  24150. },
  24151. {
  24152. "$ref": "#/components/schemas/PtyExited"
  24153. },
  24154. {
  24155. "$ref": "#/components/schemas/PtyDeleted"
  24156. },
  24157. {
  24158. "$ref": "#/components/schemas/QuestionV2Asked"
  24159. },
  24160. {
  24161. "$ref": "#/components/schemas/QuestionV2Replied"
  24162. },
  24163. {
  24164. "$ref": "#/components/schemas/QuestionV2Rejected"
  24165. },
  24166. {
  24167. "$ref": "#/components/schemas/TodoUpdated"
  24168. },
  24169. {
  24170. "$ref": "#/components/schemas/LspUpdated"
  24171. },
  24172. {
  24173. "$ref": "#/components/schemas/PermissionAsked"
  24174. },
  24175. {
  24176. "$ref": "#/components/schemas/PermissionReplied"
  24177. },
  24178. {
  24179. "$ref": "#/components/schemas/TuiPromptAppend"
  24180. },
  24181. {
  24182. "$ref": "#/components/schemas/TuiCommandExecute"
  24183. },
  24184. {
  24185. "$ref": "#/components/schemas/TuiToastShow"
  24186. },
  24187. {
  24188. "$ref": "#/components/schemas/TuiSessionSelect"
  24189. },
  24190. {
  24191. "$ref": "#/components/schemas/McpToolsChanged"
  24192. },
  24193. {
  24194. "$ref": "#/components/schemas/McpBrowserOpenFailed"
  24195. },
  24196. {
  24197. "$ref": "#/components/schemas/CommandExecuted"
  24198. },
  24199. {
  24200. "$ref": "#/components/schemas/ProjectUpdated"
  24201. },
  24202. {
  24203. "$ref": "#/components/schemas/session.status"
  24204. },
  24205. {
  24206. "$ref": "#/components/schemas/SessionIdle"
  24207. },
  24208. {
  24209. "$ref": "#/components/schemas/QuestionAsked"
  24210. },
  24211. {
  24212. "$ref": "#/components/schemas/question.replied"
  24213. },
  24214. {
  24215. "$ref": "#/components/schemas/question.rejected"
  24216. },
  24217. {
  24218. "$ref": "#/components/schemas/SessionCompacted"
  24219. },
  24220. {
  24221. "$ref": "#/components/schemas/VcsBranchUpdated"
  24222. },
  24223. {
  24224. "$ref": "#/components/schemas/WorkspaceReady"
  24225. },
  24226. {
  24227. "$ref": "#/components/schemas/WorkspaceFailed"
  24228. },
  24229. {
  24230. "$ref": "#/components/schemas/WorkspaceStatus"
  24231. },
  24232. {
  24233. "$ref": "#/components/schemas/WorktreeReady"
  24234. },
  24235. {
  24236. "$ref": "#/components/schemas/WorktreeFailed"
  24237. },
  24238. {
  24239. "$ref": "#/components/schemas/ServerConnected"
  24240. },
  24241. {
  24242. "$ref": "#/components/schemas/GlobalDisposed"
  24243. }
  24244. ]
  24245. },
  24246. "V2Event": {
  24247. "type": "string",
  24248. "contentSchema": {
  24249. "$ref": "#/components/schemas/V2Event1"
  24250. },
  24251. "contentMediaType": "application/json"
  24252. },
  24253. "ForbiddenError": {
  24254. "type": "object",
  24255. "properties": {
  24256. "_tag": {
  24257. "type": "string",
  24258. "enum": ["ForbiddenError"]
  24259. },
  24260. "message": {
  24261. "type": "string"
  24262. }
  24263. },
  24264. "required": ["_tag", "message"],
  24265. "additionalProperties": false
  24266. },
  24267. "ProjectCopyError": {
  24268. "type": "object",
  24269. "properties": {
  24270. "name": {
  24271. "type": "string",
  24272. "enum": ["ProjectCopyError"]
  24273. },
  24274. "data": {
  24275. "type": "object",
  24276. "properties": {
  24277. "message": {
  24278. "type": "string"
  24279. },
  24280. "forceRequired": {
  24281. "type": "boolean"
  24282. }
  24283. },
  24284. "required": ["message"],
  24285. "additionalProperties": false
  24286. }
  24287. },
  24288. "required": ["name", "data"],
  24289. "additionalProperties": false
  24290. },
  24291. "effect_HttpApiError_Forbidden": {
  24292. "type": "object",
  24293. "properties": {
  24294. "_tag": {
  24295. "type": "string",
  24296. "enum": ["Forbidden"]
  24297. }
  24298. },
  24299. "required": ["_tag"],
  24300. "additionalProperties": false
  24301. },
  24302. "Event.tui.prompt.append": {
  24303. "type": "object",
  24304. "properties": {
  24305. "id": {
  24306. "type": "string",
  24307. "pattern": "^evt_"
  24308. },
  24309. "type": {
  24310. "type": "string",
  24311. "enum": ["tui.prompt.append"]
  24312. },
  24313. "properties": {
  24314. "type": "object",
  24315. "properties": {
  24316. "text": {
  24317. "type": "string"
  24318. }
  24319. },
  24320. "required": ["text"],
  24321. "additionalProperties": false
  24322. }
  24323. },
  24324. "required": ["id", "type", "properties"],
  24325. "additionalProperties": false
  24326. },
  24327. "Event.tui.command.execute": {
  24328. "type": "object",
  24329. "properties": {
  24330. "id": {
  24331. "type": "string",
  24332. "pattern": "^evt_"
  24333. },
  24334. "type": {
  24335. "type": "string",
  24336. "enum": ["tui.command.execute"]
  24337. },
  24338. "properties": {
  24339. "type": "object",
  24340. "properties": {
  24341. "command": {
  24342. "anyOf": [
  24343. {
  24344. "type": "string",
  24345. "enum": [
  24346. "session.list",
  24347. "session.new",
  24348. "session.share",
  24349. "session.interrupt",
  24350. "session.compact",
  24351. "session.page.up",
  24352. "session.page.down",
  24353. "session.line.up",
  24354. "session.line.down",
  24355. "session.half.page.up",
  24356. "session.half.page.down",
  24357. "session.first",
  24358. "session.last",
  24359. "prompt.clear",
  24360. "prompt.submit",
  24361. "agent.cycle"
  24362. ]
  24363. },
  24364. {
  24365. "type": "string"
  24366. }
  24367. ]
  24368. }
  24369. },
  24370. "required": ["command"],
  24371. "additionalProperties": false
  24372. }
  24373. },
  24374. "required": ["id", "type", "properties"],
  24375. "additionalProperties": false
  24376. },
  24377. "Event.tui.toast.show": {
  24378. "type": "object",
  24379. "properties": {
  24380. "id": {
  24381. "type": "string",
  24382. "pattern": "^evt_"
  24383. },
  24384. "type": {
  24385. "type": "string",
  24386. "enum": ["tui.toast.show"]
  24387. },
  24388. "properties": {
  24389. "type": "object",
  24390. "properties": {
  24391. "title": {
  24392. "type": "string"
  24393. },
  24394. "message": {
  24395. "type": "string"
  24396. },
  24397. "variant": {
  24398. "type": "string",
  24399. "enum": ["info", "success", "warning", "error"]
  24400. },
  24401. "duration": {
  24402. "type": "integer",
  24403. "exclusiveMinimum": 0
  24404. }
  24405. },
  24406. "required": ["message", "variant"],
  24407. "additionalProperties": false
  24408. }
  24409. },
  24410. "required": ["id", "type", "properties"],
  24411. "additionalProperties": false
  24412. },
  24413. "Event.tui.session.select": {
  24414. "type": "object",
  24415. "properties": {
  24416. "id": {
  24417. "type": "string",
  24418. "pattern": "^evt_"
  24419. },
  24420. "type": {
  24421. "type": "string",
  24422. "enum": ["tui.session.select"]
  24423. },
  24424. "properties": {
  24425. "type": "object",
  24426. "properties": {
  24427. "sessionID": {
  24428. "type": "string",
  24429. "pattern": "^ses",
  24430. "description": "Session ID to navigate to"
  24431. }
  24432. },
  24433. "required": ["sessionID"],
  24434. "additionalProperties": false
  24435. }
  24436. },
  24437. "required": ["id", "type", "properties"],
  24438. "additionalProperties": false
  24439. },
  24440. "CredentialValue": {
  24441. "anyOf": [
  24442. {
  24443. "$ref": "#/components/schemas/CredentialOAuth"
  24444. },
  24445. {
  24446. "$ref": "#/components/schemas/CredentialKey"
  24447. }
  24448. ]
  24449. },
  24450. "IntegrationInputs": {
  24451. "type": "object",
  24452. "additionalProperties": {
  24453. "type": "string"
  24454. }
  24455. },
  24456. "IntegrationMethod": {
  24457. "anyOf": [
  24458. {
  24459. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24460. },
  24461. {
  24462. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24463. },
  24464. {
  24465. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24466. }
  24467. ]
  24468. },
  24469. "IntegrationRef": {
  24470. "type": "object",
  24471. "properties": {
  24472. "id": {
  24473. "type": "string"
  24474. },
  24475. "name": {
  24476. "type": "string"
  24477. }
  24478. },
  24479. "required": ["id", "name"],
  24480. "additionalProperties": false
  24481. },
  24482. "SkillV2Source": {
  24483. "anyOf": [
  24484. {
  24485. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24486. },
  24487. {
  24488. "$ref": "#/components/schemas/SkillV2UrlSource"
  24489. },
  24490. {
  24491. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24492. }
  24493. ]
  24494. },
  24495. "MoveSessionDestination": {
  24496. "type": "object",
  24497. "properties": {
  24498. "directory": {
  24499. "type": "string"
  24500. }
  24501. },
  24502. "required": ["directory"],
  24503. "additionalProperties": false
  24504. },
  24505. "ModelRef": {
  24506. "type": "object",
  24507. "properties": {
  24508. "id": {
  24509. "type": "string"
  24510. },
  24511. "providerID": {
  24512. "type": "string"
  24513. },
  24514. "variant": {
  24515. "type": "string"
  24516. }
  24517. },
  24518. "required": ["id", "providerID"],
  24519. "additionalProperties": false
  24520. },
  24521. "LocationRef": {
  24522. "type": "object",
  24523. "properties": {
  24524. "directory": {
  24525. "type": "string"
  24526. },
  24527. "workspaceID": {
  24528. "type": "string",
  24529. "pattern": "^wrk"
  24530. }
  24531. },
  24532. "required": ["directory"],
  24533. "additionalProperties": false
  24534. },
  24535. "PromptSource": {
  24536. "type": "object",
  24537. "properties": {
  24538. "start": {
  24539. "type": "number"
  24540. },
  24541. "end": {
  24542. "type": "number"
  24543. },
  24544. "text": {
  24545. "type": "string"
  24546. }
  24547. },
  24548. "required": ["start", "end", "text"],
  24549. "additionalProperties": false
  24550. },
  24551. "PromptFileAttachment": {
  24552. "type": "object",
  24553. "properties": {
  24554. "uri": {
  24555. "type": "string"
  24556. },
  24557. "mime": {
  24558. "type": "string"
  24559. },
  24560. "name": {
  24561. "type": "string"
  24562. },
  24563. "description": {
  24564. "type": "string"
  24565. },
  24566. "source": {
  24567. "$ref": "#/components/schemas/PromptSource"
  24568. }
  24569. },
  24570. "required": ["uri", "mime"],
  24571. "additionalProperties": false
  24572. },
  24573. "PromptAgentAttachment": {
  24574. "type": "object",
  24575. "properties": {
  24576. "name": {
  24577. "type": "string"
  24578. },
  24579. "source": {
  24580. "$ref": "#/components/schemas/PromptSource"
  24581. }
  24582. },
  24583. "required": ["name"],
  24584. "additionalProperties": false
  24585. },
  24586. "SessionErrorUnknown": {
  24587. "type": "object",
  24588. "properties": {
  24589. "type": {
  24590. "type": "string",
  24591. "enum": ["unknown"]
  24592. },
  24593. "message": {
  24594. "type": "string"
  24595. }
  24596. },
  24597. "required": ["type", "message"],
  24598. "additionalProperties": false
  24599. },
  24600. "LLMProviderMetadata": {
  24601. "type": "object",
  24602. "additionalProperties": {
  24603. "type": "object"
  24604. }
  24605. },
  24606. "ToolTextContent": {
  24607. "type": "object",
  24608. "properties": {
  24609. "type": {
  24610. "type": "string",
  24611. "enum": ["text"]
  24612. },
  24613. "text": {
  24614. "type": "string"
  24615. }
  24616. },
  24617. "required": ["type", "text"],
  24618. "additionalProperties": false
  24619. },
  24620. "ToolFileContent": {
  24621. "type": "object",
  24622. "properties": {
  24623. "type": {
  24624. "type": "string",
  24625. "enum": ["file"]
  24626. },
  24627. "uri": {
  24628. "type": "string"
  24629. },
  24630. "mime": {
  24631. "type": "string"
  24632. },
  24633. "name": {
  24634. "type": "string"
  24635. }
  24636. },
  24637. "required": ["type", "uri", "mime"],
  24638. "additionalProperties": false
  24639. },
  24640. "LLMToolContent": {
  24641. "anyOf": [
  24642. {
  24643. "$ref": "#/components/schemas/ToolTextContent"
  24644. },
  24645. {
  24646. "$ref": "#/components/schemas/ToolFileContent"
  24647. }
  24648. ]
  24649. },
  24650. "SessionNextRetry_error": {
  24651. "type": "object",
  24652. "properties": {
  24653. "message": {
  24654. "type": "string"
  24655. },
  24656. "statusCode": {
  24657. "type": "number"
  24658. },
  24659. "isRetryable": {
  24660. "type": "boolean"
  24661. },
  24662. "responseHeaders": {
  24663. "type": "object",
  24664. "additionalProperties": {
  24665. "type": "string"
  24666. }
  24667. },
  24668. "responseBody": {
  24669. "type": "string"
  24670. },
  24671. "metadata": {
  24672. "type": "object",
  24673. "additionalProperties": {
  24674. "type": "string"
  24675. }
  24676. }
  24677. },
  24678. "required": ["message", "isRetryable"],
  24679. "additionalProperties": false
  24680. },
  24681. "FileDiff": {
  24682. "type": "object",
  24683. "properties": {
  24684. "path": {
  24685. "type": "string"
  24686. },
  24687. "status": {
  24688. "type": "string",
  24689. "enum": ["added", "modified", "deleted"]
  24690. },
  24691. "additions": {
  24692. "type": "integer",
  24693. "minimum": 0
  24694. },
  24695. "deletions": {
  24696. "type": "integer",
  24697. "minimum": 0
  24698. },
  24699. "patch": {
  24700. "type": "string"
  24701. }
  24702. },
  24703. "required": ["path", "status", "additions", "deletions", "patch"],
  24704. "additionalProperties": false
  24705. },
  24706. "RevertState": {
  24707. "type": "object",
  24708. "properties": {
  24709. "messageID": {
  24710. "type": "string",
  24711. "pattern": "^msg_"
  24712. },
  24713. "partID": {
  24714. "type": "string"
  24715. },
  24716. "snapshot": {
  24717. "type": "string"
  24718. },
  24719. "diff": {
  24720. "type": "string"
  24721. },
  24722. "files": {
  24723. "type": "array",
  24724. "items": {
  24725. "$ref": "#/components/schemas/FileDiff"
  24726. }
  24727. }
  24728. },
  24729. "required": ["messageID"],
  24730. "additionalProperties": false
  24731. },
  24732. "PermissionV2Source": {
  24733. "type": "object",
  24734. "properties": {
  24735. "type": {
  24736. "type": "string",
  24737. "enum": ["tool"]
  24738. },
  24739. "messageID": {
  24740. "type": "string"
  24741. },
  24742. "callID": {
  24743. "type": "string"
  24744. }
  24745. },
  24746. "required": ["type", "messageID", "callID"],
  24747. "additionalProperties": false
  24748. },
  24749. "PermissionV2Reply": {
  24750. "type": "string",
  24751. "enum": ["once", "always", "reject"]
  24752. },
  24753. "QuestionV2Option": {
  24754. "type": "object",
  24755. "properties": {
  24756. "label": {
  24757. "type": "string",
  24758. "description": "Display text (1-5 words, concise)"
  24759. },
  24760. "description": {
  24761. "type": "string",
  24762. "description": "Explanation of choice"
  24763. }
  24764. },
  24765. "required": ["label", "description"],
  24766. "additionalProperties": false
  24767. },
  24768. "QuestionV2Info": {
  24769. "type": "object",
  24770. "properties": {
  24771. "question": {
  24772. "type": "string",
  24773. "description": "Complete question"
  24774. },
  24775. "header": {
  24776. "type": "string",
  24777. "description": "Very short label (max 30 chars)"
  24778. },
  24779. "options": {
  24780. "type": "array",
  24781. "items": {
  24782. "$ref": "#/components/schemas/QuestionV2Option"
  24783. },
  24784. "description": "Available choices"
  24785. },
  24786. "multiple": {
  24787. "type": "boolean"
  24788. },
  24789. "custom": {
  24790. "type": "boolean"
  24791. }
  24792. },
  24793. "required": ["question", "header", "options"],
  24794. "additionalProperties": false
  24795. },
  24796. "QuestionV2Tool": {
  24797. "type": "object",
  24798. "properties": {
  24799. "messageID": {
  24800. "type": "string"
  24801. },
  24802. "callID": {
  24803. "type": "string"
  24804. }
  24805. },
  24806. "required": ["messageID", "callID"],
  24807. "additionalProperties": false
  24808. },
  24809. "QuestionV2Answer": {
  24810. "type": "array",
  24811. "items": {
  24812. "type": "string"
  24813. }
  24814. },
  24815. "ProjectVcs": {
  24816. "type": "string",
  24817. "enum": ["git"]
  24818. },
  24819. "ProjectIcon": {
  24820. "type": "object",
  24821. "properties": {
  24822. "url": {
  24823. "type": "string"
  24824. },
  24825. "override": {
  24826. "type": "string"
  24827. },
  24828. "color": {
  24829. "type": "string"
  24830. }
  24831. },
  24832. "additionalProperties": false
  24833. },
  24834. "ProjectCommands": {
  24835. "type": "object",
  24836. "properties": {
  24837. "start": {
  24838. "type": "string",
  24839. "description": "Startup script to run when creating a new workspace (worktree)"
  24840. }
  24841. },
  24842. "additionalProperties": false
  24843. },
  24844. "ProjectTime": {
  24845. "type": "object",
  24846. "properties": {
  24847. "created": {
  24848. "type": "integer",
  24849. "minimum": 0
  24850. },
  24851. "updated": {
  24852. "type": "integer",
  24853. "minimum": 0
  24854. },
  24855. "initialized": {
  24856. "type": "integer",
  24857. "minimum": 0
  24858. }
  24859. },
  24860. "required": ["created", "updated"],
  24861. "additionalProperties": false
  24862. },
  24863. "EventServerInstanceDisposed": {
  24864. "type": "object",
  24865. "properties": {
  24866. "id": {
  24867. "type": "string"
  24868. },
  24869. "type": {
  24870. "type": "string",
  24871. "enum": ["server.instance.disposed"]
  24872. },
  24873. "properties": {
  24874. "type": "object",
  24875. "properties": {
  24876. "directory": {
  24877. "type": "string"
  24878. }
  24879. },
  24880. "required": ["directory"],
  24881. "additionalProperties": false
  24882. }
  24883. },
  24884. "required": ["id", "type", "properties"],
  24885. "additionalProperties": false
  24886. },
  24887. "SyncEventSessionCreated": {
  24888. "type": "object",
  24889. "properties": {
  24890. "type": {
  24891. "type": "string",
  24892. "enum": ["sync"]
  24893. },
  24894. "id": {
  24895. "type": "string",
  24896. "pattern": "^evt_"
  24897. },
  24898. "syncEvent": {
  24899. "type": "object",
  24900. "properties": {
  24901. "type": {
  24902. "type": "string",
  24903. "enum": ["session.created.1"]
  24904. },
  24905. "id": {
  24906. "type": "string",
  24907. "pattern": "^evt_"
  24908. },
  24909. "seq": {
  24910. "type": "number"
  24911. },
  24912. "aggregateID": {
  24913. "type": "string"
  24914. },
  24915. "data": {
  24916. "type": "object",
  24917. "properties": {
  24918. "sessionID": {
  24919. "type": "string",
  24920. "pattern": "^ses"
  24921. },
  24922. "info": {
  24923. "$ref": "#/components/schemas/Session"
  24924. }
  24925. },
  24926. "required": ["sessionID", "info"],
  24927. "additionalProperties": false
  24928. }
  24929. },
  24930. "required": ["type", "id", "seq", "aggregateID", "data"],
  24931. "additionalProperties": false
  24932. }
  24933. },
  24934. "required": ["type", "id", "syncEvent"],
  24935. "additionalProperties": false
  24936. },
  24937. "SyncEventSessionUpdated": {
  24938. "type": "object",
  24939. "properties": {
  24940. "type": {
  24941. "type": "string",
  24942. "enum": ["sync"]
  24943. },
  24944. "id": {
  24945. "type": "string",
  24946. "pattern": "^evt_"
  24947. },
  24948. "syncEvent": {
  24949. "type": "object",
  24950. "properties": {
  24951. "type": {
  24952. "type": "string",
  24953. "enum": ["session.updated.1"]
  24954. },
  24955. "id": {
  24956. "type": "string",
  24957. "pattern": "^evt_"
  24958. },
  24959. "seq": {
  24960. "type": "number"
  24961. },
  24962. "aggregateID": {
  24963. "type": "string"
  24964. },
  24965. "data": {
  24966. "type": "object",
  24967. "properties": {
  24968. "sessionID": {
  24969. "type": "string",
  24970. "pattern": "^ses"
  24971. },
  24972. "info": {
  24973. "$ref": "#/components/schemas/Session"
  24974. }
  24975. },
  24976. "required": ["sessionID", "info"],
  24977. "additionalProperties": false
  24978. }
  24979. },
  24980. "required": ["type", "id", "seq", "aggregateID", "data"],
  24981. "additionalProperties": false
  24982. }
  24983. },
  24984. "required": ["type", "id", "syncEvent"],
  24985. "additionalProperties": false
  24986. },
  24987. "SyncEventSessionDeleted": {
  24988. "type": "object",
  24989. "properties": {
  24990. "type": {
  24991. "type": "string",
  24992. "enum": ["sync"]
  24993. },
  24994. "id": {
  24995. "type": "string",
  24996. "pattern": "^evt_"
  24997. },
  24998. "syncEvent": {
  24999. "type": "object",
  25000. "properties": {
  25001. "type": {
  25002. "type": "string",
  25003. "enum": ["session.deleted.1"]
  25004. },
  25005. "id": {
  25006. "type": "string",
  25007. "pattern": "^evt_"
  25008. },
  25009. "seq": {
  25010. "type": "number"
  25011. },
  25012. "aggregateID": {
  25013. "type": "string"
  25014. },
  25015. "data": {
  25016. "type": "object",
  25017. "properties": {
  25018. "sessionID": {
  25019. "type": "string",
  25020. "pattern": "^ses"
  25021. },
  25022. "info": {
  25023. "$ref": "#/components/schemas/Session"
  25024. }
  25025. },
  25026. "required": ["sessionID", "info"],
  25027. "additionalProperties": false
  25028. }
  25029. },
  25030. "required": ["type", "id", "seq", "aggregateID", "data"],
  25031. "additionalProperties": false
  25032. }
  25033. },
  25034. "required": ["type", "id", "syncEvent"],
  25035. "additionalProperties": false
  25036. },
  25037. "SyncEventMessageUpdated": {
  25038. "type": "object",
  25039. "properties": {
  25040. "type": {
  25041. "type": "string",
  25042. "enum": ["sync"]
  25043. },
  25044. "id": {
  25045. "type": "string",
  25046. "pattern": "^evt_"
  25047. },
  25048. "syncEvent": {
  25049. "type": "object",
  25050. "properties": {
  25051. "type": {
  25052. "type": "string",
  25053. "enum": ["message.updated.1"]
  25054. },
  25055. "id": {
  25056. "type": "string",
  25057. "pattern": "^evt_"
  25058. },
  25059. "seq": {
  25060. "type": "number"
  25061. },
  25062. "aggregateID": {
  25063. "type": "string"
  25064. },
  25065. "data": {
  25066. "type": "object",
  25067. "properties": {
  25068. "sessionID": {
  25069. "type": "string",
  25070. "pattern": "^ses"
  25071. },
  25072. "info": {
  25073. "$ref": "#/components/schemas/Message"
  25074. }
  25075. },
  25076. "required": ["sessionID", "info"],
  25077. "additionalProperties": false
  25078. }
  25079. },
  25080. "required": ["type", "id", "seq", "aggregateID", "data"],
  25081. "additionalProperties": false
  25082. }
  25083. },
  25084. "required": ["type", "id", "syncEvent"],
  25085. "additionalProperties": false
  25086. },
  25087. "SyncEventMessageRemoved": {
  25088. "type": "object",
  25089. "properties": {
  25090. "type": {
  25091. "type": "string",
  25092. "enum": ["sync"]
  25093. },
  25094. "id": {
  25095. "type": "string",
  25096. "pattern": "^evt_"
  25097. },
  25098. "syncEvent": {
  25099. "type": "object",
  25100. "properties": {
  25101. "type": {
  25102. "type": "string",
  25103. "enum": ["message.removed.1"]
  25104. },
  25105. "id": {
  25106. "type": "string",
  25107. "pattern": "^evt_"
  25108. },
  25109. "seq": {
  25110. "type": "number"
  25111. },
  25112. "aggregateID": {
  25113. "type": "string"
  25114. },
  25115. "data": {
  25116. "type": "object",
  25117. "properties": {
  25118. "sessionID": {
  25119. "type": "string",
  25120. "pattern": "^ses"
  25121. },
  25122. "messageID": {
  25123. "type": "string",
  25124. "pattern": "^msg"
  25125. }
  25126. },
  25127. "required": ["sessionID", "messageID"],
  25128. "additionalProperties": false
  25129. }
  25130. },
  25131. "required": ["type", "id", "seq", "aggregateID", "data"],
  25132. "additionalProperties": false
  25133. }
  25134. },
  25135. "required": ["type", "id", "syncEvent"],
  25136. "additionalProperties": false
  25137. },
  25138. "SyncEventMessagePartUpdated": {
  25139. "type": "object",
  25140. "properties": {
  25141. "type": {
  25142. "type": "string",
  25143. "enum": ["sync"]
  25144. },
  25145. "id": {
  25146. "type": "string",
  25147. "pattern": "^evt_"
  25148. },
  25149. "syncEvent": {
  25150. "type": "object",
  25151. "properties": {
  25152. "type": {
  25153. "type": "string",
  25154. "enum": ["message.part.updated.1"]
  25155. },
  25156. "id": {
  25157. "type": "string",
  25158. "pattern": "^evt_"
  25159. },
  25160. "seq": {
  25161. "type": "number"
  25162. },
  25163. "aggregateID": {
  25164. "type": "string"
  25165. },
  25166. "data": {
  25167. "type": "object",
  25168. "properties": {
  25169. "sessionID": {
  25170. "type": "string",
  25171. "pattern": "^ses"
  25172. },
  25173. "part": {
  25174. "$ref": "#/components/schemas/Part"
  25175. },
  25176. "time": {
  25177. "type": "number"
  25178. }
  25179. },
  25180. "required": ["sessionID", "part", "time"],
  25181. "additionalProperties": false
  25182. }
  25183. },
  25184. "required": ["type", "id", "seq", "aggregateID", "data"],
  25185. "additionalProperties": false
  25186. }
  25187. },
  25188. "required": ["type", "id", "syncEvent"],
  25189. "additionalProperties": false
  25190. },
  25191. "SyncEventMessagePartRemoved": {
  25192. "type": "object",
  25193. "properties": {
  25194. "type": {
  25195. "type": "string",
  25196. "enum": ["sync"]
  25197. },
  25198. "id": {
  25199. "type": "string",
  25200. "pattern": "^evt_"
  25201. },
  25202. "syncEvent": {
  25203. "type": "object",
  25204. "properties": {
  25205. "type": {
  25206. "type": "string",
  25207. "enum": ["message.part.removed.1"]
  25208. },
  25209. "id": {
  25210. "type": "string",
  25211. "pattern": "^evt_"
  25212. },
  25213. "seq": {
  25214. "type": "number"
  25215. },
  25216. "aggregateID": {
  25217. "type": "string"
  25218. },
  25219. "data": {
  25220. "type": "object",
  25221. "properties": {
  25222. "sessionID": {
  25223. "type": "string",
  25224. "pattern": "^ses"
  25225. },
  25226. "messageID": {
  25227. "type": "string",
  25228. "pattern": "^msg"
  25229. },
  25230. "partID": {
  25231. "type": "string",
  25232. "pattern": "^prt"
  25233. }
  25234. },
  25235. "required": ["sessionID", "messageID", "partID"],
  25236. "additionalProperties": false
  25237. }
  25238. },
  25239. "required": ["type", "id", "seq", "aggregateID", "data"],
  25240. "additionalProperties": false
  25241. }
  25242. },
  25243. "required": ["type", "id", "syncEvent"],
  25244. "additionalProperties": false
  25245. },
  25246. "SyncEventSessionNextAgentSwitched": {
  25247. "type": "object",
  25248. "properties": {
  25249. "type": {
  25250. "type": "string",
  25251. "enum": ["sync"]
  25252. },
  25253. "id": {
  25254. "type": "string",
  25255. "pattern": "^evt_"
  25256. },
  25257. "syncEvent": {
  25258. "type": "object",
  25259. "properties": {
  25260. "type": {
  25261. "type": "string",
  25262. "enum": ["session.next.agent.switched.1"]
  25263. },
  25264. "id": {
  25265. "type": "string",
  25266. "pattern": "^evt_"
  25267. },
  25268. "seq": {
  25269. "type": "number"
  25270. },
  25271. "aggregateID": {
  25272. "type": "string"
  25273. },
  25274. "data": {
  25275. "type": "object",
  25276. "properties": {
  25277. "timestamp": {
  25278. "type": "number"
  25279. },
  25280. "sessionID": {
  25281. "type": "string",
  25282. "pattern": "^ses"
  25283. },
  25284. "messageID": {
  25285. "type": "string",
  25286. "pattern": "^msg_"
  25287. },
  25288. "agent": {
  25289. "type": "string"
  25290. }
  25291. },
  25292. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25293. "additionalProperties": false
  25294. }
  25295. },
  25296. "required": ["type", "id", "seq", "aggregateID", "data"],
  25297. "additionalProperties": false
  25298. }
  25299. },
  25300. "required": ["type", "id", "syncEvent"],
  25301. "additionalProperties": false
  25302. },
  25303. "SyncEventSessionNextModelSwitched": {
  25304. "type": "object",
  25305. "properties": {
  25306. "type": {
  25307. "type": "string",
  25308. "enum": ["sync"]
  25309. },
  25310. "id": {
  25311. "type": "string",
  25312. "pattern": "^evt_"
  25313. },
  25314. "syncEvent": {
  25315. "type": "object",
  25316. "properties": {
  25317. "type": {
  25318. "type": "string",
  25319. "enum": ["session.next.model.switched.1"]
  25320. },
  25321. "id": {
  25322. "type": "string",
  25323. "pattern": "^evt_"
  25324. },
  25325. "seq": {
  25326. "type": "number"
  25327. },
  25328. "aggregateID": {
  25329. "type": "string"
  25330. },
  25331. "data": {
  25332. "type": "object",
  25333. "properties": {
  25334. "timestamp": {
  25335. "type": "number"
  25336. },
  25337. "sessionID": {
  25338. "type": "string",
  25339. "pattern": "^ses"
  25340. },
  25341. "messageID": {
  25342. "type": "string",
  25343. "pattern": "^msg_"
  25344. },
  25345. "model": {
  25346. "$ref": "#/components/schemas/ModelRef"
  25347. }
  25348. },
  25349. "required": ["timestamp", "sessionID", "messageID", "model"],
  25350. "additionalProperties": false
  25351. }
  25352. },
  25353. "required": ["type", "id", "seq", "aggregateID", "data"],
  25354. "additionalProperties": false
  25355. }
  25356. },
  25357. "required": ["type", "id", "syncEvent"],
  25358. "additionalProperties": false
  25359. },
  25360. "SyncEventSessionNextMoved": {
  25361. "type": "object",
  25362. "properties": {
  25363. "type": {
  25364. "type": "string",
  25365. "enum": ["sync"]
  25366. },
  25367. "id": {
  25368. "type": "string",
  25369. "pattern": "^evt_"
  25370. },
  25371. "syncEvent": {
  25372. "type": "object",
  25373. "properties": {
  25374. "type": {
  25375. "type": "string",
  25376. "enum": ["session.next.moved.1"]
  25377. },
  25378. "id": {
  25379. "type": "string",
  25380. "pattern": "^evt_"
  25381. },
  25382. "seq": {
  25383. "type": "number"
  25384. },
  25385. "aggregateID": {
  25386. "type": "string"
  25387. },
  25388. "data": {
  25389. "type": "object",
  25390. "properties": {
  25391. "timestamp": {
  25392. "type": "number"
  25393. },
  25394. "sessionID": {
  25395. "type": "string",
  25396. "pattern": "^ses"
  25397. },
  25398. "location": {
  25399. "$ref": "#/components/schemas/LocationRef"
  25400. },
  25401. "subdirectory": {
  25402. "type": "string"
  25403. }
  25404. },
  25405. "required": ["timestamp", "sessionID", "location"],
  25406. "additionalProperties": false
  25407. }
  25408. },
  25409. "required": ["type", "id", "seq", "aggregateID", "data"],
  25410. "additionalProperties": false
  25411. }
  25412. },
  25413. "required": ["type", "id", "syncEvent"],
  25414. "additionalProperties": false
  25415. },
  25416. "SyncEventSessionNextPrompted": {
  25417. "type": "object",
  25418. "properties": {
  25419. "type": {
  25420. "type": "string",
  25421. "enum": ["sync"]
  25422. },
  25423. "id": {
  25424. "type": "string",
  25425. "pattern": "^evt_"
  25426. },
  25427. "syncEvent": {
  25428. "type": "object",
  25429. "properties": {
  25430. "type": {
  25431. "type": "string",
  25432. "enum": ["session.next.prompted.1"]
  25433. },
  25434. "id": {
  25435. "type": "string",
  25436. "pattern": "^evt_"
  25437. },
  25438. "seq": {
  25439. "type": "number"
  25440. },
  25441. "aggregateID": {
  25442. "type": "string"
  25443. },
  25444. "data": {
  25445. "type": "object",
  25446. "properties": {
  25447. "timestamp": {
  25448. "type": "number"
  25449. },
  25450. "sessionID": {
  25451. "type": "string",
  25452. "pattern": "^ses"
  25453. },
  25454. "messageID": {
  25455. "type": "string",
  25456. "pattern": "^msg_"
  25457. },
  25458. "prompt": {
  25459. "$ref": "#/components/schemas/Prompt"
  25460. },
  25461. "delivery": {
  25462. "type": "string",
  25463. "enum": ["steer", "queue"]
  25464. }
  25465. },
  25466. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25467. "additionalProperties": false
  25468. }
  25469. },
  25470. "required": ["type", "id", "seq", "aggregateID", "data"],
  25471. "additionalProperties": false
  25472. }
  25473. },
  25474. "required": ["type", "id", "syncEvent"],
  25475. "additionalProperties": false
  25476. },
  25477. "SyncEventSessionNextPromptAdmitted": {
  25478. "type": "object",
  25479. "properties": {
  25480. "type": {
  25481. "type": "string",
  25482. "enum": ["sync"]
  25483. },
  25484. "id": {
  25485. "type": "string",
  25486. "pattern": "^evt_"
  25487. },
  25488. "syncEvent": {
  25489. "type": "object",
  25490. "properties": {
  25491. "type": {
  25492. "type": "string",
  25493. "enum": ["session.next.prompt.admitted.1"]
  25494. },
  25495. "id": {
  25496. "type": "string",
  25497. "pattern": "^evt_"
  25498. },
  25499. "seq": {
  25500. "type": "number"
  25501. },
  25502. "aggregateID": {
  25503. "type": "string"
  25504. },
  25505. "data": {
  25506. "type": "object",
  25507. "properties": {
  25508. "timestamp": {
  25509. "type": "number"
  25510. },
  25511. "sessionID": {
  25512. "type": "string",
  25513. "pattern": "^ses"
  25514. },
  25515. "messageID": {
  25516. "type": "string",
  25517. "pattern": "^msg_"
  25518. },
  25519. "prompt": {
  25520. "$ref": "#/components/schemas/Prompt"
  25521. },
  25522. "delivery": {
  25523. "type": "string",
  25524. "enum": ["steer", "queue"]
  25525. }
  25526. },
  25527. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25528. "additionalProperties": false
  25529. }
  25530. },
  25531. "required": ["type", "id", "seq", "aggregateID", "data"],
  25532. "additionalProperties": false
  25533. }
  25534. },
  25535. "required": ["type", "id", "syncEvent"],
  25536. "additionalProperties": false
  25537. },
  25538. "SyncEventSessionNextContextUpdated": {
  25539. "type": "object",
  25540. "properties": {
  25541. "type": {
  25542. "type": "string",
  25543. "enum": ["sync"]
  25544. },
  25545. "id": {
  25546. "type": "string",
  25547. "pattern": "^evt_"
  25548. },
  25549. "syncEvent": {
  25550. "type": "object",
  25551. "properties": {
  25552. "type": {
  25553. "type": "string",
  25554. "enum": ["session.next.context.updated.1"]
  25555. },
  25556. "id": {
  25557. "type": "string",
  25558. "pattern": "^evt_"
  25559. },
  25560. "seq": {
  25561. "type": "number"
  25562. },
  25563. "aggregateID": {
  25564. "type": "string"
  25565. },
  25566. "data": {
  25567. "type": "object",
  25568. "properties": {
  25569. "timestamp": {
  25570. "type": "number"
  25571. },
  25572. "sessionID": {
  25573. "type": "string",
  25574. "pattern": "^ses"
  25575. },
  25576. "messageID": {
  25577. "type": "string",
  25578. "pattern": "^msg_"
  25579. },
  25580. "text": {
  25581. "type": "string"
  25582. }
  25583. },
  25584. "required": ["timestamp", "sessionID", "messageID", "text"],
  25585. "additionalProperties": false
  25586. }
  25587. },
  25588. "required": ["type", "id", "seq", "aggregateID", "data"],
  25589. "additionalProperties": false
  25590. }
  25591. },
  25592. "required": ["type", "id", "syncEvent"],
  25593. "additionalProperties": false
  25594. },
  25595. "SyncEventSessionNextSynthetic": {
  25596. "type": "object",
  25597. "properties": {
  25598. "type": {
  25599. "type": "string",
  25600. "enum": ["sync"]
  25601. },
  25602. "id": {
  25603. "type": "string",
  25604. "pattern": "^evt_"
  25605. },
  25606. "syncEvent": {
  25607. "type": "object",
  25608. "properties": {
  25609. "type": {
  25610. "type": "string",
  25611. "enum": ["session.next.synthetic.1"]
  25612. },
  25613. "id": {
  25614. "type": "string",
  25615. "pattern": "^evt_"
  25616. },
  25617. "seq": {
  25618. "type": "number"
  25619. },
  25620. "aggregateID": {
  25621. "type": "string"
  25622. },
  25623. "data": {
  25624. "type": "object",
  25625. "properties": {
  25626. "timestamp": {
  25627. "type": "number"
  25628. },
  25629. "sessionID": {
  25630. "type": "string",
  25631. "pattern": "^ses"
  25632. },
  25633. "messageID": {
  25634. "type": "string",
  25635. "pattern": "^msg_"
  25636. },
  25637. "text": {
  25638. "type": "string"
  25639. }
  25640. },
  25641. "required": ["timestamp", "sessionID", "messageID", "text"],
  25642. "additionalProperties": false
  25643. }
  25644. },
  25645. "required": ["type", "id", "seq", "aggregateID", "data"],
  25646. "additionalProperties": false
  25647. }
  25648. },
  25649. "required": ["type", "id", "syncEvent"],
  25650. "additionalProperties": false
  25651. },
  25652. "SyncEventSessionNextShellStarted": {
  25653. "type": "object",
  25654. "properties": {
  25655. "type": {
  25656. "type": "string",
  25657. "enum": ["sync"]
  25658. },
  25659. "id": {
  25660. "type": "string",
  25661. "pattern": "^evt_"
  25662. },
  25663. "syncEvent": {
  25664. "type": "object",
  25665. "properties": {
  25666. "type": {
  25667. "type": "string",
  25668. "enum": ["session.next.shell.started.1"]
  25669. },
  25670. "id": {
  25671. "type": "string",
  25672. "pattern": "^evt_"
  25673. },
  25674. "seq": {
  25675. "type": "number"
  25676. },
  25677. "aggregateID": {
  25678. "type": "string"
  25679. },
  25680. "data": {
  25681. "type": "object",
  25682. "properties": {
  25683. "timestamp": {
  25684. "type": "number"
  25685. },
  25686. "sessionID": {
  25687. "type": "string",
  25688. "pattern": "^ses"
  25689. },
  25690. "messageID": {
  25691. "type": "string",
  25692. "pattern": "^msg_"
  25693. },
  25694. "callID": {
  25695. "type": "string"
  25696. },
  25697. "command": {
  25698. "type": "string"
  25699. }
  25700. },
  25701. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25702. "additionalProperties": false
  25703. }
  25704. },
  25705. "required": ["type", "id", "seq", "aggregateID", "data"],
  25706. "additionalProperties": false
  25707. }
  25708. },
  25709. "required": ["type", "id", "syncEvent"],
  25710. "additionalProperties": false
  25711. },
  25712. "SyncEventSessionNextShellEnded": {
  25713. "type": "object",
  25714. "properties": {
  25715. "type": {
  25716. "type": "string",
  25717. "enum": ["sync"]
  25718. },
  25719. "id": {
  25720. "type": "string",
  25721. "pattern": "^evt_"
  25722. },
  25723. "syncEvent": {
  25724. "type": "object",
  25725. "properties": {
  25726. "type": {
  25727. "type": "string",
  25728. "enum": ["session.next.shell.ended.1"]
  25729. },
  25730. "id": {
  25731. "type": "string",
  25732. "pattern": "^evt_"
  25733. },
  25734. "seq": {
  25735. "type": "number"
  25736. },
  25737. "aggregateID": {
  25738. "type": "string"
  25739. },
  25740. "data": {
  25741. "type": "object",
  25742. "properties": {
  25743. "timestamp": {
  25744. "type": "number"
  25745. },
  25746. "sessionID": {
  25747. "type": "string",
  25748. "pattern": "^ses"
  25749. },
  25750. "callID": {
  25751. "type": "string"
  25752. },
  25753. "output": {
  25754. "type": "string"
  25755. }
  25756. },
  25757. "required": ["timestamp", "sessionID", "callID", "output"],
  25758. "additionalProperties": false
  25759. }
  25760. },
  25761. "required": ["type", "id", "seq", "aggregateID", "data"],
  25762. "additionalProperties": false
  25763. }
  25764. },
  25765. "required": ["type", "id", "syncEvent"],
  25766. "additionalProperties": false
  25767. },
  25768. "SyncEventSessionNextStepStarted": {
  25769. "type": "object",
  25770. "properties": {
  25771. "type": {
  25772. "type": "string",
  25773. "enum": ["sync"]
  25774. },
  25775. "id": {
  25776. "type": "string",
  25777. "pattern": "^evt_"
  25778. },
  25779. "syncEvent": {
  25780. "type": "object",
  25781. "properties": {
  25782. "type": {
  25783. "type": "string",
  25784. "enum": ["session.next.step.started.1"]
  25785. },
  25786. "id": {
  25787. "type": "string",
  25788. "pattern": "^evt_"
  25789. },
  25790. "seq": {
  25791. "type": "number"
  25792. },
  25793. "aggregateID": {
  25794. "type": "string"
  25795. },
  25796. "data": {
  25797. "type": "object",
  25798. "properties": {
  25799. "timestamp": {
  25800. "type": "number"
  25801. },
  25802. "sessionID": {
  25803. "type": "string",
  25804. "pattern": "^ses"
  25805. },
  25806. "assistantMessageID": {
  25807. "type": "string",
  25808. "pattern": "^msg_"
  25809. },
  25810. "agent": {
  25811. "type": "string"
  25812. },
  25813. "model": {
  25814. "$ref": "#/components/schemas/ModelRef"
  25815. },
  25816. "snapshot": {
  25817. "type": "string"
  25818. }
  25819. },
  25820. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25821. "additionalProperties": false
  25822. }
  25823. },
  25824. "required": ["type", "id", "seq", "aggregateID", "data"],
  25825. "additionalProperties": false
  25826. }
  25827. },
  25828. "required": ["type", "id", "syncEvent"],
  25829. "additionalProperties": false
  25830. },
  25831. "SyncEventSessionNextStepEnded": {
  25832. "type": "object",
  25833. "properties": {
  25834. "type": {
  25835. "type": "string",
  25836. "enum": ["sync"]
  25837. },
  25838. "id": {
  25839. "type": "string",
  25840. "pattern": "^evt_"
  25841. },
  25842. "syncEvent": {
  25843. "type": "object",
  25844. "properties": {
  25845. "type": {
  25846. "type": "string",
  25847. "enum": ["session.next.step.ended.2"]
  25848. },
  25849. "id": {
  25850. "type": "string",
  25851. "pattern": "^evt_"
  25852. },
  25853. "seq": {
  25854. "type": "number"
  25855. },
  25856. "aggregateID": {
  25857. "type": "string"
  25858. },
  25859. "data": {
  25860. "type": "object",
  25861. "properties": {
  25862. "timestamp": {
  25863. "type": "number"
  25864. },
  25865. "sessionID": {
  25866. "type": "string",
  25867. "pattern": "^ses"
  25868. },
  25869. "assistantMessageID": {
  25870. "type": "string",
  25871. "pattern": "^msg_"
  25872. },
  25873. "finish": {
  25874. "type": "string"
  25875. },
  25876. "cost": {
  25877. "type": "number"
  25878. },
  25879. "tokens": {
  25880. "type": "object",
  25881. "properties": {
  25882. "input": {
  25883. "type": "number"
  25884. },
  25885. "output": {
  25886. "type": "number"
  25887. },
  25888. "reasoning": {
  25889. "type": "number"
  25890. },
  25891. "cache": {
  25892. "type": "object",
  25893. "properties": {
  25894. "read": {
  25895. "type": "number"
  25896. },
  25897. "write": {
  25898. "type": "number"
  25899. }
  25900. },
  25901. "required": ["read", "write"],
  25902. "additionalProperties": false
  25903. }
  25904. },
  25905. "required": ["input", "output", "reasoning", "cache"],
  25906. "additionalProperties": false
  25907. },
  25908. "snapshot": {
  25909. "type": "string"
  25910. },
  25911. "files": {
  25912. "type": "array",
  25913. "items": {
  25914. "type": "string"
  25915. }
  25916. }
  25917. },
  25918. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25919. "additionalProperties": false
  25920. }
  25921. },
  25922. "required": ["type", "id", "seq", "aggregateID", "data"],
  25923. "additionalProperties": false
  25924. }
  25925. },
  25926. "required": ["type", "id", "syncEvent"],
  25927. "additionalProperties": false
  25928. },
  25929. "SyncEventSessionNextStepFailed": {
  25930. "type": "object",
  25931. "properties": {
  25932. "type": {
  25933. "type": "string",
  25934. "enum": ["sync"]
  25935. },
  25936. "id": {
  25937. "type": "string",
  25938. "pattern": "^evt_"
  25939. },
  25940. "syncEvent": {
  25941. "type": "object",
  25942. "properties": {
  25943. "type": {
  25944. "type": "string",
  25945. "enum": ["session.next.step.failed.2"]
  25946. },
  25947. "id": {
  25948. "type": "string",
  25949. "pattern": "^evt_"
  25950. },
  25951. "seq": {
  25952. "type": "number"
  25953. },
  25954. "aggregateID": {
  25955. "type": "string"
  25956. },
  25957. "data": {
  25958. "type": "object",
  25959. "properties": {
  25960. "timestamp": {
  25961. "type": "number"
  25962. },
  25963. "sessionID": {
  25964. "type": "string",
  25965. "pattern": "^ses"
  25966. },
  25967. "assistantMessageID": {
  25968. "type": "string",
  25969. "pattern": "^msg_"
  25970. },
  25971. "error": {
  25972. "$ref": "#/components/schemas/SessionErrorUnknown"
  25973. }
  25974. },
  25975. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25976. "additionalProperties": false
  25977. }
  25978. },
  25979. "required": ["type", "id", "seq", "aggregateID", "data"],
  25980. "additionalProperties": false
  25981. }
  25982. },
  25983. "required": ["type", "id", "syncEvent"],
  25984. "additionalProperties": false
  25985. },
  25986. "SyncEventSessionNextTextStarted": {
  25987. "type": "object",
  25988. "properties": {
  25989. "type": {
  25990. "type": "string",
  25991. "enum": ["sync"]
  25992. },
  25993. "id": {
  25994. "type": "string",
  25995. "pattern": "^evt_"
  25996. },
  25997. "syncEvent": {
  25998. "type": "object",
  25999. "properties": {
  26000. "type": {
  26001. "type": "string",
  26002. "enum": ["session.next.text.started.1"]
  26003. },
  26004. "id": {
  26005. "type": "string",
  26006. "pattern": "^evt_"
  26007. },
  26008. "seq": {
  26009. "type": "number"
  26010. },
  26011. "aggregateID": {
  26012. "type": "string"
  26013. },
  26014. "data": {
  26015. "type": "object",
  26016. "properties": {
  26017. "timestamp": {
  26018. "type": "number"
  26019. },
  26020. "sessionID": {
  26021. "type": "string",
  26022. "pattern": "^ses"
  26023. },
  26024. "assistantMessageID": {
  26025. "type": "string",
  26026. "pattern": "^msg_"
  26027. },
  26028. "textID": {
  26029. "type": "string"
  26030. }
  26031. },
  26032. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26033. "additionalProperties": false
  26034. }
  26035. },
  26036. "required": ["type", "id", "seq", "aggregateID", "data"],
  26037. "additionalProperties": false
  26038. }
  26039. },
  26040. "required": ["type", "id", "syncEvent"],
  26041. "additionalProperties": false
  26042. },
  26043. "SyncEventSessionNextTextEnded": {
  26044. "type": "object",
  26045. "properties": {
  26046. "type": {
  26047. "type": "string",
  26048. "enum": ["sync"]
  26049. },
  26050. "id": {
  26051. "type": "string",
  26052. "pattern": "^evt_"
  26053. },
  26054. "syncEvent": {
  26055. "type": "object",
  26056. "properties": {
  26057. "type": {
  26058. "type": "string",
  26059. "enum": ["session.next.text.ended.1"]
  26060. },
  26061. "id": {
  26062. "type": "string",
  26063. "pattern": "^evt_"
  26064. },
  26065. "seq": {
  26066. "type": "number"
  26067. },
  26068. "aggregateID": {
  26069. "type": "string"
  26070. },
  26071. "data": {
  26072. "type": "object",
  26073. "properties": {
  26074. "timestamp": {
  26075. "type": "number"
  26076. },
  26077. "sessionID": {
  26078. "type": "string",
  26079. "pattern": "^ses"
  26080. },
  26081. "assistantMessageID": {
  26082. "type": "string",
  26083. "pattern": "^msg_"
  26084. },
  26085. "textID": {
  26086. "type": "string"
  26087. },
  26088. "text": {
  26089. "type": "string"
  26090. }
  26091. },
  26092. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26093. "additionalProperties": false
  26094. }
  26095. },
  26096. "required": ["type", "id", "seq", "aggregateID", "data"],
  26097. "additionalProperties": false
  26098. }
  26099. },
  26100. "required": ["type", "id", "syncEvent"],
  26101. "additionalProperties": false
  26102. },
  26103. "SyncEventSessionNextReasoningStarted": {
  26104. "type": "object",
  26105. "properties": {
  26106. "type": {
  26107. "type": "string",
  26108. "enum": ["sync"]
  26109. },
  26110. "id": {
  26111. "type": "string",
  26112. "pattern": "^evt_"
  26113. },
  26114. "syncEvent": {
  26115. "type": "object",
  26116. "properties": {
  26117. "type": {
  26118. "type": "string",
  26119. "enum": ["session.next.reasoning.started.1"]
  26120. },
  26121. "id": {
  26122. "type": "string",
  26123. "pattern": "^evt_"
  26124. },
  26125. "seq": {
  26126. "type": "number"
  26127. },
  26128. "aggregateID": {
  26129. "type": "string"
  26130. },
  26131. "data": {
  26132. "type": "object",
  26133. "properties": {
  26134. "timestamp": {
  26135. "type": "number"
  26136. },
  26137. "sessionID": {
  26138. "type": "string",
  26139. "pattern": "^ses"
  26140. },
  26141. "assistantMessageID": {
  26142. "type": "string",
  26143. "pattern": "^msg_"
  26144. },
  26145. "reasoningID": {
  26146. "type": "string"
  26147. },
  26148. "providerMetadata": {
  26149. "$ref": "#/components/schemas/LLMProviderMetadata"
  26150. }
  26151. },
  26152. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26153. "additionalProperties": false
  26154. }
  26155. },
  26156. "required": ["type", "id", "seq", "aggregateID", "data"],
  26157. "additionalProperties": false
  26158. }
  26159. },
  26160. "required": ["type", "id", "syncEvent"],
  26161. "additionalProperties": false
  26162. },
  26163. "SyncEventSessionNextReasoningEnded": {
  26164. "type": "object",
  26165. "properties": {
  26166. "type": {
  26167. "type": "string",
  26168. "enum": ["sync"]
  26169. },
  26170. "id": {
  26171. "type": "string",
  26172. "pattern": "^evt_"
  26173. },
  26174. "syncEvent": {
  26175. "type": "object",
  26176. "properties": {
  26177. "type": {
  26178. "type": "string",
  26179. "enum": ["session.next.reasoning.ended.1"]
  26180. },
  26181. "id": {
  26182. "type": "string",
  26183. "pattern": "^evt_"
  26184. },
  26185. "seq": {
  26186. "type": "number"
  26187. },
  26188. "aggregateID": {
  26189. "type": "string"
  26190. },
  26191. "data": {
  26192. "type": "object",
  26193. "properties": {
  26194. "timestamp": {
  26195. "type": "number"
  26196. },
  26197. "sessionID": {
  26198. "type": "string",
  26199. "pattern": "^ses"
  26200. },
  26201. "assistantMessageID": {
  26202. "type": "string",
  26203. "pattern": "^msg_"
  26204. },
  26205. "reasoningID": {
  26206. "type": "string"
  26207. },
  26208. "text": {
  26209. "type": "string"
  26210. },
  26211. "providerMetadata": {
  26212. "$ref": "#/components/schemas/LLMProviderMetadata"
  26213. }
  26214. },
  26215. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26216. "additionalProperties": false
  26217. }
  26218. },
  26219. "required": ["type", "id", "seq", "aggregateID", "data"],
  26220. "additionalProperties": false
  26221. }
  26222. },
  26223. "required": ["type", "id", "syncEvent"],
  26224. "additionalProperties": false
  26225. },
  26226. "SyncEventSessionNextToolInputStarted": {
  26227. "type": "object",
  26228. "properties": {
  26229. "type": {
  26230. "type": "string",
  26231. "enum": ["sync"]
  26232. },
  26233. "id": {
  26234. "type": "string",
  26235. "pattern": "^evt_"
  26236. },
  26237. "syncEvent": {
  26238. "type": "object",
  26239. "properties": {
  26240. "type": {
  26241. "type": "string",
  26242. "enum": ["session.next.tool.input.started.1"]
  26243. },
  26244. "id": {
  26245. "type": "string",
  26246. "pattern": "^evt_"
  26247. },
  26248. "seq": {
  26249. "type": "number"
  26250. },
  26251. "aggregateID": {
  26252. "type": "string"
  26253. },
  26254. "data": {
  26255. "type": "object",
  26256. "properties": {
  26257. "timestamp": {
  26258. "type": "number"
  26259. },
  26260. "sessionID": {
  26261. "type": "string",
  26262. "pattern": "^ses"
  26263. },
  26264. "assistantMessageID": {
  26265. "type": "string",
  26266. "pattern": "^msg_"
  26267. },
  26268. "callID": {
  26269. "type": "string"
  26270. },
  26271. "name": {
  26272. "type": "string"
  26273. }
  26274. },
  26275. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26276. "additionalProperties": false
  26277. }
  26278. },
  26279. "required": ["type", "id", "seq", "aggregateID", "data"],
  26280. "additionalProperties": false
  26281. }
  26282. },
  26283. "required": ["type", "id", "syncEvent"],
  26284. "additionalProperties": false
  26285. },
  26286. "SyncEventSessionNextToolInputEnded": {
  26287. "type": "object",
  26288. "properties": {
  26289. "type": {
  26290. "type": "string",
  26291. "enum": ["sync"]
  26292. },
  26293. "id": {
  26294. "type": "string",
  26295. "pattern": "^evt_"
  26296. },
  26297. "syncEvent": {
  26298. "type": "object",
  26299. "properties": {
  26300. "type": {
  26301. "type": "string",
  26302. "enum": ["session.next.tool.input.ended.1"]
  26303. },
  26304. "id": {
  26305. "type": "string",
  26306. "pattern": "^evt_"
  26307. },
  26308. "seq": {
  26309. "type": "number"
  26310. },
  26311. "aggregateID": {
  26312. "type": "string"
  26313. },
  26314. "data": {
  26315. "type": "object",
  26316. "properties": {
  26317. "timestamp": {
  26318. "type": "number"
  26319. },
  26320. "sessionID": {
  26321. "type": "string",
  26322. "pattern": "^ses"
  26323. },
  26324. "assistantMessageID": {
  26325. "type": "string",
  26326. "pattern": "^msg_"
  26327. },
  26328. "callID": {
  26329. "type": "string"
  26330. },
  26331. "text": {
  26332. "type": "string"
  26333. }
  26334. },
  26335. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26336. "additionalProperties": false
  26337. }
  26338. },
  26339. "required": ["type", "id", "seq", "aggregateID", "data"],
  26340. "additionalProperties": false
  26341. }
  26342. },
  26343. "required": ["type", "id", "syncEvent"],
  26344. "additionalProperties": false
  26345. },
  26346. "SyncEventSessionNextToolCalled": {
  26347. "type": "object",
  26348. "properties": {
  26349. "type": {
  26350. "type": "string",
  26351. "enum": ["sync"]
  26352. },
  26353. "id": {
  26354. "type": "string",
  26355. "pattern": "^evt_"
  26356. },
  26357. "syncEvent": {
  26358. "type": "object",
  26359. "properties": {
  26360. "type": {
  26361. "type": "string",
  26362. "enum": ["session.next.tool.called.1"]
  26363. },
  26364. "id": {
  26365. "type": "string",
  26366. "pattern": "^evt_"
  26367. },
  26368. "seq": {
  26369. "type": "number"
  26370. },
  26371. "aggregateID": {
  26372. "type": "string"
  26373. },
  26374. "data": {
  26375. "type": "object",
  26376. "properties": {
  26377. "timestamp": {
  26378. "type": "number"
  26379. },
  26380. "sessionID": {
  26381. "type": "string",
  26382. "pattern": "^ses"
  26383. },
  26384. "assistantMessageID": {
  26385. "type": "string",
  26386. "pattern": "^msg_"
  26387. },
  26388. "callID": {
  26389. "type": "string"
  26390. },
  26391. "tool": {
  26392. "type": "string"
  26393. },
  26394. "input": {
  26395. "type": "object"
  26396. },
  26397. "provider": {
  26398. "type": "object",
  26399. "properties": {
  26400. "executed": {
  26401. "type": "boolean"
  26402. },
  26403. "metadata": {
  26404. "$ref": "#/components/schemas/LLMProviderMetadata"
  26405. }
  26406. },
  26407. "required": ["executed"],
  26408. "additionalProperties": false
  26409. }
  26410. },
  26411. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26412. "additionalProperties": false
  26413. }
  26414. },
  26415. "required": ["type", "id", "seq", "aggregateID", "data"],
  26416. "additionalProperties": false
  26417. }
  26418. },
  26419. "required": ["type", "id", "syncEvent"],
  26420. "additionalProperties": false
  26421. },
  26422. "SyncEventSessionNextToolProgress": {
  26423. "type": "object",
  26424. "properties": {
  26425. "type": {
  26426. "type": "string",
  26427. "enum": ["sync"]
  26428. },
  26429. "id": {
  26430. "type": "string",
  26431. "pattern": "^evt_"
  26432. },
  26433. "syncEvent": {
  26434. "type": "object",
  26435. "properties": {
  26436. "type": {
  26437. "type": "string",
  26438. "enum": ["session.next.tool.progress.1"]
  26439. },
  26440. "id": {
  26441. "type": "string",
  26442. "pattern": "^evt_"
  26443. },
  26444. "seq": {
  26445. "type": "number"
  26446. },
  26447. "aggregateID": {
  26448. "type": "string"
  26449. },
  26450. "data": {
  26451. "type": "object",
  26452. "properties": {
  26453. "timestamp": {
  26454. "type": "number"
  26455. },
  26456. "sessionID": {
  26457. "type": "string",
  26458. "pattern": "^ses"
  26459. },
  26460. "assistantMessageID": {
  26461. "type": "string",
  26462. "pattern": "^msg_"
  26463. },
  26464. "callID": {
  26465. "type": "string"
  26466. },
  26467. "structured": {
  26468. "type": "object"
  26469. },
  26470. "content": {
  26471. "type": "array",
  26472. "items": {
  26473. "$ref": "#/components/schemas/LLMToolContent"
  26474. }
  26475. }
  26476. },
  26477. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26478. "additionalProperties": false
  26479. }
  26480. },
  26481. "required": ["type", "id", "seq", "aggregateID", "data"],
  26482. "additionalProperties": false
  26483. }
  26484. },
  26485. "required": ["type", "id", "syncEvent"],
  26486. "additionalProperties": false
  26487. },
  26488. "SyncEventSessionNextToolSuccess": {
  26489. "type": "object",
  26490. "properties": {
  26491. "type": {
  26492. "type": "string",
  26493. "enum": ["sync"]
  26494. },
  26495. "id": {
  26496. "type": "string",
  26497. "pattern": "^evt_"
  26498. },
  26499. "syncEvent": {
  26500. "type": "object",
  26501. "properties": {
  26502. "type": {
  26503. "type": "string",
  26504. "enum": ["session.next.tool.success.1"]
  26505. },
  26506. "id": {
  26507. "type": "string",
  26508. "pattern": "^evt_"
  26509. },
  26510. "seq": {
  26511. "type": "number"
  26512. },
  26513. "aggregateID": {
  26514. "type": "string"
  26515. },
  26516. "data": {
  26517. "type": "object",
  26518. "properties": {
  26519. "timestamp": {
  26520. "type": "number"
  26521. },
  26522. "sessionID": {
  26523. "type": "string",
  26524. "pattern": "^ses"
  26525. },
  26526. "assistantMessageID": {
  26527. "type": "string",
  26528. "pattern": "^msg_"
  26529. },
  26530. "callID": {
  26531. "type": "string"
  26532. },
  26533. "structured": {
  26534. "type": "object"
  26535. },
  26536. "content": {
  26537. "type": "array",
  26538. "items": {
  26539. "$ref": "#/components/schemas/LLMToolContent"
  26540. }
  26541. },
  26542. "outputPaths": {
  26543. "type": "array",
  26544. "items": {
  26545. "type": "string"
  26546. }
  26547. },
  26548. "result": {},
  26549. "provider": {
  26550. "type": "object",
  26551. "properties": {
  26552. "executed": {
  26553. "type": "boolean"
  26554. },
  26555. "metadata": {
  26556. "$ref": "#/components/schemas/LLMProviderMetadata"
  26557. }
  26558. },
  26559. "required": ["executed"],
  26560. "additionalProperties": false
  26561. }
  26562. },
  26563. "required": [
  26564. "timestamp",
  26565. "sessionID",
  26566. "assistantMessageID",
  26567. "callID",
  26568. "structured",
  26569. "content",
  26570. "provider"
  26571. ],
  26572. "additionalProperties": false
  26573. }
  26574. },
  26575. "required": ["type", "id", "seq", "aggregateID", "data"],
  26576. "additionalProperties": false
  26577. }
  26578. },
  26579. "required": ["type", "id", "syncEvent"],
  26580. "additionalProperties": false
  26581. },
  26582. "SyncEventSessionNextToolFailed": {
  26583. "type": "object",
  26584. "properties": {
  26585. "type": {
  26586. "type": "string",
  26587. "enum": ["sync"]
  26588. },
  26589. "id": {
  26590. "type": "string",
  26591. "pattern": "^evt_"
  26592. },
  26593. "syncEvent": {
  26594. "type": "object",
  26595. "properties": {
  26596. "type": {
  26597. "type": "string",
  26598. "enum": ["session.next.tool.failed.1"]
  26599. },
  26600. "id": {
  26601. "type": "string",
  26602. "pattern": "^evt_"
  26603. },
  26604. "seq": {
  26605. "type": "number"
  26606. },
  26607. "aggregateID": {
  26608. "type": "string"
  26609. },
  26610. "data": {
  26611. "type": "object",
  26612. "properties": {
  26613. "timestamp": {
  26614. "type": "number"
  26615. },
  26616. "sessionID": {
  26617. "type": "string",
  26618. "pattern": "^ses"
  26619. },
  26620. "assistantMessageID": {
  26621. "type": "string",
  26622. "pattern": "^msg_"
  26623. },
  26624. "callID": {
  26625. "type": "string"
  26626. },
  26627. "error": {
  26628. "$ref": "#/components/schemas/SessionErrorUnknown"
  26629. },
  26630. "result": {},
  26631. "provider": {
  26632. "type": "object",
  26633. "properties": {
  26634. "executed": {
  26635. "type": "boolean"
  26636. },
  26637. "metadata": {
  26638. "$ref": "#/components/schemas/LLMProviderMetadata"
  26639. }
  26640. },
  26641. "required": ["executed"],
  26642. "additionalProperties": false
  26643. }
  26644. },
  26645. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26646. "additionalProperties": false
  26647. }
  26648. },
  26649. "required": ["type", "id", "seq", "aggregateID", "data"],
  26650. "additionalProperties": false
  26651. }
  26652. },
  26653. "required": ["type", "id", "syncEvent"],
  26654. "additionalProperties": false
  26655. },
  26656. "SyncEventSessionNextRetried": {
  26657. "type": "object",
  26658. "properties": {
  26659. "type": {
  26660. "type": "string",
  26661. "enum": ["sync"]
  26662. },
  26663. "id": {
  26664. "type": "string",
  26665. "pattern": "^evt_"
  26666. },
  26667. "syncEvent": {
  26668. "type": "object",
  26669. "properties": {
  26670. "type": {
  26671. "type": "string",
  26672. "enum": ["session.next.retried.1"]
  26673. },
  26674. "id": {
  26675. "type": "string",
  26676. "pattern": "^evt_"
  26677. },
  26678. "seq": {
  26679. "type": "number"
  26680. },
  26681. "aggregateID": {
  26682. "type": "string"
  26683. },
  26684. "data": {
  26685. "type": "object",
  26686. "properties": {
  26687. "timestamp": {
  26688. "type": "number"
  26689. },
  26690. "sessionID": {
  26691. "type": "string",
  26692. "pattern": "^ses"
  26693. },
  26694. "attempt": {
  26695. "type": "number"
  26696. },
  26697. "error": {
  26698. "$ref": "#/components/schemas/SessionNextRetry_error"
  26699. }
  26700. },
  26701. "required": ["timestamp", "sessionID", "attempt", "error"],
  26702. "additionalProperties": false
  26703. }
  26704. },
  26705. "required": ["type", "id", "seq", "aggregateID", "data"],
  26706. "additionalProperties": false
  26707. }
  26708. },
  26709. "required": ["type", "id", "syncEvent"],
  26710. "additionalProperties": false
  26711. },
  26712. "SyncEventSessionNextCompactionStarted": {
  26713. "type": "object",
  26714. "properties": {
  26715. "type": {
  26716. "type": "string",
  26717. "enum": ["sync"]
  26718. },
  26719. "id": {
  26720. "type": "string",
  26721. "pattern": "^evt_"
  26722. },
  26723. "syncEvent": {
  26724. "type": "object",
  26725. "properties": {
  26726. "type": {
  26727. "type": "string",
  26728. "enum": ["session.next.compaction.started.1"]
  26729. },
  26730. "id": {
  26731. "type": "string",
  26732. "pattern": "^evt_"
  26733. },
  26734. "seq": {
  26735. "type": "number"
  26736. },
  26737. "aggregateID": {
  26738. "type": "string"
  26739. },
  26740. "data": {
  26741. "type": "object",
  26742. "properties": {
  26743. "timestamp": {
  26744. "type": "number"
  26745. },
  26746. "sessionID": {
  26747. "type": "string",
  26748. "pattern": "^ses"
  26749. },
  26750. "messageID": {
  26751. "type": "string",
  26752. "pattern": "^msg_"
  26753. },
  26754. "reason": {
  26755. "type": "string",
  26756. "enum": ["auto", "manual"]
  26757. }
  26758. },
  26759. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26760. "additionalProperties": false
  26761. }
  26762. },
  26763. "required": ["type", "id", "seq", "aggregateID", "data"],
  26764. "additionalProperties": false
  26765. }
  26766. },
  26767. "required": ["type", "id", "syncEvent"],
  26768. "additionalProperties": false
  26769. },
  26770. "SyncEventSessionNextCompactionEnded": {
  26771. "type": "object",
  26772. "properties": {
  26773. "type": {
  26774. "type": "string",
  26775. "enum": ["sync"]
  26776. },
  26777. "id": {
  26778. "type": "string",
  26779. "pattern": "^evt_"
  26780. },
  26781. "syncEvent": {
  26782. "type": "object",
  26783. "properties": {
  26784. "type": {
  26785. "type": "string",
  26786. "enum": ["session.next.compaction.ended.1"]
  26787. },
  26788. "id": {
  26789. "type": "string",
  26790. "pattern": "^evt_"
  26791. },
  26792. "seq": {
  26793. "type": "number"
  26794. },
  26795. "aggregateID": {
  26796. "type": "string"
  26797. },
  26798. "data": {
  26799. "type": "object",
  26800. "properties": {
  26801. "timestamp": {
  26802. "type": "number"
  26803. },
  26804. "sessionID": {
  26805. "type": "string",
  26806. "pattern": "^ses"
  26807. },
  26808. "messageID": {
  26809. "type": "string",
  26810. "pattern": "^msg_"
  26811. },
  26812. "reason": {
  26813. "type": "string",
  26814. "enum": ["auto", "manual"]
  26815. },
  26816. "text": {
  26817. "type": "string"
  26818. },
  26819. "recent": {
  26820. "type": "string"
  26821. }
  26822. },
  26823. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26824. "additionalProperties": false
  26825. }
  26826. },
  26827. "required": ["type", "id", "seq", "aggregateID", "data"],
  26828. "additionalProperties": false
  26829. }
  26830. },
  26831. "required": ["type", "id", "syncEvent"],
  26832. "additionalProperties": false
  26833. },
  26834. "SyncEventSessionNextRevertStaged": {
  26835. "type": "object",
  26836. "properties": {
  26837. "type": {
  26838. "type": "string",
  26839. "enum": ["sync"]
  26840. },
  26841. "id": {
  26842. "type": "string",
  26843. "pattern": "^evt_"
  26844. },
  26845. "syncEvent": {
  26846. "type": "object",
  26847. "properties": {
  26848. "type": {
  26849. "type": "string",
  26850. "enum": ["session.next.revert.staged.1"]
  26851. },
  26852. "id": {
  26853. "type": "string",
  26854. "pattern": "^evt_"
  26855. },
  26856. "seq": {
  26857. "type": "number"
  26858. },
  26859. "aggregateID": {
  26860. "type": "string"
  26861. },
  26862. "data": {
  26863. "type": "object",
  26864. "properties": {
  26865. "timestamp": {
  26866. "type": "number"
  26867. },
  26868. "sessionID": {
  26869. "type": "string",
  26870. "pattern": "^ses"
  26871. },
  26872. "revert": {
  26873. "$ref": "#/components/schemas/RevertState"
  26874. }
  26875. },
  26876. "required": ["timestamp", "sessionID", "revert"],
  26877. "additionalProperties": false
  26878. }
  26879. },
  26880. "required": ["type", "id", "seq", "aggregateID", "data"],
  26881. "additionalProperties": false
  26882. }
  26883. },
  26884. "required": ["type", "id", "syncEvent"],
  26885. "additionalProperties": false
  26886. },
  26887. "SyncEventSessionNextRevertCleared": {
  26888. "type": "object",
  26889. "properties": {
  26890. "type": {
  26891. "type": "string",
  26892. "enum": ["sync"]
  26893. },
  26894. "id": {
  26895. "type": "string",
  26896. "pattern": "^evt_"
  26897. },
  26898. "syncEvent": {
  26899. "type": "object",
  26900. "properties": {
  26901. "type": {
  26902. "type": "string",
  26903. "enum": ["session.next.revert.cleared.1"]
  26904. },
  26905. "id": {
  26906. "type": "string",
  26907. "pattern": "^evt_"
  26908. },
  26909. "seq": {
  26910. "type": "number"
  26911. },
  26912. "aggregateID": {
  26913. "type": "string"
  26914. },
  26915. "data": {
  26916. "type": "object",
  26917. "properties": {
  26918. "timestamp": {
  26919. "type": "number"
  26920. },
  26921. "sessionID": {
  26922. "type": "string",
  26923. "pattern": "^ses"
  26924. }
  26925. },
  26926. "required": ["timestamp", "sessionID"],
  26927. "additionalProperties": false
  26928. }
  26929. },
  26930. "required": ["type", "id", "seq", "aggregateID", "data"],
  26931. "additionalProperties": false
  26932. }
  26933. },
  26934. "required": ["type", "id", "syncEvent"],
  26935. "additionalProperties": false
  26936. },
  26937. "SyncEventSessionNextRevertCommitted": {
  26938. "type": "object",
  26939. "properties": {
  26940. "type": {
  26941. "type": "string",
  26942. "enum": ["sync"]
  26943. },
  26944. "id": {
  26945. "type": "string",
  26946. "pattern": "^evt_"
  26947. },
  26948. "syncEvent": {
  26949. "type": "object",
  26950. "properties": {
  26951. "type": {
  26952. "type": "string",
  26953. "enum": ["session.next.revert.committed.1"]
  26954. },
  26955. "id": {
  26956. "type": "string",
  26957. "pattern": "^evt_"
  26958. },
  26959. "seq": {
  26960. "type": "number"
  26961. },
  26962. "aggregateID": {
  26963. "type": "string"
  26964. },
  26965. "data": {
  26966. "type": "object",
  26967. "properties": {
  26968. "timestamp": {
  26969. "type": "number"
  26970. },
  26971. "sessionID": {
  26972. "type": "string",
  26973. "pattern": "^ses"
  26974. },
  26975. "messageID": {
  26976. "type": "string",
  26977. "pattern": "^msg_"
  26978. }
  26979. },
  26980. "required": ["timestamp", "sessionID", "messageID"],
  26981. "additionalProperties": false
  26982. }
  26983. },
  26984. "required": ["type", "id", "seq", "aggregateID", "data"],
  26985. "additionalProperties": false
  26986. }
  26987. },
  26988. "required": ["type", "id", "syncEvent"],
  26989. "additionalProperties": false
  26990. },
  26991. "ConfigV2ReferenceGit": {
  26992. "type": "object",
  26993. "properties": {
  26994. "repository": {
  26995. "type": "string"
  26996. },
  26997. "branch": {
  26998. "type": "string"
  26999. },
  27000. "description": {
  27001. "type": "string"
  27002. },
  27003. "hidden": {
  27004. "type": "boolean"
  27005. }
  27006. },
  27007. "required": ["repository"],
  27008. "additionalProperties": false
  27009. },
  27010. "ConfigV2ReferenceLocal": {
  27011. "type": "object",
  27012. "properties": {
  27013. "path": {
  27014. "type": "string"
  27015. },
  27016. "description": {
  27017. "type": "string"
  27018. },
  27019. "hidden": {
  27020. "type": "boolean"
  27021. }
  27022. },
  27023. "required": ["path"],
  27024. "additionalProperties": false
  27025. },
  27026. "PolicyEffect": {
  27027. "type": "string",
  27028. "enum": ["allow", "deny"]
  27029. },
  27030. "ConfigV2ExperimentalPolicy": {
  27031. "type": "object",
  27032. "properties": {
  27033. "action": {
  27034. "type": "string",
  27035. "enum": ["provider.use"]
  27036. },
  27037. "effect": {
  27038. "$ref": "#/components/schemas/PolicyEffect"
  27039. },
  27040. "resource": {
  27041. "type": "string"
  27042. }
  27043. },
  27044. "required": ["action", "effect", "resource"],
  27045. "additionalProperties": false
  27046. },
  27047. "ProjectDirectories": {
  27048. "type": "array",
  27049. "items": {
  27050. "type": "object",
  27051. "properties": {
  27052. "directory": {
  27053. "type": "string"
  27054. },
  27055. "strategy": {
  27056. "type": "string"
  27057. }
  27058. },
  27059. "required": ["directory"],
  27060. "additionalProperties": false
  27061. }
  27062. },
  27063. "PtyTicketConnectToken": {
  27064. "type": "object",
  27065. "properties": {
  27066. "ticket": {
  27067. "type": "string"
  27068. },
  27069. "expires_in": {
  27070. "type": "integer",
  27071. "exclusiveMinimum": 0
  27072. }
  27073. },
  27074. "required": ["ticket", "expires_in"],
  27075. "additionalProperties": false
  27076. },
  27077. "WorkspaceEventConnectionStatus": {
  27078. "type": "object",
  27079. "properties": {
  27080. "workspaceID": {
  27081. "type": "string",
  27082. "pattern": "^wrk"
  27083. },
  27084. "status": {
  27085. "type": "string",
  27086. "enum": ["connected", "connecting", "disconnected", "error"]
  27087. }
  27088. },
  27089. "required": ["workspaceID", "status"],
  27090. "additionalProperties": false
  27091. },
  27092. "LocationInfo": {
  27093. "type": "object",
  27094. "properties": {
  27095. "directory": {
  27096. "type": "string"
  27097. },
  27098. "workspaceID": {
  27099. "type": "string",
  27100. "pattern": "^wrk"
  27101. },
  27102. "project": {
  27103. "type": "object",
  27104. "properties": {
  27105. "id": {
  27106. "type": "string"
  27107. },
  27108. "directory": {
  27109. "type": "string"
  27110. }
  27111. },
  27112. "required": ["id", "directory"],
  27113. "additionalProperties": false
  27114. }
  27115. },
  27116. "required": ["directory", "project"],
  27117. "additionalProperties": false
  27118. },
  27119. "ProviderRequest": {
  27120. "type": "object",
  27121. "properties": {
  27122. "headers": {
  27123. "type": "object",
  27124. "additionalProperties": {
  27125. "type": "string"
  27126. }
  27127. },
  27128. "body": {
  27129. "type": "object"
  27130. }
  27131. },
  27132. "required": ["headers", "body"],
  27133. "additionalProperties": false
  27134. },
  27135. "AgentColor": {
  27136. "anyOf": [
  27137. {
  27138. "type": "string",
  27139. "pattern": "^#[0-9a-fA-F]{6}$"
  27140. },
  27141. {
  27142. "type": "string",
  27143. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  27144. }
  27145. ]
  27146. },
  27147. "PermissionV2Effect": {
  27148. "type": "string",
  27149. "enum": ["allow", "deny", "ask"]
  27150. },
  27151. "PermissionV2Rule": {
  27152. "type": "object",
  27153. "properties": {
  27154. "action": {
  27155. "type": "string"
  27156. },
  27157. "resource": {
  27158. "type": "string"
  27159. },
  27160. "effect": {
  27161. "$ref": "#/components/schemas/PermissionV2Effect"
  27162. }
  27163. },
  27164. "required": ["action", "resource", "effect"],
  27165. "additionalProperties": false
  27166. },
  27167. "PermissionV2Ruleset": {
  27168. "type": "array",
  27169. "items": {
  27170. "$ref": "#/components/schemas/PermissionV2Rule"
  27171. }
  27172. },
  27173. "AgentV2Info": {
  27174. "type": "object",
  27175. "properties": {
  27176. "id": {
  27177. "type": "string"
  27178. },
  27179. "model": {
  27180. "$ref": "#/components/schemas/ModelRef"
  27181. },
  27182. "request": {
  27183. "$ref": "#/components/schemas/ProviderRequest"
  27184. },
  27185. "system": {
  27186. "type": "string"
  27187. },
  27188. "description": {
  27189. "type": "string"
  27190. },
  27191. "mode": {
  27192. "type": "string",
  27193. "enum": ["subagent", "primary", "all"]
  27194. },
  27195. "hidden": {
  27196. "type": "boolean"
  27197. },
  27198. "color": {
  27199. "$ref": "#/components/schemas/AgentColor"
  27200. },
  27201. "steps": {
  27202. "type": "integer",
  27203. "exclusiveMinimum": 0
  27204. },
  27205. "permissions": {
  27206. "$ref": "#/components/schemas/PermissionV2Ruleset"
  27207. }
  27208. },
  27209. "required": ["id", "request", "mode", "hidden", "permissions"],
  27210. "additionalProperties": false
  27211. },
  27212. "SessionV2Info": {
  27213. "type": "object",
  27214. "properties": {
  27215. "id": {
  27216. "type": "string",
  27217. "pattern": "^ses"
  27218. },
  27219. "parentID": {
  27220. "type": "string",
  27221. "pattern": "^ses"
  27222. },
  27223. "projectID": {
  27224. "type": "string"
  27225. },
  27226. "agent": {
  27227. "type": "string"
  27228. },
  27229. "model": {
  27230. "$ref": "#/components/schemas/ModelRef"
  27231. },
  27232. "cost": {
  27233. "type": "number"
  27234. },
  27235. "tokens": {
  27236. "type": "object",
  27237. "properties": {
  27238. "input": {
  27239. "type": "number"
  27240. },
  27241. "output": {
  27242. "type": "number"
  27243. },
  27244. "reasoning": {
  27245. "type": "number"
  27246. },
  27247. "cache": {
  27248. "type": "object",
  27249. "properties": {
  27250. "read": {
  27251. "type": "number"
  27252. },
  27253. "write": {
  27254. "type": "number"
  27255. }
  27256. },
  27257. "required": ["read", "write"],
  27258. "additionalProperties": false
  27259. }
  27260. },
  27261. "required": ["input", "output", "reasoning", "cache"],
  27262. "additionalProperties": false
  27263. },
  27264. "time": {
  27265. "type": "object",
  27266. "properties": {
  27267. "created": {
  27268. "type": "number"
  27269. },
  27270. "updated": {
  27271. "type": "number"
  27272. },
  27273. "archived": {
  27274. "type": "number"
  27275. }
  27276. },
  27277. "required": ["created", "updated"],
  27278. "additionalProperties": false
  27279. },
  27280. "title": {
  27281. "type": "string"
  27282. },
  27283. "location": {
  27284. "$ref": "#/components/schemas/LocationRef"
  27285. },
  27286. "subpath": {
  27287. "type": "string"
  27288. },
  27289. "revert": {
  27290. "$ref": "#/components/schemas/RevertState"
  27291. }
  27292. },
  27293. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  27294. "additionalProperties": false
  27295. },
  27296. "PromptInputFileAttachment": {
  27297. "type": "object",
  27298. "properties": {
  27299. "uri": {
  27300. "type": "string"
  27301. },
  27302. "name": {
  27303. "type": "string"
  27304. },
  27305. "description": {
  27306. "type": "string"
  27307. },
  27308. "source": {
  27309. "$ref": "#/components/schemas/PromptSource"
  27310. }
  27311. },
  27312. "required": ["uri"],
  27313. "additionalProperties": false
  27314. },
  27315. "SessionInputAdmitted": {
  27316. "type": "object",
  27317. "properties": {
  27318. "admittedSeq": {
  27319. "type": "integer",
  27320. "minimum": 0
  27321. },
  27322. "id": {
  27323. "type": "string",
  27324. "pattern": "^msg_"
  27325. },
  27326. "sessionID": {
  27327. "type": "string",
  27328. "pattern": "^ses"
  27329. },
  27330. "prompt": {
  27331. "$ref": "#/components/schemas/Prompt"
  27332. },
  27333. "delivery": {
  27334. "type": "string",
  27335. "enum": ["steer", "queue"]
  27336. },
  27337. "timeCreated": {
  27338. "type": "number"
  27339. },
  27340. "promotedSeq": {
  27341. "type": "integer",
  27342. "minimum": 0
  27343. }
  27344. },
  27345. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27346. "additionalProperties": false
  27347. },
  27348. "SessionMessageAgentSwitched": {
  27349. "type": "object",
  27350. "properties": {
  27351. "id": {
  27352. "type": "string",
  27353. "pattern": "^msg_"
  27354. },
  27355. "metadata": {
  27356. "type": "object"
  27357. },
  27358. "time": {
  27359. "type": "object",
  27360. "properties": {
  27361. "created": {
  27362. "type": "number"
  27363. }
  27364. },
  27365. "required": ["created"],
  27366. "additionalProperties": false
  27367. },
  27368. "type": {
  27369. "type": "string",
  27370. "enum": ["agent-switched"]
  27371. },
  27372. "agent": {
  27373. "type": "string"
  27374. }
  27375. },
  27376. "required": ["id", "time", "type", "agent"],
  27377. "additionalProperties": false
  27378. },
  27379. "SessionMessageModelSwitched": {
  27380. "type": "object",
  27381. "properties": {
  27382. "id": {
  27383. "type": "string",
  27384. "pattern": "^msg_"
  27385. },
  27386. "metadata": {
  27387. "type": "object"
  27388. },
  27389. "time": {
  27390. "type": "object",
  27391. "properties": {
  27392. "created": {
  27393. "type": "number"
  27394. }
  27395. },
  27396. "required": ["created"],
  27397. "additionalProperties": false
  27398. },
  27399. "type": {
  27400. "type": "string",
  27401. "enum": ["model-switched"]
  27402. },
  27403. "model": {
  27404. "$ref": "#/components/schemas/ModelRef"
  27405. }
  27406. },
  27407. "required": ["id", "time", "type", "model"],
  27408. "additionalProperties": false
  27409. },
  27410. "SessionMessageUser": {
  27411. "type": "object",
  27412. "properties": {
  27413. "id": {
  27414. "type": "string",
  27415. "pattern": "^msg_"
  27416. },
  27417. "metadata": {
  27418. "type": "object"
  27419. },
  27420. "time": {
  27421. "type": "object",
  27422. "properties": {
  27423. "created": {
  27424. "type": "number"
  27425. }
  27426. },
  27427. "required": ["created"],
  27428. "additionalProperties": false
  27429. },
  27430. "text": {
  27431. "type": "string"
  27432. },
  27433. "files": {
  27434. "type": "array",
  27435. "items": {
  27436. "$ref": "#/components/schemas/PromptFileAttachment"
  27437. }
  27438. },
  27439. "agents": {
  27440. "type": "array",
  27441. "items": {
  27442. "$ref": "#/components/schemas/PromptAgentAttachment"
  27443. }
  27444. },
  27445. "type": {
  27446. "type": "string",
  27447. "enum": ["user"]
  27448. }
  27449. },
  27450. "required": ["id", "time", "text", "type"],
  27451. "additionalProperties": false
  27452. },
  27453. "SessionMessageSynthetic": {
  27454. "type": "object",
  27455. "properties": {
  27456. "id": {
  27457. "type": "string",
  27458. "pattern": "^msg_"
  27459. },
  27460. "metadata": {
  27461. "type": "object"
  27462. },
  27463. "time": {
  27464. "type": "object",
  27465. "properties": {
  27466. "created": {
  27467. "type": "number"
  27468. }
  27469. },
  27470. "required": ["created"],
  27471. "additionalProperties": false
  27472. },
  27473. "sessionID": {
  27474. "type": "string",
  27475. "pattern": "^ses"
  27476. },
  27477. "text": {
  27478. "type": "string"
  27479. },
  27480. "type": {
  27481. "type": "string",
  27482. "enum": ["synthetic"]
  27483. }
  27484. },
  27485. "required": ["id", "time", "sessionID", "text", "type"],
  27486. "additionalProperties": false
  27487. },
  27488. "SessionMessageSystem": {
  27489. "type": "object",
  27490. "properties": {
  27491. "id": {
  27492. "type": "string",
  27493. "pattern": "^msg_"
  27494. },
  27495. "metadata": {
  27496. "type": "object"
  27497. },
  27498. "time": {
  27499. "type": "object",
  27500. "properties": {
  27501. "created": {
  27502. "type": "number"
  27503. }
  27504. },
  27505. "required": ["created"],
  27506. "additionalProperties": false
  27507. },
  27508. "type": {
  27509. "type": "string",
  27510. "enum": ["system"]
  27511. },
  27512. "text": {
  27513. "type": "string"
  27514. }
  27515. },
  27516. "required": ["id", "time", "type", "text"],
  27517. "additionalProperties": false
  27518. },
  27519. "SessionMessageShell": {
  27520. "type": "object",
  27521. "properties": {
  27522. "id": {
  27523. "type": "string",
  27524. "pattern": "^msg_"
  27525. },
  27526. "metadata": {
  27527. "type": "object"
  27528. },
  27529. "time": {
  27530. "type": "object",
  27531. "properties": {
  27532. "created": {
  27533. "type": "number"
  27534. },
  27535. "completed": {
  27536. "type": "number"
  27537. }
  27538. },
  27539. "required": ["created"],
  27540. "additionalProperties": false
  27541. },
  27542. "type": {
  27543. "type": "string",
  27544. "enum": ["shell"]
  27545. },
  27546. "callID": {
  27547. "type": "string"
  27548. },
  27549. "command": {
  27550. "type": "string"
  27551. },
  27552. "output": {
  27553. "type": "string"
  27554. }
  27555. },
  27556. "required": ["id", "time", "type", "callID", "command", "output"],
  27557. "additionalProperties": false
  27558. },
  27559. "SessionMessageAssistantText": {
  27560. "type": "object",
  27561. "properties": {
  27562. "type": {
  27563. "type": "string",
  27564. "enum": ["text"]
  27565. },
  27566. "id": {
  27567. "type": "string"
  27568. },
  27569. "text": {
  27570. "type": "string"
  27571. }
  27572. },
  27573. "required": ["type", "id", "text"],
  27574. "additionalProperties": false
  27575. },
  27576. "SessionMessageAssistantReasoning": {
  27577. "type": "object",
  27578. "properties": {
  27579. "type": {
  27580. "type": "string",
  27581. "enum": ["reasoning"]
  27582. },
  27583. "id": {
  27584. "type": "string"
  27585. },
  27586. "text": {
  27587. "type": "string"
  27588. },
  27589. "providerMetadata": {
  27590. "$ref": "#/components/schemas/LLMProviderMetadata"
  27591. }
  27592. },
  27593. "required": ["type", "id", "text"],
  27594. "additionalProperties": false
  27595. },
  27596. "SessionMessageToolStatePending": {
  27597. "type": "object",
  27598. "properties": {
  27599. "status": {
  27600. "type": "string",
  27601. "enum": ["pending"]
  27602. },
  27603. "input": {
  27604. "type": "string"
  27605. }
  27606. },
  27607. "required": ["status", "input"],
  27608. "additionalProperties": false
  27609. },
  27610. "SessionMessageToolStateRunning": {
  27611. "type": "object",
  27612. "properties": {
  27613. "status": {
  27614. "type": "string",
  27615. "enum": ["running"]
  27616. },
  27617. "input": {
  27618. "type": "object"
  27619. },
  27620. "structured": {
  27621. "type": "object"
  27622. },
  27623. "content": {
  27624. "type": "array",
  27625. "items": {
  27626. "$ref": "#/components/schemas/LLMToolContent"
  27627. }
  27628. }
  27629. },
  27630. "required": ["status", "input", "structured", "content"],
  27631. "additionalProperties": false
  27632. },
  27633. "SessionMessageToolStateCompleted": {
  27634. "type": "object",
  27635. "properties": {
  27636. "status": {
  27637. "type": "string",
  27638. "enum": ["completed"]
  27639. },
  27640. "input": {
  27641. "type": "object"
  27642. },
  27643. "attachments": {
  27644. "type": "array",
  27645. "items": {
  27646. "$ref": "#/components/schemas/PromptFileAttachment"
  27647. }
  27648. },
  27649. "content": {
  27650. "type": "array",
  27651. "items": {
  27652. "$ref": "#/components/schemas/LLMToolContent"
  27653. }
  27654. },
  27655. "outputPaths": {
  27656. "type": "array",
  27657. "items": {
  27658. "type": "string"
  27659. }
  27660. },
  27661. "structured": {
  27662. "type": "object"
  27663. },
  27664. "result": {}
  27665. },
  27666. "required": ["status", "input", "content", "structured"],
  27667. "additionalProperties": false
  27668. },
  27669. "SessionMessageToolStateError": {
  27670. "type": "object",
  27671. "properties": {
  27672. "status": {
  27673. "type": "string",
  27674. "enum": ["error"]
  27675. },
  27676. "input": {
  27677. "type": "object"
  27678. },
  27679. "content": {
  27680. "type": "array",
  27681. "items": {
  27682. "$ref": "#/components/schemas/LLMToolContent"
  27683. }
  27684. },
  27685. "structured": {
  27686. "type": "object"
  27687. },
  27688. "error": {
  27689. "$ref": "#/components/schemas/SessionErrorUnknown"
  27690. },
  27691. "result": {}
  27692. },
  27693. "required": ["status", "input", "content", "structured", "error"],
  27694. "additionalProperties": false
  27695. },
  27696. "SessionMessageAssistantTool": {
  27697. "type": "object",
  27698. "properties": {
  27699. "type": {
  27700. "type": "string",
  27701. "enum": ["tool"]
  27702. },
  27703. "id": {
  27704. "type": "string"
  27705. },
  27706. "name": {
  27707. "type": "string"
  27708. },
  27709. "provider": {
  27710. "type": "object",
  27711. "properties": {
  27712. "executed": {
  27713. "type": "boolean"
  27714. },
  27715. "metadata": {
  27716. "$ref": "#/components/schemas/LLMProviderMetadata"
  27717. },
  27718. "resultMetadata": {
  27719. "$ref": "#/components/schemas/LLMProviderMetadata"
  27720. }
  27721. },
  27722. "required": ["executed"],
  27723. "additionalProperties": false
  27724. },
  27725. "state": {
  27726. "anyOf": [
  27727. {
  27728. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27729. },
  27730. {
  27731. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27732. },
  27733. {
  27734. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27735. },
  27736. {
  27737. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27738. }
  27739. ]
  27740. },
  27741. "time": {
  27742. "type": "object",
  27743. "properties": {
  27744. "created": {
  27745. "type": "number"
  27746. },
  27747. "ran": {
  27748. "type": "number"
  27749. },
  27750. "completed": {
  27751. "type": "number"
  27752. },
  27753. "pruned": {
  27754. "type": "number"
  27755. }
  27756. },
  27757. "required": ["created"],
  27758. "additionalProperties": false
  27759. }
  27760. },
  27761. "required": ["type", "id", "name", "state", "time"],
  27762. "additionalProperties": false
  27763. },
  27764. "SessionMessageAssistant": {
  27765. "type": "object",
  27766. "properties": {
  27767. "id": {
  27768. "type": "string",
  27769. "pattern": "^msg_"
  27770. },
  27771. "metadata": {
  27772. "type": "object"
  27773. },
  27774. "time": {
  27775. "type": "object",
  27776. "properties": {
  27777. "created": {
  27778. "type": "number"
  27779. },
  27780. "completed": {
  27781. "type": "number"
  27782. }
  27783. },
  27784. "required": ["created"],
  27785. "additionalProperties": false
  27786. },
  27787. "type": {
  27788. "type": "string",
  27789. "enum": ["assistant"]
  27790. },
  27791. "agent": {
  27792. "type": "string"
  27793. },
  27794. "model": {
  27795. "$ref": "#/components/schemas/ModelRef"
  27796. },
  27797. "content": {
  27798. "type": "array",
  27799. "items": {
  27800. "anyOf": [
  27801. {
  27802. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27803. },
  27804. {
  27805. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27806. },
  27807. {
  27808. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27809. }
  27810. ]
  27811. }
  27812. },
  27813. "snapshot": {
  27814. "type": "object",
  27815. "properties": {
  27816. "start": {
  27817. "type": "string"
  27818. },
  27819. "end": {
  27820. "type": "string"
  27821. },
  27822. "files": {
  27823. "type": "array",
  27824. "items": {
  27825. "type": "string"
  27826. }
  27827. }
  27828. },
  27829. "additionalProperties": false
  27830. },
  27831. "finish": {
  27832. "type": "string"
  27833. },
  27834. "cost": {
  27835. "type": "number"
  27836. },
  27837. "tokens": {
  27838. "type": "object",
  27839. "properties": {
  27840. "input": {
  27841. "type": "number"
  27842. },
  27843. "output": {
  27844. "type": "number"
  27845. },
  27846. "reasoning": {
  27847. "type": "number"
  27848. },
  27849. "cache": {
  27850. "type": "object",
  27851. "properties": {
  27852. "read": {
  27853. "type": "number"
  27854. },
  27855. "write": {
  27856. "type": "number"
  27857. }
  27858. },
  27859. "required": ["read", "write"],
  27860. "additionalProperties": false
  27861. }
  27862. },
  27863. "required": ["input", "output", "reasoning", "cache"],
  27864. "additionalProperties": false
  27865. },
  27866. "error": {
  27867. "$ref": "#/components/schemas/SessionErrorUnknown"
  27868. }
  27869. },
  27870. "required": ["id", "time", "type", "agent", "model", "content"],
  27871. "additionalProperties": false
  27872. },
  27873. "SessionMessageCompaction": {
  27874. "type": "object",
  27875. "properties": {
  27876. "type": {
  27877. "type": "string",
  27878. "enum": ["compaction"]
  27879. },
  27880. "reason": {
  27881. "type": "string",
  27882. "enum": ["auto", "manual"]
  27883. },
  27884. "summary": {
  27885. "type": "string"
  27886. },
  27887. "recent": {
  27888. "type": "string"
  27889. },
  27890. "id": {
  27891. "type": "string",
  27892. "pattern": "^msg_"
  27893. },
  27894. "metadata": {
  27895. "type": "object"
  27896. },
  27897. "time": {
  27898. "type": "object",
  27899. "properties": {
  27900. "created": {
  27901. "type": "number"
  27902. }
  27903. },
  27904. "required": ["created"],
  27905. "additionalProperties": false
  27906. }
  27907. },
  27908. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27909. "additionalProperties": false
  27910. },
  27911. "SessionMessage": {
  27912. "anyOf": [
  27913. {
  27914. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27915. },
  27916. {
  27917. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27918. },
  27919. {
  27920. "$ref": "#/components/schemas/SessionMessageUser"
  27921. },
  27922. {
  27923. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27924. },
  27925. {
  27926. "$ref": "#/components/schemas/SessionMessageSystem"
  27927. },
  27928. {
  27929. "$ref": "#/components/schemas/SessionMessageShell"
  27930. },
  27931. {
  27932. "$ref": "#/components/schemas/SessionMessageAssistant"
  27933. },
  27934. {
  27935. "$ref": "#/components/schemas/SessionMessageCompaction"
  27936. }
  27937. ]
  27938. },
  27939. "SessionNextAgentSwitched": {
  27940. "type": "object",
  27941. "properties": {
  27942. "id": {
  27943. "type": "string",
  27944. "pattern": "^evt_"
  27945. },
  27946. "metadata": {
  27947. "type": "object"
  27948. },
  27949. "type": {
  27950. "type": "string",
  27951. "enum": ["session.next.agent.switched"]
  27952. },
  27953. "durable": {
  27954. "type": "object",
  27955. "properties": {
  27956. "aggregateID": {
  27957. "type": "string"
  27958. },
  27959. "seq": {
  27960. "type": "integer"
  27961. },
  27962. "version": {
  27963. "type": "integer"
  27964. }
  27965. },
  27966. "required": ["aggregateID", "seq", "version"],
  27967. "additionalProperties": false
  27968. },
  27969. "location": {
  27970. "$ref": "#/components/schemas/LocationRef"
  27971. },
  27972. "data": {
  27973. "type": "object",
  27974. "properties": {
  27975. "timestamp": {
  27976. "type": "number"
  27977. },
  27978. "sessionID": {
  27979. "type": "string",
  27980. "pattern": "^ses"
  27981. },
  27982. "messageID": {
  27983. "type": "string",
  27984. "pattern": "^msg_"
  27985. },
  27986. "agent": {
  27987. "type": "string"
  27988. }
  27989. },
  27990. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27991. "additionalProperties": false
  27992. }
  27993. },
  27994. "required": ["id", "type", "data"],
  27995. "additionalProperties": false
  27996. },
  27997. "SessionNextModelSwitched": {
  27998. "type": "object",
  27999. "properties": {
  28000. "id": {
  28001. "type": "string",
  28002. "pattern": "^evt_"
  28003. },
  28004. "metadata": {
  28005. "type": "object"
  28006. },
  28007. "type": {
  28008. "type": "string",
  28009. "enum": ["session.next.model.switched"]
  28010. },
  28011. "durable": {
  28012. "type": "object",
  28013. "properties": {
  28014. "aggregateID": {
  28015. "type": "string"
  28016. },
  28017. "seq": {
  28018. "type": "integer"
  28019. },
  28020. "version": {
  28021. "type": "integer"
  28022. }
  28023. },
  28024. "required": ["aggregateID", "seq", "version"],
  28025. "additionalProperties": false
  28026. },
  28027. "location": {
  28028. "$ref": "#/components/schemas/LocationRef"
  28029. },
  28030. "data": {
  28031. "type": "object",
  28032. "properties": {
  28033. "timestamp": {
  28034. "type": "number"
  28035. },
  28036. "sessionID": {
  28037. "type": "string",
  28038. "pattern": "^ses"
  28039. },
  28040. "messageID": {
  28041. "type": "string",
  28042. "pattern": "^msg_"
  28043. },
  28044. "model": {
  28045. "$ref": "#/components/schemas/ModelRef"
  28046. }
  28047. },
  28048. "required": ["timestamp", "sessionID", "messageID", "model"],
  28049. "additionalProperties": false
  28050. }
  28051. },
  28052. "required": ["id", "type", "data"],
  28053. "additionalProperties": false
  28054. },
  28055. "SessionNextMoved": {
  28056. "type": "object",
  28057. "properties": {
  28058. "id": {
  28059. "type": "string",
  28060. "pattern": "^evt_"
  28061. },
  28062. "metadata": {
  28063. "type": "object"
  28064. },
  28065. "type": {
  28066. "type": "string",
  28067. "enum": ["session.next.moved"]
  28068. },
  28069. "durable": {
  28070. "type": "object",
  28071. "properties": {
  28072. "aggregateID": {
  28073. "type": "string"
  28074. },
  28075. "seq": {
  28076. "type": "integer"
  28077. },
  28078. "version": {
  28079. "type": "integer"
  28080. }
  28081. },
  28082. "required": ["aggregateID", "seq", "version"],
  28083. "additionalProperties": false
  28084. },
  28085. "location": {
  28086. "$ref": "#/components/schemas/LocationRef"
  28087. },
  28088. "data": {
  28089. "type": "object",
  28090. "properties": {
  28091. "timestamp": {
  28092. "type": "number"
  28093. },
  28094. "sessionID": {
  28095. "type": "string",
  28096. "pattern": "^ses"
  28097. },
  28098. "location": {
  28099. "$ref": "#/components/schemas/LocationRef"
  28100. },
  28101. "subdirectory": {
  28102. "type": "string"
  28103. }
  28104. },
  28105. "required": ["timestamp", "sessionID", "location"],
  28106. "additionalProperties": false
  28107. }
  28108. },
  28109. "required": ["id", "type", "data"],
  28110. "additionalProperties": false
  28111. },
  28112. "SessionNextPrompted": {
  28113. "type": "object",
  28114. "properties": {
  28115. "id": {
  28116. "type": "string",
  28117. "pattern": "^evt_"
  28118. },
  28119. "metadata": {
  28120. "type": "object"
  28121. },
  28122. "type": {
  28123. "type": "string",
  28124. "enum": ["session.next.prompted"]
  28125. },
  28126. "durable": {
  28127. "type": "object",
  28128. "properties": {
  28129. "aggregateID": {
  28130. "type": "string"
  28131. },
  28132. "seq": {
  28133. "type": "integer"
  28134. },
  28135. "version": {
  28136. "type": "integer"
  28137. }
  28138. },
  28139. "required": ["aggregateID", "seq", "version"],
  28140. "additionalProperties": false
  28141. },
  28142. "location": {
  28143. "$ref": "#/components/schemas/LocationRef"
  28144. },
  28145. "data": {
  28146. "type": "object",
  28147. "properties": {
  28148. "timestamp": {
  28149. "type": "number"
  28150. },
  28151. "sessionID": {
  28152. "type": "string",
  28153. "pattern": "^ses"
  28154. },
  28155. "messageID": {
  28156. "type": "string",
  28157. "pattern": "^msg_"
  28158. },
  28159. "prompt": {
  28160. "$ref": "#/components/schemas/Prompt"
  28161. },
  28162. "delivery": {
  28163. "type": "string",
  28164. "enum": ["steer", "queue"]
  28165. }
  28166. },
  28167. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28168. "additionalProperties": false
  28169. }
  28170. },
  28171. "required": ["id", "type", "data"],
  28172. "additionalProperties": false
  28173. },
  28174. "SessionNextPromptAdmitted": {
  28175. "type": "object",
  28176. "properties": {
  28177. "id": {
  28178. "type": "string",
  28179. "pattern": "^evt_"
  28180. },
  28181. "metadata": {
  28182. "type": "object"
  28183. },
  28184. "type": {
  28185. "type": "string",
  28186. "enum": ["session.next.prompt.admitted"]
  28187. },
  28188. "durable": {
  28189. "type": "object",
  28190. "properties": {
  28191. "aggregateID": {
  28192. "type": "string"
  28193. },
  28194. "seq": {
  28195. "type": "integer"
  28196. },
  28197. "version": {
  28198. "type": "integer"
  28199. }
  28200. },
  28201. "required": ["aggregateID", "seq", "version"],
  28202. "additionalProperties": false
  28203. },
  28204. "location": {
  28205. "$ref": "#/components/schemas/LocationRef"
  28206. },
  28207. "data": {
  28208. "type": "object",
  28209. "properties": {
  28210. "timestamp": {
  28211. "type": "number"
  28212. },
  28213. "sessionID": {
  28214. "type": "string",
  28215. "pattern": "^ses"
  28216. },
  28217. "messageID": {
  28218. "type": "string",
  28219. "pattern": "^msg_"
  28220. },
  28221. "prompt": {
  28222. "$ref": "#/components/schemas/Prompt"
  28223. },
  28224. "delivery": {
  28225. "type": "string",
  28226. "enum": ["steer", "queue"]
  28227. }
  28228. },
  28229. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28230. "additionalProperties": false
  28231. }
  28232. },
  28233. "required": ["id", "type", "data"],
  28234. "additionalProperties": false
  28235. },
  28236. "SessionNextContextUpdated": {
  28237. "type": "object",
  28238. "properties": {
  28239. "id": {
  28240. "type": "string",
  28241. "pattern": "^evt_"
  28242. },
  28243. "metadata": {
  28244. "type": "object"
  28245. },
  28246. "type": {
  28247. "type": "string",
  28248. "enum": ["session.next.context.updated"]
  28249. },
  28250. "durable": {
  28251. "type": "object",
  28252. "properties": {
  28253. "aggregateID": {
  28254. "type": "string"
  28255. },
  28256. "seq": {
  28257. "type": "integer"
  28258. },
  28259. "version": {
  28260. "type": "integer"
  28261. }
  28262. },
  28263. "required": ["aggregateID", "seq", "version"],
  28264. "additionalProperties": false
  28265. },
  28266. "location": {
  28267. "$ref": "#/components/schemas/LocationRef"
  28268. },
  28269. "data": {
  28270. "type": "object",
  28271. "properties": {
  28272. "timestamp": {
  28273. "type": "number"
  28274. },
  28275. "sessionID": {
  28276. "type": "string",
  28277. "pattern": "^ses"
  28278. },
  28279. "messageID": {
  28280. "type": "string",
  28281. "pattern": "^msg_"
  28282. },
  28283. "text": {
  28284. "type": "string"
  28285. }
  28286. },
  28287. "required": ["timestamp", "sessionID", "messageID", "text"],
  28288. "additionalProperties": false
  28289. }
  28290. },
  28291. "required": ["id", "type", "data"],
  28292. "additionalProperties": false
  28293. },
  28294. "SessionNextSynthetic": {
  28295. "type": "object",
  28296. "properties": {
  28297. "id": {
  28298. "type": "string",
  28299. "pattern": "^evt_"
  28300. },
  28301. "metadata": {
  28302. "type": "object"
  28303. },
  28304. "type": {
  28305. "type": "string",
  28306. "enum": ["session.next.synthetic"]
  28307. },
  28308. "durable": {
  28309. "type": "object",
  28310. "properties": {
  28311. "aggregateID": {
  28312. "type": "string"
  28313. },
  28314. "seq": {
  28315. "type": "integer"
  28316. },
  28317. "version": {
  28318. "type": "integer"
  28319. }
  28320. },
  28321. "required": ["aggregateID", "seq", "version"],
  28322. "additionalProperties": false
  28323. },
  28324. "location": {
  28325. "$ref": "#/components/schemas/LocationRef"
  28326. },
  28327. "data": {
  28328. "type": "object",
  28329. "properties": {
  28330. "timestamp": {
  28331. "type": "number"
  28332. },
  28333. "sessionID": {
  28334. "type": "string",
  28335. "pattern": "^ses"
  28336. },
  28337. "messageID": {
  28338. "type": "string",
  28339. "pattern": "^msg_"
  28340. },
  28341. "text": {
  28342. "type": "string"
  28343. }
  28344. },
  28345. "required": ["timestamp", "sessionID", "messageID", "text"],
  28346. "additionalProperties": false
  28347. }
  28348. },
  28349. "required": ["id", "type", "data"],
  28350. "additionalProperties": false
  28351. },
  28352. "SessionNextShellStarted": {
  28353. "type": "object",
  28354. "properties": {
  28355. "id": {
  28356. "type": "string",
  28357. "pattern": "^evt_"
  28358. },
  28359. "metadata": {
  28360. "type": "object"
  28361. },
  28362. "type": {
  28363. "type": "string",
  28364. "enum": ["session.next.shell.started"]
  28365. },
  28366. "durable": {
  28367. "type": "object",
  28368. "properties": {
  28369. "aggregateID": {
  28370. "type": "string"
  28371. },
  28372. "seq": {
  28373. "type": "integer"
  28374. },
  28375. "version": {
  28376. "type": "integer"
  28377. }
  28378. },
  28379. "required": ["aggregateID", "seq", "version"],
  28380. "additionalProperties": false
  28381. },
  28382. "location": {
  28383. "$ref": "#/components/schemas/LocationRef"
  28384. },
  28385. "data": {
  28386. "type": "object",
  28387. "properties": {
  28388. "timestamp": {
  28389. "type": "number"
  28390. },
  28391. "sessionID": {
  28392. "type": "string",
  28393. "pattern": "^ses"
  28394. },
  28395. "messageID": {
  28396. "type": "string",
  28397. "pattern": "^msg_"
  28398. },
  28399. "callID": {
  28400. "type": "string"
  28401. },
  28402. "command": {
  28403. "type": "string"
  28404. }
  28405. },
  28406. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28407. "additionalProperties": false
  28408. }
  28409. },
  28410. "required": ["id", "type", "data"],
  28411. "additionalProperties": false
  28412. },
  28413. "SessionNextShellEnded": {
  28414. "type": "object",
  28415. "properties": {
  28416. "id": {
  28417. "type": "string",
  28418. "pattern": "^evt_"
  28419. },
  28420. "metadata": {
  28421. "type": "object"
  28422. },
  28423. "type": {
  28424. "type": "string",
  28425. "enum": ["session.next.shell.ended"]
  28426. },
  28427. "durable": {
  28428. "type": "object",
  28429. "properties": {
  28430. "aggregateID": {
  28431. "type": "string"
  28432. },
  28433. "seq": {
  28434. "type": "integer"
  28435. },
  28436. "version": {
  28437. "type": "integer"
  28438. }
  28439. },
  28440. "required": ["aggregateID", "seq", "version"],
  28441. "additionalProperties": false
  28442. },
  28443. "location": {
  28444. "$ref": "#/components/schemas/LocationRef"
  28445. },
  28446. "data": {
  28447. "type": "object",
  28448. "properties": {
  28449. "timestamp": {
  28450. "type": "number"
  28451. },
  28452. "sessionID": {
  28453. "type": "string",
  28454. "pattern": "^ses"
  28455. },
  28456. "callID": {
  28457. "type": "string"
  28458. },
  28459. "output": {
  28460. "type": "string"
  28461. }
  28462. },
  28463. "required": ["timestamp", "sessionID", "callID", "output"],
  28464. "additionalProperties": false
  28465. }
  28466. },
  28467. "required": ["id", "type", "data"],
  28468. "additionalProperties": false
  28469. },
  28470. "SessionNextStepStarted": {
  28471. "type": "object",
  28472. "properties": {
  28473. "id": {
  28474. "type": "string",
  28475. "pattern": "^evt_"
  28476. },
  28477. "metadata": {
  28478. "type": "object"
  28479. },
  28480. "type": {
  28481. "type": "string",
  28482. "enum": ["session.next.step.started"]
  28483. },
  28484. "durable": {
  28485. "type": "object",
  28486. "properties": {
  28487. "aggregateID": {
  28488. "type": "string"
  28489. },
  28490. "seq": {
  28491. "type": "integer"
  28492. },
  28493. "version": {
  28494. "type": "integer"
  28495. }
  28496. },
  28497. "required": ["aggregateID", "seq", "version"],
  28498. "additionalProperties": false
  28499. },
  28500. "location": {
  28501. "$ref": "#/components/schemas/LocationRef"
  28502. },
  28503. "data": {
  28504. "type": "object",
  28505. "properties": {
  28506. "timestamp": {
  28507. "type": "number"
  28508. },
  28509. "sessionID": {
  28510. "type": "string",
  28511. "pattern": "^ses"
  28512. },
  28513. "assistantMessageID": {
  28514. "type": "string",
  28515. "pattern": "^msg_"
  28516. },
  28517. "agent": {
  28518. "type": "string"
  28519. },
  28520. "model": {
  28521. "$ref": "#/components/schemas/ModelRef"
  28522. },
  28523. "snapshot": {
  28524. "type": "string"
  28525. }
  28526. },
  28527. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28528. "additionalProperties": false
  28529. }
  28530. },
  28531. "required": ["id", "type", "data"],
  28532. "additionalProperties": false
  28533. },
  28534. "SessionNextStepEnded": {
  28535. "type": "object",
  28536. "properties": {
  28537. "id": {
  28538. "type": "string",
  28539. "pattern": "^evt_"
  28540. },
  28541. "metadata": {
  28542. "type": "object"
  28543. },
  28544. "type": {
  28545. "type": "string",
  28546. "enum": ["session.next.step.ended"]
  28547. },
  28548. "durable": {
  28549. "type": "object",
  28550. "properties": {
  28551. "aggregateID": {
  28552. "type": "string"
  28553. },
  28554. "seq": {
  28555. "type": "integer"
  28556. },
  28557. "version": {
  28558. "type": "integer"
  28559. }
  28560. },
  28561. "required": ["aggregateID", "seq", "version"],
  28562. "additionalProperties": false
  28563. },
  28564. "location": {
  28565. "$ref": "#/components/schemas/LocationRef"
  28566. },
  28567. "data": {
  28568. "type": "object",
  28569. "properties": {
  28570. "timestamp": {
  28571. "type": "number"
  28572. },
  28573. "sessionID": {
  28574. "type": "string",
  28575. "pattern": "^ses"
  28576. },
  28577. "assistantMessageID": {
  28578. "type": "string",
  28579. "pattern": "^msg_"
  28580. },
  28581. "finish": {
  28582. "type": "string"
  28583. },
  28584. "cost": {
  28585. "type": "number"
  28586. },
  28587. "tokens": {
  28588. "type": "object",
  28589. "properties": {
  28590. "input": {
  28591. "type": "number"
  28592. },
  28593. "output": {
  28594. "type": "number"
  28595. },
  28596. "reasoning": {
  28597. "type": "number"
  28598. },
  28599. "cache": {
  28600. "type": "object",
  28601. "properties": {
  28602. "read": {
  28603. "type": "number"
  28604. },
  28605. "write": {
  28606. "type": "number"
  28607. }
  28608. },
  28609. "required": ["read", "write"],
  28610. "additionalProperties": false
  28611. }
  28612. },
  28613. "required": ["input", "output", "reasoning", "cache"],
  28614. "additionalProperties": false
  28615. },
  28616. "snapshot": {
  28617. "type": "string"
  28618. },
  28619. "files": {
  28620. "type": "array",
  28621. "items": {
  28622. "type": "string"
  28623. }
  28624. }
  28625. },
  28626. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28627. "additionalProperties": false
  28628. }
  28629. },
  28630. "required": ["id", "type", "data"],
  28631. "additionalProperties": false
  28632. },
  28633. "SessionNextStepFailed": {
  28634. "type": "object",
  28635. "properties": {
  28636. "id": {
  28637. "type": "string",
  28638. "pattern": "^evt_"
  28639. },
  28640. "metadata": {
  28641. "type": "object"
  28642. },
  28643. "type": {
  28644. "type": "string",
  28645. "enum": ["session.next.step.failed"]
  28646. },
  28647. "durable": {
  28648. "type": "object",
  28649. "properties": {
  28650. "aggregateID": {
  28651. "type": "string"
  28652. },
  28653. "seq": {
  28654. "type": "integer"
  28655. },
  28656. "version": {
  28657. "type": "integer"
  28658. }
  28659. },
  28660. "required": ["aggregateID", "seq", "version"],
  28661. "additionalProperties": false
  28662. },
  28663. "location": {
  28664. "$ref": "#/components/schemas/LocationRef"
  28665. },
  28666. "data": {
  28667. "type": "object",
  28668. "properties": {
  28669. "timestamp": {
  28670. "type": "number"
  28671. },
  28672. "sessionID": {
  28673. "type": "string",
  28674. "pattern": "^ses"
  28675. },
  28676. "assistantMessageID": {
  28677. "type": "string",
  28678. "pattern": "^msg_"
  28679. },
  28680. "error": {
  28681. "$ref": "#/components/schemas/SessionErrorUnknown"
  28682. }
  28683. },
  28684. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28685. "additionalProperties": false
  28686. }
  28687. },
  28688. "required": ["id", "type", "data"],
  28689. "additionalProperties": false
  28690. },
  28691. "SessionNextTextStarted": {
  28692. "type": "object",
  28693. "properties": {
  28694. "id": {
  28695. "type": "string",
  28696. "pattern": "^evt_"
  28697. },
  28698. "metadata": {
  28699. "type": "object"
  28700. },
  28701. "type": {
  28702. "type": "string",
  28703. "enum": ["session.next.text.started"]
  28704. },
  28705. "durable": {
  28706. "type": "object",
  28707. "properties": {
  28708. "aggregateID": {
  28709. "type": "string"
  28710. },
  28711. "seq": {
  28712. "type": "integer"
  28713. },
  28714. "version": {
  28715. "type": "integer"
  28716. }
  28717. },
  28718. "required": ["aggregateID", "seq", "version"],
  28719. "additionalProperties": false
  28720. },
  28721. "location": {
  28722. "$ref": "#/components/schemas/LocationRef"
  28723. },
  28724. "data": {
  28725. "type": "object",
  28726. "properties": {
  28727. "timestamp": {
  28728. "type": "number"
  28729. },
  28730. "sessionID": {
  28731. "type": "string",
  28732. "pattern": "^ses"
  28733. },
  28734. "assistantMessageID": {
  28735. "type": "string",
  28736. "pattern": "^msg_"
  28737. },
  28738. "textID": {
  28739. "type": "string"
  28740. }
  28741. },
  28742. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28743. "additionalProperties": false
  28744. }
  28745. },
  28746. "required": ["id", "type", "data"],
  28747. "additionalProperties": false
  28748. },
  28749. "SessionNextTextEnded": {
  28750. "type": "object",
  28751. "properties": {
  28752. "id": {
  28753. "type": "string",
  28754. "pattern": "^evt_"
  28755. },
  28756. "metadata": {
  28757. "type": "object"
  28758. },
  28759. "type": {
  28760. "type": "string",
  28761. "enum": ["session.next.text.ended"]
  28762. },
  28763. "durable": {
  28764. "type": "object",
  28765. "properties": {
  28766. "aggregateID": {
  28767. "type": "string"
  28768. },
  28769. "seq": {
  28770. "type": "integer"
  28771. },
  28772. "version": {
  28773. "type": "integer"
  28774. }
  28775. },
  28776. "required": ["aggregateID", "seq", "version"],
  28777. "additionalProperties": false
  28778. },
  28779. "location": {
  28780. "$ref": "#/components/schemas/LocationRef"
  28781. },
  28782. "data": {
  28783. "type": "object",
  28784. "properties": {
  28785. "timestamp": {
  28786. "type": "number"
  28787. },
  28788. "sessionID": {
  28789. "type": "string",
  28790. "pattern": "^ses"
  28791. },
  28792. "assistantMessageID": {
  28793. "type": "string",
  28794. "pattern": "^msg_"
  28795. },
  28796. "textID": {
  28797. "type": "string"
  28798. },
  28799. "text": {
  28800. "type": "string"
  28801. }
  28802. },
  28803. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28804. "additionalProperties": false
  28805. }
  28806. },
  28807. "required": ["id", "type", "data"],
  28808. "additionalProperties": false
  28809. },
  28810. "SessionNextToolInputStarted": {
  28811. "type": "object",
  28812. "properties": {
  28813. "id": {
  28814. "type": "string",
  28815. "pattern": "^evt_"
  28816. },
  28817. "metadata": {
  28818. "type": "object"
  28819. },
  28820. "type": {
  28821. "type": "string",
  28822. "enum": ["session.next.tool.input.started"]
  28823. },
  28824. "durable": {
  28825. "type": "object",
  28826. "properties": {
  28827. "aggregateID": {
  28828. "type": "string"
  28829. },
  28830. "seq": {
  28831. "type": "integer"
  28832. },
  28833. "version": {
  28834. "type": "integer"
  28835. }
  28836. },
  28837. "required": ["aggregateID", "seq", "version"],
  28838. "additionalProperties": false
  28839. },
  28840. "location": {
  28841. "$ref": "#/components/schemas/LocationRef"
  28842. },
  28843. "data": {
  28844. "type": "object",
  28845. "properties": {
  28846. "timestamp": {
  28847. "type": "number"
  28848. },
  28849. "sessionID": {
  28850. "type": "string",
  28851. "pattern": "^ses"
  28852. },
  28853. "assistantMessageID": {
  28854. "type": "string",
  28855. "pattern": "^msg_"
  28856. },
  28857. "callID": {
  28858. "type": "string"
  28859. },
  28860. "name": {
  28861. "type": "string"
  28862. }
  28863. },
  28864. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28865. "additionalProperties": false
  28866. }
  28867. },
  28868. "required": ["id", "type", "data"],
  28869. "additionalProperties": false
  28870. },
  28871. "SessionNextToolInputEnded": {
  28872. "type": "object",
  28873. "properties": {
  28874. "id": {
  28875. "type": "string",
  28876. "pattern": "^evt_"
  28877. },
  28878. "metadata": {
  28879. "type": "object"
  28880. },
  28881. "type": {
  28882. "type": "string",
  28883. "enum": ["session.next.tool.input.ended"]
  28884. },
  28885. "durable": {
  28886. "type": "object",
  28887. "properties": {
  28888. "aggregateID": {
  28889. "type": "string"
  28890. },
  28891. "seq": {
  28892. "type": "integer"
  28893. },
  28894. "version": {
  28895. "type": "integer"
  28896. }
  28897. },
  28898. "required": ["aggregateID", "seq", "version"],
  28899. "additionalProperties": false
  28900. },
  28901. "location": {
  28902. "$ref": "#/components/schemas/LocationRef"
  28903. },
  28904. "data": {
  28905. "type": "object",
  28906. "properties": {
  28907. "timestamp": {
  28908. "type": "number"
  28909. },
  28910. "sessionID": {
  28911. "type": "string",
  28912. "pattern": "^ses"
  28913. },
  28914. "assistantMessageID": {
  28915. "type": "string",
  28916. "pattern": "^msg_"
  28917. },
  28918. "callID": {
  28919. "type": "string"
  28920. },
  28921. "text": {
  28922. "type": "string"
  28923. }
  28924. },
  28925. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28926. "additionalProperties": false
  28927. }
  28928. },
  28929. "required": ["id", "type", "data"],
  28930. "additionalProperties": false
  28931. },
  28932. "SessionNextToolCalled": {
  28933. "type": "object",
  28934. "properties": {
  28935. "id": {
  28936. "type": "string",
  28937. "pattern": "^evt_"
  28938. },
  28939. "metadata": {
  28940. "type": "object"
  28941. },
  28942. "type": {
  28943. "type": "string",
  28944. "enum": ["session.next.tool.called"]
  28945. },
  28946. "durable": {
  28947. "type": "object",
  28948. "properties": {
  28949. "aggregateID": {
  28950. "type": "string"
  28951. },
  28952. "seq": {
  28953. "type": "integer"
  28954. },
  28955. "version": {
  28956. "type": "integer"
  28957. }
  28958. },
  28959. "required": ["aggregateID", "seq", "version"],
  28960. "additionalProperties": false
  28961. },
  28962. "location": {
  28963. "$ref": "#/components/schemas/LocationRef"
  28964. },
  28965. "data": {
  28966. "type": "object",
  28967. "properties": {
  28968. "timestamp": {
  28969. "type": "number"
  28970. },
  28971. "sessionID": {
  28972. "type": "string",
  28973. "pattern": "^ses"
  28974. },
  28975. "assistantMessageID": {
  28976. "type": "string",
  28977. "pattern": "^msg_"
  28978. },
  28979. "callID": {
  28980. "type": "string"
  28981. },
  28982. "tool": {
  28983. "type": "string"
  28984. },
  28985. "input": {
  28986. "type": "object"
  28987. },
  28988. "provider": {
  28989. "type": "object",
  28990. "properties": {
  28991. "executed": {
  28992. "type": "boolean"
  28993. },
  28994. "metadata": {
  28995. "$ref": "#/components/schemas/LLMProviderMetadata"
  28996. }
  28997. },
  28998. "required": ["executed"],
  28999. "additionalProperties": false
  29000. }
  29001. },
  29002. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29003. "additionalProperties": false
  29004. }
  29005. },
  29006. "required": ["id", "type", "data"],
  29007. "additionalProperties": false
  29008. },
  29009. "SessionNextToolProgress": {
  29010. "type": "object",
  29011. "properties": {
  29012. "id": {
  29013. "type": "string",
  29014. "pattern": "^evt_"
  29015. },
  29016. "metadata": {
  29017. "type": "object"
  29018. },
  29019. "type": {
  29020. "type": "string",
  29021. "enum": ["session.next.tool.progress"]
  29022. },
  29023. "durable": {
  29024. "type": "object",
  29025. "properties": {
  29026. "aggregateID": {
  29027. "type": "string"
  29028. },
  29029. "seq": {
  29030. "type": "integer"
  29031. },
  29032. "version": {
  29033. "type": "integer"
  29034. }
  29035. },
  29036. "required": ["aggregateID", "seq", "version"],
  29037. "additionalProperties": false
  29038. },
  29039. "location": {
  29040. "$ref": "#/components/schemas/LocationRef"
  29041. },
  29042. "data": {
  29043. "type": "object",
  29044. "properties": {
  29045. "timestamp": {
  29046. "type": "number"
  29047. },
  29048. "sessionID": {
  29049. "type": "string",
  29050. "pattern": "^ses"
  29051. },
  29052. "assistantMessageID": {
  29053. "type": "string",
  29054. "pattern": "^msg_"
  29055. },
  29056. "callID": {
  29057. "type": "string"
  29058. },
  29059. "structured": {
  29060. "type": "object"
  29061. },
  29062. "content": {
  29063. "type": "array",
  29064. "items": {
  29065. "$ref": "#/components/schemas/LLMToolContent"
  29066. }
  29067. }
  29068. },
  29069. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29070. "additionalProperties": false
  29071. }
  29072. },
  29073. "required": ["id", "type", "data"],
  29074. "additionalProperties": false
  29075. },
  29076. "SessionNextToolSuccess": {
  29077. "type": "object",
  29078. "properties": {
  29079. "id": {
  29080. "type": "string",
  29081. "pattern": "^evt_"
  29082. },
  29083. "metadata": {
  29084. "type": "object"
  29085. },
  29086. "type": {
  29087. "type": "string",
  29088. "enum": ["session.next.tool.success"]
  29089. },
  29090. "durable": {
  29091. "type": "object",
  29092. "properties": {
  29093. "aggregateID": {
  29094. "type": "string"
  29095. },
  29096. "seq": {
  29097. "type": "integer"
  29098. },
  29099. "version": {
  29100. "type": "integer"
  29101. }
  29102. },
  29103. "required": ["aggregateID", "seq", "version"],
  29104. "additionalProperties": false
  29105. },
  29106. "location": {
  29107. "$ref": "#/components/schemas/LocationRef"
  29108. },
  29109. "data": {
  29110. "type": "object",
  29111. "properties": {
  29112. "timestamp": {
  29113. "type": "number"
  29114. },
  29115. "sessionID": {
  29116. "type": "string",
  29117. "pattern": "^ses"
  29118. },
  29119. "assistantMessageID": {
  29120. "type": "string",
  29121. "pattern": "^msg_"
  29122. },
  29123. "callID": {
  29124. "type": "string"
  29125. },
  29126. "structured": {
  29127. "type": "object"
  29128. },
  29129. "content": {
  29130. "type": "array",
  29131. "items": {
  29132. "$ref": "#/components/schemas/LLMToolContent"
  29133. }
  29134. },
  29135. "outputPaths": {
  29136. "type": "array",
  29137. "items": {
  29138. "type": "string"
  29139. }
  29140. },
  29141. "result": {},
  29142. "provider": {
  29143. "type": "object",
  29144. "properties": {
  29145. "executed": {
  29146. "type": "boolean"
  29147. },
  29148. "metadata": {
  29149. "$ref": "#/components/schemas/LLMProviderMetadata"
  29150. }
  29151. },
  29152. "required": ["executed"],
  29153. "additionalProperties": false
  29154. }
  29155. },
  29156. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29157. "additionalProperties": false
  29158. }
  29159. },
  29160. "required": ["id", "type", "data"],
  29161. "additionalProperties": false
  29162. },
  29163. "SessionNextToolFailed": {
  29164. "type": "object",
  29165. "properties": {
  29166. "id": {
  29167. "type": "string",
  29168. "pattern": "^evt_"
  29169. },
  29170. "metadata": {
  29171. "type": "object"
  29172. },
  29173. "type": {
  29174. "type": "string",
  29175. "enum": ["session.next.tool.failed"]
  29176. },
  29177. "durable": {
  29178. "type": "object",
  29179. "properties": {
  29180. "aggregateID": {
  29181. "type": "string"
  29182. },
  29183. "seq": {
  29184. "type": "integer"
  29185. },
  29186. "version": {
  29187. "type": "integer"
  29188. }
  29189. },
  29190. "required": ["aggregateID", "seq", "version"],
  29191. "additionalProperties": false
  29192. },
  29193. "location": {
  29194. "$ref": "#/components/schemas/LocationRef"
  29195. },
  29196. "data": {
  29197. "type": "object",
  29198. "properties": {
  29199. "timestamp": {
  29200. "type": "number"
  29201. },
  29202. "sessionID": {
  29203. "type": "string",
  29204. "pattern": "^ses"
  29205. },
  29206. "assistantMessageID": {
  29207. "type": "string",
  29208. "pattern": "^msg_"
  29209. },
  29210. "callID": {
  29211. "type": "string"
  29212. },
  29213. "error": {
  29214. "$ref": "#/components/schemas/SessionErrorUnknown"
  29215. },
  29216. "result": {},
  29217. "provider": {
  29218. "type": "object",
  29219. "properties": {
  29220. "executed": {
  29221. "type": "boolean"
  29222. },
  29223. "metadata": {
  29224. "$ref": "#/components/schemas/LLMProviderMetadata"
  29225. }
  29226. },
  29227. "required": ["executed"],
  29228. "additionalProperties": false
  29229. }
  29230. },
  29231. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29232. "additionalProperties": false
  29233. }
  29234. },
  29235. "required": ["id", "type", "data"],
  29236. "additionalProperties": false
  29237. },
  29238. "SessionNextReasoningStarted": {
  29239. "type": "object",
  29240. "properties": {
  29241. "id": {
  29242. "type": "string",
  29243. "pattern": "^evt_"
  29244. },
  29245. "metadata": {
  29246. "type": "object"
  29247. },
  29248. "type": {
  29249. "type": "string",
  29250. "enum": ["session.next.reasoning.started"]
  29251. },
  29252. "durable": {
  29253. "type": "object",
  29254. "properties": {
  29255. "aggregateID": {
  29256. "type": "string"
  29257. },
  29258. "seq": {
  29259. "type": "integer"
  29260. },
  29261. "version": {
  29262. "type": "integer"
  29263. }
  29264. },
  29265. "required": ["aggregateID", "seq", "version"],
  29266. "additionalProperties": false
  29267. },
  29268. "location": {
  29269. "$ref": "#/components/schemas/LocationRef"
  29270. },
  29271. "data": {
  29272. "type": "object",
  29273. "properties": {
  29274. "timestamp": {
  29275. "type": "number"
  29276. },
  29277. "sessionID": {
  29278. "type": "string",
  29279. "pattern": "^ses"
  29280. },
  29281. "assistantMessageID": {
  29282. "type": "string",
  29283. "pattern": "^msg_"
  29284. },
  29285. "reasoningID": {
  29286. "type": "string"
  29287. },
  29288. "providerMetadata": {
  29289. "$ref": "#/components/schemas/LLMProviderMetadata"
  29290. }
  29291. },
  29292. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29293. "additionalProperties": false
  29294. }
  29295. },
  29296. "required": ["id", "type", "data"],
  29297. "additionalProperties": false
  29298. },
  29299. "SessionNextReasoningEnded": {
  29300. "type": "object",
  29301. "properties": {
  29302. "id": {
  29303. "type": "string",
  29304. "pattern": "^evt_"
  29305. },
  29306. "metadata": {
  29307. "type": "object"
  29308. },
  29309. "type": {
  29310. "type": "string",
  29311. "enum": ["session.next.reasoning.ended"]
  29312. },
  29313. "durable": {
  29314. "type": "object",
  29315. "properties": {
  29316. "aggregateID": {
  29317. "type": "string"
  29318. },
  29319. "seq": {
  29320. "type": "integer"
  29321. },
  29322. "version": {
  29323. "type": "integer"
  29324. }
  29325. },
  29326. "required": ["aggregateID", "seq", "version"],
  29327. "additionalProperties": false
  29328. },
  29329. "location": {
  29330. "$ref": "#/components/schemas/LocationRef"
  29331. },
  29332. "data": {
  29333. "type": "object",
  29334. "properties": {
  29335. "timestamp": {
  29336. "type": "number"
  29337. },
  29338. "sessionID": {
  29339. "type": "string",
  29340. "pattern": "^ses"
  29341. },
  29342. "assistantMessageID": {
  29343. "type": "string",
  29344. "pattern": "^msg_"
  29345. },
  29346. "reasoningID": {
  29347. "type": "string"
  29348. },
  29349. "text": {
  29350. "type": "string"
  29351. },
  29352. "providerMetadata": {
  29353. "$ref": "#/components/schemas/LLMProviderMetadata"
  29354. }
  29355. },
  29356. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29357. "additionalProperties": false
  29358. }
  29359. },
  29360. "required": ["id", "type", "data"],
  29361. "additionalProperties": false
  29362. },
  29363. "SessionNextRetried": {
  29364. "type": "object",
  29365. "properties": {
  29366. "id": {
  29367. "type": "string",
  29368. "pattern": "^evt_"
  29369. },
  29370. "metadata": {
  29371. "type": "object"
  29372. },
  29373. "type": {
  29374. "type": "string",
  29375. "enum": ["session.next.retried"]
  29376. },
  29377. "durable": {
  29378. "type": "object",
  29379. "properties": {
  29380. "aggregateID": {
  29381. "type": "string"
  29382. },
  29383. "seq": {
  29384. "type": "integer"
  29385. },
  29386. "version": {
  29387. "type": "integer"
  29388. }
  29389. },
  29390. "required": ["aggregateID", "seq", "version"],
  29391. "additionalProperties": false
  29392. },
  29393. "location": {
  29394. "$ref": "#/components/schemas/LocationRef"
  29395. },
  29396. "data": {
  29397. "type": "object",
  29398. "properties": {
  29399. "timestamp": {
  29400. "type": "number"
  29401. },
  29402. "sessionID": {
  29403. "type": "string",
  29404. "pattern": "^ses"
  29405. },
  29406. "attempt": {
  29407. "type": "number"
  29408. },
  29409. "error": {
  29410. "$ref": "#/components/schemas/SessionNextRetry_error"
  29411. }
  29412. },
  29413. "required": ["timestamp", "sessionID", "attempt", "error"],
  29414. "additionalProperties": false
  29415. }
  29416. },
  29417. "required": ["id", "type", "data"],
  29418. "additionalProperties": false
  29419. },
  29420. "SessionNextCompactionStarted": {
  29421. "type": "object",
  29422. "properties": {
  29423. "id": {
  29424. "type": "string",
  29425. "pattern": "^evt_"
  29426. },
  29427. "metadata": {
  29428. "type": "object"
  29429. },
  29430. "type": {
  29431. "type": "string",
  29432. "enum": ["session.next.compaction.started"]
  29433. },
  29434. "durable": {
  29435. "type": "object",
  29436. "properties": {
  29437. "aggregateID": {
  29438. "type": "string"
  29439. },
  29440. "seq": {
  29441. "type": "integer"
  29442. },
  29443. "version": {
  29444. "type": "integer"
  29445. }
  29446. },
  29447. "required": ["aggregateID", "seq", "version"],
  29448. "additionalProperties": false
  29449. },
  29450. "location": {
  29451. "$ref": "#/components/schemas/LocationRef"
  29452. },
  29453. "data": {
  29454. "type": "object",
  29455. "properties": {
  29456. "timestamp": {
  29457. "type": "number"
  29458. },
  29459. "sessionID": {
  29460. "type": "string",
  29461. "pattern": "^ses"
  29462. },
  29463. "messageID": {
  29464. "type": "string",
  29465. "pattern": "^msg_"
  29466. },
  29467. "reason": {
  29468. "type": "string",
  29469. "enum": ["auto", "manual"]
  29470. }
  29471. },
  29472. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29473. "additionalProperties": false
  29474. }
  29475. },
  29476. "required": ["id", "type", "data"],
  29477. "additionalProperties": false
  29478. },
  29479. "SessionNextCompactionEnded": {
  29480. "type": "object",
  29481. "properties": {
  29482. "id": {
  29483. "type": "string",
  29484. "pattern": "^evt_"
  29485. },
  29486. "metadata": {
  29487. "type": "object"
  29488. },
  29489. "type": {
  29490. "type": "string",
  29491. "enum": ["session.next.compaction.ended"]
  29492. },
  29493. "durable": {
  29494. "type": "object",
  29495. "properties": {
  29496. "aggregateID": {
  29497. "type": "string"
  29498. },
  29499. "seq": {
  29500. "type": "integer"
  29501. },
  29502. "version": {
  29503. "type": "integer"
  29504. }
  29505. },
  29506. "required": ["aggregateID", "seq", "version"],
  29507. "additionalProperties": false
  29508. },
  29509. "location": {
  29510. "$ref": "#/components/schemas/LocationRef"
  29511. },
  29512. "data": {
  29513. "type": "object",
  29514. "properties": {
  29515. "timestamp": {
  29516. "type": "number"
  29517. },
  29518. "sessionID": {
  29519. "type": "string",
  29520. "pattern": "^ses"
  29521. },
  29522. "messageID": {
  29523. "type": "string",
  29524. "pattern": "^msg_"
  29525. },
  29526. "reason": {
  29527. "type": "string",
  29528. "enum": ["auto", "manual"]
  29529. },
  29530. "text": {
  29531. "type": "string"
  29532. },
  29533. "recent": {
  29534. "type": "string"
  29535. }
  29536. },
  29537. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29538. "additionalProperties": false
  29539. }
  29540. },
  29541. "required": ["id", "type", "data"],
  29542. "additionalProperties": false
  29543. },
  29544. "SessionNextRevertStaged": {
  29545. "type": "object",
  29546. "properties": {
  29547. "id": {
  29548. "type": "string",
  29549. "pattern": "^evt_"
  29550. },
  29551. "metadata": {
  29552. "type": "object"
  29553. },
  29554. "type": {
  29555. "type": "string",
  29556. "enum": ["session.next.revert.staged"]
  29557. },
  29558. "durable": {
  29559. "type": "object",
  29560. "properties": {
  29561. "aggregateID": {
  29562. "type": "string"
  29563. },
  29564. "seq": {
  29565. "type": "integer"
  29566. },
  29567. "version": {
  29568. "type": "integer"
  29569. }
  29570. },
  29571. "required": ["aggregateID", "seq", "version"],
  29572. "additionalProperties": false
  29573. },
  29574. "location": {
  29575. "$ref": "#/components/schemas/LocationRef"
  29576. },
  29577. "data": {
  29578. "type": "object",
  29579. "properties": {
  29580. "timestamp": {
  29581. "type": "number"
  29582. },
  29583. "sessionID": {
  29584. "type": "string",
  29585. "pattern": "^ses"
  29586. },
  29587. "revert": {
  29588. "$ref": "#/components/schemas/RevertState"
  29589. }
  29590. },
  29591. "required": ["timestamp", "sessionID", "revert"],
  29592. "additionalProperties": false
  29593. }
  29594. },
  29595. "required": ["id", "type", "data"],
  29596. "additionalProperties": false
  29597. },
  29598. "SessionNextRevertCleared": {
  29599. "type": "object",
  29600. "properties": {
  29601. "id": {
  29602. "type": "string",
  29603. "pattern": "^evt_"
  29604. },
  29605. "metadata": {
  29606. "type": "object"
  29607. },
  29608. "type": {
  29609. "type": "string",
  29610. "enum": ["session.next.revert.cleared"]
  29611. },
  29612. "durable": {
  29613. "type": "object",
  29614. "properties": {
  29615. "aggregateID": {
  29616. "type": "string"
  29617. },
  29618. "seq": {
  29619. "type": "integer"
  29620. },
  29621. "version": {
  29622. "type": "integer"
  29623. }
  29624. },
  29625. "required": ["aggregateID", "seq", "version"],
  29626. "additionalProperties": false
  29627. },
  29628. "location": {
  29629. "$ref": "#/components/schemas/LocationRef"
  29630. },
  29631. "data": {
  29632. "type": "object",
  29633. "properties": {
  29634. "timestamp": {
  29635. "type": "number"
  29636. },
  29637. "sessionID": {
  29638. "type": "string",
  29639. "pattern": "^ses"
  29640. }
  29641. },
  29642. "required": ["timestamp", "sessionID"],
  29643. "additionalProperties": false
  29644. }
  29645. },
  29646. "required": ["id", "type", "data"],
  29647. "additionalProperties": false
  29648. },
  29649. "SessionNextRevertCommitted": {
  29650. "type": "object",
  29651. "properties": {
  29652. "id": {
  29653. "type": "string",
  29654. "pattern": "^evt_"
  29655. },
  29656. "metadata": {
  29657. "type": "object"
  29658. },
  29659. "type": {
  29660. "type": "string",
  29661. "enum": ["session.next.revert.committed"]
  29662. },
  29663. "durable": {
  29664. "type": "object",
  29665. "properties": {
  29666. "aggregateID": {
  29667. "type": "string"
  29668. },
  29669. "seq": {
  29670. "type": "integer"
  29671. },
  29672. "version": {
  29673. "type": "integer"
  29674. }
  29675. },
  29676. "required": ["aggregateID", "seq", "version"],
  29677. "additionalProperties": false
  29678. },
  29679. "location": {
  29680. "$ref": "#/components/schemas/LocationRef"
  29681. },
  29682. "data": {
  29683. "type": "object",
  29684. "properties": {
  29685. "timestamp": {
  29686. "type": "number"
  29687. },
  29688. "sessionID": {
  29689. "type": "string",
  29690. "pattern": "^ses"
  29691. },
  29692. "messageID": {
  29693. "type": "string",
  29694. "pattern": "^msg_"
  29695. }
  29696. },
  29697. "required": ["timestamp", "sessionID", "messageID"],
  29698. "additionalProperties": false
  29699. }
  29700. },
  29701. "required": ["id", "type", "data"],
  29702. "additionalProperties": false
  29703. },
  29704. "ModelApi": {
  29705. "anyOf": [
  29706. {
  29707. "type": "object",
  29708. "properties": {
  29709. "id": {
  29710. "type": "string"
  29711. },
  29712. "type": {
  29713. "type": "string",
  29714. "enum": ["aisdk"]
  29715. },
  29716. "package": {
  29717. "type": "string"
  29718. },
  29719. "url": {
  29720. "type": "string"
  29721. },
  29722. "settings": {
  29723. "type": "object"
  29724. }
  29725. },
  29726. "required": ["id", "type", "package"],
  29727. "additionalProperties": false
  29728. },
  29729. {
  29730. "type": "object",
  29731. "properties": {
  29732. "id": {
  29733. "type": "string"
  29734. },
  29735. "type": {
  29736. "type": "string",
  29737. "enum": ["native"]
  29738. },
  29739. "url": {
  29740. "type": "string"
  29741. },
  29742. "settings": {
  29743. "type": "object"
  29744. }
  29745. },
  29746. "required": ["id", "type", "settings"],
  29747. "additionalProperties": false
  29748. }
  29749. ]
  29750. },
  29751. "ModelCapabilities": {
  29752. "type": "object",
  29753. "properties": {
  29754. "tools": {
  29755. "type": "boolean"
  29756. },
  29757. "input": {
  29758. "type": "array",
  29759. "items": {
  29760. "type": "string"
  29761. }
  29762. },
  29763. "output": {
  29764. "type": "array",
  29765. "items": {
  29766. "type": "string"
  29767. }
  29768. }
  29769. },
  29770. "required": ["tools", "input", "output"],
  29771. "additionalProperties": false
  29772. },
  29773. "ModelCost": {
  29774. "type": "object",
  29775. "properties": {
  29776. "tier": {
  29777. "type": "object",
  29778. "properties": {
  29779. "type": {
  29780. "type": "string",
  29781. "enum": ["context"]
  29782. },
  29783. "size": {
  29784. "type": "integer"
  29785. }
  29786. },
  29787. "required": ["type", "size"],
  29788. "additionalProperties": false
  29789. },
  29790. "input": {
  29791. "type": "number"
  29792. },
  29793. "output": {
  29794. "type": "number"
  29795. },
  29796. "cache": {
  29797. "type": "object",
  29798. "properties": {
  29799. "read": {
  29800. "type": "number"
  29801. },
  29802. "write": {
  29803. "type": "number"
  29804. }
  29805. },
  29806. "required": ["read", "write"],
  29807. "additionalProperties": false
  29808. }
  29809. },
  29810. "required": ["input", "output", "cache"],
  29811. "additionalProperties": false
  29812. },
  29813. "ModelV2Info": {
  29814. "type": "object",
  29815. "properties": {
  29816. "id": {
  29817. "type": "string"
  29818. },
  29819. "providerID": {
  29820. "type": "string"
  29821. },
  29822. "family": {
  29823. "type": "string"
  29824. },
  29825. "name": {
  29826. "type": "string"
  29827. },
  29828. "api": {
  29829. "$ref": "#/components/schemas/ModelApi"
  29830. },
  29831. "capabilities": {
  29832. "$ref": "#/components/schemas/ModelCapabilities"
  29833. },
  29834. "request": {
  29835. "type": "object",
  29836. "properties": {
  29837. "headers": {
  29838. "type": "object",
  29839. "additionalProperties": {
  29840. "type": "string"
  29841. }
  29842. },
  29843. "body": {
  29844. "type": "object"
  29845. },
  29846. "variant": {
  29847. "type": "string"
  29848. }
  29849. },
  29850. "required": ["headers", "body"],
  29851. "additionalProperties": false
  29852. },
  29853. "variants": {
  29854. "type": "array",
  29855. "items": {
  29856. "type": "object",
  29857. "properties": {
  29858. "id": {
  29859. "type": "string"
  29860. },
  29861. "headers": {
  29862. "type": "object",
  29863. "additionalProperties": {
  29864. "type": "string"
  29865. }
  29866. },
  29867. "body": {
  29868. "type": "object"
  29869. }
  29870. },
  29871. "required": ["id", "headers", "body"],
  29872. "additionalProperties": false
  29873. }
  29874. },
  29875. "time": {
  29876. "type": "object",
  29877. "properties": {
  29878. "released": {
  29879. "type": "number"
  29880. }
  29881. },
  29882. "required": ["released"],
  29883. "additionalProperties": false
  29884. },
  29885. "cost": {
  29886. "type": "array",
  29887. "items": {
  29888. "$ref": "#/components/schemas/ModelCost"
  29889. }
  29890. },
  29891. "status": {
  29892. "type": "string",
  29893. "enum": ["alpha", "beta", "deprecated", "active"]
  29894. },
  29895. "enabled": {
  29896. "type": "boolean"
  29897. },
  29898. "limit": {
  29899. "type": "object",
  29900. "properties": {
  29901. "context": {
  29902. "type": "integer"
  29903. },
  29904. "input": {
  29905. "type": "integer"
  29906. },
  29907. "output": {
  29908. "type": "integer"
  29909. }
  29910. },
  29911. "required": ["context", "output"],
  29912. "additionalProperties": false
  29913. }
  29914. },
  29915. "required": [
  29916. "id",
  29917. "providerID",
  29918. "name",
  29919. "api",
  29920. "capabilities",
  29921. "request",
  29922. "variants",
  29923. "time",
  29924. "cost",
  29925. "status",
  29926. "enabled",
  29927. "limit"
  29928. ],
  29929. "additionalProperties": false
  29930. },
  29931. "ProviderAISDK": {
  29932. "type": "object",
  29933. "properties": {
  29934. "type": {
  29935. "type": "string",
  29936. "enum": ["aisdk"]
  29937. },
  29938. "package": {
  29939. "type": "string"
  29940. },
  29941. "url": {
  29942. "type": "string"
  29943. },
  29944. "settings": {
  29945. "type": "object"
  29946. }
  29947. },
  29948. "required": ["type", "package"],
  29949. "additionalProperties": false
  29950. },
  29951. "ProviderNative": {
  29952. "type": "object",
  29953. "properties": {
  29954. "type": {
  29955. "type": "string",
  29956. "enum": ["native"]
  29957. },
  29958. "url": {
  29959. "type": "string"
  29960. },
  29961. "settings": {
  29962. "type": "object"
  29963. }
  29964. },
  29965. "required": ["type", "settings"],
  29966. "additionalProperties": false
  29967. },
  29968. "ProviderApi": {
  29969. "anyOf": [
  29970. {
  29971. "$ref": "#/components/schemas/ProviderAISDK"
  29972. },
  29973. {
  29974. "$ref": "#/components/schemas/ProviderNative"
  29975. }
  29976. ]
  29977. },
  29978. "ProviderV2Info": {
  29979. "type": "object",
  29980. "properties": {
  29981. "id": {
  29982. "type": "string"
  29983. },
  29984. "integrationID": {
  29985. "type": "string"
  29986. },
  29987. "name": {
  29988. "type": "string"
  29989. },
  29990. "disabled": {
  29991. "type": "boolean"
  29992. },
  29993. "api": {
  29994. "$ref": "#/components/schemas/ProviderApi"
  29995. },
  29996. "request": {
  29997. "$ref": "#/components/schemas/ProviderRequest"
  29998. }
  29999. },
  30000. "required": ["id", "name", "api", "request"],
  30001. "additionalProperties": false
  30002. },
  30003. "IntegrationWhen": {
  30004. "type": "object",
  30005. "properties": {
  30006. "key": {
  30007. "type": "string"
  30008. },
  30009. "op": {
  30010. "type": "string",
  30011. "enum": ["eq", "neq"]
  30012. },
  30013. "value": {
  30014. "type": "string"
  30015. }
  30016. },
  30017. "required": ["key", "op", "value"],
  30018. "additionalProperties": false
  30019. },
  30020. "IntegrationTextPrompt": {
  30021. "type": "object",
  30022. "properties": {
  30023. "type": {
  30024. "type": "string",
  30025. "enum": ["text"]
  30026. },
  30027. "key": {
  30028. "type": "string"
  30029. },
  30030. "message": {
  30031. "type": "string"
  30032. },
  30033. "placeholder": {
  30034. "type": "string"
  30035. },
  30036. "when": {
  30037. "$ref": "#/components/schemas/IntegrationWhen"
  30038. }
  30039. },
  30040. "required": ["type", "key", "message"],
  30041. "additionalProperties": false
  30042. },
  30043. "IntegrationSelectPrompt": {
  30044. "type": "object",
  30045. "properties": {
  30046. "type": {
  30047. "type": "string",
  30048. "enum": ["select"]
  30049. },
  30050. "key": {
  30051. "type": "string"
  30052. },
  30053. "message": {
  30054. "type": "string"
  30055. },
  30056. "options": {
  30057. "type": "array",
  30058. "items": {
  30059. "type": "object",
  30060. "properties": {
  30061. "label": {
  30062. "type": "string"
  30063. },
  30064. "value": {
  30065. "type": "string"
  30066. },
  30067. "hint": {
  30068. "type": "string"
  30069. }
  30070. },
  30071. "required": ["label", "value"],
  30072. "additionalProperties": false
  30073. }
  30074. },
  30075. "when": {
  30076. "$ref": "#/components/schemas/IntegrationWhen"
  30077. }
  30078. },
  30079. "required": ["type", "key", "message", "options"],
  30080. "additionalProperties": false
  30081. },
  30082. "IntegrationOAuthMethod": {
  30083. "type": "object",
  30084. "properties": {
  30085. "id": {
  30086. "type": "string"
  30087. },
  30088. "type": {
  30089. "type": "string",
  30090. "enum": ["oauth"]
  30091. },
  30092. "label": {
  30093. "type": "string"
  30094. },
  30095. "prompts": {
  30096. "type": "array",
  30097. "items": {
  30098. "anyOf": [
  30099. {
  30100. "$ref": "#/components/schemas/IntegrationTextPrompt"
  30101. },
  30102. {
  30103. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  30104. }
  30105. ]
  30106. }
  30107. }
  30108. },
  30109. "required": ["id", "type", "label"],
  30110. "additionalProperties": false
  30111. },
  30112. "IntegrationKeyMethod": {
  30113. "type": "object",
  30114. "properties": {
  30115. "type": {
  30116. "type": "string",
  30117. "enum": ["key"]
  30118. },
  30119. "label": {
  30120. "type": "string"
  30121. }
  30122. },
  30123. "required": ["type"],
  30124. "additionalProperties": false
  30125. },
  30126. "IntegrationEnvMethod": {
  30127. "type": "object",
  30128. "properties": {
  30129. "type": {
  30130. "type": "string",
  30131. "enum": ["env"]
  30132. },
  30133. "names": {
  30134. "type": "array",
  30135. "items": {
  30136. "type": "string"
  30137. }
  30138. }
  30139. },
  30140. "required": ["type", "names"],
  30141. "additionalProperties": false
  30142. },
  30143. "ConnectionCredentialInfo": {
  30144. "type": "object",
  30145. "properties": {
  30146. "type": {
  30147. "type": "string",
  30148. "enum": ["credential"]
  30149. },
  30150. "id": {
  30151. "type": "string"
  30152. },
  30153. "label": {
  30154. "type": "string"
  30155. }
  30156. },
  30157. "required": ["type", "id", "label"],
  30158. "additionalProperties": false
  30159. },
  30160. "ConnectionEnvInfo": {
  30161. "type": "object",
  30162. "properties": {
  30163. "type": {
  30164. "type": "string",
  30165. "enum": ["env"]
  30166. },
  30167. "name": {
  30168. "type": "string"
  30169. }
  30170. },
  30171. "required": ["type", "name"],
  30172. "additionalProperties": false
  30173. },
  30174. "ConnectionInfo": {
  30175. "anyOf": [
  30176. {
  30177. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30178. },
  30179. {
  30180. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30181. }
  30182. ]
  30183. },
  30184. "IntegrationInfo": {
  30185. "type": "object",
  30186. "properties": {
  30187. "id": {
  30188. "type": "string"
  30189. },
  30190. "name": {
  30191. "type": "string"
  30192. },
  30193. "methods": {
  30194. "type": "array",
  30195. "items": {
  30196. "$ref": "#/components/schemas/IntegrationMethod"
  30197. }
  30198. },
  30199. "connections": {
  30200. "type": "array",
  30201. "items": {
  30202. "$ref": "#/components/schemas/ConnectionInfo"
  30203. }
  30204. }
  30205. },
  30206. "required": ["id", "name", "methods", "connections"],
  30207. "additionalProperties": false
  30208. },
  30209. "IntegrationAttempt": {
  30210. "type": "object",
  30211. "properties": {
  30212. "attemptID": {
  30213. "type": "string"
  30214. },
  30215. "url": {
  30216. "type": "string"
  30217. },
  30218. "instructions": {
  30219. "type": "string"
  30220. },
  30221. "mode": {
  30222. "type": "string",
  30223. "enum": ["auto", "code"]
  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": ["attemptID", "url", "instructions", "mode", "time"],
  30280. "additionalProperties": false
  30281. },
  30282. "IntegrationAttemptStatus": {
  30283. "anyOf": [
  30284. {
  30285. "type": "object",
  30286. "properties": {
  30287. "status": {
  30288. "type": "string",
  30289. "enum": ["pending"]
  30290. },
  30291. "time": {
  30292. "type": "object",
  30293. "properties": {
  30294. "created": {
  30295. "anyOf": [
  30296. {
  30297. "type": "number"
  30298. },
  30299. {
  30300. "type": "string",
  30301. "enum": ["NaN"]
  30302. },
  30303. {
  30304. "type": "string",
  30305. "enum": ["Infinity"]
  30306. },
  30307. {
  30308. "type": "string",
  30309. "enum": ["-Infinity"]
  30310. },
  30311. {
  30312. "type": "string",
  30313. "enum": ["Infinity", "-Infinity", "NaN"]
  30314. }
  30315. ]
  30316. },
  30317. "expires": {
  30318. "anyOf": [
  30319. {
  30320. "type": "number"
  30321. },
  30322. {
  30323. "type": "string",
  30324. "enum": ["NaN"]
  30325. },
  30326. {
  30327. "type": "string",
  30328. "enum": ["Infinity"]
  30329. },
  30330. {
  30331. "type": "string",
  30332. "enum": ["-Infinity"]
  30333. },
  30334. {
  30335. "type": "string",
  30336. "enum": ["Infinity", "-Infinity", "NaN"]
  30337. }
  30338. ]
  30339. }
  30340. },
  30341. "required": ["created", "expires"],
  30342. "additionalProperties": false
  30343. }
  30344. },
  30345. "required": ["status", "time"],
  30346. "additionalProperties": false
  30347. },
  30348. {
  30349. "type": "object",
  30350. "properties": {
  30351. "status": {
  30352. "type": "string",
  30353. "enum": ["complete"]
  30354. },
  30355. "time": {
  30356. "type": "object",
  30357. "properties": {
  30358. "created": {
  30359. "anyOf": [
  30360. {
  30361. "type": "number"
  30362. },
  30363. {
  30364. "type": "string",
  30365. "enum": ["NaN"]
  30366. },
  30367. {
  30368. "type": "string",
  30369. "enum": ["Infinity"]
  30370. },
  30371. {
  30372. "type": "string",
  30373. "enum": ["-Infinity"]
  30374. },
  30375. {
  30376. "type": "string",
  30377. "enum": ["Infinity", "-Infinity", "NaN"]
  30378. }
  30379. ]
  30380. },
  30381. "expires": {
  30382. "anyOf": [
  30383. {
  30384. "type": "number"
  30385. },
  30386. {
  30387. "type": "string",
  30388. "enum": ["NaN"]
  30389. },
  30390. {
  30391. "type": "string",
  30392. "enum": ["Infinity"]
  30393. },
  30394. {
  30395. "type": "string",
  30396. "enum": ["-Infinity"]
  30397. },
  30398. {
  30399. "type": "string",
  30400. "enum": ["Infinity", "-Infinity", "NaN"]
  30401. }
  30402. ]
  30403. }
  30404. },
  30405. "required": ["created", "expires"],
  30406. "additionalProperties": false
  30407. }
  30408. },
  30409. "required": ["status", "time"],
  30410. "additionalProperties": false
  30411. },
  30412. {
  30413. "type": "object",
  30414. "properties": {
  30415. "status": {
  30416. "type": "string",
  30417. "enum": ["failed"]
  30418. },
  30419. "message": {
  30420. "type": "string"
  30421. },
  30422. "time": {
  30423. "type": "object",
  30424. "properties": {
  30425. "created": {
  30426. "anyOf": [
  30427. {
  30428. "type": "number"
  30429. },
  30430. {
  30431. "type": "string",
  30432. "enum": ["NaN"]
  30433. },
  30434. {
  30435. "type": "string",
  30436. "enum": ["Infinity"]
  30437. },
  30438. {
  30439. "type": "string",
  30440. "enum": ["-Infinity"]
  30441. },
  30442. {
  30443. "type": "string",
  30444. "enum": ["Infinity", "-Infinity", "NaN"]
  30445. }
  30446. ]
  30447. },
  30448. "expires": {
  30449. "anyOf": [
  30450. {
  30451. "type": "number"
  30452. },
  30453. {
  30454. "type": "string",
  30455. "enum": ["NaN"]
  30456. },
  30457. {
  30458. "type": "string",
  30459. "enum": ["Infinity"]
  30460. },
  30461. {
  30462. "type": "string",
  30463. "enum": ["-Infinity"]
  30464. },
  30465. {
  30466. "type": "string",
  30467. "enum": ["Infinity", "-Infinity", "NaN"]
  30468. }
  30469. ]
  30470. }
  30471. },
  30472. "required": ["created", "expires"],
  30473. "additionalProperties": false
  30474. }
  30475. },
  30476. "required": ["status", "message", "time"],
  30477. "additionalProperties": false
  30478. },
  30479. {
  30480. "type": "object",
  30481. "properties": {
  30482. "status": {
  30483. "type": "string",
  30484. "enum": ["expired"]
  30485. },
  30486. "time": {
  30487. "type": "object",
  30488. "properties": {
  30489. "created": {
  30490. "anyOf": [
  30491. {
  30492. "type": "number"
  30493. },
  30494. {
  30495. "type": "string",
  30496. "enum": ["NaN"]
  30497. },
  30498. {
  30499. "type": "string",
  30500. "enum": ["Infinity"]
  30501. },
  30502. {
  30503. "type": "string",
  30504. "enum": ["-Infinity"]
  30505. },
  30506. {
  30507. "type": "string",
  30508. "enum": ["Infinity", "-Infinity", "NaN"]
  30509. }
  30510. ]
  30511. },
  30512. "expires": {
  30513. "anyOf": [
  30514. {
  30515. "type": "number"
  30516. },
  30517. {
  30518. "type": "string",
  30519. "enum": ["NaN"]
  30520. },
  30521. {
  30522. "type": "string",
  30523. "enum": ["Infinity"]
  30524. },
  30525. {
  30526. "type": "string",
  30527. "enum": ["-Infinity"]
  30528. },
  30529. {
  30530. "type": "string",
  30531. "enum": ["Infinity", "-Infinity", "NaN"]
  30532. }
  30533. ]
  30534. }
  30535. },
  30536. "required": ["created", "expires"],
  30537. "additionalProperties": false
  30538. }
  30539. },
  30540. "required": ["status", "time"],
  30541. "additionalProperties": false
  30542. }
  30543. ]
  30544. },
  30545. "PermissionV2Request": {
  30546. "type": "object",
  30547. "properties": {
  30548. "id": {
  30549. "type": "string",
  30550. "pattern": "^per"
  30551. },
  30552. "sessionID": {
  30553. "type": "string",
  30554. "pattern": "^ses"
  30555. },
  30556. "action": {
  30557. "type": "string"
  30558. },
  30559. "resources": {
  30560. "type": "array",
  30561. "items": {
  30562. "type": "string"
  30563. }
  30564. },
  30565. "save": {
  30566. "type": "array",
  30567. "items": {
  30568. "type": "string"
  30569. }
  30570. },
  30571. "metadata": {
  30572. "type": "object"
  30573. },
  30574. "source": {
  30575. "$ref": "#/components/schemas/PermissionV2Source"
  30576. }
  30577. },
  30578. "required": ["id", "sessionID", "action", "resources"],
  30579. "additionalProperties": false
  30580. },
  30581. "PermissionSavedInfo": {
  30582. "type": "object",
  30583. "properties": {
  30584. "id": {
  30585. "type": "string"
  30586. },
  30587. "projectID": {
  30588. "type": "string"
  30589. },
  30590. "action": {
  30591. "type": "string"
  30592. },
  30593. "resource": {
  30594. "type": "string"
  30595. }
  30596. },
  30597. "required": ["id", "projectID", "action", "resource"],
  30598. "additionalProperties": false
  30599. },
  30600. "FileSystemEntry": {
  30601. "type": "object",
  30602. "properties": {
  30603. "path": {
  30604. "type": "string"
  30605. },
  30606. "type": {
  30607. "type": "string",
  30608. "enum": ["file", "directory"]
  30609. }
  30610. },
  30611. "required": ["path", "type"],
  30612. "additionalProperties": false
  30613. },
  30614. "CommandV2Info": {
  30615. "type": "object",
  30616. "properties": {
  30617. "name": {
  30618. "type": "string"
  30619. },
  30620. "template": {
  30621. "type": "string"
  30622. },
  30623. "description": {
  30624. "type": "string"
  30625. },
  30626. "agent": {
  30627. "type": "string"
  30628. },
  30629. "model": {
  30630. "$ref": "#/components/schemas/ModelRef"
  30631. },
  30632. "subtask": {
  30633. "type": "boolean"
  30634. }
  30635. },
  30636. "required": ["name", "template"],
  30637. "additionalProperties": false
  30638. },
  30639. "SkillV2Info": {
  30640. "type": "object",
  30641. "properties": {
  30642. "name": {
  30643. "type": "string"
  30644. },
  30645. "description": {
  30646. "type": "string"
  30647. },
  30648. "slash": {
  30649. "type": "boolean"
  30650. },
  30651. "location": {
  30652. "type": "string"
  30653. },
  30654. "content": {
  30655. "type": "string"
  30656. }
  30657. },
  30658. "required": ["name", "location", "content"],
  30659. "additionalProperties": false
  30660. },
  30661. "Models-devRefreshed": {
  30662. "type": "object",
  30663. "properties": {
  30664. "id": {
  30665. "type": "string",
  30666. "pattern": "^evt_"
  30667. },
  30668. "metadata": {
  30669. "type": "object"
  30670. },
  30671. "type": {
  30672. "type": "string",
  30673. "enum": ["models-dev.refreshed"]
  30674. },
  30675. "durable": {
  30676. "type": "object",
  30677. "properties": {
  30678. "aggregateID": {
  30679. "type": "string"
  30680. },
  30681. "seq": {
  30682. "type": "integer"
  30683. },
  30684. "version": {
  30685. "type": "integer"
  30686. }
  30687. },
  30688. "required": ["aggregateID", "seq", "version"],
  30689. "additionalProperties": false
  30690. },
  30691. "location": {
  30692. "$ref": "#/components/schemas/LocationRef"
  30693. },
  30694. "data": {
  30695. "type": "object",
  30696. "properties": {}
  30697. }
  30698. },
  30699. "required": ["id", "type", "data"],
  30700. "additionalProperties": false
  30701. },
  30702. "IntegrationUpdated": {
  30703. "type": "object",
  30704. "properties": {
  30705. "id": {
  30706. "type": "string",
  30707. "pattern": "^evt_"
  30708. },
  30709. "metadata": {
  30710. "type": "object"
  30711. },
  30712. "type": {
  30713. "type": "string",
  30714. "enum": ["integration.updated"]
  30715. },
  30716. "durable": {
  30717. "type": "object",
  30718. "properties": {
  30719. "aggregateID": {
  30720. "type": "string"
  30721. },
  30722. "seq": {
  30723. "type": "integer"
  30724. },
  30725. "version": {
  30726. "type": "integer"
  30727. }
  30728. },
  30729. "required": ["aggregateID", "seq", "version"],
  30730. "additionalProperties": false
  30731. },
  30732. "location": {
  30733. "$ref": "#/components/schemas/LocationRef"
  30734. },
  30735. "data": {
  30736. "type": "object",
  30737. "properties": {}
  30738. }
  30739. },
  30740. "required": ["id", "type", "data"],
  30741. "additionalProperties": false
  30742. },
  30743. "IntegrationConnectionUpdated": {
  30744. "type": "object",
  30745. "properties": {
  30746. "id": {
  30747. "type": "string",
  30748. "pattern": "^evt_"
  30749. },
  30750. "metadata": {
  30751. "type": "object"
  30752. },
  30753. "type": {
  30754. "type": "string",
  30755. "enum": ["integration.connection.updated"]
  30756. },
  30757. "durable": {
  30758. "type": "object",
  30759. "properties": {
  30760. "aggregateID": {
  30761. "type": "string"
  30762. },
  30763. "seq": {
  30764. "type": "integer"
  30765. },
  30766. "version": {
  30767. "type": "integer"
  30768. }
  30769. },
  30770. "required": ["aggregateID", "seq", "version"],
  30771. "additionalProperties": false
  30772. },
  30773. "location": {
  30774. "$ref": "#/components/schemas/LocationRef"
  30775. },
  30776. "data": {
  30777. "type": "object",
  30778. "properties": {
  30779. "integrationID": {
  30780. "type": "string"
  30781. }
  30782. },
  30783. "required": ["integrationID"],
  30784. "additionalProperties": false
  30785. }
  30786. },
  30787. "required": ["id", "type", "data"],
  30788. "additionalProperties": false
  30789. },
  30790. "CatalogUpdated": {
  30791. "type": "object",
  30792. "properties": {
  30793. "id": {
  30794. "type": "string",
  30795. "pattern": "^evt_"
  30796. },
  30797. "metadata": {
  30798. "type": "object"
  30799. },
  30800. "type": {
  30801. "type": "string",
  30802. "enum": ["catalog.updated"]
  30803. },
  30804. "durable": {
  30805. "type": "object",
  30806. "properties": {
  30807. "aggregateID": {
  30808. "type": "string"
  30809. },
  30810. "seq": {
  30811. "type": "integer"
  30812. },
  30813. "version": {
  30814. "type": "integer"
  30815. }
  30816. },
  30817. "required": ["aggregateID", "seq", "version"],
  30818. "additionalProperties": false
  30819. },
  30820. "location": {
  30821. "$ref": "#/components/schemas/LocationRef"
  30822. },
  30823. "data": {
  30824. "type": "object",
  30825. "properties": {}
  30826. }
  30827. },
  30828. "required": ["id", "type", "data"],
  30829. "additionalProperties": false
  30830. },
  30831. "SessionCreated": {
  30832. "type": "object",
  30833. "properties": {
  30834. "id": {
  30835. "type": "string",
  30836. "pattern": "^evt_"
  30837. },
  30838. "metadata": {
  30839. "type": "object"
  30840. },
  30841. "type": {
  30842. "type": "string",
  30843. "enum": ["session.created"]
  30844. },
  30845. "durable": {
  30846. "type": "object",
  30847. "properties": {
  30848. "aggregateID": {
  30849. "type": "string"
  30850. },
  30851. "seq": {
  30852. "type": "integer"
  30853. },
  30854. "version": {
  30855. "type": "integer"
  30856. }
  30857. },
  30858. "required": ["aggregateID", "seq", "version"],
  30859. "additionalProperties": false
  30860. },
  30861. "location": {
  30862. "$ref": "#/components/schemas/LocationRef"
  30863. },
  30864. "data": {
  30865. "type": "object",
  30866. "properties": {
  30867. "sessionID": {
  30868. "type": "string",
  30869. "pattern": "^ses"
  30870. },
  30871. "info": {
  30872. "$ref": "#/components/schemas/Session"
  30873. }
  30874. },
  30875. "required": ["sessionID", "info"],
  30876. "additionalProperties": false
  30877. }
  30878. },
  30879. "required": ["id", "type", "data"],
  30880. "additionalProperties": false
  30881. },
  30882. "SessionUpdated": {
  30883. "type": "object",
  30884. "properties": {
  30885. "id": {
  30886. "type": "string",
  30887. "pattern": "^evt_"
  30888. },
  30889. "metadata": {
  30890. "type": "object"
  30891. },
  30892. "type": {
  30893. "type": "string",
  30894. "enum": ["session.updated"]
  30895. },
  30896. "durable": {
  30897. "type": "object",
  30898. "properties": {
  30899. "aggregateID": {
  30900. "type": "string"
  30901. },
  30902. "seq": {
  30903. "type": "integer"
  30904. },
  30905. "version": {
  30906. "type": "integer"
  30907. }
  30908. },
  30909. "required": ["aggregateID", "seq", "version"],
  30910. "additionalProperties": false
  30911. },
  30912. "location": {
  30913. "$ref": "#/components/schemas/LocationRef"
  30914. },
  30915. "data": {
  30916. "type": "object",
  30917. "properties": {
  30918. "sessionID": {
  30919. "type": "string",
  30920. "pattern": "^ses"
  30921. },
  30922. "info": {
  30923. "$ref": "#/components/schemas/Session"
  30924. }
  30925. },
  30926. "required": ["sessionID", "info"],
  30927. "additionalProperties": false
  30928. }
  30929. },
  30930. "required": ["id", "type", "data"],
  30931. "additionalProperties": false
  30932. },
  30933. "SessionDeleted": {
  30934. "type": "object",
  30935. "properties": {
  30936. "id": {
  30937. "type": "string",
  30938. "pattern": "^evt_"
  30939. },
  30940. "metadata": {
  30941. "type": "object"
  30942. },
  30943. "type": {
  30944. "type": "string",
  30945. "enum": ["session.deleted"]
  30946. },
  30947. "durable": {
  30948. "type": "object",
  30949. "properties": {
  30950. "aggregateID": {
  30951. "type": "string"
  30952. },
  30953. "seq": {
  30954. "type": "integer"
  30955. },
  30956. "version": {
  30957. "type": "integer"
  30958. }
  30959. },
  30960. "required": ["aggregateID", "seq", "version"],
  30961. "additionalProperties": false
  30962. },
  30963. "location": {
  30964. "$ref": "#/components/schemas/LocationRef"
  30965. },
  30966. "data": {
  30967. "type": "object",
  30968. "properties": {
  30969. "sessionID": {
  30970. "type": "string",
  30971. "pattern": "^ses"
  30972. },
  30973. "info": {
  30974. "$ref": "#/components/schemas/Session"
  30975. }
  30976. },
  30977. "required": ["sessionID", "info"],
  30978. "additionalProperties": false
  30979. }
  30980. },
  30981. "required": ["id", "type", "data"],
  30982. "additionalProperties": false
  30983. },
  30984. "MessageUpdated": {
  30985. "type": "object",
  30986. "properties": {
  30987. "id": {
  30988. "type": "string",
  30989. "pattern": "^evt_"
  30990. },
  30991. "metadata": {
  30992. "type": "object"
  30993. },
  30994. "type": {
  30995. "type": "string",
  30996. "enum": ["message.updated"]
  30997. },
  30998. "durable": {
  30999. "type": "object",
  31000. "properties": {
  31001. "aggregateID": {
  31002. "type": "string"
  31003. },
  31004. "seq": {
  31005. "type": "integer"
  31006. },
  31007. "version": {
  31008. "type": "integer"
  31009. }
  31010. },
  31011. "required": ["aggregateID", "seq", "version"],
  31012. "additionalProperties": false
  31013. },
  31014. "location": {
  31015. "$ref": "#/components/schemas/LocationRef"
  31016. },
  31017. "data": {
  31018. "type": "object",
  31019. "properties": {
  31020. "sessionID": {
  31021. "type": "string",
  31022. "pattern": "^ses"
  31023. },
  31024. "info": {
  31025. "$ref": "#/components/schemas/Message"
  31026. }
  31027. },
  31028. "required": ["sessionID", "info"],
  31029. "additionalProperties": false
  31030. }
  31031. },
  31032. "required": ["id", "type", "data"],
  31033. "additionalProperties": false
  31034. },
  31035. "MessageRemoved": {
  31036. "type": "object",
  31037. "properties": {
  31038. "id": {
  31039. "type": "string",
  31040. "pattern": "^evt_"
  31041. },
  31042. "metadata": {
  31043. "type": "object"
  31044. },
  31045. "type": {
  31046. "type": "string",
  31047. "enum": ["message.removed"]
  31048. },
  31049. "durable": {
  31050. "type": "object",
  31051. "properties": {
  31052. "aggregateID": {
  31053. "type": "string"
  31054. },
  31055. "seq": {
  31056. "type": "integer"
  31057. },
  31058. "version": {
  31059. "type": "integer"
  31060. }
  31061. },
  31062. "required": ["aggregateID", "seq", "version"],
  31063. "additionalProperties": false
  31064. },
  31065. "location": {
  31066. "$ref": "#/components/schemas/LocationRef"
  31067. },
  31068. "data": {
  31069. "type": "object",
  31070. "properties": {
  31071. "sessionID": {
  31072. "type": "string",
  31073. "pattern": "^ses"
  31074. },
  31075. "messageID": {
  31076. "type": "string",
  31077. "pattern": "^msg"
  31078. }
  31079. },
  31080. "required": ["sessionID", "messageID"],
  31081. "additionalProperties": false
  31082. }
  31083. },
  31084. "required": ["id", "type", "data"],
  31085. "additionalProperties": false
  31086. },
  31087. "MessagePartUpdated": {
  31088. "type": "object",
  31089. "properties": {
  31090. "id": {
  31091. "type": "string",
  31092. "pattern": "^evt_"
  31093. },
  31094. "metadata": {
  31095. "type": "object"
  31096. },
  31097. "type": {
  31098. "type": "string",
  31099. "enum": ["message.part.updated"]
  31100. },
  31101. "durable": {
  31102. "type": "object",
  31103. "properties": {
  31104. "aggregateID": {
  31105. "type": "string"
  31106. },
  31107. "seq": {
  31108. "type": "integer"
  31109. },
  31110. "version": {
  31111. "type": "integer"
  31112. }
  31113. },
  31114. "required": ["aggregateID", "seq", "version"],
  31115. "additionalProperties": false
  31116. },
  31117. "location": {
  31118. "$ref": "#/components/schemas/LocationRef"
  31119. },
  31120. "data": {
  31121. "type": "object",
  31122. "properties": {
  31123. "sessionID": {
  31124. "type": "string",
  31125. "pattern": "^ses"
  31126. },
  31127. "part": {
  31128. "$ref": "#/components/schemas/Part"
  31129. },
  31130. "time": {
  31131. "type": "number"
  31132. }
  31133. },
  31134. "required": ["sessionID", "part", "time"],
  31135. "additionalProperties": false
  31136. }
  31137. },
  31138. "required": ["id", "type", "data"],
  31139. "additionalProperties": false
  31140. },
  31141. "MessagePartRemoved": {
  31142. "type": "object",
  31143. "properties": {
  31144. "id": {
  31145. "type": "string",
  31146. "pattern": "^evt_"
  31147. },
  31148. "metadata": {
  31149. "type": "object"
  31150. },
  31151. "type": {
  31152. "type": "string",
  31153. "enum": ["message.part.removed"]
  31154. },
  31155. "durable": {
  31156. "type": "object",
  31157. "properties": {
  31158. "aggregateID": {
  31159. "type": "string"
  31160. },
  31161. "seq": {
  31162. "type": "integer"
  31163. },
  31164. "version": {
  31165. "type": "integer"
  31166. }
  31167. },
  31168. "required": ["aggregateID", "seq", "version"],
  31169. "additionalProperties": false
  31170. },
  31171. "location": {
  31172. "$ref": "#/components/schemas/LocationRef"
  31173. },
  31174. "data": {
  31175. "type": "object",
  31176. "properties": {
  31177. "sessionID": {
  31178. "type": "string",
  31179. "pattern": "^ses"
  31180. },
  31181. "messageID": {
  31182. "type": "string",
  31183. "pattern": "^msg"
  31184. },
  31185. "partID": {
  31186. "type": "string",
  31187. "pattern": "^prt"
  31188. }
  31189. },
  31190. "required": ["sessionID", "messageID", "partID"],
  31191. "additionalProperties": false
  31192. }
  31193. },
  31194. "required": ["id", "type", "data"],
  31195. "additionalProperties": false
  31196. },
  31197. "SessionNextTextDelta": {
  31198. "type": "object",
  31199. "properties": {
  31200. "id": {
  31201. "type": "string",
  31202. "pattern": "^evt_"
  31203. },
  31204. "metadata": {
  31205. "type": "object"
  31206. },
  31207. "type": {
  31208. "type": "string",
  31209. "enum": ["session.next.text.delta"]
  31210. },
  31211. "durable": {
  31212. "type": "object",
  31213. "properties": {
  31214. "aggregateID": {
  31215. "type": "string"
  31216. },
  31217. "seq": {
  31218. "type": "integer"
  31219. },
  31220. "version": {
  31221. "type": "integer"
  31222. }
  31223. },
  31224. "required": ["aggregateID", "seq", "version"],
  31225. "additionalProperties": false
  31226. },
  31227. "location": {
  31228. "$ref": "#/components/schemas/LocationRef"
  31229. },
  31230. "data": {
  31231. "type": "object",
  31232. "properties": {
  31233. "timestamp": {
  31234. "type": "number"
  31235. },
  31236. "sessionID": {
  31237. "type": "string",
  31238. "pattern": "^ses"
  31239. },
  31240. "assistantMessageID": {
  31241. "type": "string",
  31242. "pattern": "^msg_"
  31243. },
  31244. "textID": {
  31245. "type": "string"
  31246. },
  31247. "delta": {
  31248. "type": "string"
  31249. }
  31250. },
  31251. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  31252. "additionalProperties": false
  31253. }
  31254. },
  31255. "required": ["id", "type", "data"],
  31256. "additionalProperties": false
  31257. },
  31258. "SessionNextReasoningDelta": {
  31259. "type": "object",
  31260. "properties": {
  31261. "id": {
  31262. "type": "string",
  31263. "pattern": "^evt_"
  31264. },
  31265. "metadata": {
  31266. "type": "object"
  31267. },
  31268. "type": {
  31269. "type": "string",
  31270. "enum": ["session.next.reasoning.delta"]
  31271. },
  31272. "durable": {
  31273. "type": "object",
  31274. "properties": {
  31275. "aggregateID": {
  31276. "type": "string"
  31277. },
  31278. "seq": {
  31279. "type": "integer"
  31280. },
  31281. "version": {
  31282. "type": "integer"
  31283. }
  31284. },
  31285. "required": ["aggregateID", "seq", "version"],
  31286. "additionalProperties": false
  31287. },
  31288. "location": {
  31289. "$ref": "#/components/schemas/LocationRef"
  31290. },
  31291. "data": {
  31292. "type": "object",
  31293. "properties": {
  31294. "timestamp": {
  31295. "type": "number"
  31296. },
  31297. "sessionID": {
  31298. "type": "string",
  31299. "pattern": "^ses"
  31300. },
  31301. "assistantMessageID": {
  31302. "type": "string",
  31303. "pattern": "^msg_"
  31304. },
  31305. "reasoningID": {
  31306. "type": "string"
  31307. },
  31308. "delta": {
  31309. "type": "string"
  31310. }
  31311. },
  31312. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  31313. "additionalProperties": false
  31314. }
  31315. },
  31316. "required": ["id", "type", "data"],
  31317. "additionalProperties": false
  31318. },
  31319. "SessionNextToolInputDelta": {
  31320. "type": "object",
  31321. "properties": {
  31322. "id": {
  31323. "type": "string",
  31324. "pattern": "^evt_"
  31325. },
  31326. "metadata": {
  31327. "type": "object"
  31328. },
  31329. "type": {
  31330. "type": "string",
  31331. "enum": ["session.next.tool.input.delta"]
  31332. },
  31333. "durable": {
  31334. "type": "object",
  31335. "properties": {
  31336. "aggregateID": {
  31337. "type": "string"
  31338. },
  31339. "seq": {
  31340. "type": "integer"
  31341. },
  31342. "version": {
  31343. "type": "integer"
  31344. }
  31345. },
  31346. "required": ["aggregateID", "seq", "version"],
  31347. "additionalProperties": false
  31348. },
  31349. "location": {
  31350. "$ref": "#/components/schemas/LocationRef"
  31351. },
  31352. "data": {
  31353. "type": "object",
  31354. "properties": {
  31355. "timestamp": {
  31356. "type": "number"
  31357. },
  31358. "sessionID": {
  31359. "type": "string",
  31360. "pattern": "^ses"
  31361. },
  31362. "assistantMessageID": {
  31363. "type": "string",
  31364. "pattern": "^msg_"
  31365. },
  31366. "callID": {
  31367. "type": "string"
  31368. },
  31369. "delta": {
  31370. "type": "string"
  31371. }
  31372. },
  31373. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  31374. "additionalProperties": false
  31375. }
  31376. },
  31377. "required": ["id", "type", "data"],
  31378. "additionalProperties": false
  31379. },
  31380. "SessionNextCompactionDelta": {
  31381. "type": "object",
  31382. "properties": {
  31383. "id": {
  31384. "type": "string",
  31385. "pattern": "^evt_"
  31386. },
  31387. "metadata": {
  31388. "type": "object"
  31389. },
  31390. "type": {
  31391. "type": "string",
  31392. "enum": ["session.next.compaction.delta"]
  31393. },
  31394. "durable": {
  31395. "type": "object",
  31396. "properties": {
  31397. "aggregateID": {
  31398. "type": "string"
  31399. },
  31400. "seq": {
  31401. "type": "integer"
  31402. },
  31403. "version": {
  31404. "type": "integer"
  31405. }
  31406. },
  31407. "required": ["aggregateID", "seq", "version"],
  31408. "additionalProperties": false
  31409. },
  31410. "location": {
  31411. "$ref": "#/components/schemas/LocationRef"
  31412. },
  31413. "data": {
  31414. "type": "object",
  31415. "properties": {
  31416. "timestamp": {
  31417. "type": "number"
  31418. },
  31419. "sessionID": {
  31420. "type": "string",
  31421. "pattern": "^ses"
  31422. },
  31423. "messageID": {
  31424. "type": "string",
  31425. "pattern": "^msg_"
  31426. },
  31427. "text": {
  31428. "type": "string"
  31429. }
  31430. },
  31431. "required": ["timestamp", "sessionID", "messageID", "text"],
  31432. "additionalProperties": false
  31433. }
  31434. },
  31435. "required": ["id", "type", "data"],
  31436. "additionalProperties": false
  31437. },
  31438. "MessagePartDelta": {
  31439. "type": "object",
  31440. "properties": {
  31441. "id": {
  31442. "type": "string",
  31443. "pattern": "^evt_"
  31444. },
  31445. "metadata": {
  31446. "type": "object"
  31447. },
  31448. "type": {
  31449. "type": "string",
  31450. "enum": ["message.part.delta"]
  31451. },
  31452. "durable": {
  31453. "type": "object",
  31454. "properties": {
  31455. "aggregateID": {
  31456. "type": "string"
  31457. },
  31458. "seq": {
  31459. "type": "integer"
  31460. },
  31461. "version": {
  31462. "type": "integer"
  31463. }
  31464. },
  31465. "required": ["aggregateID", "seq", "version"],
  31466. "additionalProperties": false
  31467. },
  31468. "location": {
  31469. "$ref": "#/components/schemas/LocationRef"
  31470. },
  31471. "data": {
  31472. "type": "object",
  31473. "properties": {
  31474. "sessionID": {
  31475. "type": "string",
  31476. "pattern": "^ses"
  31477. },
  31478. "messageID": {
  31479. "type": "string",
  31480. "pattern": "^msg"
  31481. },
  31482. "partID": {
  31483. "type": "string",
  31484. "pattern": "^prt"
  31485. },
  31486. "field": {
  31487. "type": "string"
  31488. },
  31489. "delta": {
  31490. "type": "string"
  31491. }
  31492. },
  31493. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  31494. "additionalProperties": false
  31495. }
  31496. },
  31497. "required": ["id", "type", "data"],
  31498. "additionalProperties": false
  31499. },
  31500. "SessionDiff": {
  31501. "type": "object",
  31502. "properties": {
  31503. "id": {
  31504. "type": "string",
  31505. "pattern": "^evt_"
  31506. },
  31507. "metadata": {
  31508. "type": "object"
  31509. },
  31510. "type": {
  31511. "type": "string",
  31512. "enum": ["session.diff"]
  31513. },
  31514. "durable": {
  31515. "type": "object",
  31516. "properties": {
  31517. "aggregateID": {
  31518. "type": "string"
  31519. },
  31520. "seq": {
  31521. "type": "integer"
  31522. },
  31523. "version": {
  31524. "type": "integer"
  31525. }
  31526. },
  31527. "required": ["aggregateID", "seq", "version"],
  31528. "additionalProperties": false
  31529. },
  31530. "location": {
  31531. "$ref": "#/components/schemas/LocationRef"
  31532. },
  31533. "data": {
  31534. "type": "object",
  31535. "properties": {
  31536. "sessionID": {
  31537. "type": "string",
  31538. "pattern": "^ses"
  31539. },
  31540. "diff": {
  31541. "type": "array",
  31542. "items": {
  31543. "$ref": "#/components/schemas/SnapshotFileDiff"
  31544. }
  31545. }
  31546. },
  31547. "required": ["sessionID", "diff"],
  31548. "additionalProperties": false
  31549. }
  31550. },
  31551. "required": ["id", "type", "data"],
  31552. "additionalProperties": false
  31553. },
  31554. "SessionError": {
  31555. "type": "object",
  31556. "properties": {
  31557. "id": {
  31558. "type": "string",
  31559. "pattern": "^evt_"
  31560. },
  31561. "metadata": {
  31562. "type": "object"
  31563. },
  31564. "type": {
  31565. "type": "string",
  31566. "enum": ["session.error"]
  31567. },
  31568. "durable": {
  31569. "type": "object",
  31570. "properties": {
  31571. "aggregateID": {
  31572. "type": "string"
  31573. },
  31574. "seq": {
  31575. "type": "integer"
  31576. },
  31577. "version": {
  31578. "type": "integer"
  31579. }
  31580. },
  31581. "required": ["aggregateID", "seq", "version"],
  31582. "additionalProperties": false
  31583. },
  31584. "location": {
  31585. "$ref": "#/components/schemas/LocationRef"
  31586. },
  31587. "data": {
  31588. "type": "object",
  31589. "properties": {
  31590. "sessionID": {
  31591. "type": "string",
  31592. "pattern": "^ses"
  31593. },
  31594. "error": {
  31595. "anyOf": [
  31596. {
  31597. "$ref": "#/components/schemas/ProviderAuthError"
  31598. },
  31599. {
  31600. "$ref": "#/components/schemas/UnknownError"
  31601. },
  31602. {
  31603. "$ref": "#/components/schemas/MessageOutputLengthError"
  31604. },
  31605. {
  31606. "$ref": "#/components/schemas/MessageAbortedError"
  31607. },
  31608. {
  31609. "$ref": "#/components/schemas/StructuredOutputError"
  31610. },
  31611. {
  31612. "$ref": "#/components/schemas/ContextOverflowError"
  31613. },
  31614. {
  31615. "$ref": "#/components/schemas/ContentFilterError"
  31616. },
  31617. {
  31618. "$ref": "#/components/schemas/APIError"
  31619. }
  31620. ]
  31621. }
  31622. },
  31623. "additionalProperties": false
  31624. }
  31625. },
  31626. "required": ["id", "type", "data"],
  31627. "additionalProperties": false
  31628. },
  31629. "InstallationUpdated": {
  31630. "type": "object",
  31631. "properties": {
  31632. "id": {
  31633. "type": "string",
  31634. "pattern": "^evt_"
  31635. },
  31636. "metadata": {
  31637. "type": "object"
  31638. },
  31639. "type": {
  31640. "type": "string",
  31641. "enum": ["installation.updated"]
  31642. },
  31643. "durable": {
  31644. "type": "object",
  31645. "properties": {
  31646. "aggregateID": {
  31647. "type": "string"
  31648. },
  31649. "seq": {
  31650. "type": "integer"
  31651. },
  31652. "version": {
  31653. "type": "integer"
  31654. }
  31655. },
  31656. "required": ["aggregateID", "seq", "version"],
  31657. "additionalProperties": false
  31658. },
  31659. "location": {
  31660. "$ref": "#/components/schemas/LocationRef"
  31661. },
  31662. "data": {
  31663. "type": "object",
  31664. "properties": {
  31665. "version": {
  31666. "type": "string"
  31667. }
  31668. },
  31669. "required": ["version"],
  31670. "additionalProperties": false
  31671. }
  31672. },
  31673. "required": ["id", "type", "data"],
  31674. "additionalProperties": false
  31675. },
  31676. "InstallationUpdate-available": {
  31677. "type": "object",
  31678. "properties": {
  31679. "id": {
  31680. "type": "string",
  31681. "pattern": "^evt_"
  31682. },
  31683. "metadata": {
  31684. "type": "object"
  31685. },
  31686. "type": {
  31687. "type": "string",
  31688. "enum": ["installation.update-available"]
  31689. },
  31690. "durable": {
  31691. "type": "object",
  31692. "properties": {
  31693. "aggregateID": {
  31694. "type": "string"
  31695. },
  31696. "seq": {
  31697. "type": "integer"
  31698. },
  31699. "version": {
  31700. "type": "integer"
  31701. }
  31702. },
  31703. "required": ["aggregateID", "seq", "version"],
  31704. "additionalProperties": false
  31705. },
  31706. "location": {
  31707. "$ref": "#/components/schemas/LocationRef"
  31708. },
  31709. "data": {
  31710. "type": "object",
  31711. "properties": {
  31712. "version": {
  31713. "type": "string"
  31714. }
  31715. },
  31716. "required": ["version"],
  31717. "additionalProperties": false
  31718. }
  31719. },
  31720. "required": ["id", "type", "data"],
  31721. "additionalProperties": false
  31722. },
  31723. "FileEdited": {
  31724. "type": "object",
  31725. "properties": {
  31726. "id": {
  31727. "type": "string",
  31728. "pattern": "^evt_"
  31729. },
  31730. "metadata": {
  31731. "type": "object"
  31732. },
  31733. "type": {
  31734. "type": "string",
  31735. "enum": ["file.edited"]
  31736. },
  31737. "durable": {
  31738. "type": "object",
  31739. "properties": {
  31740. "aggregateID": {
  31741. "type": "string"
  31742. },
  31743. "seq": {
  31744. "type": "integer"
  31745. },
  31746. "version": {
  31747. "type": "integer"
  31748. }
  31749. },
  31750. "required": ["aggregateID", "seq", "version"],
  31751. "additionalProperties": false
  31752. },
  31753. "location": {
  31754. "$ref": "#/components/schemas/LocationRef"
  31755. },
  31756. "data": {
  31757. "type": "object",
  31758. "properties": {
  31759. "file": {
  31760. "type": "string"
  31761. }
  31762. },
  31763. "required": ["file"],
  31764. "additionalProperties": false
  31765. }
  31766. },
  31767. "required": ["id", "type", "data"],
  31768. "additionalProperties": false
  31769. },
  31770. "ReferenceUpdated": {
  31771. "type": "object",
  31772. "properties": {
  31773. "id": {
  31774. "type": "string",
  31775. "pattern": "^evt_"
  31776. },
  31777. "metadata": {
  31778. "type": "object"
  31779. },
  31780. "type": {
  31781. "type": "string",
  31782. "enum": ["reference.updated"]
  31783. },
  31784. "durable": {
  31785. "type": "object",
  31786. "properties": {
  31787. "aggregateID": {
  31788. "type": "string"
  31789. },
  31790. "seq": {
  31791. "type": "integer"
  31792. },
  31793. "version": {
  31794. "type": "integer"
  31795. }
  31796. },
  31797. "required": ["aggregateID", "seq", "version"],
  31798. "additionalProperties": false
  31799. },
  31800. "location": {
  31801. "$ref": "#/components/schemas/LocationRef"
  31802. },
  31803. "data": {
  31804. "type": "object",
  31805. "properties": {}
  31806. }
  31807. },
  31808. "required": ["id", "type", "data"],
  31809. "additionalProperties": false
  31810. },
  31811. "PermissionV2Asked": {
  31812. "type": "object",
  31813. "properties": {
  31814. "id": {
  31815. "type": "string",
  31816. "pattern": "^evt_"
  31817. },
  31818. "metadata": {
  31819. "type": "object"
  31820. },
  31821. "type": {
  31822. "type": "string",
  31823. "enum": ["permission.v2.asked"]
  31824. },
  31825. "durable": {
  31826. "type": "object",
  31827. "properties": {
  31828. "aggregateID": {
  31829. "type": "string"
  31830. },
  31831. "seq": {
  31832. "type": "integer"
  31833. },
  31834. "version": {
  31835. "type": "integer"
  31836. }
  31837. },
  31838. "required": ["aggregateID", "seq", "version"],
  31839. "additionalProperties": false
  31840. },
  31841. "location": {
  31842. "$ref": "#/components/schemas/LocationRef"
  31843. },
  31844. "data": {
  31845. "type": "object",
  31846. "properties": {
  31847. "id": {
  31848. "type": "string",
  31849. "pattern": "^per"
  31850. },
  31851. "sessionID": {
  31852. "type": "string",
  31853. "pattern": "^ses"
  31854. },
  31855. "action": {
  31856. "type": "string"
  31857. },
  31858. "resources": {
  31859. "type": "array",
  31860. "items": {
  31861. "type": "string"
  31862. }
  31863. },
  31864. "save": {
  31865. "type": "array",
  31866. "items": {
  31867. "type": "string"
  31868. }
  31869. },
  31870. "metadata": {
  31871. "type": "object"
  31872. },
  31873. "source": {
  31874. "$ref": "#/components/schemas/PermissionV2Source"
  31875. }
  31876. },
  31877. "required": ["id", "sessionID", "action", "resources"],
  31878. "additionalProperties": false
  31879. }
  31880. },
  31881. "required": ["id", "type", "data"],
  31882. "additionalProperties": false
  31883. },
  31884. "PermissionV2Replied": {
  31885. "type": "object",
  31886. "properties": {
  31887. "id": {
  31888. "type": "string",
  31889. "pattern": "^evt_"
  31890. },
  31891. "metadata": {
  31892. "type": "object"
  31893. },
  31894. "type": {
  31895. "type": "string",
  31896. "enum": ["permission.v2.replied"]
  31897. },
  31898. "durable": {
  31899. "type": "object",
  31900. "properties": {
  31901. "aggregateID": {
  31902. "type": "string"
  31903. },
  31904. "seq": {
  31905. "type": "integer"
  31906. },
  31907. "version": {
  31908. "type": "integer"
  31909. }
  31910. },
  31911. "required": ["aggregateID", "seq", "version"],
  31912. "additionalProperties": false
  31913. },
  31914. "location": {
  31915. "$ref": "#/components/schemas/LocationRef"
  31916. },
  31917. "data": {
  31918. "type": "object",
  31919. "properties": {
  31920. "sessionID": {
  31921. "type": "string",
  31922. "pattern": "^ses"
  31923. },
  31924. "requestID": {
  31925. "type": "string",
  31926. "pattern": "^per"
  31927. },
  31928. "reply": {
  31929. "$ref": "#/components/schemas/PermissionV2Reply"
  31930. }
  31931. },
  31932. "required": ["sessionID", "requestID", "reply"],
  31933. "additionalProperties": false
  31934. }
  31935. },
  31936. "required": ["id", "type", "data"],
  31937. "additionalProperties": false
  31938. },
  31939. "PluginAdded": {
  31940. "type": "object",
  31941. "properties": {
  31942. "id": {
  31943. "type": "string",
  31944. "pattern": "^evt_"
  31945. },
  31946. "metadata": {
  31947. "type": "object"
  31948. },
  31949. "type": {
  31950. "type": "string",
  31951. "enum": ["plugin.added"]
  31952. },
  31953. "durable": {
  31954. "type": "object",
  31955. "properties": {
  31956. "aggregateID": {
  31957. "type": "string"
  31958. },
  31959. "seq": {
  31960. "type": "integer"
  31961. },
  31962. "version": {
  31963. "type": "integer"
  31964. }
  31965. },
  31966. "required": ["aggregateID", "seq", "version"],
  31967. "additionalProperties": false
  31968. },
  31969. "location": {
  31970. "$ref": "#/components/schemas/LocationRef"
  31971. },
  31972. "data": {
  31973. "type": "object",
  31974. "properties": {
  31975. "id": {
  31976. "type": "string"
  31977. }
  31978. },
  31979. "required": ["id"],
  31980. "additionalProperties": false
  31981. }
  31982. },
  31983. "required": ["id", "type", "data"],
  31984. "additionalProperties": false
  31985. },
  31986. "ProjectDirectoriesUpdated": {
  31987. "type": "object",
  31988. "properties": {
  31989. "id": {
  31990. "type": "string",
  31991. "pattern": "^evt_"
  31992. },
  31993. "metadata": {
  31994. "type": "object"
  31995. },
  31996. "type": {
  31997. "type": "string",
  31998. "enum": ["project.directories.updated"]
  31999. },
  32000. "durable": {
  32001. "type": "object",
  32002. "properties": {
  32003. "aggregateID": {
  32004. "type": "string"
  32005. },
  32006. "seq": {
  32007. "type": "integer"
  32008. },
  32009. "version": {
  32010. "type": "integer"
  32011. }
  32012. },
  32013. "required": ["aggregateID", "seq", "version"],
  32014. "additionalProperties": false
  32015. },
  32016. "location": {
  32017. "$ref": "#/components/schemas/LocationRef"
  32018. },
  32019. "data": {
  32020. "type": "object",
  32021. "properties": {
  32022. "projectID": {
  32023. "type": "string"
  32024. }
  32025. },
  32026. "required": ["projectID"],
  32027. "additionalProperties": false
  32028. }
  32029. },
  32030. "required": ["id", "type", "data"],
  32031. "additionalProperties": false
  32032. },
  32033. "FileWatcherUpdated": {
  32034. "type": "object",
  32035. "properties": {
  32036. "id": {
  32037. "type": "string",
  32038. "pattern": "^evt_"
  32039. },
  32040. "metadata": {
  32041. "type": "object"
  32042. },
  32043. "type": {
  32044. "type": "string",
  32045. "enum": ["file.watcher.updated"]
  32046. },
  32047. "durable": {
  32048. "type": "object",
  32049. "properties": {
  32050. "aggregateID": {
  32051. "type": "string"
  32052. },
  32053. "seq": {
  32054. "type": "integer"
  32055. },
  32056. "version": {
  32057. "type": "integer"
  32058. }
  32059. },
  32060. "required": ["aggregateID", "seq", "version"],
  32061. "additionalProperties": false
  32062. },
  32063. "location": {
  32064. "$ref": "#/components/schemas/LocationRef"
  32065. },
  32066. "data": {
  32067. "type": "object",
  32068. "properties": {
  32069. "file": {
  32070. "type": "string"
  32071. },
  32072. "event": {
  32073. "type": "string",
  32074. "enum": ["add", "change", "unlink"]
  32075. }
  32076. },
  32077. "required": ["file", "event"],
  32078. "additionalProperties": false
  32079. }
  32080. },
  32081. "required": ["id", "type", "data"],
  32082. "additionalProperties": false
  32083. },
  32084. "PtyCreated": {
  32085. "type": "object",
  32086. "properties": {
  32087. "id": {
  32088. "type": "string",
  32089. "pattern": "^evt_"
  32090. },
  32091. "metadata": {
  32092. "type": "object"
  32093. },
  32094. "type": {
  32095. "type": "string",
  32096. "enum": ["pty.created"]
  32097. },
  32098. "durable": {
  32099. "type": "object",
  32100. "properties": {
  32101. "aggregateID": {
  32102. "type": "string"
  32103. },
  32104. "seq": {
  32105. "type": "integer"
  32106. },
  32107. "version": {
  32108. "type": "integer"
  32109. }
  32110. },
  32111. "required": ["aggregateID", "seq", "version"],
  32112. "additionalProperties": false
  32113. },
  32114. "location": {
  32115. "$ref": "#/components/schemas/LocationRef"
  32116. },
  32117. "data": {
  32118. "type": "object",
  32119. "properties": {
  32120. "info": {
  32121. "$ref": "#/components/schemas/Pty"
  32122. }
  32123. },
  32124. "required": ["info"],
  32125. "additionalProperties": false
  32126. }
  32127. },
  32128. "required": ["id", "type", "data"],
  32129. "additionalProperties": false
  32130. },
  32131. "PtyUpdated": {
  32132. "type": "object",
  32133. "properties": {
  32134. "id": {
  32135. "type": "string",
  32136. "pattern": "^evt_"
  32137. },
  32138. "metadata": {
  32139. "type": "object"
  32140. },
  32141. "type": {
  32142. "type": "string",
  32143. "enum": ["pty.updated"]
  32144. },
  32145. "durable": {
  32146. "type": "object",
  32147. "properties": {
  32148. "aggregateID": {
  32149. "type": "string"
  32150. },
  32151. "seq": {
  32152. "type": "integer"
  32153. },
  32154. "version": {
  32155. "type": "integer"
  32156. }
  32157. },
  32158. "required": ["aggregateID", "seq", "version"],
  32159. "additionalProperties": false
  32160. },
  32161. "location": {
  32162. "$ref": "#/components/schemas/LocationRef"
  32163. },
  32164. "data": {
  32165. "type": "object",
  32166. "properties": {
  32167. "info": {
  32168. "$ref": "#/components/schemas/Pty"
  32169. }
  32170. },
  32171. "required": ["info"],
  32172. "additionalProperties": false
  32173. }
  32174. },
  32175. "required": ["id", "type", "data"],
  32176. "additionalProperties": false
  32177. },
  32178. "PtyExited": {
  32179. "type": "object",
  32180. "properties": {
  32181. "id": {
  32182. "type": "string",
  32183. "pattern": "^evt_"
  32184. },
  32185. "metadata": {
  32186. "type": "object"
  32187. },
  32188. "type": {
  32189. "type": "string",
  32190. "enum": ["pty.exited"]
  32191. },
  32192. "durable": {
  32193. "type": "object",
  32194. "properties": {
  32195. "aggregateID": {
  32196. "type": "string"
  32197. },
  32198. "seq": {
  32199. "type": "integer"
  32200. },
  32201. "version": {
  32202. "type": "integer"
  32203. }
  32204. },
  32205. "required": ["aggregateID", "seq", "version"],
  32206. "additionalProperties": false
  32207. },
  32208. "location": {
  32209. "$ref": "#/components/schemas/LocationRef"
  32210. },
  32211. "data": {
  32212. "type": "object",
  32213. "properties": {
  32214. "id": {
  32215. "type": "string",
  32216. "pattern": "^pty"
  32217. },
  32218. "exitCode": {
  32219. "type": "integer",
  32220. "minimum": 0
  32221. }
  32222. },
  32223. "required": ["id", "exitCode"],
  32224. "additionalProperties": false
  32225. }
  32226. },
  32227. "required": ["id", "type", "data"],
  32228. "additionalProperties": false
  32229. },
  32230. "PtyDeleted": {
  32231. "type": "object",
  32232. "properties": {
  32233. "id": {
  32234. "type": "string",
  32235. "pattern": "^evt_"
  32236. },
  32237. "metadata": {
  32238. "type": "object"
  32239. },
  32240. "type": {
  32241. "type": "string",
  32242. "enum": ["pty.deleted"]
  32243. },
  32244. "durable": {
  32245. "type": "object",
  32246. "properties": {
  32247. "aggregateID": {
  32248. "type": "string"
  32249. },
  32250. "seq": {
  32251. "type": "integer"
  32252. },
  32253. "version": {
  32254. "type": "integer"
  32255. }
  32256. },
  32257. "required": ["aggregateID", "seq", "version"],
  32258. "additionalProperties": false
  32259. },
  32260. "location": {
  32261. "$ref": "#/components/schemas/LocationRef"
  32262. },
  32263. "data": {
  32264. "type": "object",
  32265. "properties": {
  32266. "id": {
  32267. "type": "string",
  32268. "pattern": "^pty"
  32269. }
  32270. },
  32271. "required": ["id"],
  32272. "additionalProperties": false
  32273. }
  32274. },
  32275. "required": ["id", "type", "data"],
  32276. "additionalProperties": false
  32277. },
  32278. "QuestionV2Asked": {
  32279. "type": "object",
  32280. "properties": {
  32281. "id": {
  32282. "type": "string",
  32283. "pattern": "^evt_"
  32284. },
  32285. "metadata": {
  32286. "type": "object"
  32287. },
  32288. "type": {
  32289. "type": "string",
  32290. "enum": ["question.v2.asked"]
  32291. },
  32292. "durable": {
  32293. "type": "object",
  32294. "properties": {
  32295. "aggregateID": {
  32296. "type": "string"
  32297. },
  32298. "seq": {
  32299. "type": "integer"
  32300. },
  32301. "version": {
  32302. "type": "integer"
  32303. }
  32304. },
  32305. "required": ["aggregateID", "seq", "version"],
  32306. "additionalProperties": false
  32307. },
  32308. "location": {
  32309. "$ref": "#/components/schemas/LocationRef"
  32310. },
  32311. "data": {
  32312. "type": "object",
  32313. "properties": {
  32314. "id": {
  32315. "type": "string",
  32316. "pattern": "^que"
  32317. },
  32318. "sessionID": {
  32319. "type": "string",
  32320. "pattern": "^ses"
  32321. },
  32322. "questions": {
  32323. "type": "array",
  32324. "items": {
  32325. "$ref": "#/components/schemas/QuestionV2Info"
  32326. },
  32327. "description": "Questions to ask"
  32328. },
  32329. "tool": {
  32330. "$ref": "#/components/schemas/QuestionV2Tool"
  32331. }
  32332. },
  32333. "required": ["id", "sessionID", "questions"],
  32334. "additionalProperties": false
  32335. }
  32336. },
  32337. "required": ["id", "type", "data"],
  32338. "additionalProperties": false
  32339. },
  32340. "QuestionV2Replied": {
  32341. "type": "object",
  32342. "properties": {
  32343. "id": {
  32344. "type": "string",
  32345. "pattern": "^evt_"
  32346. },
  32347. "metadata": {
  32348. "type": "object"
  32349. },
  32350. "type": {
  32351. "type": "string",
  32352. "enum": ["question.v2.replied"]
  32353. },
  32354. "durable": {
  32355. "type": "object",
  32356. "properties": {
  32357. "aggregateID": {
  32358. "type": "string"
  32359. },
  32360. "seq": {
  32361. "type": "integer"
  32362. },
  32363. "version": {
  32364. "type": "integer"
  32365. }
  32366. },
  32367. "required": ["aggregateID", "seq", "version"],
  32368. "additionalProperties": false
  32369. },
  32370. "location": {
  32371. "$ref": "#/components/schemas/LocationRef"
  32372. },
  32373. "data": {
  32374. "type": "object",
  32375. "properties": {
  32376. "sessionID": {
  32377. "type": "string",
  32378. "pattern": "^ses"
  32379. },
  32380. "requestID": {
  32381. "type": "string",
  32382. "pattern": "^que"
  32383. },
  32384. "answers": {
  32385. "type": "array",
  32386. "items": {
  32387. "$ref": "#/components/schemas/QuestionV2Answer"
  32388. }
  32389. }
  32390. },
  32391. "required": ["sessionID", "requestID", "answers"],
  32392. "additionalProperties": false
  32393. }
  32394. },
  32395. "required": ["id", "type", "data"],
  32396. "additionalProperties": false
  32397. },
  32398. "QuestionV2Rejected": {
  32399. "type": "object",
  32400. "properties": {
  32401. "id": {
  32402. "type": "string",
  32403. "pattern": "^evt_"
  32404. },
  32405. "metadata": {
  32406. "type": "object"
  32407. },
  32408. "type": {
  32409. "type": "string",
  32410. "enum": ["question.v2.rejected"]
  32411. },
  32412. "durable": {
  32413. "type": "object",
  32414. "properties": {
  32415. "aggregateID": {
  32416. "type": "string"
  32417. },
  32418. "seq": {
  32419. "type": "integer"
  32420. },
  32421. "version": {
  32422. "type": "integer"
  32423. }
  32424. },
  32425. "required": ["aggregateID", "seq", "version"],
  32426. "additionalProperties": false
  32427. },
  32428. "location": {
  32429. "$ref": "#/components/schemas/LocationRef"
  32430. },
  32431. "data": {
  32432. "type": "object",
  32433. "properties": {
  32434. "sessionID": {
  32435. "type": "string",
  32436. "pattern": "^ses"
  32437. },
  32438. "requestID": {
  32439. "type": "string",
  32440. "pattern": "^que"
  32441. }
  32442. },
  32443. "required": ["sessionID", "requestID"],
  32444. "additionalProperties": false
  32445. }
  32446. },
  32447. "required": ["id", "type", "data"],
  32448. "additionalProperties": false
  32449. },
  32450. "TodoUpdated": {
  32451. "type": "object",
  32452. "properties": {
  32453. "id": {
  32454. "type": "string",
  32455. "pattern": "^evt_"
  32456. },
  32457. "metadata": {
  32458. "type": "object"
  32459. },
  32460. "type": {
  32461. "type": "string",
  32462. "enum": ["todo.updated"]
  32463. },
  32464. "durable": {
  32465. "type": "object",
  32466. "properties": {
  32467. "aggregateID": {
  32468. "type": "string"
  32469. },
  32470. "seq": {
  32471. "type": "integer"
  32472. },
  32473. "version": {
  32474. "type": "integer"
  32475. }
  32476. },
  32477. "required": ["aggregateID", "seq", "version"],
  32478. "additionalProperties": false
  32479. },
  32480. "location": {
  32481. "$ref": "#/components/schemas/LocationRef"
  32482. },
  32483. "data": {
  32484. "type": "object",
  32485. "properties": {
  32486. "sessionID": {
  32487. "type": "string",
  32488. "pattern": "^ses"
  32489. },
  32490. "todos": {
  32491. "type": "array",
  32492. "items": {
  32493. "$ref": "#/components/schemas/Todo"
  32494. }
  32495. }
  32496. },
  32497. "required": ["sessionID", "todos"],
  32498. "additionalProperties": false
  32499. }
  32500. },
  32501. "required": ["id", "type", "data"],
  32502. "additionalProperties": false
  32503. },
  32504. "LspUpdated": {
  32505. "type": "object",
  32506. "properties": {
  32507. "id": {
  32508. "type": "string",
  32509. "pattern": "^evt_"
  32510. },
  32511. "metadata": {
  32512. "type": "object"
  32513. },
  32514. "type": {
  32515. "type": "string",
  32516. "enum": ["lsp.updated"]
  32517. },
  32518. "durable": {
  32519. "type": "object",
  32520. "properties": {
  32521. "aggregateID": {
  32522. "type": "string"
  32523. },
  32524. "seq": {
  32525. "type": "integer"
  32526. },
  32527. "version": {
  32528. "type": "integer"
  32529. }
  32530. },
  32531. "required": ["aggregateID", "seq", "version"],
  32532. "additionalProperties": false
  32533. },
  32534. "location": {
  32535. "$ref": "#/components/schemas/LocationRef"
  32536. },
  32537. "data": {
  32538. "type": "object",
  32539. "properties": {}
  32540. }
  32541. },
  32542. "required": ["id", "type", "data"],
  32543. "additionalProperties": false
  32544. },
  32545. "PermissionAsked": {
  32546. "type": "object",
  32547. "properties": {
  32548. "id": {
  32549. "type": "string",
  32550. "pattern": "^evt_"
  32551. },
  32552. "metadata": {
  32553. "type": "object"
  32554. },
  32555. "type": {
  32556. "type": "string",
  32557. "enum": ["permission.asked"]
  32558. },
  32559. "durable": {
  32560. "type": "object",
  32561. "properties": {
  32562. "aggregateID": {
  32563. "type": "string"
  32564. },
  32565. "seq": {
  32566. "type": "integer"
  32567. },
  32568. "version": {
  32569. "type": "integer"
  32570. }
  32571. },
  32572. "required": ["aggregateID", "seq", "version"],
  32573. "additionalProperties": false
  32574. },
  32575. "location": {
  32576. "$ref": "#/components/schemas/LocationRef"
  32577. },
  32578. "data": {
  32579. "type": "object",
  32580. "properties": {
  32581. "id": {
  32582. "type": "string",
  32583. "pattern": "^per"
  32584. },
  32585. "sessionID": {
  32586. "type": "string",
  32587. "pattern": "^ses"
  32588. },
  32589. "permission": {
  32590. "type": "string"
  32591. },
  32592. "patterns": {
  32593. "type": "array",
  32594. "items": {
  32595. "type": "string"
  32596. }
  32597. },
  32598. "metadata": {
  32599. "type": "object"
  32600. },
  32601. "always": {
  32602. "type": "array",
  32603. "items": {
  32604. "type": "string"
  32605. }
  32606. },
  32607. "tool": {
  32608. "type": "object",
  32609. "properties": {
  32610. "messageID": {
  32611. "type": "string"
  32612. },
  32613. "callID": {
  32614. "type": "string"
  32615. }
  32616. },
  32617. "required": ["messageID", "callID"],
  32618. "additionalProperties": false
  32619. }
  32620. },
  32621. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  32622. "additionalProperties": false
  32623. }
  32624. },
  32625. "required": ["id", "type", "data"],
  32626. "additionalProperties": false
  32627. },
  32628. "PermissionReplied": {
  32629. "type": "object",
  32630. "properties": {
  32631. "id": {
  32632. "type": "string",
  32633. "pattern": "^evt_"
  32634. },
  32635. "metadata": {
  32636. "type": "object"
  32637. },
  32638. "type": {
  32639. "type": "string",
  32640. "enum": ["permission.replied"]
  32641. },
  32642. "durable": {
  32643. "type": "object",
  32644. "properties": {
  32645. "aggregateID": {
  32646. "type": "string"
  32647. },
  32648. "seq": {
  32649. "type": "integer"
  32650. },
  32651. "version": {
  32652. "type": "integer"
  32653. }
  32654. },
  32655. "required": ["aggregateID", "seq", "version"],
  32656. "additionalProperties": false
  32657. },
  32658. "location": {
  32659. "$ref": "#/components/schemas/LocationRef"
  32660. },
  32661. "data": {
  32662. "type": "object",
  32663. "properties": {
  32664. "sessionID": {
  32665. "type": "string",
  32666. "pattern": "^ses"
  32667. },
  32668. "requestID": {
  32669. "type": "string",
  32670. "pattern": "^per"
  32671. },
  32672. "reply": {
  32673. "type": "string",
  32674. "enum": ["once", "always", "reject"]
  32675. }
  32676. },
  32677. "required": ["sessionID", "requestID", "reply"],
  32678. "additionalProperties": false
  32679. }
  32680. },
  32681. "required": ["id", "type", "data"],
  32682. "additionalProperties": false
  32683. },
  32684. "TuiPromptAppend": {
  32685. "type": "object",
  32686. "properties": {
  32687. "id": {
  32688. "type": "string",
  32689. "pattern": "^evt_"
  32690. },
  32691. "metadata": {
  32692. "type": "object"
  32693. },
  32694. "type": {
  32695. "type": "string",
  32696. "enum": ["tui.prompt.append"]
  32697. },
  32698. "durable": {
  32699. "type": "object",
  32700. "properties": {
  32701. "aggregateID": {
  32702. "type": "string"
  32703. },
  32704. "seq": {
  32705. "type": "integer"
  32706. },
  32707. "version": {
  32708. "type": "integer"
  32709. }
  32710. },
  32711. "required": ["aggregateID", "seq", "version"],
  32712. "additionalProperties": false
  32713. },
  32714. "location": {
  32715. "$ref": "#/components/schemas/LocationRef"
  32716. },
  32717. "data": {
  32718. "type": "object",
  32719. "properties": {
  32720. "text": {
  32721. "type": "string"
  32722. }
  32723. },
  32724. "required": ["text"],
  32725. "additionalProperties": false
  32726. }
  32727. },
  32728. "required": ["id", "type", "data"],
  32729. "additionalProperties": false
  32730. },
  32731. "TuiCommandExecute": {
  32732. "type": "object",
  32733. "properties": {
  32734. "id": {
  32735. "type": "string",
  32736. "pattern": "^evt_"
  32737. },
  32738. "metadata": {
  32739. "type": "object"
  32740. },
  32741. "type": {
  32742. "type": "string",
  32743. "enum": ["tui.command.execute"]
  32744. },
  32745. "durable": {
  32746. "type": "object",
  32747. "properties": {
  32748. "aggregateID": {
  32749. "type": "string"
  32750. },
  32751. "seq": {
  32752. "type": "integer"
  32753. },
  32754. "version": {
  32755. "type": "integer"
  32756. }
  32757. },
  32758. "required": ["aggregateID", "seq", "version"],
  32759. "additionalProperties": false
  32760. },
  32761. "location": {
  32762. "$ref": "#/components/schemas/LocationRef"
  32763. },
  32764. "data": {
  32765. "type": "object",
  32766. "properties": {
  32767. "command": {
  32768. "anyOf": [
  32769. {
  32770. "type": "string",
  32771. "enum": [
  32772. "session.list",
  32773. "session.new",
  32774. "session.share",
  32775. "session.interrupt",
  32776. "session.compact",
  32777. "session.page.up",
  32778. "session.page.down",
  32779. "session.line.up",
  32780. "session.line.down",
  32781. "session.half.page.up",
  32782. "session.half.page.down",
  32783. "session.first",
  32784. "session.last",
  32785. "prompt.clear",
  32786. "prompt.submit",
  32787. "agent.cycle"
  32788. ]
  32789. },
  32790. {
  32791. "type": "string"
  32792. }
  32793. ]
  32794. }
  32795. },
  32796. "required": ["command"],
  32797. "additionalProperties": false
  32798. }
  32799. },
  32800. "required": ["id", "type", "data"],
  32801. "additionalProperties": false
  32802. },
  32803. "TuiToastShow": {
  32804. "type": "object",
  32805. "properties": {
  32806. "id": {
  32807. "type": "string",
  32808. "pattern": "^evt_"
  32809. },
  32810. "metadata": {
  32811. "type": "object"
  32812. },
  32813. "type": {
  32814. "type": "string",
  32815. "enum": ["tui.toast.show"]
  32816. },
  32817. "durable": {
  32818. "type": "object",
  32819. "properties": {
  32820. "aggregateID": {
  32821. "type": "string"
  32822. },
  32823. "seq": {
  32824. "type": "integer"
  32825. },
  32826. "version": {
  32827. "type": "integer"
  32828. }
  32829. },
  32830. "required": ["aggregateID", "seq", "version"],
  32831. "additionalProperties": false
  32832. },
  32833. "location": {
  32834. "$ref": "#/components/schemas/LocationRef"
  32835. },
  32836. "data": {
  32837. "type": "object",
  32838. "properties": {
  32839. "title": {
  32840. "type": "string"
  32841. },
  32842. "message": {
  32843. "type": "string"
  32844. },
  32845. "variant": {
  32846. "type": "string",
  32847. "enum": ["info", "success", "warning", "error"]
  32848. },
  32849. "duration": {
  32850. "type": "integer",
  32851. "exclusiveMinimum": 0
  32852. }
  32853. },
  32854. "required": ["message", "variant"],
  32855. "additionalProperties": false
  32856. }
  32857. },
  32858. "required": ["id", "type", "data"],
  32859. "additionalProperties": false
  32860. },
  32861. "TuiSessionSelect": {
  32862. "type": "object",
  32863. "properties": {
  32864. "id": {
  32865. "type": "string",
  32866. "pattern": "^evt_"
  32867. },
  32868. "metadata": {
  32869. "type": "object"
  32870. },
  32871. "type": {
  32872. "type": "string",
  32873. "enum": ["tui.session.select"]
  32874. },
  32875. "durable": {
  32876. "type": "object",
  32877. "properties": {
  32878. "aggregateID": {
  32879. "type": "string"
  32880. },
  32881. "seq": {
  32882. "type": "integer"
  32883. },
  32884. "version": {
  32885. "type": "integer"
  32886. }
  32887. },
  32888. "required": ["aggregateID", "seq", "version"],
  32889. "additionalProperties": false
  32890. },
  32891. "location": {
  32892. "$ref": "#/components/schemas/LocationRef"
  32893. },
  32894. "data": {
  32895. "type": "object",
  32896. "properties": {
  32897. "sessionID": {
  32898. "type": "string",
  32899. "pattern": "^ses",
  32900. "description": "Session ID to navigate to"
  32901. }
  32902. },
  32903. "required": ["sessionID"],
  32904. "additionalProperties": false
  32905. }
  32906. },
  32907. "required": ["id", "type", "data"],
  32908. "additionalProperties": false
  32909. },
  32910. "McpToolsChanged": {
  32911. "type": "object",
  32912. "properties": {
  32913. "id": {
  32914. "type": "string",
  32915. "pattern": "^evt_"
  32916. },
  32917. "metadata": {
  32918. "type": "object"
  32919. },
  32920. "type": {
  32921. "type": "string",
  32922. "enum": ["mcp.tools.changed"]
  32923. },
  32924. "durable": {
  32925. "type": "object",
  32926. "properties": {
  32927. "aggregateID": {
  32928. "type": "string"
  32929. },
  32930. "seq": {
  32931. "type": "integer"
  32932. },
  32933. "version": {
  32934. "type": "integer"
  32935. }
  32936. },
  32937. "required": ["aggregateID", "seq", "version"],
  32938. "additionalProperties": false
  32939. },
  32940. "location": {
  32941. "$ref": "#/components/schemas/LocationRef"
  32942. },
  32943. "data": {
  32944. "type": "object",
  32945. "properties": {
  32946. "server": {
  32947. "type": "string"
  32948. }
  32949. },
  32950. "required": ["server"],
  32951. "additionalProperties": false
  32952. }
  32953. },
  32954. "required": ["id", "type", "data"],
  32955. "additionalProperties": false
  32956. },
  32957. "McpBrowserOpenFailed": {
  32958. "type": "object",
  32959. "properties": {
  32960. "id": {
  32961. "type": "string",
  32962. "pattern": "^evt_"
  32963. },
  32964. "metadata": {
  32965. "type": "object"
  32966. },
  32967. "type": {
  32968. "type": "string",
  32969. "enum": ["mcp.browser.open.failed"]
  32970. },
  32971. "durable": {
  32972. "type": "object",
  32973. "properties": {
  32974. "aggregateID": {
  32975. "type": "string"
  32976. },
  32977. "seq": {
  32978. "type": "integer"
  32979. },
  32980. "version": {
  32981. "type": "integer"
  32982. }
  32983. },
  32984. "required": ["aggregateID", "seq", "version"],
  32985. "additionalProperties": false
  32986. },
  32987. "location": {
  32988. "$ref": "#/components/schemas/LocationRef"
  32989. },
  32990. "data": {
  32991. "type": "object",
  32992. "properties": {
  32993. "mcpName": {
  32994. "type": "string"
  32995. },
  32996. "url": {
  32997. "type": "string"
  32998. }
  32999. },
  33000. "required": ["mcpName", "url"],
  33001. "additionalProperties": false
  33002. }
  33003. },
  33004. "required": ["id", "type", "data"],
  33005. "additionalProperties": false
  33006. },
  33007. "CommandExecuted": {
  33008. "type": "object",
  33009. "properties": {
  33010. "id": {
  33011. "type": "string",
  33012. "pattern": "^evt_"
  33013. },
  33014. "metadata": {
  33015. "type": "object"
  33016. },
  33017. "type": {
  33018. "type": "string",
  33019. "enum": ["command.executed"]
  33020. },
  33021. "durable": {
  33022. "type": "object",
  33023. "properties": {
  33024. "aggregateID": {
  33025. "type": "string"
  33026. },
  33027. "seq": {
  33028. "type": "integer"
  33029. },
  33030. "version": {
  33031. "type": "integer"
  33032. }
  33033. },
  33034. "required": ["aggregateID", "seq", "version"],
  33035. "additionalProperties": false
  33036. },
  33037. "location": {
  33038. "$ref": "#/components/schemas/LocationRef"
  33039. },
  33040. "data": {
  33041. "type": "object",
  33042. "properties": {
  33043. "name": {
  33044. "type": "string"
  33045. },
  33046. "sessionID": {
  33047. "type": "string",
  33048. "pattern": "^ses"
  33049. },
  33050. "arguments": {
  33051. "type": "string"
  33052. },
  33053. "messageID": {
  33054. "type": "string",
  33055. "pattern": "^msg"
  33056. }
  33057. },
  33058. "required": ["name", "sessionID", "arguments", "messageID"],
  33059. "additionalProperties": false
  33060. }
  33061. },
  33062. "required": ["id", "type", "data"],
  33063. "additionalProperties": false
  33064. },
  33065. "ProjectUpdated": {
  33066. "type": "object",
  33067. "properties": {
  33068. "id": {
  33069. "type": "string",
  33070. "pattern": "^evt_"
  33071. },
  33072. "metadata": {
  33073. "type": "object"
  33074. },
  33075. "type": {
  33076. "type": "string",
  33077. "enum": ["project.updated"]
  33078. },
  33079. "durable": {
  33080. "type": "object",
  33081. "properties": {
  33082. "aggregateID": {
  33083. "type": "string"
  33084. },
  33085. "seq": {
  33086. "type": "integer"
  33087. },
  33088. "version": {
  33089. "type": "integer"
  33090. }
  33091. },
  33092. "required": ["aggregateID", "seq", "version"],
  33093. "additionalProperties": false
  33094. },
  33095. "location": {
  33096. "$ref": "#/components/schemas/LocationRef"
  33097. },
  33098. "data": {
  33099. "type": "object",
  33100. "properties": {
  33101. "id": {
  33102. "type": "string"
  33103. },
  33104. "worktree": {
  33105. "type": "string"
  33106. },
  33107. "vcs": {
  33108. "$ref": "#/components/schemas/ProjectVcs"
  33109. },
  33110. "name": {
  33111. "type": "string"
  33112. },
  33113. "icon": {
  33114. "$ref": "#/components/schemas/ProjectIcon"
  33115. },
  33116. "commands": {
  33117. "$ref": "#/components/schemas/ProjectCommands"
  33118. },
  33119. "time": {
  33120. "$ref": "#/components/schemas/ProjectTime"
  33121. },
  33122. "sandboxes": {
  33123. "type": "array",
  33124. "items": {
  33125. "type": "string"
  33126. }
  33127. }
  33128. },
  33129. "required": ["id", "worktree", "time", "sandboxes"],
  33130. "additionalProperties": false
  33131. }
  33132. },
  33133. "required": ["id", "type", "data"],
  33134. "additionalProperties": false
  33135. },
  33136. "SessionIdle": {
  33137. "type": "object",
  33138. "properties": {
  33139. "id": {
  33140. "type": "string",
  33141. "pattern": "^evt_"
  33142. },
  33143. "metadata": {
  33144. "type": "object"
  33145. },
  33146. "type": {
  33147. "type": "string",
  33148. "enum": ["session.idle"]
  33149. },
  33150. "durable": {
  33151. "type": "object",
  33152. "properties": {
  33153. "aggregateID": {
  33154. "type": "string"
  33155. },
  33156. "seq": {
  33157. "type": "integer"
  33158. },
  33159. "version": {
  33160. "type": "integer"
  33161. }
  33162. },
  33163. "required": ["aggregateID", "seq", "version"],
  33164. "additionalProperties": false
  33165. },
  33166. "location": {
  33167. "$ref": "#/components/schemas/LocationRef"
  33168. },
  33169. "data": {
  33170. "type": "object",
  33171. "properties": {
  33172. "sessionID": {
  33173. "type": "string",
  33174. "pattern": "^ses"
  33175. }
  33176. },
  33177. "required": ["sessionID"],
  33178. "additionalProperties": false
  33179. }
  33180. },
  33181. "required": ["id", "type", "data"],
  33182. "additionalProperties": false
  33183. },
  33184. "QuestionAsked": {
  33185. "type": "object",
  33186. "properties": {
  33187. "id": {
  33188. "type": "string",
  33189. "pattern": "^evt_"
  33190. },
  33191. "metadata": {
  33192. "type": "object"
  33193. },
  33194. "type": {
  33195. "type": "string",
  33196. "enum": ["question.asked"]
  33197. },
  33198. "durable": {
  33199. "type": "object",
  33200. "properties": {
  33201. "aggregateID": {
  33202. "type": "string"
  33203. },
  33204. "seq": {
  33205. "type": "integer"
  33206. },
  33207. "version": {
  33208. "type": "integer"
  33209. }
  33210. },
  33211. "required": ["aggregateID", "seq", "version"],
  33212. "additionalProperties": false
  33213. },
  33214. "location": {
  33215. "$ref": "#/components/schemas/LocationRef"
  33216. },
  33217. "data": {
  33218. "type": "object",
  33219. "properties": {
  33220. "id": {
  33221. "type": "string",
  33222. "pattern": "^que"
  33223. },
  33224. "sessionID": {
  33225. "type": "string",
  33226. "pattern": "^ses"
  33227. },
  33228. "questions": {
  33229. "type": "array",
  33230. "items": {
  33231. "$ref": "#/components/schemas/QuestionInfo"
  33232. },
  33233. "description": "Questions to ask"
  33234. },
  33235. "tool": {
  33236. "$ref": "#/components/schemas/QuestionTool"
  33237. }
  33238. },
  33239. "required": ["id", "sessionID", "questions"],
  33240. "additionalProperties": false
  33241. }
  33242. },
  33243. "required": ["id", "type", "data"],
  33244. "additionalProperties": false
  33245. },
  33246. "SessionCompacted": {
  33247. "type": "object",
  33248. "properties": {
  33249. "id": {
  33250. "type": "string",
  33251. "pattern": "^evt_"
  33252. },
  33253. "metadata": {
  33254. "type": "object"
  33255. },
  33256. "type": {
  33257. "type": "string",
  33258. "enum": ["session.compacted"]
  33259. },
  33260. "durable": {
  33261. "type": "object",
  33262. "properties": {
  33263. "aggregateID": {
  33264. "type": "string"
  33265. },
  33266. "seq": {
  33267. "type": "integer"
  33268. },
  33269. "version": {
  33270. "type": "integer"
  33271. }
  33272. },
  33273. "required": ["aggregateID", "seq", "version"],
  33274. "additionalProperties": false
  33275. },
  33276. "location": {
  33277. "$ref": "#/components/schemas/LocationRef"
  33278. },
  33279. "data": {
  33280. "type": "object",
  33281. "properties": {
  33282. "sessionID": {
  33283. "type": "string",
  33284. "pattern": "^ses"
  33285. }
  33286. },
  33287. "required": ["sessionID"],
  33288. "additionalProperties": false
  33289. }
  33290. },
  33291. "required": ["id", "type", "data"],
  33292. "additionalProperties": false
  33293. },
  33294. "VcsBranchUpdated": {
  33295. "type": "object",
  33296. "properties": {
  33297. "id": {
  33298. "type": "string",
  33299. "pattern": "^evt_"
  33300. },
  33301. "metadata": {
  33302. "type": "object"
  33303. },
  33304. "type": {
  33305. "type": "string",
  33306. "enum": ["vcs.branch.updated"]
  33307. },
  33308. "durable": {
  33309. "type": "object",
  33310. "properties": {
  33311. "aggregateID": {
  33312. "type": "string"
  33313. },
  33314. "seq": {
  33315. "type": "integer"
  33316. },
  33317. "version": {
  33318. "type": "integer"
  33319. }
  33320. },
  33321. "required": ["aggregateID", "seq", "version"],
  33322. "additionalProperties": false
  33323. },
  33324. "location": {
  33325. "$ref": "#/components/schemas/LocationRef"
  33326. },
  33327. "data": {
  33328. "type": "object",
  33329. "properties": {
  33330. "branch": {
  33331. "type": "string"
  33332. }
  33333. },
  33334. "additionalProperties": false
  33335. }
  33336. },
  33337. "required": ["id", "type", "data"],
  33338. "additionalProperties": false
  33339. },
  33340. "WorkspaceReady": {
  33341. "type": "object",
  33342. "properties": {
  33343. "id": {
  33344. "type": "string",
  33345. "pattern": "^evt_"
  33346. },
  33347. "metadata": {
  33348. "type": "object"
  33349. },
  33350. "type": {
  33351. "type": "string",
  33352. "enum": ["workspace.ready"]
  33353. },
  33354. "durable": {
  33355. "type": "object",
  33356. "properties": {
  33357. "aggregateID": {
  33358. "type": "string"
  33359. },
  33360. "seq": {
  33361. "type": "integer"
  33362. },
  33363. "version": {
  33364. "type": "integer"
  33365. }
  33366. },
  33367. "required": ["aggregateID", "seq", "version"],
  33368. "additionalProperties": false
  33369. },
  33370. "location": {
  33371. "$ref": "#/components/schemas/LocationRef"
  33372. },
  33373. "data": {
  33374. "type": "object",
  33375. "properties": {
  33376. "name": {
  33377. "type": "string"
  33378. }
  33379. },
  33380. "required": ["name"],
  33381. "additionalProperties": false
  33382. }
  33383. },
  33384. "required": ["id", "type", "data"],
  33385. "additionalProperties": false
  33386. },
  33387. "WorkspaceFailed": {
  33388. "type": "object",
  33389. "properties": {
  33390. "id": {
  33391. "type": "string",
  33392. "pattern": "^evt_"
  33393. },
  33394. "metadata": {
  33395. "type": "object"
  33396. },
  33397. "type": {
  33398. "type": "string",
  33399. "enum": ["workspace.failed"]
  33400. },
  33401. "durable": {
  33402. "type": "object",
  33403. "properties": {
  33404. "aggregateID": {
  33405. "type": "string"
  33406. },
  33407. "seq": {
  33408. "type": "integer"
  33409. },
  33410. "version": {
  33411. "type": "integer"
  33412. }
  33413. },
  33414. "required": ["aggregateID", "seq", "version"],
  33415. "additionalProperties": false
  33416. },
  33417. "location": {
  33418. "$ref": "#/components/schemas/LocationRef"
  33419. },
  33420. "data": {
  33421. "type": "object",
  33422. "properties": {
  33423. "message": {
  33424. "type": "string"
  33425. }
  33426. },
  33427. "required": ["message"],
  33428. "additionalProperties": false
  33429. }
  33430. },
  33431. "required": ["id", "type", "data"],
  33432. "additionalProperties": false
  33433. },
  33434. "WorkspaceStatus": {
  33435. "type": "object",
  33436. "properties": {
  33437. "id": {
  33438. "type": "string",
  33439. "pattern": "^evt_"
  33440. },
  33441. "metadata": {
  33442. "type": "object"
  33443. },
  33444. "type": {
  33445. "type": "string",
  33446. "enum": ["workspace.status"]
  33447. },
  33448. "durable": {
  33449. "type": "object",
  33450. "properties": {
  33451. "aggregateID": {
  33452. "type": "string"
  33453. },
  33454. "seq": {
  33455. "type": "integer"
  33456. },
  33457. "version": {
  33458. "type": "integer"
  33459. }
  33460. },
  33461. "required": ["aggregateID", "seq", "version"],
  33462. "additionalProperties": false
  33463. },
  33464. "location": {
  33465. "$ref": "#/components/schemas/LocationRef"
  33466. },
  33467. "data": {
  33468. "type": "object",
  33469. "properties": {
  33470. "workspaceID": {
  33471. "type": "string",
  33472. "pattern": "^wrk"
  33473. },
  33474. "status": {
  33475. "type": "string",
  33476. "enum": ["connected", "connecting", "disconnected", "error"]
  33477. }
  33478. },
  33479. "required": ["workspaceID", "status"],
  33480. "additionalProperties": false
  33481. }
  33482. },
  33483. "required": ["id", "type", "data"],
  33484. "additionalProperties": false
  33485. },
  33486. "WorktreeReady": {
  33487. "type": "object",
  33488. "properties": {
  33489. "id": {
  33490. "type": "string",
  33491. "pattern": "^evt_"
  33492. },
  33493. "metadata": {
  33494. "type": "object"
  33495. },
  33496. "type": {
  33497. "type": "string",
  33498. "enum": ["worktree.ready"]
  33499. },
  33500. "durable": {
  33501. "type": "object",
  33502. "properties": {
  33503. "aggregateID": {
  33504. "type": "string"
  33505. },
  33506. "seq": {
  33507. "type": "integer"
  33508. },
  33509. "version": {
  33510. "type": "integer"
  33511. }
  33512. },
  33513. "required": ["aggregateID", "seq", "version"],
  33514. "additionalProperties": false
  33515. },
  33516. "location": {
  33517. "$ref": "#/components/schemas/LocationRef"
  33518. },
  33519. "data": {
  33520. "type": "object",
  33521. "properties": {
  33522. "name": {
  33523. "type": "string"
  33524. },
  33525. "branch": {
  33526. "type": "string"
  33527. }
  33528. },
  33529. "required": ["name"],
  33530. "additionalProperties": false
  33531. }
  33532. },
  33533. "required": ["id", "type", "data"],
  33534. "additionalProperties": false
  33535. },
  33536. "WorktreeFailed": {
  33537. "type": "object",
  33538. "properties": {
  33539. "id": {
  33540. "type": "string",
  33541. "pattern": "^evt_"
  33542. },
  33543. "metadata": {
  33544. "type": "object"
  33545. },
  33546. "type": {
  33547. "type": "string",
  33548. "enum": ["worktree.failed"]
  33549. },
  33550. "durable": {
  33551. "type": "object",
  33552. "properties": {
  33553. "aggregateID": {
  33554. "type": "string"
  33555. },
  33556. "seq": {
  33557. "type": "integer"
  33558. },
  33559. "version": {
  33560. "type": "integer"
  33561. }
  33562. },
  33563. "required": ["aggregateID", "seq", "version"],
  33564. "additionalProperties": false
  33565. },
  33566. "location": {
  33567. "$ref": "#/components/schemas/LocationRef"
  33568. },
  33569. "data": {
  33570. "type": "object",
  33571. "properties": {
  33572. "message": {
  33573. "type": "string"
  33574. }
  33575. },
  33576. "required": ["message"],
  33577. "additionalProperties": false
  33578. }
  33579. },
  33580. "required": ["id", "type", "data"],
  33581. "additionalProperties": false
  33582. },
  33583. "ServerConnected": {
  33584. "type": "object",
  33585. "properties": {
  33586. "id": {
  33587. "type": "string",
  33588. "pattern": "^evt_"
  33589. },
  33590. "metadata": {
  33591. "type": "object"
  33592. },
  33593. "type": {
  33594. "type": "string",
  33595. "enum": ["server.connected"]
  33596. },
  33597. "durable": {
  33598. "type": "object",
  33599. "properties": {
  33600. "aggregateID": {
  33601. "type": "string"
  33602. },
  33603. "seq": {
  33604. "type": "integer"
  33605. },
  33606. "version": {
  33607. "type": "integer"
  33608. }
  33609. },
  33610. "required": ["aggregateID", "seq", "version"],
  33611. "additionalProperties": false
  33612. },
  33613. "location": {
  33614. "$ref": "#/components/schemas/LocationRef"
  33615. },
  33616. "data": {
  33617. "type": "object",
  33618. "properties": {}
  33619. }
  33620. },
  33621. "required": ["id", "type", "data"],
  33622. "additionalProperties": false
  33623. },
  33624. "GlobalDisposed": {
  33625. "type": "object",
  33626. "properties": {
  33627. "id": {
  33628. "type": "string",
  33629. "pattern": "^evt_"
  33630. },
  33631. "metadata": {
  33632. "type": "object"
  33633. },
  33634. "type": {
  33635. "type": "string",
  33636. "enum": ["global.disposed"]
  33637. },
  33638. "durable": {
  33639. "type": "object",
  33640. "properties": {
  33641. "aggregateID": {
  33642. "type": "string"
  33643. },
  33644. "seq": {
  33645. "type": "integer"
  33646. },
  33647. "version": {
  33648. "type": "integer"
  33649. }
  33650. },
  33651. "required": ["aggregateID", "seq", "version"],
  33652. "additionalProperties": false
  33653. },
  33654. "location": {
  33655. "$ref": "#/components/schemas/LocationRef"
  33656. },
  33657. "data": {
  33658. "type": "object",
  33659. "properties": {}
  33660. }
  33661. },
  33662. "required": ["id", "type", "data"],
  33663. "additionalProperties": false
  33664. },
  33665. "QuestionV2Request": {
  33666. "type": "object",
  33667. "properties": {
  33668. "id": {
  33669. "type": "string",
  33670. "pattern": "^que"
  33671. },
  33672. "sessionID": {
  33673. "type": "string",
  33674. "pattern": "^ses"
  33675. },
  33676. "questions": {
  33677. "type": "array",
  33678. "items": {
  33679. "$ref": "#/components/schemas/QuestionV2Info"
  33680. },
  33681. "description": "Questions to ask"
  33682. },
  33683. "tool": {
  33684. "$ref": "#/components/schemas/QuestionV2Tool"
  33685. }
  33686. },
  33687. "required": ["id", "sessionID", "questions"],
  33688. "additionalProperties": false
  33689. },
  33690. "QuestionV2Reply": {
  33691. "type": "object",
  33692. "properties": {
  33693. "answers": {
  33694. "type": "array",
  33695. "items": {
  33696. "$ref": "#/components/schemas/QuestionV2Answer"
  33697. },
  33698. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33699. }
  33700. },
  33701. "required": ["answers"],
  33702. "additionalProperties": false
  33703. },
  33704. "ReferenceLocalSource": {
  33705. "type": "object",
  33706. "properties": {
  33707. "type": {
  33708. "type": "string",
  33709. "enum": ["local"]
  33710. },
  33711. "path": {
  33712. "type": "string"
  33713. },
  33714. "description": {
  33715. "type": "string"
  33716. },
  33717. "hidden": {
  33718. "type": "boolean"
  33719. }
  33720. },
  33721. "required": ["type", "path"],
  33722. "additionalProperties": false
  33723. },
  33724. "ReferenceGitSource": {
  33725. "type": "object",
  33726. "properties": {
  33727. "type": {
  33728. "type": "string",
  33729. "enum": ["git"]
  33730. },
  33731. "repository": {
  33732. "type": "string"
  33733. },
  33734. "branch": {
  33735. "type": "string"
  33736. },
  33737. "description": {
  33738. "type": "string"
  33739. },
  33740. "hidden": {
  33741. "type": "boolean"
  33742. }
  33743. },
  33744. "required": ["type", "repository"],
  33745. "additionalProperties": false
  33746. },
  33747. "ReferenceSource": {
  33748. "anyOf": [
  33749. {
  33750. "$ref": "#/components/schemas/ReferenceLocalSource"
  33751. },
  33752. {
  33753. "$ref": "#/components/schemas/ReferenceGitSource"
  33754. }
  33755. ]
  33756. },
  33757. "ReferenceInfo": {
  33758. "type": "object",
  33759. "properties": {
  33760. "name": {
  33761. "type": "string"
  33762. },
  33763. "path": {
  33764. "type": "string"
  33765. },
  33766. "description": {
  33767. "type": "string"
  33768. },
  33769. "hidden": {
  33770. "type": "boolean"
  33771. },
  33772. "source": {
  33773. "$ref": "#/components/schemas/ReferenceSource"
  33774. }
  33775. },
  33776. "required": ["name", "path", "source"],
  33777. "additionalProperties": false
  33778. },
  33779. "ProjectCopyCopy": {
  33780. "type": "object",
  33781. "properties": {
  33782. "directory": {
  33783. "type": "string"
  33784. }
  33785. },
  33786. "required": ["directory"],
  33787. "additionalProperties": false
  33788. },
  33789. "EventModels-devRefreshed": {
  33790. "type": "object",
  33791. "properties": {
  33792. "id": {
  33793. "type": "string",
  33794. "pattern": "^evt_"
  33795. },
  33796. "type": {
  33797. "type": "string",
  33798. "enum": ["models-dev.refreshed"]
  33799. },
  33800. "properties": {
  33801. "type": "object",
  33802. "properties": {}
  33803. }
  33804. },
  33805. "required": ["id", "type", "properties"],
  33806. "additionalProperties": false
  33807. },
  33808. "EventIntegrationUpdated": {
  33809. "type": "object",
  33810. "properties": {
  33811. "id": {
  33812. "type": "string",
  33813. "pattern": "^evt_"
  33814. },
  33815. "type": {
  33816. "type": "string",
  33817. "enum": ["integration.updated"]
  33818. },
  33819. "properties": {
  33820. "type": "object",
  33821. "properties": {}
  33822. }
  33823. },
  33824. "required": ["id", "type", "properties"],
  33825. "additionalProperties": false
  33826. },
  33827. "EventIntegrationConnectionUpdated": {
  33828. "type": "object",
  33829. "properties": {
  33830. "id": {
  33831. "type": "string",
  33832. "pattern": "^evt_"
  33833. },
  33834. "type": {
  33835. "type": "string",
  33836. "enum": ["integration.connection.updated"]
  33837. },
  33838. "properties": {
  33839. "type": "object",
  33840. "properties": {
  33841. "integrationID": {
  33842. "type": "string"
  33843. }
  33844. },
  33845. "required": ["integrationID"],
  33846. "additionalProperties": false
  33847. }
  33848. },
  33849. "required": ["id", "type", "properties"],
  33850. "additionalProperties": false
  33851. },
  33852. "EventCatalogUpdated": {
  33853. "type": "object",
  33854. "properties": {
  33855. "id": {
  33856. "type": "string",
  33857. "pattern": "^evt_"
  33858. },
  33859. "type": {
  33860. "type": "string",
  33861. "enum": ["catalog.updated"]
  33862. },
  33863. "properties": {
  33864. "type": "object",
  33865. "properties": {}
  33866. }
  33867. },
  33868. "required": ["id", "type", "properties"],
  33869. "additionalProperties": false
  33870. },
  33871. "EventSessionCreated": {
  33872. "type": "object",
  33873. "properties": {
  33874. "id": {
  33875. "type": "string",
  33876. "pattern": "^evt_"
  33877. },
  33878. "type": {
  33879. "type": "string",
  33880. "enum": ["session.created"]
  33881. },
  33882. "properties": {
  33883. "type": "object",
  33884. "properties": {
  33885. "sessionID": {
  33886. "type": "string",
  33887. "pattern": "^ses"
  33888. },
  33889. "info": {
  33890. "$ref": "#/components/schemas/Session"
  33891. }
  33892. },
  33893. "required": ["sessionID", "info"],
  33894. "additionalProperties": false
  33895. }
  33896. },
  33897. "required": ["id", "type", "properties"],
  33898. "additionalProperties": false
  33899. },
  33900. "EventSessionUpdated": {
  33901. "type": "object",
  33902. "properties": {
  33903. "id": {
  33904. "type": "string",
  33905. "pattern": "^evt_"
  33906. },
  33907. "type": {
  33908. "type": "string",
  33909. "enum": ["session.updated"]
  33910. },
  33911. "properties": {
  33912. "type": "object",
  33913. "properties": {
  33914. "sessionID": {
  33915. "type": "string",
  33916. "pattern": "^ses"
  33917. },
  33918. "info": {
  33919. "$ref": "#/components/schemas/Session"
  33920. }
  33921. },
  33922. "required": ["sessionID", "info"],
  33923. "additionalProperties": false
  33924. }
  33925. },
  33926. "required": ["id", "type", "properties"],
  33927. "additionalProperties": false
  33928. },
  33929. "EventSessionDeleted": {
  33930. "type": "object",
  33931. "properties": {
  33932. "id": {
  33933. "type": "string",
  33934. "pattern": "^evt_"
  33935. },
  33936. "type": {
  33937. "type": "string",
  33938. "enum": ["session.deleted"]
  33939. },
  33940. "properties": {
  33941. "type": "object",
  33942. "properties": {
  33943. "sessionID": {
  33944. "type": "string",
  33945. "pattern": "^ses"
  33946. },
  33947. "info": {
  33948. "$ref": "#/components/schemas/Session"
  33949. }
  33950. },
  33951. "required": ["sessionID", "info"],
  33952. "additionalProperties": false
  33953. }
  33954. },
  33955. "required": ["id", "type", "properties"],
  33956. "additionalProperties": false
  33957. },
  33958. "EventMessageUpdated": {
  33959. "type": "object",
  33960. "properties": {
  33961. "id": {
  33962. "type": "string",
  33963. "pattern": "^evt_"
  33964. },
  33965. "type": {
  33966. "type": "string",
  33967. "enum": ["message.updated"]
  33968. },
  33969. "properties": {
  33970. "type": "object",
  33971. "properties": {
  33972. "sessionID": {
  33973. "type": "string",
  33974. "pattern": "^ses"
  33975. },
  33976. "info": {
  33977. "$ref": "#/components/schemas/Message"
  33978. }
  33979. },
  33980. "required": ["sessionID", "info"],
  33981. "additionalProperties": false
  33982. }
  33983. },
  33984. "required": ["id", "type", "properties"],
  33985. "additionalProperties": false
  33986. },
  33987. "EventMessageRemoved": {
  33988. "type": "object",
  33989. "properties": {
  33990. "id": {
  33991. "type": "string",
  33992. "pattern": "^evt_"
  33993. },
  33994. "type": {
  33995. "type": "string",
  33996. "enum": ["message.removed"]
  33997. },
  33998. "properties": {
  33999. "type": "object",
  34000. "properties": {
  34001. "sessionID": {
  34002. "type": "string",
  34003. "pattern": "^ses"
  34004. },
  34005. "messageID": {
  34006. "type": "string",
  34007. "pattern": "^msg"
  34008. }
  34009. },
  34010. "required": ["sessionID", "messageID"],
  34011. "additionalProperties": false
  34012. }
  34013. },
  34014. "required": ["id", "type", "properties"],
  34015. "additionalProperties": false
  34016. },
  34017. "EventMessagePartUpdated": {
  34018. "type": "object",
  34019. "properties": {
  34020. "id": {
  34021. "type": "string",
  34022. "pattern": "^evt_"
  34023. },
  34024. "type": {
  34025. "type": "string",
  34026. "enum": ["message.part.updated"]
  34027. },
  34028. "properties": {
  34029. "type": "object",
  34030. "properties": {
  34031. "sessionID": {
  34032. "type": "string",
  34033. "pattern": "^ses"
  34034. },
  34035. "part": {
  34036. "$ref": "#/components/schemas/Part"
  34037. },
  34038. "time": {
  34039. "type": "number"
  34040. }
  34041. },
  34042. "required": ["sessionID", "part", "time"],
  34043. "additionalProperties": false
  34044. }
  34045. },
  34046. "required": ["id", "type", "properties"],
  34047. "additionalProperties": false
  34048. },
  34049. "EventMessagePartRemoved": {
  34050. "type": "object",
  34051. "properties": {
  34052. "id": {
  34053. "type": "string",
  34054. "pattern": "^evt_"
  34055. },
  34056. "type": {
  34057. "type": "string",
  34058. "enum": ["message.part.removed"]
  34059. },
  34060. "properties": {
  34061. "type": "object",
  34062. "properties": {
  34063. "sessionID": {
  34064. "type": "string",
  34065. "pattern": "^ses"
  34066. },
  34067. "messageID": {
  34068. "type": "string",
  34069. "pattern": "^msg"
  34070. },
  34071. "partID": {
  34072. "type": "string",
  34073. "pattern": "^prt"
  34074. }
  34075. },
  34076. "required": ["sessionID", "messageID", "partID"],
  34077. "additionalProperties": false
  34078. }
  34079. },
  34080. "required": ["id", "type", "properties"],
  34081. "additionalProperties": false
  34082. },
  34083. "EventSessionNextAgentSwitched": {
  34084. "type": "object",
  34085. "properties": {
  34086. "id": {
  34087. "type": "string",
  34088. "pattern": "^evt_"
  34089. },
  34090. "type": {
  34091. "type": "string",
  34092. "enum": ["session.next.agent.switched"]
  34093. },
  34094. "properties": {
  34095. "type": "object",
  34096. "properties": {
  34097. "timestamp": {
  34098. "type": "number"
  34099. },
  34100. "sessionID": {
  34101. "type": "string",
  34102. "pattern": "^ses"
  34103. },
  34104. "messageID": {
  34105. "type": "string",
  34106. "pattern": "^msg_"
  34107. },
  34108. "agent": {
  34109. "type": "string"
  34110. }
  34111. },
  34112. "required": ["timestamp", "sessionID", "messageID", "agent"],
  34113. "additionalProperties": false
  34114. }
  34115. },
  34116. "required": ["id", "type", "properties"],
  34117. "additionalProperties": false
  34118. },
  34119. "EventSessionNextModelSwitched": {
  34120. "type": "object",
  34121. "properties": {
  34122. "id": {
  34123. "type": "string",
  34124. "pattern": "^evt_"
  34125. },
  34126. "type": {
  34127. "type": "string",
  34128. "enum": ["session.next.model.switched"]
  34129. },
  34130. "properties": {
  34131. "type": "object",
  34132. "properties": {
  34133. "timestamp": {
  34134. "type": "number"
  34135. },
  34136. "sessionID": {
  34137. "type": "string",
  34138. "pattern": "^ses"
  34139. },
  34140. "messageID": {
  34141. "type": "string",
  34142. "pattern": "^msg_"
  34143. },
  34144. "model": {
  34145. "$ref": "#/components/schemas/ModelRef"
  34146. }
  34147. },
  34148. "required": ["timestamp", "sessionID", "messageID", "model"],
  34149. "additionalProperties": false
  34150. }
  34151. },
  34152. "required": ["id", "type", "properties"],
  34153. "additionalProperties": false
  34154. },
  34155. "EventSessionNextMoved": {
  34156. "type": "object",
  34157. "properties": {
  34158. "id": {
  34159. "type": "string",
  34160. "pattern": "^evt_"
  34161. },
  34162. "type": {
  34163. "type": "string",
  34164. "enum": ["session.next.moved"]
  34165. },
  34166. "properties": {
  34167. "type": "object",
  34168. "properties": {
  34169. "timestamp": {
  34170. "type": "number"
  34171. },
  34172. "sessionID": {
  34173. "type": "string",
  34174. "pattern": "^ses"
  34175. },
  34176. "location": {
  34177. "$ref": "#/components/schemas/LocationRef"
  34178. },
  34179. "subdirectory": {
  34180. "type": "string"
  34181. }
  34182. },
  34183. "required": ["timestamp", "sessionID", "location"],
  34184. "additionalProperties": false
  34185. }
  34186. },
  34187. "required": ["id", "type", "properties"],
  34188. "additionalProperties": false
  34189. },
  34190. "EventSessionNextPrompted": {
  34191. "type": "object",
  34192. "properties": {
  34193. "id": {
  34194. "type": "string",
  34195. "pattern": "^evt_"
  34196. },
  34197. "type": {
  34198. "type": "string",
  34199. "enum": ["session.next.prompted"]
  34200. },
  34201. "properties": {
  34202. "type": "object",
  34203. "properties": {
  34204. "timestamp": {
  34205. "type": "number"
  34206. },
  34207. "sessionID": {
  34208. "type": "string",
  34209. "pattern": "^ses"
  34210. },
  34211. "messageID": {
  34212. "type": "string",
  34213. "pattern": "^msg_"
  34214. },
  34215. "prompt": {
  34216. "$ref": "#/components/schemas/Prompt"
  34217. },
  34218. "delivery": {
  34219. "type": "string",
  34220. "enum": ["steer", "queue"]
  34221. }
  34222. },
  34223. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34224. "additionalProperties": false
  34225. }
  34226. },
  34227. "required": ["id", "type", "properties"],
  34228. "additionalProperties": false
  34229. },
  34230. "EventSessionNextPromptAdmitted": {
  34231. "type": "object",
  34232. "properties": {
  34233. "id": {
  34234. "type": "string",
  34235. "pattern": "^evt_"
  34236. },
  34237. "type": {
  34238. "type": "string",
  34239. "enum": ["session.next.prompt.admitted"]
  34240. },
  34241. "properties": {
  34242. "type": "object",
  34243. "properties": {
  34244. "timestamp": {
  34245. "type": "number"
  34246. },
  34247. "sessionID": {
  34248. "type": "string",
  34249. "pattern": "^ses"
  34250. },
  34251. "messageID": {
  34252. "type": "string",
  34253. "pattern": "^msg_"
  34254. },
  34255. "prompt": {
  34256. "$ref": "#/components/schemas/Prompt"
  34257. },
  34258. "delivery": {
  34259. "type": "string",
  34260. "enum": ["steer", "queue"]
  34261. }
  34262. },
  34263. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34264. "additionalProperties": false
  34265. }
  34266. },
  34267. "required": ["id", "type", "properties"],
  34268. "additionalProperties": false
  34269. },
  34270. "EventSessionNextContextUpdated": {
  34271. "type": "object",
  34272. "properties": {
  34273. "id": {
  34274. "type": "string",
  34275. "pattern": "^evt_"
  34276. },
  34277. "type": {
  34278. "type": "string",
  34279. "enum": ["session.next.context.updated"]
  34280. },
  34281. "properties": {
  34282. "type": "object",
  34283. "properties": {
  34284. "timestamp": {
  34285. "type": "number"
  34286. },
  34287. "sessionID": {
  34288. "type": "string",
  34289. "pattern": "^ses"
  34290. },
  34291. "messageID": {
  34292. "type": "string",
  34293. "pattern": "^msg_"
  34294. },
  34295. "text": {
  34296. "type": "string"
  34297. }
  34298. },
  34299. "required": ["timestamp", "sessionID", "messageID", "text"],
  34300. "additionalProperties": false
  34301. }
  34302. },
  34303. "required": ["id", "type", "properties"],
  34304. "additionalProperties": false
  34305. },
  34306. "EventSessionNextSynthetic": {
  34307. "type": "object",
  34308. "properties": {
  34309. "id": {
  34310. "type": "string",
  34311. "pattern": "^evt_"
  34312. },
  34313. "type": {
  34314. "type": "string",
  34315. "enum": ["session.next.synthetic"]
  34316. },
  34317. "properties": {
  34318. "type": "object",
  34319. "properties": {
  34320. "timestamp": {
  34321. "type": "number"
  34322. },
  34323. "sessionID": {
  34324. "type": "string",
  34325. "pattern": "^ses"
  34326. },
  34327. "messageID": {
  34328. "type": "string",
  34329. "pattern": "^msg_"
  34330. },
  34331. "text": {
  34332. "type": "string"
  34333. }
  34334. },
  34335. "required": ["timestamp", "sessionID", "messageID", "text"],
  34336. "additionalProperties": false
  34337. }
  34338. },
  34339. "required": ["id", "type", "properties"],
  34340. "additionalProperties": false
  34341. },
  34342. "EventSessionNextShellStarted": {
  34343. "type": "object",
  34344. "properties": {
  34345. "id": {
  34346. "type": "string",
  34347. "pattern": "^evt_"
  34348. },
  34349. "type": {
  34350. "type": "string",
  34351. "enum": ["session.next.shell.started"]
  34352. },
  34353. "properties": {
  34354. "type": "object",
  34355. "properties": {
  34356. "timestamp": {
  34357. "type": "number"
  34358. },
  34359. "sessionID": {
  34360. "type": "string",
  34361. "pattern": "^ses"
  34362. },
  34363. "messageID": {
  34364. "type": "string",
  34365. "pattern": "^msg_"
  34366. },
  34367. "callID": {
  34368. "type": "string"
  34369. },
  34370. "command": {
  34371. "type": "string"
  34372. }
  34373. },
  34374. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  34375. "additionalProperties": false
  34376. }
  34377. },
  34378. "required": ["id", "type", "properties"],
  34379. "additionalProperties": false
  34380. },
  34381. "EventSessionNextShellEnded": {
  34382. "type": "object",
  34383. "properties": {
  34384. "id": {
  34385. "type": "string",
  34386. "pattern": "^evt_"
  34387. },
  34388. "type": {
  34389. "type": "string",
  34390. "enum": ["session.next.shell.ended"]
  34391. },
  34392. "properties": {
  34393. "type": "object",
  34394. "properties": {
  34395. "timestamp": {
  34396. "type": "number"
  34397. },
  34398. "sessionID": {
  34399. "type": "string",
  34400. "pattern": "^ses"
  34401. },
  34402. "callID": {
  34403. "type": "string"
  34404. },
  34405. "output": {
  34406. "type": "string"
  34407. }
  34408. },
  34409. "required": ["timestamp", "sessionID", "callID", "output"],
  34410. "additionalProperties": false
  34411. }
  34412. },
  34413. "required": ["id", "type", "properties"],
  34414. "additionalProperties": false
  34415. },
  34416. "EventSessionNextStepStarted": {
  34417. "type": "object",
  34418. "properties": {
  34419. "id": {
  34420. "type": "string",
  34421. "pattern": "^evt_"
  34422. },
  34423. "type": {
  34424. "type": "string",
  34425. "enum": ["session.next.step.started"]
  34426. },
  34427. "properties": {
  34428. "type": "object",
  34429. "properties": {
  34430. "timestamp": {
  34431. "type": "number"
  34432. },
  34433. "sessionID": {
  34434. "type": "string",
  34435. "pattern": "^ses"
  34436. },
  34437. "assistantMessageID": {
  34438. "type": "string",
  34439. "pattern": "^msg_"
  34440. },
  34441. "agent": {
  34442. "type": "string"
  34443. },
  34444. "model": {
  34445. "$ref": "#/components/schemas/ModelRef"
  34446. },
  34447. "snapshot": {
  34448. "type": "string"
  34449. }
  34450. },
  34451. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  34452. "additionalProperties": false
  34453. }
  34454. },
  34455. "required": ["id", "type", "properties"],
  34456. "additionalProperties": false
  34457. },
  34458. "EventSessionNextStepEnded": {
  34459. "type": "object",
  34460. "properties": {
  34461. "id": {
  34462. "type": "string",
  34463. "pattern": "^evt_"
  34464. },
  34465. "type": {
  34466. "type": "string",
  34467. "enum": ["session.next.step.ended"]
  34468. },
  34469. "properties": {
  34470. "type": "object",
  34471. "properties": {
  34472. "timestamp": {
  34473. "type": "number"
  34474. },
  34475. "sessionID": {
  34476. "type": "string",
  34477. "pattern": "^ses"
  34478. },
  34479. "assistantMessageID": {
  34480. "type": "string",
  34481. "pattern": "^msg_"
  34482. },
  34483. "finish": {
  34484. "type": "string"
  34485. },
  34486. "cost": {
  34487. "type": "number"
  34488. },
  34489. "tokens": {
  34490. "type": "object",
  34491. "properties": {
  34492. "input": {
  34493. "type": "number"
  34494. },
  34495. "output": {
  34496. "type": "number"
  34497. },
  34498. "reasoning": {
  34499. "type": "number"
  34500. },
  34501. "cache": {
  34502. "type": "object",
  34503. "properties": {
  34504. "read": {
  34505. "type": "number"
  34506. },
  34507. "write": {
  34508. "type": "number"
  34509. }
  34510. },
  34511. "required": ["read", "write"],
  34512. "additionalProperties": false
  34513. }
  34514. },
  34515. "required": ["input", "output", "reasoning", "cache"],
  34516. "additionalProperties": false
  34517. },
  34518. "snapshot": {
  34519. "type": "string"
  34520. },
  34521. "files": {
  34522. "type": "array",
  34523. "items": {
  34524. "type": "string"
  34525. }
  34526. }
  34527. },
  34528. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34529. "additionalProperties": false
  34530. }
  34531. },
  34532. "required": ["id", "type", "properties"],
  34533. "additionalProperties": false
  34534. },
  34535. "EventSessionNextStepFailed": {
  34536. "type": "object",
  34537. "properties": {
  34538. "id": {
  34539. "type": "string",
  34540. "pattern": "^evt_"
  34541. },
  34542. "type": {
  34543. "type": "string",
  34544. "enum": ["session.next.step.failed"]
  34545. },
  34546. "properties": {
  34547. "type": "object",
  34548. "properties": {
  34549. "timestamp": {
  34550. "type": "number"
  34551. },
  34552. "sessionID": {
  34553. "type": "string",
  34554. "pattern": "^ses"
  34555. },
  34556. "assistantMessageID": {
  34557. "type": "string",
  34558. "pattern": "^msg_"
  34559. },
  34560. "error": {
  34561. "$ref": "#/components/schemas/SessionErrorUnknown"
  34562. }
  34563. },
  34564. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34565. "additionalProperties": false
  34566. }
  34567. },
  34568. "required": ["id", "type", "properties"],
  34569. "additionalProperties": false
  34570. },
  34571. "EventSessionNextTextStarted": {
  34572. "type": "object",
  34573. "properties": {
  34574. "id": {
  34575. "type": "string",
  34576. "pattern": "^evt_"
  34577. },
  34578. "type": {
  34579. "type": "string",
  34580. "enum": ["session.next.text.started"]
  34581. },
  34582. "properties": {
  34583. "type": "object",
  34584. "properties": {
  34585. "timestamp": {
  34586. "type": "number"
  34587. },
  34588. "sessionID": {
  34589. "type": "string",
  34590. "pattern": "^ses"
  34591. },
  34592. "assistantMessageID": {
  34593. "type": "string",
  34594. "pattern": "^msg_"
  34595. },
  34596. "textID": {
  34597. "type": "string"
  34598. }
  34599. },
  34600. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34601. "additionalProperties": false
  34602. }
  34603. },
  34604. "required": ["id", "type", "properties"],
  34605. "additionalProperties": false
  34606. },
  34607. "EventSessionNextTextDelta": {
  34608. "type": "object",
  34609. "properties": {
  34610. "id": {
  34611. "type": "string",
  34612. "pattern": "^evt_"
  34613. },
  34614. "type": {
  34615. "type": "string",
  34616. "enum": ["session.next.text.delta"]
  34617. },
  34618. "properties": {
  34619. "type": "object",
  34620. "properties": {
  34621. "timestamp": {
  34622. "type": "number"
  34623. },
  34624. "sessionID": {
  34625. "type": "string",
  34626. "pattern": "^ses"
  34627. },
  34628. "assistantMessageID": {
  34629. "type": "string",
  34630. "pattern": "^msg_"
  34631. },
  34632. "textID": {
  34633. "type": "string"
  34634. },
  34635. "delta": {
  34636. "type": "string"
  34637. }
  34638. },
  34639. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34640. "additionalProperties": false
  34641. }
  34642. },
  34643. "required": ["id", "type", "properties"],
  34644. "additionalProperties": false
  34645. },
  34646. "EventSessionNextTextEnded": {
  34647. "type": "object",
  34648. "properties": {
  34649. "id": {
  34650. "type": "string",
  34651. "pattern": "^evt_"
  34652. },
  34653. "type": {
  34654. "type": "string",
  34655. "enum": ["session.next.text.ended"]
  34656. },
  34657. "properties": {
  34658. "type": "object",
  34659. "properties": {
  34660. "timestamp": {
  34661. "type": "number"
  34662. },
  34663. "sessionID": {
  34664. "type": "string",
  34665. "pattern": "^ses"
  34666. },
  34667. "assistantMessageID": {
  34668. "type": "string",
  34669. "pattern": "^msg_"
  34670. },
  34671. "textID": {
  34672. "type": "string"
  34673. },
  34674. "text": {
  34675. "type": "string"
  34676. }
  34677. },
  34678. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34679. "additionalProperties": false
  34680. }
  34681. },
  34682. "required": ["id", "type", "properties"],
  34683. "additionalProperties": false
  34684. },
  34685. "EventSessionNextReasoningStarted": {
  34686. "type": "object",
  34687. "properties": {
  34688. "id": {
  34689. "type": "string",
  34690. "pattern": "^evt_"
  34691. },
  34692. "type": {
  34693. "type": "string",
  34694. "enum": ["session.next.reasoning.started"]
  34695. },
  34696. "properties": {
  34697. "type": "object",
  34698. "properties": {
  34699. "timestamp": {
  34700. "type": "number"
  34701. },
  34702. "sessionID": {
  34703. "type": "string",
  34704. "pattern": "^ses"
  34705. },
  34706. "assistantMessageID": {
  34707. "type": "string",
  34708. "pattern": "^msg_"
  34709. },
  34710. "reasoningID": {
  34711. "type": "string"
  34712. },
  34713. "providerMetadata": {
  34714. "$ref": "#/components/schemas/LLMProviderMetadata"
  34715. }
  34716. },
  34717. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34718. "additionalProperties": false
  34719. }
  34720. },
  34721. "required": ["id", "type", "properties"],
  34722. "additionalProperties": false
  34723. },
  34724. "EventSessionNextReasoningDelta": {
  34725. "type": "object",
  34726. "properties": {
  34727. "id": {
  34728. "type": "string",
  34729. "pattern": "^evt_"
  34730. },
  34731. "type": {
  34732. "type": "string",
  34733. "enum": ["session.next.reasoning.delta"]
  34734. },
  34735. "properties": {
  34736. "type": "object",
  34737. "properties": {
  34738. "timestamp": {
  34739. "type": "number"
  34740. },
  34741. "sessionID": {
  34742. "type": "string",
  34743. "pattern": "^ses"
  34744. },
  34745. "assistantMessageID": {
  34746. "type": "string",
  34747. "pattern": "^msg_"
  34748. },
  34749. "reasoningID": {
  34750. "type": "string"
  34751. },
  34752. "delta": {
  34753. "type": "string"
  34754. }
  34755. },
  34756. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34757. "additionalProperties": false
  34758. }
  34759. },
  34760. "required": ["id", "type", "properties"],
  34761. "additionalProperties": false
  34762. },
  34763. "EventSessionNextReasoningEnded": {
  34764. "type": "object",
  34765. "properties": {
  34766. "id": {
  34767. "type": "string",
  34768. "pattern": "^evt_"
  34769. },
  34770. "type": {
  34771. "type": "string",
  34772. "enum": ["session.next.reasoning.ended"]
  34773. },
  34774. "properties": {
  34775. "type": "object",
  34776. "properties": {
  34777. "timestamp": {
  34778. "type": "number"
  34779. },
  34780. "sessionID": {
  34781. "type": "string",
  34782. "pattern": "^ses"
  34783. },
  34784. "assistantMessageID": {
  34785. "type": "string",
  34786. "pattern": "^msg_"
  34787. },
  34788. "reasoningID": {
  34789. "type": "string"
  34790. },
  34791. "text": {
  34792. "type": "string"
  34793. },
  34794. "providerMetadata": {
  34795. "$ref": "#/components/schemas/LLMProviderMetadata"
  34796. }
  34797. },
  34798. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34799. "additionalProperties": false
  34800. }
  34801. },
  34802. "required": ["id", "type", "properties"],
  34803. "additionalProperties": false
  34804. },
  34805. "EventSessionNextToolInputStarted": {
  34806. "type": "object",
  34807. "properties": {
  34808. "id": {
  34809. "type": "string",
  34810. "pattern": "^evt_"
  34811. },
  34812. "type": {
  34813. "type": "string",
  34814. "enum": ["session.next.tool.input.started"]
  34815. },
  34816. "properties": {
  34817. "type": "object",
  34818. "properties": {
  34819. "timestamp": {
  34820. "type": "number"
  34821. },
  34822. "sessionID": {
  34823. "type": "string",
  34824. "pattern": "^ses"
  34825. },
  34826. "assistantMessageID": {
  34827. "type": "string",
  34828. "pattern": "^msg_"
  34829. },
  34830. "callID": {
  34831. "type": "string"
  34832. },
  34833. "name": {
  34834. "type": "string"
  34835. }
  34836. },
  34837. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34838. "additionalProperties": false
  34839. }
  34840. },
  34841. "required": ["id", "type", "properties"],
  34842. "additionalProperties": false
  34843. },
  34844. "EventSessionNextToolInputDelta": {
  34845. "type": "object",
  34846. "properties": {
  34847. "id": {
  34848. "type": "string",
  34849. "pattern": "^evt_"
  34850. },
  34851. "type": {
  34852. "type": "string",
  34853. "enum": ["session.next.tool.input.delta"]
  34854. },
  34855. "properties": {
  34856. "type": "object",
  34857. "properties": {
  34858. "timestamp": {
  34859. "type": "number"
  34860. },
  34861. "sessionID": {
  34862. "type": "string",
  34863. "pattern": "^ses"
  34864. },
  34865. "assistantMessageID": {
  34866. "type": "string",
  34867. "pattern": "^msg_"
  34868. },
  34869. "callID": {
  34870. "type": "string"
  34871. },
  34872. "delta": {
  34873. "type": "string"
  34874. }
  34875. },
  34876. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34877. "additionalProperties": false
  34878. }
  34879. },
  34880. "required": ["id", "type", "properties"],
  34881. "additionalProperties": false
  34882. },
  34883. "EventSessionNextToolInputEnded": {
  34884. "type": "object",
  34885. "properties": {
  34886. "id": {
  34887. "type": "string",
  34888. "pattern": "^evt_"
  34889. },
  34890. "type": {
  34891. "type": "string",
  34892. "enum": ["session.next.tool.input.ended"]
  34893. },
  34894. "properties": {
  34895. "type": "object",
  34896. "properties": {
  34897. "timestamp": {
  34898. "type": "number"
  34899. },
  34900. "sessionID": {
  34901. "type": "string",
  34902. "pattern": "^ses"
  34903. },
  34904. "assistantMessageID": {
  34905. "type": "string",
  34906. "pattern": "^msg_"
  34907. },
  34908. "callID": {
  34909. "type": "string"
  34910. },
  34911. "text": {
  34912. "type": "string"
  34913. }
  34914. },
  34915. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34916. "additionalProperties": false
  34917. }
  34918. },
  34919. "required": ["id", "type", "properties"],
  34920. "additionalProperties": false
  34921. },
  34922. "EventSessionNextToolCalled": {
  34923. "type": "object",
  34924. "properties": {
  34925. "id": {
  34926. "type": "string",
  34927. "pattern": "^evt_"
  34928. },
  34929. "type": {
  34930. "type": "string",
  34931. "enum": ["session.next.tool.called"]
  34932. },
  34933. "properties": {
  34934. "type": "object",
  34935. "properties": {
  34936. "timestamp": {
  34937. "type": "number"
  34938. },
  34939. "sessionID": {
  34940. "type": "string",
  34941. "pattern": "^ses"
  34942. },
  34943. "assistantMessageID": {
  34944. "type": "string",
  34945. "pattern": "^msg_"
  34946. },
  34947. "callID": {
  34948. "type": "string"
  34949. },
  34950. "tool": {
  34951. "type": "string"
  34952. },
  34953. "input": {
  34954. "type": "object"
  34955. },
  34956. "provider": {
  34957. "type": "object",
  34958. "properties": {
  34959. "executed": {
  34960. "type": "boolean"
  34961. },
  34962. "metadata": {
  34963. "$ref": "#/components/schemas/LLMProviderMetadata"
  34964. }
  34965. },
  34966. "required": ["executed"],
  34967. "additionalProperties": false
  34968. }
  34969. },
  34970. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34971. "additionalProperties": false
  34972. }
  34973. },
  34974. "required": ["id", "type", "properties"],
  34975. "additionalProperties": false
  34976. },
  34977. "EventSessionNextToolProgress": {
  34978. "type": "object",
  34979. "properties": {
  34980. "id": {
  34981. "type": "string",
  34982. "pattern": "^evt_"
  34983. },
  34984. "type": {
  34985. "type": "string",
  34986. "enum": ["session.next.tool.progress"]
  34987. },
  34988. "properties": {
  34989. "type": "object",
  34990. "properties": {
  34991. "timestamp": {
  34992. "type": "number"
  34993. },
  34994. "sessionID": {
  34995. "type": "string",
  34996. "pattern": "^ses"
  34997. },
  34998. "assistantMessageID": {
  34999. "type": "string",
  35000. "pattern": "^msg_"
  35001. },
  35002. "callID": {
  35003. "type": "string"
  35004. },
  35005. "structured": {
  35006. "type": "object"
  35007. },
  35008. "content": {
  35009. "type": "array",
  35010. "items": {
  35011. "$ref": "#/components/schemas/LLMToolContent"
  35012. }
  35013. }
  35014. },
  35015. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  35016. "additionalProperties": false
  35017. }
  35018. },
  35019. "required": ["id", "type", "properties"],
  35020. "additionalProperties": false
  35021. },
  35022. "EventSessionNextToolSuccess": {
  35023. "type": "object",
  35024. "properties": {
  35025. "id": {
  35026. "type": "string",
  35027. "pattern": "^evt_"
  35028. },
  35029. "type": {
  35030. "type": "string",
  35031. "enum": ["session.next.tool.success"]
  35032. },
  35033. "properties": {
  35034. "type": "object",
  35035. "properties": {
  35036. "timestamp": {
  35037. "type": "number"
  35038. },
  35039. "sessionID": {
  35040. "type": "string",
  35041. "pattern": "^ses"
  35042. },
  35043. "assistantMessageID": {
  35044. "type": "string",
  35045. "pattern": "^msg_"
  35046. },
  35047. "callID": {
  35048. "type": "string"
  35049. },
  35050. "structured": {
  35051. "type": "object"
  35052. },
  35053. "content": {
  35054. "type": "array",
  35055. "items": {
  35056. "$ref": "#/components/schemas/LLMToolContent"
  35057. }
  35058. },
  35059. "outputPaths": {
  35060. "type": "array",
  35061. "items": {
  35062. "type": "string"
  35063. }
  35064. },
  35065. "result": {},
  35066. "provider": {
  35067. "type": "object",
  35068. "properties": {
  35069. "executed": {
  35070. "type": "boolean"
  35071. },
  35072. "metadata": {
  35073. "$ref": "#/components/schemas/LLMProviderMetadata"
  35074. }
  35075. },
  35076. "required": ["executed"],
  35077. "additionalProperties": false
  35078. }
  35079. },
  35080. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  35081. "additionalProperties": false
  35082. }
  35083. },
  35084. "required": ["id", "type", "properties"],
  35085. "additionalProperties": false
  35086. },
  35087. "EventSessionNextToolFailed": {
  35088. "type": "object",
  35089. "properties": {
  35090. "id": {
  35091. "type": "string",
  35092. "pattern": "^evt_"
  35093. },
  35094. "type": {
  35095. "type": "string",
  35096. "enum": ["session.next.tool.failed"]
  35097. },
  35098. "properties": {
  35099. "type": "object",
  35100. "properties": {
  35101. "timestamp": {
  35102. "type": "number"
  35103. },
  35104. "sessionID": {
  35105. "type": "string",
  35106. "pattern": "^ses"
  35107. },
  35108. "assistantMessageID": {
  35109. "type": "string",
  35110. "pattern": "^msg_"
  35111. },
  35112. "callID": {
  35113. "type": "string"
  35114. },
  35115. "error": {
  35116. "$ref": "#/components/schemas/SessionErrorUnknown"
  35117. },
  35118. "result": {},
  35119. "provider": {
  35120. "type": "object",
  35121. "properties": {
  35122. "executed": {
  35123. "type": "boolean"
  35124. },
  35125. "metadata": {
  35126. "$ref": "#/components/schemas/LLMProviderMetadata"
  35127. }
  35128. },
  35129. "required": ["executed"],
  35130. "additionalProperties": false
  35131. }
  35132. },
  35133. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  35134. "additionalProperties": false
  35135. }
  35136. },
  35137. "required": ["id", "type", "properties"],
  35138. "additionalProperties": false
  35139. },
  35140. "EventSessionNextRetried": {
  35141. "type": "object",
  35142. "properties": {
  35143. "id": {
  35144. "type": "string",
  35145. "pattern": "^evt_"
  35146. },
  35147. "type": {
  35148. "type": "string",
  35149. "enum": ["session.next.retried"]
  35150. },
  35151. "properties": {
  35152. "type": "object",
  35153. "properties": {
  35154. "timestamp": {
  35155. "type": "number"
  35156. },
  35157. "sessionID": {
  35158. "type": "string",
  35159. "pattern": "^ses"
  35160. },
  35161. "attempt": {
  35162. "type": "number"
  35163. },
  35164. "error": {
  35165. "$ref": "#/components/schemas/SessionNextRetry_error"
  35166. }
  35167. },
  35168. "required": ["timestamp", "sessionID", "attempt", "error"],
  35169. "additionalProperties": false
  35170. }
  35171. },
  35172. "required": ["id", "type", "properties"],
  35173. "additionalProperties": false
  35174. },
  35175. "EventSessionNextCompactionStarted": {
  35176. "type": "object",
  35177. "properties": {
  35178. "id": {
  35179. "type": "string",
  35180. "pattern": "^evt_"
  35181. },
  35182. "type": {
  35183. "type": "string",
  35184. "enum": ["session.next.compaction.started"]
  35185. },
  35186. "properties": {
  35187. "type": "object",
  35188. "properties": {
  35189. "timestamp": {
  35190. "type": "number"
  35191. },
  35192. "sessionID": {
  35193. "type": "string",
  35194. "pattern": "^ses"
  35195. },
  35196. "messageID": {
  35197. "type": "string",
  35198. "pattern": "^msg_"
  35199. },
  35200. "reason": {
  35201. "type": "string",
  35202. "enum": ["auto", "manual"]
  35203. }
  35204. },
  35205. "required": ["timestamp", "sessionID", "messageID", "reason"],
  35206. "additionalProperties": false
  35207. }
  35208. },
  35209. "required": ["id", "type", "properties"],
  35210. "additionalProperties": false
  35211. },
  35212. "EventSessionNextCompactionDelta": {
  35213. "type": "object",
  35214. "properties": {
  35215. "id": {
  35216. "type": "string",
  35217. "pattern": "^evt_"
  35218. },
  35219. "type": {
  35220. "type": "string",
  35221. "enum": ["session.next.compaction.delta"]
  35222. },
  35223. "properties": {
  35224. "type": "object",
  35225. "properties": {
  35226. "timestamp": {
  35227. "type": "number"
  35228. },
  35229. "sessionID": {
  35230. "type": "string",
  35231. "pattern": "^ses"
  35232. },
  35233. "messageID": {
  35234. "type": "string",
  35235. "pattern": "^msg_"
  35236. },
  35237. "text": {
  35238. "type": "string"
  35239. }
  35240. },
  35241. "required": ["timestamp", "sessionID", "messageID", "text"],
  35242. "additionalProperties": false
  35243. }
  35244. },
  35245. "required": ["id", "type", "properties"],
  35246. "additionalProperties": false
  35247. },
  35248. "EventSessionNextCompactionEnded": {
  35249. "type": "object",
  35250. "properties": {
  35251. "id": {
  35252. "type": "string",
  35253. "pattern": "^evt_"
  35254. },
  35255. "type": {
  35256. "type": "string",
  35257. "enum": ["session.next.compaction.ended"]
  35258. },
  35259. "properties": {
  35260. "type": "object",
  35261. "properties": {
  35262. "timestamp": {
  35263. "type": "number"
  35264. },
  35265. "sessionID": {
  35266. "type": "string",
  35267. "pattern": "^ses"
  35268. },
  35269. "messageID": {
  35270. "type": "string",
  35271. "pattern": "^msg_"
  35272. },
  35273. "reason": {
  35274. "type": "string",
  35275. "enum": ["auto", "manual"]
  35276. },
  35277. "text": {
  35278. "type": "string"
  35279. },
  35280. "recent": {
  35281. "type": "string"
  35282. }
  35283. },
  35284. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  35285. "additionalProperties": false
  35286. }
  35287. },
  35288. "required": ["id", "type", "properties"],
  35289. "additionalProperties": false
  35290. },
  35291. "EventSessionNextRevertStaged": {
  35292. "type": "object",
  35293. "properties": {
  35294. "id": {
  35295. "type": "string",
  35296. "pattern": "^evt_"
  35297. },
  35298. "type": {
  35299. "type": "string",
  35300. "enum": ["session.next.revert.staged"]
  35301. },
  35302. "properties": {
  35303. "type": "object",
  35304. "properties": {
  35305. "timestamp": {
  35306. "type": "number"
  35307. },
  35308. "sessionID": {
  35309. "type": "string",
  35310. "pattern": "^ses"
  35311. },
  35312. "revert": {
  35313. "$ref": "#/components/schemas/RevertState"
  35314. }
  35315. },
  35316. "required": ["timestamp", "sessionID", "revert"],
  35317. "additionalProperties": false
  35318. }
  35319. },
  35320. "required": ["id", "type", "properties"],
  35321. "additionalProperties": false
  35322. },
  35323. "EventSessionNextRevertCleared": {
  35324. "type": "object",
  35325. "properties": {
  35326. "id": {
  35327. "type": "string",
  35328. "pattern": "^evt_"
  35329. },
  35330. "type": {
  35331. "type": "string",
  35332. "enum": ["session.next.revert.cleared"]
  35333. },
  35334. "properties": {
  35335. "type": "object",
  35336. "properties": {
  35337. "timestamp": {
  35338. "type": "number"
  35339. },
  35340. "sessionID": {
  35341. "type": "string",
  35342. "pattern": "^ses"
  35343. }
  35344. },
  35345. "required": ["timestamp", "sessionID"],
  35346. "additionalProperties": false
  35347. }
  35348. },
  35349. "required": ["id", "type", "properties"],
  35350. "additionalProperties": false
  35351. },
  35352. "EventSessionNextRevertCommitted": {
  35353. "type": "object",
  35354. "properties": {
  35355. "id": {
  35356. "type": "string",
  35357. "pattern": "^evt_"
  35358. },
  35359. "type": {
  35360. "type": "string",
  35361. "enum": ["session.next.revert.committed"]
  35362. },
  35363. "properties": {
  35364. "type": "object",
  35365. "properties": {
  35366. "timestamp": {
  35367. "type": "number"
  35368. },
  35369. "sessionID": {
  35370. "type": "string",
  35371. "pattern": "^ses"
  35372. },
  35373. "messageID": {
  35374. "type": "string",
  35375. "pattern": "^msg_"
  35376. }
  35377. },
  35378. "required": ["timestamp", "sessionID", "messageID"],
  35379. "additionalProperties": false
  35380. }
  35381. },
  35382. "required": ["id", "type", "properties"],
  35383. "additionalProperties": false
  35384. },
  35385. "EventMessagePartDelta": {
  35386. "type": "object",
  35387. "properties": {
  35388. "id": {
  35389. "type": "string",
  35390. "pattern": "^evt_"
  35391. },
  35392. "type": {
  35393. "type": "string",
  35394. "enum": ["message.part.delta"]
  35395. },
  35396. "properties": {
  35397. "type": "object",
  35398. "properties": {
  35399. "sessionID": {
  35400. "type": "string",
  35401. "pattern": "^ses"
  35402. },
  35403. "messageID": {
  35404. "type": "string",
  35405. "pattern": "^msg"
  35406. },
  35407. "partID": {
  35408. "type": "string",
  35409. "pattern": "^prt"
  35410. },
  35411. "field": {
  35412. "type": "string"
  35413. },
  35414. "delta": {
  35415. "type": "string"
  35416. }
  35417. },
  35418. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35419. "additionalProperties": false
  35420. }
  35421. },
  35422. "required": ["id", "type", "properties"],
  35423. "additionalProperties": false
  35424. },
  35425. "EventSessionDiff": {
  35426. "type": "object",
  35427. "properties": {
  35428. "id": {
  35429. "type": "string",
  35430. "pattern": "^evt_"
  35431. },
  35432. "type": {
  35433. "type": "string",
  35434. "enum": ["session.diff"]
  35435. },
  35436. "properties": {
  35437. "type": "object",
  35438. "properties": {
  35439. "sessionID": {
  35440. "type": "string",
  35441. "pattern": "^ses"
  35442. },
  35443. "diff": {
  35444. "type": "array",
  35445. "items": {
  35446. "$ref": "#/components/schemas/SnapshotFileDiff"
  35447. }
  35448. }
  35449. },
  35450. "required": ["sessionID", "diff"],
  35451. "additionalProperties": false
  35452. }
  35453. },
  35454. "required": ["id", "type", "properties"],
  35455. "additionalProperties": false
  35456. },
  35457. "EventSessionError": {
  35458. "type": "object",
  35459. "properties": {
  35460. "id": {
  35461. "type": "string",
  35462. "pattern": "^evt_"
  35463. },
  35464. "type": {
  35465. "type": "string",
  35466. "enum": ["session.error"]
  35467. },
  35468. "properties": {
  35469. "type": "object",
  35470. "properties": {
  35471. "sessionID": {
  35472. "type": "string",
  35473. "pattern": "^ses"
  35474. },
  35475. "error": {
  35476. "anyOf": [
  35477. {
  35478. "$ref": "#/components/schemas/ProviderAuthError"
  35479. },
  35480. {
  35481. "$ref": "#/components/schemas/UnknownError"
  35482. },
  35483. {
  35484. "$ref": "#/components/schemas/MessageOutputLengthError"
  35485. },
  35486. {
  35487. "$ref": "#/components/schemas/MessageAbortedError"
  35488. },
  35489. {
  35490. "$ref": "#/components/schemas/StructuredOutputError"
  35491. },
  35492. {
  35493. "$ref": "#/components/schemas/ContextOverflowError"
  35494. },
  35495. {
  35496. "$ref": "#/components/schemas/ContentFilterError"
  35497. },
  35498. {
  35499. "$ref": "#/components/schemas/APIError"
  35500. }
  35501. ]
  35502. }
  35503. },
  35504. "additionalProperties": false
  35505. }
  35506. },
  35507. "required": ["id", "type", "properties"],
  35508. "additionalProperties": false
  35509. },
  35510. "EventInstallationUpdated": {
  35511. "type": "object",
  35512. "properties": {
  35513. "id": {
  35514. "type": "string",
  35515. "pattern": "^evt_"
  35516. },
  35517. "type": {
  35518. "type": "string",
  35519. "enum": ["installation.updated"]
  35520. },
  35521. "properties": {
  35522. "type": "object",
  35523. "properties": {
  35524. "version": {
  35525. "type": "string"
  35526. }
  35527. },
  35528. "required": ["version"],
  35529. "additionalProperties": false
  35530. }
  35531. },
  35532. "required": ["id", "type", "properties"],
  35533. "additionalProperties": false
  35534. },
  35535. "EventInstallationUpdate-available": {
  35536. "type": "object",
  35537. "properties": {
  35538. "id": {
  35539. "type": "string",
  35540. "pattern": "^evt_"
  35541. },
  35542. "type": {
  35543. "type": "string",
  35544. "enum": ["installation.update-available"]
  35545. },
  35546. "properties": {
  35547. "type": "object",
  35548. "properties": {
  35549. "version": {
  35550. "type": "string"
  35551. }
  35552. },
  35553. "required": ["version"],
  35554. "additionalProperties": false
  35555. }
  35556. },
  35557. "required": ["id", "type", "properties"],
  35558. "additionalProperties": false
  35559. },
  35560. "EventFileEdited": {
  35561. "type": "object",
  35562. "properties": {
  35563. "id": {
  35564. "type": "string",
  35565. "pattern": "^evt_"
  35566. },
  35567. "type": {
  35568. "type": "string",
  35569. "enum": ["file.edited"]
  35570. },
  35571. "properties": {
  35572. "type": "object",
  35573. "properties": {
  35574. "file": {
  35575. "type": "string"
  35576. }
  35577. },
  35578. "required": ["file"],
  35579. "additionalProperties": false
  35580. }
  35581. },
  35582. "required": ["id", "type", "properties"],
  35583. "additionalProperties": false
  35584. },
  35585. "EventReferenceUpdated": {
  35586. "type": "object",
  35587. "properties": {
  35588. "id": {
  35589. "type": "string",
  35590. "pattern": "^evt_"
  35591. },
  35592. "type": {
  35593. "type": "string",
  35594. "enum": ["reference.updated"]
  35595. },
  35596. "properties": {
  35597. "type": "object",
  35598. "properties": {}
  35599. }
  35600. },
  35601. "required": ["id", "type", "properties"],
  35602. "additionalProperties": false
  35603. },
  35604. "EventPermissionV2Asked": {
  35605. "type": "object",
  35606. "properties": {
  35607. "id": {
  35608. "type": "string",
  35609. "pattern": "^evt_"
  35610. },
  35611. "type": {
  35612. "type": "string",
  35613. "enum": ["permission.v2.asked"]
  35614. },
  35615. "properties": {
  35616. "type": "object",
  35617. "properties": {
  35618. "id": {
  35619. "type": "string",
  35620. "pattern": "^per"
  35621. },
  35622. "sessionID": {
  35623. "type": "string",
  35624. "pattern": "^ses"
  35625. },
  35626. "action": {
  35627. "type": "string"
  35628. },
  35629. "resources": {
  35630. "type": "array",
  35631. "items": {
  35632. "type": "string"
  35633. }
  35634. },
  35635. "save": {
  35636. "type": "array",
  35637. "items": {
  35638. "type": "string"
  35639. }
  35640. },
  35641. "metadata": {
  35642. "type": "object"
  35643. },
  35644. "source": {
  35645. "$ref": "#/components/schemas/PermissionV2Source"
  35646. }
  35647. },
  35648. "required": ["id", "sessionID", "action", "resources"],
  35649. "additionalProperties": false
  35650. }
  35651. },
  35652. "required": ["id", "type", "properties"],
  35653. "additionalProperties": false
  35654. },
  35655. "EventPermissionV2Replied": {
  35656. "type": "object",
  35657. "properties": {
  35658. "id": {
  35659. "type": "string",
  35660. "pattern": "^evt_"
  35661. },
  35662. "type": {
  35663. "type": "string",
  35664. "enum": ["permission.v2.replied"]
  35665. },
  35666. "properties": {
  35667. "type": "object",
  35668. "properties": {
  35669. "sessionID": {
  35670. "type": "string",
  35671. "pattern": "^ses"
  35672. },
  35673. "requestID": {
  35674. "type": "string",
  35675. "pattern": "^per"
  35676. },
  35677. "reply": {
  35678. "$ref": "#/components/schemas/PermissionV2Reply"
  35679. }
  35680. },
  35681. "required": ["sessionID", "requestID", "reply"],
  35682. "additionalProperties": false
  35683. }
  35684. },
  35685. "required": ["id", "type", "properties"],
  35686. "additionalProperties": false
  35687. },
  35688. "EventPluginAdded": {
  35689. "type": "object",
  35690. "properties": {
  35691. "id": {
  35692. "type": "string",
  35693. "pattern": "^evt_"
  35694. },
  35695. "type": {
  35696. "type": "string",
  35697. "enum": ["plugin.added"]
  35698. },
  35699. "properties": {
  35700. "type": "object",
  35701. "properties": {
  35702. "id": {
  35703. "type": "string"
  35704. }
  35705. },
  35706. "required": ["id"],
  35707. "additionalProperties": false
  35708. }
  35709. },
  35710. "required": ["id", "type", "properties"],
  35711. "additionalProperties": false
  35712. },
  35713. "EventProjectDirectoriesUpdated": {
  35714. "type": "object",
  35715. "properties": {
  35716. "id": {
  35717. "type": "string",
  35718. "pattern": "^evt_"
  35719. },
  35720. "type": {
  35721. "type": "string",
  35722. "enum": ["project.directories.updated"]
  35723. },
  35724. "properties": {
  35725. "type": "object",
  35726. "properties": {
  35727. "projectID": {
  35728. "type": "string"
  35729. }
  35730. },
  35731. "required": ["projectID"],
  35732. "additionalProperties": false
  35733. }
  35734. },
  35735. "required": ["id", "type", "properties"],
  35736. "additionalProperties": false
  35737. },
  35738. "EventFileWatcherUpdated": {
  35739. "type": "object",
  35740. "properties": {
  35741. "id": {
  35742. "type": "string",
  35743. "pattern": "^evt_"
  35744. },
  35745. "type": {
  35746. "type": "string",
  35747. "enum": ["file.watcher.updated"]
  35748. },
  35749. "properties": {
  35750. "type": "object",
  35751. "properties": {
  35752. "file": {
  35753. "type": "string"
  35754. },
  35755. "event": {
  35756. "type": "string",
  35757. "enum": ["add", "change", "unlink"]
  35758. }
  35759. },
  35760. "required": ["file", "event"],
  35761. "additionalProperties": false
  35762. }
  35763. },
  35764. "required": ["id", "type", "properties"],
  35765. "additionalProperties": false
  35766. },
  35767. "EventPtyCreated": {
  35768. "type": "object",
  35769. "properties": {
  35770. "id": {
  35771. "type": "string",
  35772. "pattern": "^evt_"
  35773. },
  35774. "type": {
  35775. "type": "string",
  35776. "enum": ["pty.created"]
  35777. },
  35778. "properties": {
  35779. "type": "object",
  35780. "properties": {
  35781. "info": {
  35782. "$ref": "#/components/schemas/Pty"
  35783. }
  35784. },
  35785. "required": ["info"],
  35786. "additionalProperties": false
  35787. }
  35788. },
  35789. "required": ["id", "type", "properties"],
  35790. "additionalProperties": false
  35791. },
  35792. "EventPtyUpdated": {
  35793. "type": "object",
  35794. "properties": {
  35795. "id": {
  35796. "type": "string",
  35797. "pattern": "^evt_"
  35798. },
  35799. "type": {
  35800. "type": "string",
  35801. "enum": ["pty.updated"]
  35802. },
  35803. "properties": {
  35804. "type": "object",
  35805. "properties": {
  35806. "info": {
  35807. "$ref": "#/components/schemas/Pty"
  35808. }
  35809. },
  35810. "required": ["info"],
  35811. "additionalProperties": false
  35812. }
  35813. },
  35814. "required": ["id", "type", "properties"],
  35815. "additionalProperties": false
  35816. },
  35817. "EventPtyExited": {
  35818. "type": "object",
  35819. "properties": {
  35820. "id": {
  35821. "type": "string",
  35822. "pattern": "^evt_"
  35823. },
  35824. "type": {
  35825. "type": "string",
  35826. "enum": ["pty.exited"]
  35827. },
  35828. "properties": {
  35829. "type": "object",
  35830. "properties": {
  35831. "id": {
  35832. "type": "string",
  35833. "pattern": "^pty"
  35834. },
  35835. "exitCode": {
  35836. "type": "integer",
  35837. "minimum": 0
  35838. }
  35839. },
  35840. "required": ["id", "exitCode"],
  35841. "additionalProperties": false
  35842. }
  35843. },
  35844. "required": ["id", "type", "properties"],
  35845. "additionalProperties": false
  35846. },
  35847. "EventPtyDeleted": {
  35848. "type": "object",
  35849. "properties": {
  35850. "id": {
  35851. "type": "string",
  35852. "pattern": "^evt_"
  35853. },
  35854. "type": {
  35855. "type": "string",
  35856. "enum": ["pty.deleted"]
  35857. },
  35858. "properties": {
  35859. "type": "object",
  35860. "properties": {
  35861. "id": {
  35862. "type": "string",
  35863. "pattern": "^pty"
  35864. }
  35865. },
  35866. "required": ["id"],
  35867. "additionalProperties": false
  35868. }
  35869. },
  35870. "required": ["id", "type", "properties"],
  35871. "additionalProperties": false
  35872. },
  35873. "EventQuestionV2Asked": {
  35874. "type": "object",
  35875. "properties": {
  35876. "id": {
  35877. "type": "string",
  35878. "pattern": "^evt_"
  35879. },
  35880. "type": {
  35881. "type": "string",
  35882. "enum": ["question.v2.asked"]
  35883. },
  35884. "properties": {
  35885. "type": "object",
  35886. "properties": {
  35887. "id": {
  35888. "type": "string",
  35889. "pattern": "^que"
  35890. },
  35891. "sessionID": {
  35892. "type": "string",
  35893. "pattern": "^ses"
  35894. },
  35895. "questions": {
  35896. "type": "array",
  35897. "items": {
  35898. "$ref": "#/components/schemas/QuestionV2Info"
  35899. },
  35900. "description": "Questions to ask"
  35901. },
  35902. "tool": {
  35903. "$ref": "#/components/schemas/QuestionV2Tool"
  35904. }
  35905. },
  35906. "required": ["id", "sessionID", "questions"],
  35907. "additionalProperties": false
  35908. }
  35909. },
  35910. "required": ["id", "type", "properties"],
  35911. "additionalProperties": false
  35912. },
  35913. "EventQuestionV2Replied": {
  35914. "type": "object",
  35915. "properties": {
  35916. "id": {
  35917. "type": "string",
  35918. "pattern": "^evt_"
  35919. },
  35920. "type": {
  35921. "type": "string",
  35922. "enum": ["question.v2.replied"]
  35923. },
  35924. "properties": {
  35925. "type": "object",
  35926. "properties": {
  35927. "sessionID": {
  35928. "type": "string",
  35929. "pattern": "^ses"
  35930. },
  35931. "requestID": {
  35932. "type": "string",
  35933. "pattern": "^que"
  35934. },
  35935. "answers": {
  35936. "type": "array",
  35937. "items": {
  35938. "$ref": "#/components/schemas/QuestionV2Answer"
  35939. }
  35940. }
  35941. },
  35942. "required": ["sessionID", "requestID", "answers"],
  35943. "additionalProperties": false
  35944. }
  35945. },
  35946. "required": ["id", "type", "properties"],
  35947. "additionalProperties": false
  35948. },
  35949. "EventQuestionV2Rejected": {
  35950. "type": "object",
  35951. "properties": {
  35952. "id": {
  35953. "type": "string",
  35954. "pattern": "^evt_"
  35955. },
  35956. "type": {
  35957. "type": "string",
  35958. "enum": ["question.v2.rejected"]
  35959. },
  35960. "properties": {
  35961. "type": "object",
  35962. "properties": {
  35963. "sessionID": {
  35964. "type": "string",
  35965. "pattern": "^ses"
  35966. },
  35967. "requestID": {
  35968. "type": "string",
  35969. "pattern": "^que"
  35970. }
  35971. },
  35972. "required": ["sessionID", "requestID"],
  35973. "additionalProperties": false
  35974. }
  35975. },
  35976. "required": ["id", "type", "properties"],
  35977. "additionalProperties": false
  35978. },
  35979. "EventTodoUpdated": {
  35980. "type": "object",
  35981. "properties": {
  35982. "id": {
  35983. "type": "string",
  35984. "pattern": "^evt_"
  35985. },
  35986. "type": {
  35987. "type": "string",
  35988. "enum": ["todo.updated"]
  35989. },
  35990. "properties": {
  35991. "type": "object",
  35992. "properties": {
  35993. "sessionID": {
  35994. "type": "string",
  35995. "pattern": "^ses"
  35996. },
  35997. "todos": {
  35998. "type": "array",
  35999. "items": {
  36000. "$ref": "#/components/schemas/Todo"
  36001. }
  36002. }
  36003. },
  36004. "required": ["sessionID", "todos"],
  36005. "additionalProperties": false
  36006. }
  36007. },
  36008. "required": ["id", "type", "properties"],
  36009. "additionalProperties": false
  36010. },
  36011. "EventLspUpdated": {
  36012. "type": "object",
  36013. "properties": {
  36014. "id": {
  36015. "type": "string",
  36016. "pattern": "^evt_"
  36017. },
  36018. "type": {
  36019. "type": "string",
  36020. "enum": ["lsp.updated"]
  36021. },
  36022. "properties": {
  36023. "type": "object",
  36024. "properties": {}
  36025. }
  36026. },
  36027. "required": ["id", "type", "properties"],
  36028. "additionalProperties": false
  36029. },
  36030. "EventPermissionAsked": {
  36031. "type": "object",
  36032. "properties": {
  36033. "id": {
  36034. "type": "string",
  36035. "pattern": "^evt_"
  36036. },
  36037. "type": {
  36038. "type": "string",
  36039. "enum": ["permission.asked"]
  36040. },
  36041. "properties": {
  36042. "type": "object",
  36043. "properties": {
  36044. "id": {
  36045. "type": "string",
  36046. "pattern": "^per"
  36047. },
  36048. "sessionID": {
  36049. "type": "string",
  36050. "pattern": "^ses"
  36051. },
  36052. "permission": {
  36053. "type": "string"
  36054. },
  36055. "patterns": {
  36056. "type": "array",
  36057. "items": {
  36058. "type": "string"
  36059. }
  36060. },
  36061. "metadata": {
  36062. "type": "object"
  36063. },
  36064. "always": {
  36065. "type": "array",
  36066. "items": {
  36067. "type": "string"
  36068. }
  36069. },
  36070. "tool": {
  36071. "type": "object",
  36072. "properties": {
  36073. "messageID": {
  36074. "type": "string"
  36075. },
  36076. "callID": {
  36077. "type": "string"
  36078. }
  36079. },
  36080. "required": ["messageID", "callID"],
  36081. "additionalProperties": false
  36082. }
  36083. },
  36084. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  36085. "additionalProperties": false
  36086. }
  36087. },
  36088. "required": ["id", "type", "properties"],
  36089. "additionalProperties": false
  36090. },
  36091. "EventPermissionReplied": {
  36092. "type": "object",
  36093. "properties": {
  36094. "id": {
  36095. "type": "string",
  36096. "pattern": "^evt_"
  36097. },
  36098. "type": {
  36099. "type": "string",
  36100. "enum": ["permission.replied"]
  36101. },
  36102. "properties": {
  36103. "type": "object",
  36104. "properties": {
  36105. "sessionID": {
  36106. "type": "string",
  36107. "pattern": "^ses"
  36108. },
  36109. "requestID": {
  36110. "type": "string",
  36111. "pattern": "^per"
  36112. },
  36113. "reply": {
  36114. "type": "string",
  36115. "enum": ["once", "always", "reject"]
  36116. }
  36117. },
  36118. "required": ["sessionID", "requestID", "reply"],
  36119. "additionalProperties": false
  36120. }
  36121. },
  36122. "required": ["id", "type", "properties"],
  36123. "additionalProperties": false
  36124. },
  36125. "EventMcpToolsChanged": {
  36126. "type": "object",
  36127. "properties": {
  36128. "id": {
  36129. "type": "string",
  36130. "pattern": "^evt_"
  36131. },
  36132. "type": {
  36133. "type": "string",
  36134. "enum": ["mcp.tools.changed"]
  36135. },
  36136. "properties": {
  36137. "type": "object",
  36138. "properties": {
  36139. "server": {
  36140. "type": "string"
  36141. }
  36142. },
  36143. "required": ["server"],
  36144. "additionalProperties": false
  36145. }
  36146. },
  36147. "required": ["id", "type", "properties"],
  36148. "additionalProperties": false
  36149. },
  36150. "EventMcpBrowserOpenFailed": {
  36151. "type": "object",
  36152. "properties": {
  36153. "id": {
  36154. "type": "string",
  36155. "pattern": "^evt_"
  36156. },
  36157. "type": {
  36158. "type": "string",
  36159. "enum": ["mcp.browser.open.failed"]
  36160. },
  36161. "properties": {
  36162. "type": "object",
  36163. "properties": {
  36164. "mcpName": {
  36165. "type": "string"
  36166. },
  36167. "url": {
  36168. "type": "string"
  36169. }
  36170. },
  36171. "required": ["mcpName", "url"],
  36172. "additionalProperties": false
  36173. }
  36174. },
  36175. "required": ["id", "type", "properties"],
  36176. "additionalProperties": false
  36177. },
  36178. "EventCommandExecuted": {
  36179. "type": "object",
  36180. "properties": {
  36181. "id": {
  36182. "type": "string",
  36183. "pattern": "^evt_"
  36184. },
  36185. "type": {
  36186. "type": "string",
  36187. "enum": ["command.executed"]
  36188. },
  36189. "properties": {
  36190. "type": "object",
  36191. "properties": {
  36192. "name": {
  36193. "type": "string"
  36194. },
  36195. "sessionID": {
  36196. "type": "string",
  36197. "pattern": "^ses"
  36198. },
  36199. "arguments": {
  36200. "type": "string"
  36201. },
  36202. "messageID": {
  36203. "type": "string",
  36204. "pattern": "^msg"
  36205. }
  36206. },
  36207. "required": ["name", "sessionID", "arguments", "messageID"],
  36208. "additionalProperties": false
  36209. }
  36210. },
  36211. "required": ["id", "type", "properties"],
  36212. "additionalProperties": false
  36213. },
  36214. "EventProjectUpdated": {
  36215. "type": "object",
  36216. "properties": {
  36217. "id": {
  36218. "type": "string",
  36219. "pattern": "^evt_"
  36220. },
  36221. "type": {
  36222. "type": "string",
  36223. "enum": ["project.updated"]
  36224. },
  36225. "properties": {
  36226. "type": "object",
  36227. "properties": {
  36228. "id": {
  36229. "type": "string"
  36230. },
  36231. "worktree": {
  36232. "type": "string"
  36233. },
  36234. "vcs": {
  36235. "$ref": "#/components/schemas/ProjectVcs"
  36236. },
  36237. "name": {
  36238. "type": "string"
  36239. },
  36240. "icon": {
  36241. "$ref": "#/components/schemas/ProjectIcon"
  36242. },
  36243. "commands": {
  36244. "$ref": "#/components/schemas/ProjectCommands"
  36245. },
  36246. "time": {
  36247. "$ref": "#/components/schemas/ProjectTime"
  36248. },
  36249. "sandboxes": {
  36250. "type": "array",
  36251. "items": {
  36252. "type": "string"
  36253. }
  36254. }
  36255. },
  36256. "required": ["id", "worktree", "time", "sandboxes"],
  36257. "additionalProperties": false
  36258. }
  36259. },
  36260. "required": ["id", "type", "properties"],
  36261. "additionalProperties": false
  36262. },
  36263. "EventSessionStatus": {
  36264. "type": "object",
  36265. "properties": {
  36266. "id": {
  36267. "type": "string",
  36268. "pattern": "^evt_"
  36269. },
  36270. "type": {
  36271. "type": "string",
  36272. "enum": ["session.status"]
  36273. },
  36274. "properties": {
  36275. "type": "object",
  36276. "properties": {
  36277. "sessionID": {
  36278. "type": "string",
  36279. "pattern": "^ses"
  36280. },
  36281. "status": {
  36282. "$ref": "#/components/schemas/SessionStatus"
  36283. }
  36284. },
  36285. "required": ["sessionID", "status"],
  36286. "additionalProperties": false
  36287. }
  36288. },
  36289. "required": ["id", "type", "properties"],
  36290. "additionalProperties": false
  36291. },
  36292. "EventSessionIdle": {
  36293. "type": "object",
  36294. "properties": {
  36295. "id": {
  36296. "type": "string",
  36297. "pattern": "^evt_"
  36298. },
  36299. "type": {
  36300. "type": "string",
  36301. "enum": ["session.idle"]
  36302. },
  36303. "properties": {
  36304. "type": "object",
  36305. "properties": {
  36306. "sessionID": {
  36307. "type": "string",
  36308. "pattern": "^ses"
  36309. }
  36310. },
  36311. "required": ["sessionID"],
  36312. "additionalProperties": false
  36313. }
  36314. },
  36315. "required": ["id", "type", "properties"],
  36316. "additionalProperties": false
  36317. },
  36318. "EventQuestionAsked": {
  36319. "type": "object",
  36320. "properties": {
  36321. "id": {
  36322. "type": "string",
  36323. "pattern": "^evt_"
  36324. },
  36325. "type": {
  36326. "type": "string",
  36327. "enum": ["question.asked"]
  36328. },
  36329. "properties": {
  36330. "type": "object",
  36331. "properties": {
  36332. "id": {
  36333. "type": "string",
  36334. "pattern": "^que"
  36335. },
  36336. "sessionID": {
  36337. "type": "string",
  36338. "pattern": "^ses"
  36339. },
  36340. "questions": {
  36341. "type": "array",
  36342. "items": {
  36343. "$ref": "#/components/schemas/QuestionInfo"
  36344. },
  36345. "description": "Questions to ask"
  36346. },
  36347. "tool": {
  36348. "$ref": "#/components/schemas/QuestionTool"
  36349. }
  36350. },
  36351. "required": ["id", "sessionID", "questions"],
  36352. "additionalProperties": false
  36353. }
  36354. },
  36355. "required": ["id", "type", "properties"],
  36356. "additionalProperties": false
  36357. },
  36358. "EventQuestionReplied": {
  36359. "type": "object",
  36360. "properties": {
  36361. "id": {
  36362. "type": "string",
  36363. "pattern": "^evt_"
  36364. },
  36365. "type": {
  36366. "type": "string",
  36367. "enum": ["question.replied"]
  36368. },
  36369. "properties": {
  36370. "type": "object",
  36371. "properties": {
  36372. "sessionID": {
  36373. "type": "string",
  36374. "pattern": "^ses"
  36375. },
  36376. "requestID": {
  36377. "type": "string",
  36378. "pattern": "^que"
  36379. },
  36380. "answers": {
  36381. "type": "array",
  36382. "items": {
  36383. "$ref": "#/components/schemas/QuestionAnswer"
  36384. }
  36385. }
  36386. },
  36387. "required": ["sessionID", "requestID", "answers"],
  36388. "additionalProperties": false
  36389. }
  36390. },
  36391. "required": ["id", "type", "properties"],
  36392. "additionalProperties": false
  36393. },
  36394. "EventQuestionRejected": {
  36395. "type": "object",
  36396. "properties": {
  36397. "id": {
  36398. "type": "string",
  36399. "pattern": "^evt_"
  36400. },
  36401. "type": {
  36402. "type": "string",
  36403. "enum": ["question.rejected"]
  36404. },
  36405. "properties": {
  36406. "type": "object",
  36407. "properties": {
  36408. "sessionID": {
  36409. "type": "string",
  36410. "pattern": "^ses"
  36411. },
  36412. "requestID": {
  36413. "type": "string",
  36414. "pattern": "^que"
  36415. }
  36416. },
  36417. "required": ["sessionID", "requestID"],
  36418. "additionalProperties": false
  36419. }
  36420. },
  36421. "required": ["id", "type", "properties"],
  36422. "additionalProperties": false
  36423. },
  36424. "EventSessionCompacted": {
  36425. "type": "object",
  36426. "properties": {
  36427. "id": {
  36428. "type": "string",
  36429. "pattern": "^evt_"
  36430. },
  36431. "type": {
  36432. "type": "string",
  36433. "enum": ["session.compacted"]
  36434. },
  36435. "properties": {
  36436. "type": "object",
  36437. "properties": {
  36438. "sessionID": {
  36439. "type": "string",
  36440. "pattern": "^ses"
  36441. }
  36442. },
  36443. "required": ["sessionID"],
  36444. "additionalProperties": false
  36445. }
  36446. },
  36447. "required": ["id", "type", "properties"],
  36448. "additionalProperties": false
  36449. },
  36450. "EventVcsBranchUpdated": {
  36451. "type": "object",
  36452. "properties": {
  36453. "id": {
  36454. "type": "string",
  36455. "pattern": "^evt_"
  36456. },
  36457. "type": {
  36458. "type": "string",
  36459. "enum": ["vcs.branch.updated"]
  36460. },
  36461. "properties": {
  36462. "type": "object",
  36463. "properties": {
  36464. "branch": {
  36465. "type": "string"
  36466. }
  36467. },
  36468. "additionalProperties": false
  36469. }
  36470. },
  36471. "required": ["id", "type", "properties"],
  36472. "additionalProperties": false
  36473. },
  36474. "EventWorkspaceReady": {
  36475. "type": "object",
  36476. "properties": {
  36477. "id": {
  36478. "type": "string",
  36479. "pattern": "^evt_"
  36480. },
  36481. "type": {
  36482. "type": "string",
  36483. "enum": ["workspace.ready"]
  36484. },
  36485. "properties": {
  36486. "type": "object",
  36487. "properties": {
  36488. "name": {
  36489. "type": "string"
  36490. }
  36491. },
  36492. "required": ["name"],
  36493. "additionalProperties": false
  36494. }
  36495. },
  36496. "required": ["id", "type", "properties"],
  36497. "additionalProperties": false
  36498. },
  36499. "EventWorkspaceFailed": {
  36500. "type": "object",
  36501. "properties": {
  36502. "id": {
  36503. "type": "string",
  36504. "pattern": "^evt_"
  36505. },
  36506. "type": {
  36507. "type": "string",
  36508. "enum": ["workspace.failed"]
  36509. },
  36510. "properties": {
  36511. "type": "object",
  36512. "properties": {
  36513. "message": {
  36514. "type": "string"
  36515. }
  36516. },
  36517. "required": ["message"],
  36518. "additionalProperties": false
  36519. }
  36520. },
  36521. "required": ["id", "type", "properties"],
  36522. "additionalProperties": false
  36523. },
  36524. "EventWorkspaceStatus": {
  36525. "type": "object",
  36526. "properties": {
  36527. "id": {
  36528. "type": "string",
  36529. "pattern": "^evt_"
  36530. },
  36531. "type": {
  36532. "type": "string",
  36533. "enum": ["workspace.status"]
  36534. },
  36535. "properties": {
  36536. "type": "object",
  36537. "properties": {
  36538. "workspaceID": {
  36539. "type": "string",
  36540. "pattern": "^wrk"
  36541. },
  36542. "status": {
  36543. "type": "string",
  36544. "enum": ["connected", "connecting", "disconnected", "error"]
  36545. }
  36546. },
  36547. "required": ["workspaceID", "status"],
  36548. "additionalProperties": false
  36549. }
  36550. },
  36551. "required": ["id", "type", "properties"],
  36552. "additionalProperties": false
  36553. },
  36554. "EventWorktreeReady": {
  36555. "type": "object",
  36556. "properties": {
  36557. "id": {
  36558. "type": "string",
  36559. "pattern": "^evt_"
  36560. },
  36561. "type": {
  36562. "type": "string",
  36563. "enum": ["worktree.ready"]
  36564. },
  36565. "properties": {
  36566. "type": "object",
  36567. "properties": {
  36568. "name": {
  36569. "type": "string"
  36570. },
  36571. "branch": {
  36572. "type": "string"
  36573. }
  36574. },
  36575. "required": ["name"],
  36576. "additionalProperties": false
  36577. }
  36578. },
  36579. "required": ["id", "type", "properties"],
  36580. "additionalProperties": false
  36581. },
  36582. "EventWorktreeFailed": {
  36583. "type": "object",
  36584. "properties": {
  36585. "id": {
  36586. "type": "string",
  36587. "pattern": "^evt_"
  36588. },
  36589. "type": {
  36590. "type": "string",
  36591. "enum": ["worktree.failed"]
  36592. },
  36593. "properties": {
  36594. "type": "object",
  36595. "properties": {
  36596. "message": {
  36597. "type": "string"
  36598. }
  36599. },
  36600. "required": ["message"],
  36601. "additionalProperties": false
  36602. }
  36603. },
  36604. "required": ["id", "type", "properties"],
  36605. "additionalProperties": false
  36606. },
  36607. "EventServerConnected": {
  36608. "type": "object",
  36609. "properties": {
  36610. "id": {
  36611. "type": "string",
  36612. "pattern": "^evt_"
  36613. },
  36614. "type": {
  36615. "type": "string",
  36616. "enum": ["server.connected"]
  36617. },
  36618. "properties": {
  36619. "type": "object",
  36620. "properties": {}
  36621. }
  36622. },
  36623. "required": ["id", "type", "properties"],
  36624. "additionalProperties": false
  36625. },
  36626. "EventGlobalDisposed": {
  36627. "type": "object",
  36628. "properties": {
  36629. "id": {
  36630. "type": "string",
  36631. "pattern": "^evt_"
  36632. },
  36633. "type": {
  36634. "type": "string",
  36635. "enum": ["global.disposed"]
  36636. },
  36637. "properties": {
  36638. "type": "object",
  36639. "properties": {}
  36640. }
  36641. },
  36642. "required": ["id", "type", "properties"],
  36643. "additionalProperties": false
  36644. },
  36645. "CredentialOAuth": {
  36646. "type": "object",
  36647. "properties": {
  36648. "type": {
  36649. "type": "string",
  36650. "enum": ["oauth"]
  36651. },
  36652. "methodID": {
  36653. "type": "string"
  36654. },
  36655. "refresh": {
  36656. "type": "string"
  36657. },
  36658. "access": {
  36659. "type": "string"
  36660. },
  36661. "expires": {
  36662. "type": "integer",
  36663. "minimum": 0
  36664. },
  36665. "metadata": {
  36666. "type": "object"
  36667. }
  36668. },
  36669. "required": ["type", "methodID", "refresh", "access", "expires"],
  36670. "additionalProperties": false
  36671. },
  36672. "CredentialKey": {
  36673. "type": "object",
  36674. "properties": {
  36675. "type": {
  36676. "type": "string",
  36677. "enum": ["key"]
  36678. },
  36679. "key": {
  36680. "type": "string"
  36681. },
  36682. "metadata": {
  36683. "type": "object"
  36684. }
  36685. },
  36686. "required": ["type", "key"],
  36687. "additionalProperties": false
  36688. },
  36689. "SkillV2DirectorySource": {
  36690. "type": "object",
  36691. "properties": {
  36692. "type": {
  36693. "type": "string",
  36694. "enum": ["directory"]
  36695. },
  36696. "path": {
  36697. "type": "string"
  36698. }
  36699. },
  36700. "required": ["type", "path"],
  36701. "additionalProperties": false
  36702. },
  36703. "SkillV2UrlSource": {
  36704. "type": "object",
  36705. "properties": {
  36706. "type": {
  36707. "type": "string",
  36708. "enum": ["url"]
  36709. },
  36710. "url": {
  36711. "type": "string"
  36712. }
  36713. },
  36714. "required": ["type", "url"],
  36715. "additionalProperties": false
  36716. },
  36717. "SkillV2EmbeddedSource": {
  36718. "type": "object",
  36719. "properties": {
  36720. "type": {
  36721. "type": "string",
  36722. "enum": ["embedded"]
  36723. },
  36724. "skill": {
  36725. "$ref": "#/components/schemas/SkillV2Info"
  36726. }
  36727. },
  36728. "required": ["type", "skill"],
  36729. "additionalProperties": false
  36730. },
  36731. "BadRequestError": {
  36732. "type": "object",
  36733. "required": ["name", "data"],
  36734. "properties": {
  36735. "name": {
  36736. "type": "string",
  36737. "enum": ["BadRequest"]
  36738. },
  36739. "data": {
  36740. "type": "object",
  36741. "required": ["message"],
  36742. "properties": {
  36743. "message": {
  36744. "type": "string"
  36745. },
  36746. "kind": {
  36747. "type": "string",
  36748. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36749. }
  36750. }
  36751. }
  36752. }
  36753. }
  36754. }
  36755. },
  36756. "security": [],
  36757. "tags": [
  36758. {
  36759. "name": "control",
  36760. "description": "Control plane routes."
  36761. },
  36762. {
  36763. "name": "controlPlane",
  36764. "description": "Control-plane orchestration routes."
  36765. },
  36766. {
  36767. "name": "global",
  36768. "description": "Global server routes."
  36769. },
  36770. {
  36771. "name": "event",
  36772. "description": "Instance event stream route."
  36773. },
  36774. {
  36775. "name": "config",
  36776. "description": "Experimental HttpApi config routes."
  36777. },
  36778. {
  36779. "name": "experimental",
  36780. "description": "Experimental HttpApi read-only routes."
  36781. },
  36782. {
  36783. "name": "file",
  36784. "description": "Experimental HttpApi file routes."
  36785. },
  36786. {
  36787. "name": "instance",
  36788. "description": "Experimental HttpApi instance read routes."
  36789. },
  36790. {
  36791. "name": "mcp",
  36792. "description": "Experimental HttpApi MCP routes."
  36793. },
  36794. {
  36795. "name": "project",
  36796. "description": "Experimental HttpApi project routes."
  36797. },
  36798. {
  36799. "name": "projectCopy",
  36800. "description": "Project copy naming routes."
  36801. },
  36802. {
  36803. "name": "pty",
  36804. "description": "Experimental HttpApi PTY routes."
  36805. },
  36806. {
  36807. "name": "question",
  36808. "description": "Question routes."
  36809. },
  36810. {
  36811. "name": "permission",
  36812. "description": "Experimental HttpApi permission routes."
  36813. },
  36814. {
  36815. "name": "provider",
  36816. "description": "Experimental HttpApi provider routes."
  36817. },
  36818. {
  36819. "name": "session",
  36820. "description": "Experimental HttpApi session routes."
  36821. },
  36822. {
  36823. "name": "sync",
  36824. "description": "Experimental HttpApi sync routes."
  36825. },
  36826. {
  36827. "name": "tui",
  36828. "description": "Experimental HttpApi TUI routes."
  36829. },
  36830. {
  36831. "name": "workspace",
  36832. "description": "Experimental HttpApi workspace routes."
  36833. },
  36834. {
  36835. "name": "opencode HttpApi",
  36836. "description": "Experimental HttpApi surface for selected instance routes."
  36837. },
  36838. {
  36839. "name": "opencode HttpApi",
  36840. "description": "Experimental HttpApi surface for selected instance routes."
  36841. },
  36842. {
  36843. "name": "opencode HttpApi",
  36844. "description": "Experimental HttpApi surface for selected instance routes."
  36845. },
  36846. {
  36847. "name": "sessions",
  36848. "description": "Experimental session routes."
  36849. },
  36850. {
  36851. "name": "messages",
  36852. "description": "Experimental message routes."
  36853. },
  36854. {
  36855. "name": "models",
  36856. "description": "Experimental model routes."
  36857. },
  36858. {
  36859. "name": "providers",
  36860. "description": "Experimental provider routes."
  36861. },
  36862. {
  36863. "name": "integrations",
  36864. "description": "Integration discovery and authentication routes."
  36865. },
  36866. {
  36867. "name": "opencode HttpApi",
  36868. "description": "Experimental HttpApi surface for selected instance routes."
  36869. },
  36870. {
  36871. "name": "permissions",
  36872. "description": "Experimental permission routes."
  36873. },
  36874. {
  36875. "name": "filesystem",
  36876. "description": "Experimental location-scoped filesystem routes."
  36877. },
  36878. {
  36879. "name": "commands",
  36880. "description": "Experimental command routes."
  36881. },
  36882. {
  36883. "name": "skills",
  36884. "description": "Experimental skill routes."
  36885. },
  36886. {
  36887. "name": "events",
  36888. "description": "Experimental event stream route."
  36889. },
  36890. {
  36891. "name": "pty",
  36892. "description": "Experimental location-scoped PTY routes."
  36893. },
  36894. {
  36895. "name": "session questions",
  36896. "description": "Experimental session question routes."
  36897. },
  36898. {
  36899. "name": "reference",
  36900. "description": "Location-scoped project references."
  36901. },
  36902. {
  36903. "name": "projectCopy",
  36904. "description": "Project copy management routes."
  36905. },
  36906. {
  36907. "name": "pty",
  36908. "description": "PTY websocket route."
  36909. }
  36910. ]
  36911. }