openapi.json 1.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929
  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/SessionDurableEventStream"
  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-websocket": true,
  14511. "x-codeSamples": [
  14512. {
  14513. "lang": "js",
  14514. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  14515. }
  14516. ]
  14517. }
  14518. },
  14519. "/api/question/request": {
  14520. "get": {
  14521. "tags": ["session questions"],
  14522. "operationId": "v2.question.request.list",
  14523. "parameters": [
  14524. {
  14525. "name": "location",
  14526. "in": "query",
  14527. "schema": {
  14528. "type": "object",
  14529. "properties": {
  14530. "directory": {
  14531. "type": "string"
  14532. },
  14533. "workspace": {
  14534. "type": "string"
  14535. }
  14536. },
  14537. "additionalProperties": false
  14538. },
  14539. "required": false,
  14540. "style": "deepObject",
  14541. "explode": true
  14542. }
  14543. ],
  14544. "security": [],
  14545. "responses": {
  14546. "200": {
  14547. "description": "Success",
  14548. "content": {
  14549. "application/json": {
  14550. "schema": {
  14551. "type": "object",
  14552. "properties": {
  14553. "location": {
  14554. "$ref": "#/components/schemas/LocationInfo"
  14555. },
  14556. "data": {
  14557. "type": "array",
  14558. "items": {
  14559. "$ref": "#/components/schemas/QuestionV2Request"
  14560. }
  14561. }
  14562. },
  14563. "required": ["location", "data"],
  14564. "additionalProperties": false
  14565. }
  14566. }
  14567. }
  14568. },
  14569. "400": {
  14570. "description": "InvalidRequestError",
  14571. "content": {
  14572. "application/json": {
  14573. "schema": {
  14574. "$ref": "#/components/schemas/InvalidRequestError"
  14575. }
  14576. }
  14577. }
  14578. },
  14579. "401": {
  14580. "description": "UnauthorizedError",
  14581. "content": {
  14582. "application/json": {
  14583. "schema": {
  14584. "$ref": "#/components/schemas/UnauthorizedError"
  14585. }
  14586. }
  14587. }
  14588. }
  14589. },
  14590. "description": "Retrieve pending question requests for a location.",
  14591. "summary": "List pending question requests",
  14592. "x-codeSamples": [
  14593. {
  14594. "lang": "js",
  14595. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  14596. }
  14597. ]
  14598. }
  14599. },
  14600. "/api/session/{sessionID}/question": {
  14601. "get": {
  14602. "tags": ["session questions"],
  14603. "operationId": "v2.session.question.list",
  14604. "parameters": [
  14605. {
  14606. "name": "sessionID",
  14607. "in": "path",
  14608. "schema": {
  14609. "type": "string",
  14610. "pattern": "^ses"
  14611. },
  14612. "required": true
  14613. }
  14614. ],
  14615. "security": [],
  14616. "responses": {
  14617. "200": {
  14618. "description": "Success",
  14619. "content": {
  14620. "application/json": {
  14621. "schema": {
  14622. "type": "object",
  14623. "properties": {
  14624. "data": {
  14625. "type": "array",
  14626. "items": {
  14627. "$ref": "#/components/schemas/QuestionV2Request"
  14628. }
  14629. }
  14630. },
  14631. "required": ["data"],
  14632. "additionalProperties": false
  14633. }
  14634. }
  14635. }
  14636. },
  14637. "400": {
  14638. "description": "InvalidRequestError",
  14639. "content": {
  14640. "application/json": {
  14641. "schema": {
  14642. "$ref": "#/components/schemas/InvalidRequestError"
  14643. }
  14644. }
  14645. }
  14646. },
  14647. "401": {
  14648. "description": "UnauthorizedError",
  14649. "content": {
  14650. "application/json": {
  14651. "schema": {
  14652. "$ref": "#/components/schemas/UnauthorizedError"
  14653. }
  14654. }
  14655. }
  14656. },
  14657. "404": {
  14658. "description": "SessionNotFoundError",
  14659. "content": {
  14660. "application/json": {
  14661. "schema": {
  14662. "anyOf": [
  14663. {
  14664. "$ref": "#/components/schemas/SessionNotFoundError"
  14665. },
  14666. {
  14667. "$ref": "#/components/schemas/SessionNotFoundError"
  14668. }
  14669. ]
  14670. }
  14671. }
  14672. }
  14673. }
  14674. },
  14675. "description": "Retrieve pending question requests owned by a session.",
  14676. "summary": "List session question requests",
  14677. "x-codeSamples": [
  14678. {
  14679. "lang": "js",
  14680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  14681. }
  14682. ]
  14683. }
  14684. },
  14685. "/api/session/{sessionID}/question/{requestID}/reply": {
  14686. "post": {
  14687. "tags": ["session questions"],
  14688. "operationId": "v2.session.question.reply",
  14689. "parameters": [
  14690. {
  14691. "name": "sessionID",
  14692. "in": "path",
  14693. "schema": {
  14694. "type": "string",
  14695. "pattern": "^ses"
  14696. },
  14697. "required": true
  14698. },
  14699. {
  14700. "name": "requestID",
  14701. "in": "path",
  14702. "schema": {
  14703. "type": "string",
  14704. "pattern": "^que"
  14705. },
  14706. "required": true
  14707. }
  14708. ],
  14709. "security": [],
  14710. "responses": {
  14711. "204": {
  14712. "description": "<No Content>"
  14713. },
  14714. "400": {
  14715. "description": "InvalidRequestError",
  14716. "content": {
  14717. "application/json": {
  14718. "schema": {
  14719. "$ref": "#/components/schemas/InvalidRequestError"
  14720. }
  14721. }
  14722. }
  14723. },
  14724. "401": {
  14725. "description": "UnauthorizedError",
  14726. "content": {
  14727. "application/json": {
  14728. "schema": {
  14729. "$ref": "#/components/schemas/UnauthorizedError"
  14730. }
  14731. }
  14732. }
  14733. },
  14734. "404": {
  14735. "description": "SessionNotFoundError | QuestionNotFoundError",
  14736. "content": {
  14737. "application/json": {
  14738. "schema": {
  14739. "anyOf": [
  14740. {
  14741. "$ref": "#/components/schemas/QuestionNotFoundError"
  14742. },
  14743. {
  14744. "$ref": "#/components/schemas/SessionNotFoundError"
  14745. },
  14746. {
  14747. "$ref": "#/components/schemas/SessionNotFoundError"
  14748. }
  14749. ]
  14750. }
  14751. }
  14752. }
  14753. }
  14754. },
  14755. "description": "Answer a pending question request owned by a session.",
  14756. "summary": "Reply to pending question request",
  14757. "requestBody": {
  14758. "content": {
  14759. "application/json": {
  14760. "schema": {
  14761. "$ref": "#/components/schemas/QuestionV2Reply"
  14762. }
  14763. }
  14764. },
  14765. "required": true
  14766. },
  14767. "x-codeSamples": [
  14768. {
  14769. "lang": "js",
  14770. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  14771. }
  14772. ]
  14773. }
  14774. },
  14775. "/api/session/{sessionID}/question/{requestID}/reject": {
  14776. "post": {
  14777. "tags": ["session questions"],
  14778. "operationId": "v2.session.question.reject",
  14779. "parameters": [
  14780. {
  14781. "name": "sessionID",
  14782. "in": "path",
  14783. "schema": {
  14784. "type": "string",
  14785. "pattern": "^ses"
  14786. },
  14787. "required": true
  14788. },
  14789. {
  14790. "name": "requestID",
  14791. "in": "path",
  14792. "schema": {
  14793. "type": "string",
  14794. "pattern": "^que"
  14795. },
  14796. "required": true
  14797. }
  14798. ],
  14799. "security": [],
  14800. "responses": {
  14801. "204": {
  14802. "description": "<No Content>"
  14803. },
  14804. "400": {
  14805. "description": "InvalidRequestError",
  14806. "content": {
  14807. "application/json": {
  14808. "schema": {
  14809. "$ref": "#/components/schemas/InvalidRequestError"
  14810. }
  14811. }
  14812. }
  14813. },
  14814. "401": {
  14815. "description": "UnauthorizedError",
  14816. "content": {
  14817. "application/json": {
  14818. "schema": {
  14819. "$ref": "#/components/schemas/UnauthorizedError"
  14820. }
  14821. }
  14822. }
  14823. },
  14824. "404": {
  14825. "description": "SessionNotFoundError | QuestionNotFoundError",
  14826. "content": {
  14827. "application/json": {
  14828. "schema": {
  14829. "anyOf": [
  14830. {
  14831. "$ref": "#/components/schemas/QuestionNotFoundError"
  14832. },
  14833. {
  14834. "$ref": "#/components/schemas/SessionNotFoundError"
  14835. },
  14836. {
  14837. "$ref": "#/components/schemas/SessionNotFoundError"
  14838. }
  14839. ]
  14840. }
  14841. }
  14842. }
  14843. }
  14844. },
  14845. "description": "Reject a pending question request owned by a session.",
  14846. "summary": "Reject pending question request",
  14847. "x-codeSamples": [
  14848. {
  14849. "lang": "js",
  14850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14851. }
  14852. ]
  14853. }
  14854. },
  14855. "/api/reference": {
  14856. "get": {
  14857. "tags": ["reference"],
  14858. "operationId": "v2.reference.list",
  14859. "parameters": [
  14860. {
  14861. "name": "location",
  14862. "in": "query",
  14863. "schema": {
  14864. "type": "object",
  14865. "properties": {
  14866. "directory": {
  14867. "type": "string"
  14868. },
  14869. "workspace": {
  14870. "type": "string"
  14871. }
  14872. },
  14873. "additionalProperties": false
  14874. },
  14875. "required": false,
  14876. "style": "deepObject",
  14877. "explode": true
  14878. }
  14879. ],
  14880. "security": [],
  14881. "responses": {
  14882. "200": {
  14883. "description": "Success",
  14884. "content": {
  14885. "application/json": {
  14886. "schema": {
  14887. "type": "object",
  14888. "properties": {
  14889. "location": {
  14890. "$ref": "#/components/schemas/LocationInfo"
  14891. },
  14892. "data": {
  14893. "type": "array",
  14894. "items": {
  14895. "$ref": "#/components/schemas/ReferenceInfo"
  14896. }
  14897. }
  14898. },
  14899. "required": ["location", "data"],
  14900. "additionalProperties": false
  14901. }
  14902. }
  14903. }
  14904. },
  14905. "400": {
  14906. "description": "InvalidRequestError",
  14907. "content": {
  14908. "application/json": {
  14909. "schema": {
  14910. "$ref": "#/components/schemas/InvalidRequestError"
  14911. }
  14912. }
  14913. }
  14914. },
  14915. "401": {
  14916. "description": "UnauthorizedError",
  14917. "content": {
  14918. "application/json": {
  14919. "schema": {
  14920. "$ref": "#/components/schemas/UnauthorizedError"
  14921. }
  14922. }
  14923. }
  14924. }
  14925. },
  14926. "description": "List references available in the requested location.",
  14927. "summary": "List references",
  14928. "x-codeSamples": [
  14929. {
  14930. "lang": "js",
  14931. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14932. }
  14933. ]
  14934. }
  14935. },
  14936. "/experimental/project/{projectID}/copy": {
  14937. "post": {
  14938. "tags": ["projectCopy"],
  14939. "operationId": "v2.projectCopy.create",
  14940. "parameters": [
  14941. {
  14942. "name": "projectID",
  14943. "in": "path",
  14944. "schema": {
  14945. "type": "string"
  14946. },
  14947. "required": true
  14948. },
  14949. {
  14950. "name": "location",
  14951. "in": "query",
  14952. "schema": {
  14953. "type": "object",
  14954. "properties": {
  14955. "directory": {
  14956. "type": "string"
  14957. },
  14958. "workspace": {
  14959. "type": "string"
  14960. }
  14961. },
  14962. "additionalProperties": false
  14963. },
  14964. "required": false,
  14965. "style": "deepObject",
  14966. "explode": true
  14967. }
  14968. ],
  14969. "responses": {
  14970. "200": {
  14971. "description": "ProjectCopy.Copy",
  14972. "content": {
  14973. "application/json": {
  14974. "schema": {
  14975. "$ref": "#/components/schemas/ProjectCopyCopy"
  14976. }
  14977. }
  14978. }
  14979. },
  14980. "400": {
  14981. "description": "ProjectCopyError | InvalidRequestError",
  14982. "content": {
  14983. "application/json": {
  14984. "schema": {
  14985. "anyOf": [
  14986. {
  14987. "$ref": "#/components/schemas/ProjectCopyError"
  14988. },
  14989. {
  14990. "$ref": "#/components/schemas/InvalidRequestError"
  14991. }
  14992. ]
  14993. }
  14994. }
  14995. }
  14996. }
  14997. },
  14998. "requestBody": {
  14999. "content": {
  15000. "application/json": {
  15001. "schema": {
  15002. "type": "object",
  15003. "properties": {
  15004. "strategy": {
  15005. "type": "string"
  15006. },
  15007. "directory": {
  15008. "type": "string"
  15009. },
  15010. "name": {
  15011. "type": "string"
  15012. }
  15013. },
  15014. "required": ["strategy", "directory"],
  15015. "additionalProperties": false
  15016. }
  15017. }
  15018. }
  15019. },
  15020. "x-codeSamples": [
  15021. {
  15022. "lang": "js",
  15023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  15024. }
  15025. ]
  15026. },
  15027. "delete": {
  15028. "tags": ["projectCopy"],
  15029. "operationId": "v2.projectCopy.remove",
  15030. "parameters": [
  15031. {
  15032. "name": "projectID",
  15033. "in": "path",
  15034. "schema": {
  15035. "type": "string"
  15036. },
  15037. "required": true
  15038. },
  15039. {
  15040. "name": "location",
  15041. "in": "query",
  15042. "schema": {
  15043. "type": "object",
  15044. "properties": {
  15045. "directory": {
  15046. "type": "string"
  15047. },
  15048. "workspace": {
  15049. "type": "string"
  15050. }
  15051. },
  15052. "additionalProperties": false
  15053. },
  15054. "required": false,
  15055. "style": "deepObject",
  15056. "explode": true
  15057. }
  15058. ],
  15059. "responses": {
  15060. "204": {
  15061. "description": "<No Content>"
  15062. },
  15063. "400": {
  15064. "description": "ProjectCopyError | InvalidRequestError",
  15065. "content": {
  15066. "application/json": {
  15067. "schema": {
  15068. "anyOf": [
  15069. {
  15070. "$ref": "#/components/schemas/ProjectCopyError"
  15071. },
  15072. {
  15073. "$ref": "#/components/schemas/InvalidRequestError"
  15074. }
  15075. ]
  15076. }
  15077. }
  15078. }
  15079. }
  15080. },
  15081. "requestBody": {
  15082. "content": {
  15083. "application/json": {
  15084. "schema": {
  15085. "type": "object",
  15086. "properties": {
  15087. "directory": {
  15088. "type": "string"
  15089. },
  15090. "force": {
  15091. "type": "boolean"
  15092. }
  15093. },
  15094. "required": ["directory", "force"],
  15095. "additionalProperties": false
  15096. }
  15097. }
  15098. }
  15099. },
  15100. "x-codeSamples": [
  15101. {
  15102. "lang": "js",
  15103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  15104. }
  15105. ]
  15106. }
  15107. },
  15108. "/experimental/project/{projectID}/copy/refresh": {
  15109. "post": {
  15110. "tags": ["projectCopy"],
  15111. "operationId": "v2.projectCopy.refresh",
  15112. "parameters": [
  15113. {
  15114. "name": "projectID",
  15115. "in": "path",
  15116. "schema": {
  15117. "type": "string"
  15118. },
  15119. "required": true
  15120. },
  15121. {
  15122. "name": "location",
  15123. "in": "query",
  15124. "schema": {
  15125. "type": "object",
  15126. "properties": {
  15127. "directory": {
  15128. "type": "string"
  15129. },
  15130. "workspace": {
  15131. "type": "string"
  15132. }
  15133. },
  15134. "additionalProperties": false
  15135. },
  15136. "required": false,
  15137. "style": "deepObject",
  15138. "explode": true
  15139. }
  15140. ],
  15141. "responses": {
  15142. "204": {
  15143. "description": "<No Content>"
  15144. },
  15145. "400": {
  15146. "description": "ProjectCopyError | InvalidRequestError",
  15147. "content": {
  15148. "application/json": {
  15149. "schema": {
  15150. "anyOf": [
  15151. {
  15152. "$ref": "#/components/schemas/ProjectCopyError"
  15153. },
  15154. {
  15155. "$ref": "#/components/schemas/InvalidRequestError"
  15156. }
  15157. ]
  15158. }
  15159. }
  15160. }
  15161. }
  15162. },
  15163. "x-codeSamples": [
  15164. {
  15165. "lang": "js",
  15166. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  15167. }
  15168. ]
  15169. }
  15170. },
  15171. "/pty/{ptyID}/connect": {
  15172. "get": {
  15173. "tags": ["pty"],
  15174. "operationId": "pty.connect",
  15175. "parameters": [
  15176. {
  15177. "name": "ptyID",
  15178. "in": "path",
  15179. "schema": {
  15180. "type": "string",
  15181. "pattern": "^pty"
  15182. },
  15183. "required": true
  15184. },
  15185. {
  15186. "in": "query",
  15187. "name": "directory",
  15188. "schema": {
  15189. "type": "string"
  15190. }
  15191. },
  15192. {
  15193. "in": "query",
  15194. "name": "workspace",
  15195. "schema": {
  15196. "type": "string"
  15197. }
  15198. },
  15199. {
  15200. "in": "query",
  15201. "name": "cursor",
  15202. "schema": {
  15203. "type": "string"
  15204. }
  15205. },
  15206. {
  15207. "in": "query",
  15208. "name": "ticket",
  15209. "schema": {
  15210. "type": "string"
  15211. }
  15212. }
  15213. ],
  15214. "responses": {
  15215. "200": {
  15216. "description": "Connected session",
  15217. "content": {
  15218. "application/json": {
  15219. "schema": {
  15220. "type": "boolean",
  15221. "description": "Connected session"
  15222. }
  15223. }
  15224. }
  15225. },
  15226. "403": {
  15227. "description": "Forbidden",
  15228. "content": {
  15229. "application/json": {
  15230. "schema": {
  15231. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  15232. }
  15233. }
  15234. }
  15235. },
  15236. "404": {
  15237. "description": "Not found",
  15238. "content": {
  15239. "application/json": {
  15240. "schema": {
  15241. "$ref": "#/components/schemas/NotFoundError"
  15242. }
  15243. }
  15244. }
  15245. }
  15246. },
  15247. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  15248. "summary": "Connect to PTY session",
  15249. "x-codeSamples": [
  15250. {
  15251. "lang": "js",
  15252. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  15253. }
  15254. ]
  15255. }
  15256. }
  15257. },
  15258. "components": {
  15259. "schemas": {
  15260. "Event": {
  15261. "anyOf": [
  15262. {
  15263. "$ref": "#/components/schemas/EventModels-devRefreshed"
  15264. },
  15265. {
  15266. "$ref": "#/components/schemas/EventIntegrationUpdated"
  15267. },
  15268. {
  15269. "$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
  15270. },
  15271. {
  15272. "$ref": "#/components/schemas/EventCatalogUpdated"
  15273. },
  15274. {
  15275. "$ref": "#/components/schemas/EventSessionCreated"
  15276. },
  15277. {
  15278. "$ref": "#/components/schemas/EventSessionUpdated"
  15279. },
  15280. {
  15281. "$ref": "#/components/schemas/EventSessionDeleted"
  15282. },
  15283. {
  15284. "$ref": "#/components/schemas/EventMessageUpdated"
  15285. },
  15286. {
  15287. "$ref": "#/components/schemas/EventMessageRemoved"
  15288. },
  15289. {
  15290. "$ref": "#/components/schemas/EventMessagePartUpdated"
  15291. },
  15292. {
  15293. "$ref": "#/components/schemas/EventMessagePartRemoved"
  15294. },
  15295. {
  15296. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  15297. },
  15298. {
  15299. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  15300. },
  15301. {
  15302. "$ref": "#/components/schemas/EventSessionNextMoved"
  15303. },
  15304. {
  15305. "$ref": "#/components/schemas/EventSessionNextPrompted"
  15306. },
  15307. {
  15308. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  15309. },
  15310. {
  15311. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  15312. },
  15313. {
  15314. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  15315. },
  15316. {
  15317. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  15318. },
  15319. {
  15320. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  15321. },
  15322. {
  15323. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  15324. },
  15325. {
  15326. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  15327. },
  15328. {
  15329. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  15330. },
  15331. {
  15332. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  15333. },
  15334. {
  15335. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  15336. },
  15337. {
  15338. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  15339. },
  15340. {
  15341. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  15342. },
  15343. {
  15344. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  15345. },
  15346. {
  15347. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  15348. },
  15349. {
  15350. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  15351. },
  15352. {
  15353. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  15354. },
  15355. {
  15356. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  15357. },
  15358. {
  15359. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  15360. },
  15361. {
  15362. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  15363. },
  15364. {
  15365. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  15366. },
  15367. {
  15368. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  15369. },
  15370. {
  15371. "$ref": "#/components/schemas/EventSessionNextRetried"
  15372. },
  15373. {
  15374. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  15375. },
  15376. {
  15377. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  15378. },
  15379. {
  15380. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  15381. },
  15382. {
  15383. "$ref": "#/components/schemas/EventSessionNextRevertStaged"
  15384. },
  15385. {
  15386. "$ref": "#/components/schemas/EventSessionNextRevertCleared"
  15387. },
  15388. {
  15389. "$ref": "#/components/schemas/EventSessionNextRevertCommitted"
  15390. },
  15391. {
  15392. "$ref": "#/components/schemas/EventMessagePartDelta"
  15393. },
  15394. {
  15395. "$ref": "#/components/schemas/EventSessionDiff"
  15396. },
  15397. {
  15398. "$ref": "#/components/schemas/EventSessionError"
  15399. },
  15400. {
  15401. "$ref": "#/components/schemas/EventInstallationUpdated"
  15402. },
  15403. {
  15404. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  15405. },
  15406. {
  15407. "$ref": "#/components/schemas/EventFileEdited"
  15408. },
  15409. {
  15410. "$ref": "#/components/schemas/EventReferenceUpdated"
  15411. },
  15412. {
  15413. "$ref": "#/components/schemas/EventPermissionV2Asked"
  15414. },
  15415. {
  15416. "$ref": "#/components/schemas/EventPermissionV2Replied"
  15417. },
  15418. {
  15419. "$ref": "#/components/schemas/EventPluginAdded"
  15420. },
  15421. {
  15422. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  15423. },
  15424. {
  15425. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  15426. },
  15427. {
  15428. "$ref": "#/components/schemas/EventPtyCreated"
  15429. },
  15430. {
  15431. "$ref": "#/components/schemas/EventPtyUpdated"
  15432. },
  15433. {
  15434. "$ref": "#/components/schemas/EventPtyExited"
  15435. },
  15436. {
  15437. "$ref": "#/components/schemas/EventPtyDeleted"
  15438. },
  15439. {
  15440. "$ref": "#/components/schemas/EventQuestionV2Asked"
  15441. },
  15442. {
  15443. "$ref": "#/components/schemas/EventQuestionV2Replied"
  15444. },
  15445. {
  15446. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  15447. },
  15448. {
  15449. "$ref": "#/components/schemas/EventTodoUpdated"
  15450. },
  15451. {
  15452. "$ref": "#/components/schemas/EventLspUpdated"
  15453. },
  15454. {
  15455. "$ref": "#/components/schemas/EventPermissionAsked"
  15456. },
  15457. {
  15458. "$ref": "#/components/schemas/EventPermissionReplied"
  15459. },
  15460. {
  15461. "$ref": "#/components/schemas/Event.tui.prompt.append"
  15462. },
  15463. {
  15464. "$ref": "#/components/schemas/Event.tui.command.execute"
  15465. },
  15466. {
  15467. "$ref": "#/components/schemas/Event.tui.toast.show"
  15468. },
  15469. {
  15470. "$ref": "#/components/schemas/Event.tui.session.select"
  15471. },
  15472. {
  15473. "$ref": "#/components/schemas/EventMcpToolsChanged"
  15474. },
  15475. {
  15476. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  15477. },
  15478. {
  15479. "$ref": "#/components/schemas/EventCommandExecuted"
  15480. },
  15481. {
  15482. "$ref": "#/components/schemas/EventProjectUpdated"
  15483. },
  15484. {
  15485. "$ref": "#/components/schemas/EventSessionStatus"
  15486. },
  15487. {
  15488. "$ref": "#/components/schemas/EventSessionIdle"
  15489. },
  15490. {
  15491. "$ref": "#/components/schemas/EventQuestionAsked"
  15492. },
  15493. {
  15494. "$ref": "#/components/schemas/EventQuestionReplied"
  15495. },
  15496. {
  15497. "$ref": "#/components/schemas/EventQuestionRejected"
  15498. },
  15499. {
  15500. "$ref": "#/components/schemas/EventSessionCompacted"
  15501. },
  15502. {
  15503. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  15504. },
  15505. {
  15506. "$ref": "#/components/schemas/EventWorkspaceReady"
  15507. },
  15508. {
  15509. "$ref": "#/components/schemas/EventWorkspaceFailed"
  15510. },
  15511. {
  15512. "$ref": "#/components/schemas/EventWorkspaceStatus"
  15513. },
  15514. {
  15515. "$ref": "#/components/schemas/EventWorktreeReady"
  15516. },
  15517. {
  15518. "$ref": "#/components/schemas/EventWorktreeFailed"
  15519. },
  15520. {
  15521. "$ref": "#/components/schemas/EventServerConnected"
  15522. },
  15523. {
  15524. "$ref": "#/components/schemas/EventGlobalDisposed"
  15525. },
  15526. {
  15527. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  15528. }
  15529. ]
  15530. },
  15531. "QuestionReplied": {
  15532. "type": "object",
  15533. "properties": {
  15534. "sessionID": {
  15535. "type": "string",
  15536. "pattern": "^ses"
  15537. },
  15538. "requestID": {
  15539. "type": "string",
  15540. "pattern": "^que"
  15541. },
  15542. "answers": {
  15543. "type": "array",
  15544. "items": {
  15545. "$ref": "#/components/schemas/QuestionAnswer"
  15546. }
  15547. }
  15548. },
  15549. "required": ["sessionID", "requestID", "answers"],
  15550. "additionalProperties": false
  15551. },
  15552. "QuestionRejected": {
  15553. "type": "object",
  15554. "properties": {
  15555. "sessionID": {
  15556. "type": "string",
  15557. "pattern": "^ses"
  15558. },
  15559. "requestID": {
  15560. "type": "string",
  15561. "pattern": "^que"
  15562. }
  15563. },
  15564. "required": ["sessionID", "requestID"],
  15565. "additionalProperties": false
  15566. },
  15567. "OAuth": {
  15568. "type": "object",
  15569. "properties": {
  15570. "type": {
  15571. "type": "string",
  15572. "enum": ["oauth"]
  15573. },
  15574. "refresh": {
  15575. "type": "string"
  15576. },
  15577. "access": {
  15578. "type": "string"
  15579. },
  15580. "expires": {
  15581. "type": "integer",
  15582. "minimum": 0
  15583. },
  15584. "accountId": {
  15585. "type": "string"
  15586. },
  15587. "enterpriseUrl": {
  15588. "type": "string"
  15589. }
  15590. },
  15591. "required": ["type", "refresh", "access", "expires"],
  15592. "additionalProperties": false
  15593. },
  15594. "ApiAuth": {
  15595. "type": "object",
  15596. "properties": {
  15597. "type": {
  15598. "type": "string",
  15599. "enum": ["api"]
  15600. },
  15601. "key": {
  15602. "type": "string"
  15603. },
  15604. "metadata": {
  15605. "type": "object",
  15606. "additionalProperties": {
  15607. "type": "string"
  15608. }
  15609. }
  15610. },
  15611. "required": ["type", "key"],
  15612. "additionalProperties": false
  15613. },
  15614. "WellKnownAuth": {
  15615. "type": "object",
  15616. "properties": {
  15617. "type": {
  15618. "type": "string",
  15619. "enum": ["wellknown"]
  15620. },
  15621. "key": {
  15622. "type": "string"
  15623. },
  15624. "token": {
  15625. "type": "string"
  15626. }
  15627. },
  15628. "required": ["type", "key", "token"],
  15629. "additionalProperties": false
  15630. },
  15631. "Auth": {
  15632. "anyOf": [
  15633. {
  15634. "$ref": "#/components/schemas/OAuth"
  15635. },
  15636. {
  15637. "$ref": "#/components/schemas/ApiAuth"
  15638. },
  15639. {
  15640. "$ref": "#/components/schemas/WellKnownAuth"
  15641. }
  15642. ]
  15643. },
  15644. "effect_HttpApiError_BadRequest": {
  15645. "type": "object",
  15646. "properties": {
  15647. "_tag": {
  15648. "type": "string",
  15649. "enum": ["BadRequest"]
  15650. }
  15651. },
  15652. "required": ["_tag"],
  15653. "additionalProperties": false
  15654. },
  15655. "InvalidRequestError": {
  15656. "type": "object",
  15657. "properties": {
  15658. "_tag": {
  15659. "type": "string",
  15660. "enum": ["InvalidRequestError"]
  15661. },
  15662. "message": {
  15663. "type": "string"
  15664. },
  15665. "kind": {
  15666. "type": "string"
  15667. },
  15668. "field": {
  15669. "type": "string"
  15670. }
  15671. },
  15672. "required": ["_tag", "message"],
  15673. "additionalProperties": false
  15674. },
  15675. "MoveSessionError": {
  15676. "type": "object",
  15677. "properties": {
  15678. "name": {
  15679. "type": "string",
  15680. "enum": ["MoveSessionError"]
  15681. },
  15682. "data": {
  15683. "type": "object",
  15684. "properties": {
  15685. "message": {
  15686. "type": "string"
  15687. }
  15688. },
  15689. "required": ["message"],
  15690. "additionalProperties": false
  15691. }
  15692. },
  15693. "required": ["name", "data"],
  15694. "additionalProperties": false
  15695. },
  15696. "SnapshotFileDiff": {
  15697. "type": "object",
  15698. "properties": {
  15699. "file": {
  15700. "type": "string"
  15701. },
  15702. "patch": {
  15703. "type": "string"
  15704. },
  15705. "additions": {
  15706. "type": "number"
  15707. },
  15708. "deletions": {
  15709. "type": "number"
  15710. },
  15711. "status": {
  15712. "type": "string",
  15713. "enum": ["added", "deleted", "modified"]
  15714. }
  15715. },
  15716. "required": ["additions", "deletions"],
  15717. "additionalProperties": false
  15718. },
  15719. "PermissionAction": {
  15720. "type": "string",
  15721. "enum": ["allow", "deny", "ask"]
  15722. },
  15723. "PermissionRule": {
  15724. "type": "object",
  15725. "properties": {
  15726. "permission": {
  15727. "type": "string"
  15728. },
  15729. "pattern": {
  15730. "type": "string"
  15731. },
  15732. "action": {
  15733. "$ref": "#/components/schemas/PermissionAction"
  15734. }
  15735. },
  15736. "required": ["permission", "pattern", "action"],
  15737. "additionalProperties": false
  15738. },
  15739. "PermissionRuleset": {
  15740. "type": "array",
  15741. "items": {
  15742. "$ref": "#/components/schemas/PermissionRule"
  15743. }
  15744. },
  15745. "Session": {
  15746. "type": "object",
  15747. "properties": {
  15748. "id": {
  15749. "type": "string",
  15750. "pattern": "^ses"
  15751. },
  15752. "slug": {
  15753. "type": "string"
  15754. },
  15755. "projectID": {
  15756. "type": "string"
  15757. },
  15758. "workspaceID": {
  15759. "type": "string",
  15760. "pattern": "^wrk"
  15761. },
  15762. "directory": {
  15763. "type": "string"
  15764. },
  15765. "path": {
  15766. "type": "string"
  15767. },
  15768. "parentID": {
  15769. "type": "string",
  15770. "pattern": "^ses"
  15771. },
  15772. "summary": {
  15773. "type": "object",
  15774. "properties": {
  15775. "additions": {
  15776. "type": "number"
  15777. },
  15778. "deletions": {
  15779. "type": "number"
  15780. },
  15781. "files": {
  15782. "type": "number"
  15783. },
  15784. "diffs": {
  15785. "type": "array",
  15786. "items": {
  15787. "$ref": "#/components/schemas/SnapshotFileDiff"
  15788. }
  15789. }
  15790. },
  15791. "required": ["additions", "deletions", "files"],
  15792. "additionalProperties": false
  15793. },
  15794. "cost": {
  15795. "type": "number"
  15796. },
  15797. "tokens": {
  15798. "type": "object",
  15799. "properties": {
  15800. "input": {
  15801. "type": "number"
  15802. },
  15803. "output": {
  15804. "type": "number"
  15805. },
  15806. "reasoning": {
  15807. "type": "number"
  15808. },
  15809. "cache": {
  15810. "type": "object",
  15811. "properties": {
  15812. "read": {
  15813. "type": "number"
  15814. },
  15815. "write": {
  15816. "type": "number"
  15817. }
  15818. },
  15819. "required": ["read", "write"],
  15820. "additionalProperties": false
  15821. }
  15822. },
  15823. "required": ["input", "output", "reasoning", "cache"],
  15824. "additionalProperties": false
  15825. },
  15826. "share": {
  15827. "type": "object",
  15828. "properties": {
  15829. "url": {
  15830. "type": "string"
  15831. }
  15832. },
  15833. "required": ["url"],
  15834. "additionalProperties": false
  15835. },
  15836. "title": {
  15837. "type": "string"
  15838. },
  15839. "agent": {
  15840. "type": "string"
  15841. },
  15842. "model": {
  15843. "type": "object",
  15844. "properties": {
  15845. "id": {
  15846. "type": "string"
  15847. },
  15848. "providerID": {
  15849. "type": "string"
  15850. },
  15851. "variant": {
  15852. "type": "string"
  15853. }
  15854. },
  15855. "required": ["id", "providerID"],
  15856. "additionalProperties": false
  15857. },
  15858. "version": {
  15859. "type": "string"
  15860. },
  15861. "metadata": {
  15862. "type": "object"
  15863. },
  15864. "time": {
  15865. "type": "object",
  15866. "properties": {
  15867. "created": {
  15868. "type": "integer",
  15869. "minimum": 0
  15870. },
  15871. "updated": {
  15872. "type": "integer",
  15873. "minimum": 0
  15874. },
  15875. "compacting": {
  15876. "type": "integer",
  15877. "minimum": 0
  15878. },
  15879. "archived": {
  15880. "type": "number"
  15881. }
  15882. },
  15883. "required": ["created", "updated"],
  15884. "additionalProperties": false
  15885. },
  15886. "permission": {
  15887. "$ref": "#/components/schemas/PermissionRuleset"
  15888. },
  15889. "revert": {
  15890. "type": "object",
  15891. "properties": {
  15892. "messageID": {
  15893. "type": "string",
  15894. "pattern": "^msg"
  15895. },
  15896. "partID": {
  15897. "type": "string",
  15898. "pattern": "^prt"
  15899. },
  15900. "snapshot": {
  15901. "type": "string"
  15902. },
  15903. "diff": {
  15904. "type": "string"
  15905. }
  15906. },
  15907. "required": ["messageID"],
  15908. "additionalProperties": false
  15909. }
  15910. },
  15911. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15912. "additionalProperties": false
  15913. },
  15914. "OutputFormatText": {
  15915. "type": "object",
  15916. "properties": {
  15917. "type": {
  15918. "type": "string",
  15919. "enum": ["text"]
  15920. }
  15921. },
  15922. "required": ["type"],
  15923. "additionalProperties": false
  15924. },
  15925. "JSONSchema": {
  15926. "type": "object"
  15927. },
  15928. "OutputFormatJsonSchema": {
  15929. "type": "object",
  15930. "properties": {
  15931. "type": {
  15932. "type": "string",
  15933. "enum": ["json_schema"]
  15934. },
  15935. "schema": {
  15936. "$ref": "#/components/schemas/JSONSchema"
  15937. },
  15938. "retryCount": {
  15939. "type": "integer",
  15940. "minimum": 0
  15941. }
  15942. },
  15943. "required": ["type", "schema"],
  15944. "additionalProperties": false
  15945. },
  15946. "OutputFormat": {
  15947. "anyOf": [
  15948. {
  15949. "$ref": "#/components/schemas/OutputFormatText"
  15950. },
  15951. {
  15952. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15953. }
  15954. ]
  15955. },
  15956. "UserMessage": {
  15957. "type": "object",
  15958. "properties": {
  15959. "id": {
  15960. "type": "string",
  15961. "pattern": "^msg"
  15962. },
  15963. "sessionID": {
  15964. "type": "string",
  15965. "pattern": "^ses"
  15966. },
  15967. "role": {
  15968. "type": "string",
  15969. "enum": ["user"]
  15970. },
  15971. "time": {
  15972. "type": "object",
  15973. "properties": {
  15974. "created": {
  15975. "type": "number",
  15976. "minimum": 0
  15977. }
  15978. },
  15979. "required": ["created"],
  15980. "additionalProperties": false
  15981. },
  15982. "format": {
  15983. "$ref": "#/components/schemas/OutputFormat"
  15984. },
  15985. "summary": {
  15986. "type": "object",
  15987. "properties": {
  15988. "title": {
  15989. "type": "string"
  15990. },
  15991. "body": {
  15992. "type": "string"
  15993. },
  15994. "diffs": {
  15995. "type": "array",
  15996. "items": {
  15997. "$ref": "#/components/schemas/SnapshotFileDiff"
  15998. }
  15999. }
  16000. },
  16001. "required": ["diffs"],
  16002. "additionalProperties": false
  16003. },
  16004. "agent": {
  16005. "type": "string"
  16006. },
  16007. "model": {
  16008. "type": "object",
  16009. "properties": {
  16010. "providerID": {
  16011. "type": "string"
  16012. },
  16013. "modelID": {
  16014. "type": "string"
  16015. },
  16016. "variant": {
  16017. "type": "string"
  16018. }
  16019. },
  16020. "required": ["providerID", "modelID"],
  16021. "additionalProperties": false
  16022. },
  16023. "system": {
  16024. "type": "string"
  16025. },
  16026. "tools": {
  16027. "type": "object",
  16028. "additionalProperties": {
  16029. "type": "boolean"
  16030. }
  16031. }
  16032. },
  16033. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  16034. "additionalProperties": false
  16035. },
  16036. "ProviderAuthError": {
  16037. "type": "object",
  16038. "properties": {
  16039. "name": {
  16040. "type": "string",
  16041. "enum": ["ProviderAuthError"]
  16042. },
  16043. "data": {
  16044. "type": "object",
  16045. "properties": {
  16046. "providerID": {
  16047. "type": "string"
  16048. },
  16049. "message": {
  16050. "type": "string"
  16051. }
  16052. },
  16053. "required": ["providerID", "message"],
  16054. "additionalProperties": false
  16055. }
  16056. },
  16057. "required": ["name", "data"],
  16058. "additionalProperties": false
  16059. },
  16060. "UnknownError": {
  16061. "type": "object",
  16062. "properties": {
  16063. "name": {
  16064. "type": "string",
  16065. "enum": ["UnknownError"]
  16066. },
  16067. "data": {
  16068. "type": "object",
  16069. "properties": {
  16070. "message": {
  16071. "type": "string"
  16072. },
  16073. "ref": {
  16074. "type": "string"
  16075. }
  16076. },
  16077. "required": ["message"],
  16078. "additionalProperties": false
  16079. }
  16080. },
  16081. "required": ["name", "data"],
  16082. "additionalProperties": false
  16083. },
  16084. "MessageOutputLengthError": {
  16085. "type": "object",
  16086. "properties": {
  16087. "name": {
  16088. "type": "string",
  16089. "enum": ["MessageOutputLengthError"]
  16090. },
  16091. "data": {
  16092. "type": "object",
  16093. "properties": {}
  16094. }
  16095. },
  16096. "required": ["name", "data"],
  16097. "additionalProperties": false
  16098. },
  16099. "MessageAbortedError": {
  16100. "type": "object",
  16101. "properties": {
  16102. "name": {
  16103. "type": "string",
  16104. "enum": ["MessageAbortedError"]
  16105. },
  16106. "data": {
  16107. "type": "object",
  16108. "properties": {
  16109. "message": {
  16110. "type": "string"
  16111. }
  16112. },
  16113. "required": ["message"],
  16114. "additionalProperties": false
  16115. }
  16116. },
  16117. "required": ["name", "data"],
  16118. "additionalProperties": false
  16119. },
  16120. "StructuredOutputError": {
  16121. "type": "object",
  16122. "properties": {
  16123. "name": {
  16124. "type": "string",
  16125. "enum": ["StructuredOutputError"]
  16126. },
  16127. "data": {
  16128. "type": "object",
  16129. "properties": {
  16130. "message": {
  16131. "type": "string"
  16132. },
  16133. "retries": {
  16134. "type": "integer",
  16135. "minimum": 0
  16136. }
  16137. },
  16138. "required": ["message", "retries"],
  16139. "additionalProperties": false
  16140. }
  16141. },
  16142. "required": ["name", "data"],
  16143. "additionalProperties": false
  16144. },
  16145. "ContextOverflowError": {
  16146. "type": "object",
  16147. "properties": {
  16148. "name": {
  16149. "type": "string",
  16150. "enum": ["ContextOverflowError"]
  16151. },
  16152. "data": {
  16153. "type": "object",
  16154. "properties": {
  16155. "message": {
  16156. "type": "string"
  16157. },
  16158. "responseBody": {
  16159. "type": "string"
  16160. }
  16161. },
  16162. "required": ["message"],
  16163. "additionalProperties": false
  16164. }
  16165. },
  16166. "required": ["name", "data"],
  16167. "additionalProperties": false
  16168. },
  16169. "ContentFilterError": {
  16170. "type": "object",
  16171. "properties": {
  16172. "name": {
  16173. "type": "string",
  16174. "enum": ["ContentFilterError"]
  16175. },
  16176. "data": {
  16177. "type": "object",
  16178. "properties": {
  16179. "message": {
  16180. "type": "string"
  16181. }
  16182. },
  16183. "required": ["message"],
  16184. "additionalProperties": false
  16185. }
  16186. },
  16187. "required": ["name", "data"],
  16188. "additionalProperties": false
  16189. },
  16190. "APIError": {
  16191. "type": "object",
  16192. "properties": {
  16193. "name": {
  16194. "type": "string",
  16195. "enum": ["APIError"]
  16196. },
  16197. "data": {
  16198. "type": "object",
  16199. "properties": {
  16200. "message": {
  16201. "type": "string"
  16202. },
  16203. "statusCode": {
  16204. "type": "integer",
  16205. "minimum": 0
  16206. },
  16207. "isRetryable": {
  16208. "type": "boolean"
  16209. },
  16210. "responseHeaders": {
  16211. "type": "object",
  16212. "additionalProperties": {
  16213. "type": "string"
  16214. }
  16215. },
  16216. "responseBody": {
  16217. "type": "string"
  16218. },
  16219. "metadata": {
  16220. "type": "object",
  16221. "additionalProperties": {
  16222. "type": "string"
  16223. }
  16224. }
  16225. },
  16226. "required": ["message", "isRetryable"],
  16227. "additionalProperties": false
  16228. }
  16229. },
  16230. "required": ["name", "data"],
  16231. "additionalProperties": false
  16232. },
  16233. "AssistantMessage": {
  16234. "type": "object",
  16235. "properties": {
  16236. "id": {
  16237. "type": "string",
  16238. "pattern": "^msg"
  16239. },
  16240. "sessionID": {
  16241. "type": "string",
  16242. "pattern": "^ses"
  16243. },
  16244. "role": {
  16245. "type": "string",
  16246. "enum": ["assistant"]
  16247. },
  16248. "time": {
  16249. "type": "object",
  16250. "properties": {
  16251. "created": {
  16252. "type": "integer",
  16253. "minimum": 0
  16254. },
  16255. "completed": {
  16256. "type": "integer",
  16257. "minimum": 0
  16258. }
  16259. },
  16260. "required": ["created"],
  16261. "additionalProperties": false
  16262. },
  16263. "error": {
  16264. "anyOf": [
  16265. {
  16266. "$ref": "#/components/schemas/ProviderAuthError"
  16267. },
  16268. {
  16269. "$ref": "#/components/schemas/UnknownError"
  16270. },
  16271. {
  16272. "$ref": "#/components/schemas/MessageOutputLengthError"
  16273. },
  16274. {
  16275. "$ref": "#/components/schemas/MessageAbortedError"
  16276. },
  16277. {
  16278. "$ref": "#/components/schemas/StructuredOutputError"
  16279. },
  16280. {
  16281. "$ref": "#/components/schemas/ContextOverflowError"
  16282. },
  16283. {
  16284. "$ref": "#/components/schemas/ContentFilterError"
  16285. },
  16286. {
  16287. "$ref": "#/components/schemas/APIError"
  16288. }
  16289. ]
  16290. },
  16291. "parentID": {
  16292. "type": "string",
  16293. "pattern": "^msg"
  16294. },
  16295. "modelID": {
  16296. "type": "string"
  16297. },
  16298. "providerID": {
  16299. "type": "string"
  16300. },
  16301. "mode": {
  16302. "type": "string"
  16303. },
  16304. "agent": {
  16305. "type": "string"
  16306. },
  16307. "path": {
  16308. "type": "object",
  16309. "properties": {
  16310. "cwd": {
  16311. "type": "string"
  16312. },
  16313. "root": {
  16314. "type": "string"
  16315. }
  16316. },
  16317. "required": ["cwd", "root"],
  16318. "additionalProperties": false
  16319. },
  16320. "summary": {
  16321. "type": "boolean"
  16322. },
  16323. "cost": {
  16324. "type": "number"
  16325. },
  16326. "tokens": {
  16327. "type": "object",
  16328. "properties": {
  16329. "total": {
  16330. "type": "number"
  16331. },
  16332. "input": {
  16333. "type": "number"
  16334. },
  16335. "output": {
  16336. "type": "number"
  16337. },
  16338. "reasoning": {
  16339. "type": "number"
  16340. },
  16341. "cache": {
  16342. "type": "object",
  16343. "properties": {
  16344. "read": {
  16345. "type": "number"
  16346. },
  16347. "write": {
  16348. "type": "number"
  16349. }
  16350. },
  16351. "required": ["read", "write"],
  16352. "additionalProperties": false
  16353. }
  16354. },
  16355. "required": ["input", "output", "reasoning", "cache"],
  16356. "additionalProperties": false
  16357. },
  16358. "structured": {},
  16359. "variant": {
  16360. "type": "string"
  16361. },
  16362. "finish": {
  16363. "type": "string"
  16364. }
  16365. },
  16366. "required": [
  16367. "id",
  16368. "sessionID",
  16369. "role",
  16370. "time",
  16371. "parentID",
  16372. "modelID",
  16373. "providerID",
  16374. "mode",
  16375. "agent",
  16376. "path",
  16377. "cost",
  16378. "tokens"
  16379. ],
  16380. "additionalProperties": false
  16381. },
  16382. "Message": {
  16383. "anyOf": [
  16384. {
  16385. "$ref": "#/components/schemas/UserMessage"
  16386. },
  16387. {
  16388. "$ref": "#/components/schemas/AssistantMessage"
  16389. }
  16390. ]
  16391. },
  16392. "TextPart": {
  16393. "type": "object",
  16394. "properties": {
  16395. "id": {
  16396. "type": "string",
  16397. "pattern": "^prt"
  16398. },
  16399. "sessionID": {
  16400. "type": "string",
  16401. "pattern": "^ses"
  16402. },
  16403. "messageID": {
  16404. "type": "string",
  16405. "pattern": "^msg"
  16406. },
  16407. "type": {
  16408. "type": "string",
  16409. "enum": ["text"]
  16410. },
  16411. "text": {
  16412. "type": "string"
  16413. },
  16414. "synthetic": {
  16415. "type": "boolean"
  16416. },
  16417. "ignored": {
  16418. "type": "boolean"
  16419. },
  16420. "time": {
  16421. "type": "object",
  16422. "properties": {
  16423. "start": {
  16424. "type": "integer",
  16425. "minimum": 0
  16426. },
  16427. "end": {
  16428. "type": "integer",
  16429. "minimum": 0
  16430. }
  16431. },
  16432. "required": ["start"],
  16433. "additionalProperties": false
  16434. },
  16435. "metadata": {
  16436. "type": "object"
  16437. }
  16438. },
  16439. "required": ["id", "sessionID", "messageID", "type", "text"],
  16440. "additionalProperties": false
  16441. },
  16442. "SubtaskPart": {
  16443. "type": "object",
  16444. "properties": {
  16445. "id": {
  16446. "type": "string",
  16447. "pattern": "^prt"
  16448. },
  16449. "sessionID": {
  16450. "type": "string",
  16451. "pattern": "^ses"
  16452. },
  16453. "messageID": {
  16454. "type": "string",
  16455. "pattern": "^msg"
  16456. },
  16457. "type": {
  16458. "type": "string",
  16459. "enum": ["subtask"]
  16460. },
  16461. "prompt": {
  16462. "type": "string"
  16463. },
  16464. "description": {
  16465. "type": "string"
  16466. },
  16467. "agent": {
  16468. "type": "string"
  16469. },
  16470. "model": {
  16471. "type": "object",
  16472. "properties": {
  16473. "providerID": {
  16474. "type": "string"
  16475. },
  16476. "modelID": {
  16477. "type": "string"
  16478. }
  16479. },
  16480. "required": ["providerID", "modelID"],
  16481. "additionalProperties": false
  16482. },
  16483. "command": {
  16484. "type": "string"
  16485. }
  16486. },
  16487. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  16488. "additionalProperties": false
  16489. },
  16490. "ReasoningPart": {
  16491. "type": "object",
  16492. "properties": {
  16493. "id": {
  16494. "type": "string",
  16495. "pattern": "^prt"
  16496. },
  16497. "sessionID": {
  16498. "type": "string",
  16499. "pattern": "^ses"
  16500. },
  16501. "messageID": {
  16502. "type": "string",
  16503. "pattern": "^msg"
  16504. },
  16505. "type": {
  16506. "type": "string",
  16507. "enum": ["reasoning"]
  16508. },
  16509. "text": {
  16510. "type": "string"
  16511. },
  16512. "metadata": {
  16513. "type": "object"
  16514. },
  16515. "time": {
  16516. "type": "object",
  16517. "properties": {
  16518. "start": {
  16519. "type": "integer",
  16520. "minimum": 0
  16521. },
  16522. "end": {
  16523. "type": "integer",
  16524. "minimum": 0
  16525. }
  16526. },
  16527. "required": ["start"],
  16528. "additionalProperties": false
  16529. }
  16530. },
  16531. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  16532. "additionalProperties": false
  16533. },
  16534. "FilePartSourceText": {
  16535. "type": "object",
  16536. "properties": {
  16537. "value": {
  16538. "type": "string"
  16539. },
  16540. "start": {
  16541. "type": "number"
  16542. },
  16543. "end": {
  16544. "type": "number"
  16545. }
  16546. },
  16547. "required": ["value", "start", "end"],
  16548. "additionalProperties": false
  16549. },
  16550. "FileSource": {
  16551. "type": "object",
  16552. "properties": {
  16553. "text": {
  16554. "$ref": "#/components/schemas/FilePartSourceText"
  16555. },
  16556. "type": {
  16557. "type": "string",
  16558. "enum": ["file"]
  16559. },
  16560. "path": {
  16561. "type": "string"
  16562. }
  16563. },
  16564. "required": ["text", "type", "path"],
  16565. "additionalProperties": false
  16566. },
  16567. "Range": {
  16568. "type": "object",
  16569. "properties": {
  16570. "start": {
  16571. "type": "object",
  16572. "properties": {
  16573. "line": {
  16574. "type": "integer",
  16575. "minimum": 0
  16576. },
  16577. "character": {
  16578. "type": "integer",
  16579. "minimum": 0
  16580. }
  16581. },
  16582. "required": ["line", "character"],
  16583. "additionalProperties": false
  16584. },
  16585. "end": {
  16586. "type": "object",
  16587. "properties": {
  16588. "line": {
  16589. "type": "integer",
  16590. "minimum": 0
  16591. },
  16592. "character": {
  16593. "type": "integer",
  16594. "minimum": 0
  16595. }
  16596. },
  16597. "required": ["line", "character"],
  16598. "additionalProperties": false
  16599. }
  16600. },
  16601. "required": ["start", "end"],
  16602. "additionalProperties": false
  16603. },
  16604. "SymbolSource": {
  16605. "type": "object",
  16606. "properties": {
  16607. "text": {
  16608. "$ref": "#/components/schemas/FilePartSourceText"
  16609. },
  16610. "type": {
  16611. "type": "string",
  16612. "enum": ["symbol"]
  16613. },
  16614. "path": {
  16615. "type": "string"
  16616. },
  16617. "range": {
  16618. "$ref": "#/components/schemas/Range"
  16619. },
  16620. "name": {
  16621. "type": "string"
  16622. },
  16623. "kind": {
  16624. "type": "integer",
  16625. "minimum": 0
  16626. }
  16627. },
  16628. "required": ["text", "type", "path", "range", "name", "kind"],
  16629. "additionalProperties": false
  16630. },
  16631. "ResourceSource": {
  16632. "type": "object",
  16633. "properties": {
  16634. "text": {
  16635. "$ref": "#/components/schemas/FilePartSourceText"
  16636. },
  16637. "type": {
  16638. "type": "string",
  16639. "enum": ["resource"]
  16640. },
  16641. "clientName": {
  16642. "type": "string"
  16643. },
  16644. "uri": {
  16645. "type": "string"
  16646. }
  16647. },
  16648. "required": ["text", "type", "clientName", "uri"],
  16649. "additionalProperties": false
  16650. },
  16651. "FilePartSource": {
  16652. "anyOf": [
  16653. {
  16654. "$ref": "#/components/schemas/FileSource"
  16655. },
  16656. {
  16657. "$ref": "#/components/schemas/SymbolSource"
  16658. },
  16659. {
  16660. "$ref": "#/components/schemas/ResourceSource"
  16661. }
  16662. ]
  16663. },
  16664. "FilePart": {
  16665. "type": "object",
  16666. "properties": {
  16667. "id": {
  16668. "type": "string",
  16669. "pattern": "^prt"
  16670. },
  16671. "sessionID": {
  16672. "type": "string",
  16673. "pattern": "^ses"
  16674. },
  16675. "messageID": {
  16676. "type": "string",
  16677. "pattern": "^msg"
  16678. },
  16679. "type": {
  16680. "type": "string",
  16681. "enum": ["file"]
  16682. },
  16683. "mime": {
  16684. "type": "string"
  16685. },
  16686. "filename": {
  16687. "type": "string"
  16688. },
  16689. "url": {
  16690. "type": "string"
  16691. },
  16692. "source": {
  16693. "$ref": "#/components/schemas/FilePartSource"
  16694. }
  16695. },
  16696. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  16697. "additionalProperties": false
  16698. },
  16699. "ToolStatePending": {
  16700. "type": "object",
  16701. "properties": {
  16702. "status": {
  16703. "type": "string",
  16704. "enum": ["pending"]
  16705. },
  16706. "input": {
  16707. "type": "object"
  16708. },
  16709. "raw": {
  16710. "type": "string"
  16711. }
  16712. },
  16713. "required": ["status", "input", "raw"],
  16714. "additionalProperties": false
  16715. },
  16716. "ToolStateRunning": {
  16717. "type": "object",
  16718. "properties": {
  16719. "status": {
  16720. "type": "string",
  16721. "enum": ["running"]
  16722. },
  16723. "input": {
  16724. "type": "object"
  16725. },
  16726. "title": {
  16727. "type": "string"
  16728. },
  16729. "metadata": {
  16730. "type": "object"
  16731. },
  16732. "time": {
  16733. "type": "object",
  16734. "properties": {
  16735. "start": {
  16736. "type": "integer",
  16737. "minimum": 0
  16738. }
  16739. },
  16740. "required": ["start"],
  16741. "additionalProperties": false
  16742. }
  16743. },
  16744. "required": ["status", "input", "time"],
  16745. "additionalProperties": false
  16746. },
  16747. "ToolStateCompleted": {
  16748. "type": "object",
  16749. "properties": {
  16750. "status": {
  16751. "type": "string",
  16752. "enum": ["completed"]
  16753. },
  16754. "input": {
  16755. "type": "object"
  16756. },
  16757. "output": {
  16758. "type": "string"
  16759. },
  16760. "title": {
  16761. "type": "string"
  16762. },
  16763. "metadata": {
  16764. "type": "object"
  16765. },
  16766. "time": {
  16767. "type": "object",
  16768. "properties": {
  16769. "start": {
  16770. "type": "integer",
  16771. "minimum": 0
  16772. },
  16773. "end": {
  16774. "type": "integer",
  16775. "minimum": 0
  16776. },
  16777. "compacted": {
  16778. "type": "integer",
  16779. "minimum": 0
  16780. }
  16781. },
  16782. "required": ["start", "end"],
  16783. "additionalProperties": false
  16784. },
  16785. "attachments": {
  16786. "type": "array",
  16787. "items": {
  16788. "$ref": "#/components/schemas/FilePart"
  16789. }
  16790. }
  16791. },
  16792. "required": ["status", "input", "output", "title", "metadata", "time"],
  16793. "additionalProperties": false
  16794. },
  16795. "ToolStateError": {
  16796. "type": "object",
  16797. "properties": {
  16798. "status": {
  16799. "type": "string",
  16800. "enum": ["error"]
  16801. },
  16802. "input": {
  16803. "type": "object"
  16804. },
  16805. "error": {
  16806. "type": "string"
  16807. },
  16808. "metadata": {
  16809. "type": "object"
  16810. },
  16811. "time": {
  16812. "type": "object",
  16813. "properties": {
  16814. "start": {
  16815. "type": "integer",
  16816. "minimum": 0
  16817. },
  16818. "end": {
  16819. "type": "integer",
  16820. "minimum": 0
  16821. }
  16822. },
  16823. "required": ["start", "end"],
  16824. "additionalProperties": false
  16825. }
  16826. },
  16827. "required": ["status", "input", "error", "time"],
  16828. "additionalProperties": false
  16829. },
  16830. "ToolState": {
  16831. "anyOf": [
  16832. {
  16833. "$ref": "#/components/schemas/ToolStatePending"
  16834. },
  16835. {
  16836. "$ref": "#/components/schemas/ToolStateRunning"
  16837. },
  16838. {
  16839. "$ref": "#/components/schemas/ToolStateCompleted"
  16840. },
  16841. {
  16842. "$ref": "#/components/schemas/ToolStateError"
  16843. }
  16844. ]
  16845. },
  16846. "ToolPart": {
  16847. "type": "object",
  16848. "properties": {
  16849. "id": {
  16850. "type": "string",
  16851. "pattern": "^prt"
  16852. },
  16853. "sessionID": {
  16854. "type": "string",
  16855. "pattern": "^ses"
  16856. },
  16857. "messageID": {
  16858. "type": "string",
  16859. "pattern": "^msg"
  16860. },
  16861. "type": {
  16862. "type": "string",
  16863. "enum": ["tool"]
  16864. },
  16865. "callID": {
  16866. "type": "string"
  16867. },
  16868. "tool": {
  16869. "type": "string"
  16870. },
  16871. "state": {
  16872. "$ref": "#/components/schemas/ToolState"
  16873. },
  16874. "metadata": {
  16875. "type": "object"
  16876. }
  16877. },
  16878. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16879. "additionalProperties": false
  16880. },
  16881. "StepStartPart": {
  16882. "type": "object",
  16883. "properties": {
  16884. "id": {
  16885. "type": "string",
  16886. "pattern": "^prt"
  16887. },
  16888. "sessionID": {
  16889. "type": "string",
  16890. "pattern": "^ses"
  16891. },
  16892. "messageID": {
  16893. "type": "string",
  16894. "pattern": "^msg"
  16895. },
  16896. "type": {
  16897. "type": "string",
  16898. "enum": ["step-start"]
  16899. },
  16900. "snapshot": {
  16901. "type": "string"
  16902. }
  16903. },
  16904. "required": ["id", "sessionID", "messageID", "type"],
  16905. "additionalProperties": false
  16906. },
  16907. "StepFinishPart": {
  16908. "type": "object",
  16909. "properties": {
  16910. "id": {
  16911. "type": "string",
  16912. "pattern": "^prt"
  16913. },
  16914. "sessionID": {
  16915. "type": "string",
  16916. "pattern": "^ses"
  16917. },
  16918. "messageID": {
  16919. "type": "string",
  16920. "pattern": "^msg"
  16921. },
  16922. "type": {
  16923. "type": "string",
  16924. "enum": ["step-finish"]
  16925. },
  16926. "reason": {
  16927. "type": "string"
  16928. },
  16929. "snapshot": {
  16930. "type": "string"
  16931. },
  16932. "cost": {
  16933. "type": "number"
  16934. },
  16935. "tokens": {
  16936. "type": "object",
  16937. "properties": {
  16938. "total": {
  16939. "type": "number"
  16940. },
  16941. "input": {
  16942. "type": "number"
  16943. },
  16944. "output": {
  16945. "type": "number"
  16946. },
  16947. "reasoning": {
  16948. "type": "number"
  16949. },
  16950. "cache": {
  16951. "type": "object",
  16952. "properties": {
  16953. "read": {
  16954. "type": "number"
  16955. },
  16956. "write": {
  16957. "type": "number"
  16958. }
  16959. },
  16960. "required": ["read", "write"],
  16961. "additionalProperties": false
  16962. }
  16963. },
  16964. "required": ["input", "output", "reasoning", "cache"],
  16965. "additionalProperties": false
  16966. }
  16967. },
  16968. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16969. "additionalProperties": false
  16970. },
  16971. "SnapshotPart": {
  16972. "type": "object",
  16973. "properties": {
  16974. "id": {
  16975. "type": "string",
  16976. "pattern": "^prt"
  16977. },
  16978. "sessionID": {
  16979. "type": "string",
  16980. "pattern": "^ses"
  16981. },
  16982. "messageID": {
  16983. "type": "string",
  16984. "pattern": "^msg"
  16985. },
  16986. "type": {
  16987. "type": "string",
  16988. "enum": ["snapshot"]
  16989. },
  16990. "snapshot": {
  16991. "type": "string"
  16992. }
  16993. },
  16994. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16995. "additionalProperties": false
  16996. },
  16997. "PatchPart": {
  16998. "type": "object",
  16999. "properties": {
  17000. "id": {
  17001. "type": "string",
  17002. "pattern": "^prt"
  17003. },
  17004. "sessionID": {
  17005. "type": "string",
  17006. "pattern": "^ses"
  17007. },
  17008. "messageID": {
  17009. "type": "string",
  17010. "pattern": "^msg"
  17011. },
  17012. "type": {
  17013. "type": "string",
  17014. "enum": ["patch"]
  17015. },
  17016. "hash": {
  17017. "type": "string"
  17018. },
  17019. "files": {
  17020. "type": "array",
  17021. "items": {
  17022. "type": "string"
  17023. }
  17024. }
  17025. },
  17026. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  17027. "additionalProperties": false
  17028. },
  17029. "AgentPart": {
  17030. "type": "object",
  17031. "properties": {
  17032. "id": {
  17033. "type": "string",
  17034. "pattern": "^prt"
  17035. },
  17036. "sessionID": {
  17037. "type": "string",
  17038. "pattern": "^ses"
  17039. },
  17040. "messageID": {
  17041. "type": "string",
  17042. "pattern": "^msg"
  17043. },
  17044. "type": {
  17045. "type": "string",
  17046. "enum": ["agent"]
  17047. },
  17048. "name": {
  17049. "type": "string"
  17050. },
  17051. "source": {
  17052. "type": "object",
  17053. "properties": {
  17054. "value": {
  17055. "type": "string"
  17056. },
  17057. "start": {
  17058. "type": "integer",
  17059. "minimum": 0
  17060. },
  17061. "end": {
  17062. "type": "integer",
  17063. "minimum": 0
  17064. }
  17065. },
  17066. "required": ["value", "start", "end"],
  17067. "additionalProperties": false
  17068. }
  17069. },
  17070. "required": ["id", "sessionID", "messageID", "type", "name"],
  17071. "additionalProperties": false
  17072. },
  17073. "RetryPart": {
  17074. "type": "object",
  17075. "properties": {
  17076. "id": {
  17077. "type": "string",
  17078. "pattern": "^prt"
  17079. },
  17080. "sessionID": {
  17081. "type": "string",
  17082. "pattern": "^ses"
  17083. },
  17084. "messageID": {
  17085. "type": "string",
  17086. "pattern": "^msg"
  17087. },
  17088. "type": {
  17089. "type": "string",
  17090. "enum": ["retry"]
  17091. },
  17092. "attempt": {
  17093. "type": "integer",
  17094. "minimum": 0
  17095. },
  17096. "error": {
  17097. "$ref": "#/components/schemas/APIError"
  17098. },
  17099. "time": {
  17100. "type": "object",
  17101. "properties": {
  17102. "created": {
  17103. "type": "integer",
  17104. "minimum": 0
  17105. }
  17106. },
  17107. "required": ["created"],
  17108. "additionalProperties": false
  17109. }
  17110. },
  17111. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  17112. "additionalProperties": false
  17113. },
  17114. "CompactionPart": {
  17115. "type": "object",
  17116. "properties": {
  17117. "id": {
  17118. "type": "string",
  17119. "pattern": "^prt"
  17120. },
  17121. "sessionID": {
  17122. "type": "string",
  17123. "pattern": "^ses"
  17124. },
  17125. "messageID": {
  17126. "type": "string",
  17127. "pattern": "^msg"
  17128. },
  17129. "type": {
  17130. "type": "string",
  17131. "enum": ["compaction"]
  17132. },
  17133. "auto": {
  17134. "type": "boolean"
  17135. },
  17136. "overflow": {
  17137. "type": "boolean"
  17138. },
  17139. "tail_start_id": {
  17140. "type": "string",
  17141. "pattern": "^msg"
  17142. }
  17143. },
  17144. "required": ["id", "sessionID", "messageID", "type", "auto"],
  17145. "additionalProperties": false
  17146. },
  17147. "Part": {
  17148. "anyOf": [
  17149. {
  17150. "$ref": "#/components/schemas/TextPart"
  17151. },
  17152. {
  17153. "$ref": "#/components/schemas/SubtaskPart"
  17154. },
  17155. {
  17156. "$ref": "#/components/schemas/ReasoningPart"
  17157. },
  17158. {
  17159. "$ref": "#/components/schemas/FilePart"
  17160. },
  17161. {
  17162. "$ref": "#/components/schemas/ToolPart"
  17163. },
  17164. {
  17165. "$ref": "#/components/schemas/StepStartPart"
  17166. },
  17167. {
  17168. "$ref": "#/components/schemas/StepFinishPart"
  17169. },
  17170. {
  17171. "$ref": "#/components/schemas/SnapshotPart"
  17172. },
  17173. {
  17174. "$ref": "#/components/schemas/PatchPart"
  17175. },
  17176. {
  17177. "$ref": "#/components/schemas/AgentPart"
  17178. },
  17179. {
  17180. "$ref": "#/components/schemas/RetryPart"
  17181. },
  17182. {
  17183. "$ref": "#/components/schemas/CompactionPart"
  17184. }
  17185. ]
  17186. },
  17187. "Prompt": {
  17188. "type": "object",
  17189. "properties": {
  17190. "text": {
  17191. "type": "string"
  17192. },
  17193. "files": {
  17194. "type": "array",
  17195. "items": {
  17196. "$ref": "#/components/schemas/PromptFileAttachment"
  17197. }
  17198. },
  17199. "agents": {
  17200. "type": "array",
  17201. "items": {
  17202. "$ref": "#/components/schemas/PromptAgentAttachment"
  17203. }
  17204. }
  17205. },
  17206. "required": ["text"],
  17207. "additionalProperties": false
  17208. },
  17209. "Pty": {
  17210. "type": "object",
  17211. "properties": {
  17212. "id": {
  17213. "type": "string",
  17214. "pattern": "^pty"
  17215. },
  17216. "title": {
  17217. "type": "string"
  17218. },
  17219. "command": {
  17220. "type": "string"
  17221. },
  17222. "args": {
  17223. "type": "array",
  17224. "items": {
  17225. "type": "string"
  17226. }
  17227. },
  17228. "cwd": {
  17229. "type": "string"
  17230. },
  17231. "status": {
  17232. "type": "string",
  17233. "enum": ["running", "exited"]
  17234. },
  17235. "pid": {
  17236. "type": "integer",
  17237. "minimum": 0
  17238. },
  17239. "exitCode": {
  17240. "type": "integer",
  17241. "minimum": 0
  17242. }
  17243. },
  17244. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  17245. "additionalProperties": false
  17246. },
  17247. "Todo": {
  17248. "type": "object",
  17249. "properties": {
  17250. "content": {
  17251. "type": "string",
  17252. "description": "Brief description of the task"
  17253. },
  17254. "status": {
  17255. "type": "string",
  17256. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  17257. },
  17258. "priority": {
  17259. "type": "string",
  17260. "description": "Priority level of the task: high, medium, low"
  17261. }
  17262. },
  17263. "required": ["content", "status", "priority"],
  17264. "additionalProperties": false
  17265. },
  17266. "SessionStatus": {
  17267. "anyOf": [
  17268. {
  17269. "type": "object",
  17270. "properties": {
  17271. "type": {
  17272. "type": "string",
  17273. "enum": ["idle"]
  17274. }
  17275. },
  17276. "required": ["type"],
  17277. "additionalProperties": false
  17278. },
  17279. {
  17280. "type": "object",
  17281. "properties": {
  17282. "type": {
  17283. "type": "string",
  17284. "enum": ["retry"]
  17285. },
  17286. "attempt": {
  17287. "type": "integer",
  17288. "minimum": 0
  17289. },
  17290. "message": {
  17291. "type": "string"
  17292. },
  17293. "action": {
  17294. "type": "object",
  17295. "properties": {
  17296. "reason": {
  17297. "type": "string"
  17298. },
  17299. "provider": {
  17300. "type": "string"
  17301. },
  17302. "title": {
  17303. "type": "string"
  17304. },
  17305. "message": {
  17306. "type": "string"
  17307. },
  17308. "label": {
  17309. "type": "string"
  17310. },
  17311. "link": {
  17312. "type": "string"
  17313. }
  17314. },
  17315. "required": ["reason", "provider", "title", "message", "label"],
  17316. "additionalProperties": false
  17317. },
  17318. "next": {
  17319. "type": "integer",
  17320. "minimum": 0
  17321. }
  17322. },
  17323. "required": ["type", "attempt", "message", "next"],
  17324. "additionalProperties": false
  17325. },
  17326. {
  17327. "type": "object",
  17328. "properties": {
  17329. "type": {
  17330. "type": "string",
  17331. "enum": ["busy"]
  17332. }
  17333. },
  17334. "required": ["type"],
  17335. "additionalProperties": false
  17336. }
  17337. ]
  17338. },
  17339. "QuestionOption": {
  17340. "type": "object",
  17341. "properties": {
  17342. "label": {
  17343. "type": "string",
  17344. "description": "Display text (1-5 words, concise)"
  17345. },
  17346. "description": {
  17347. "type": "string",
  17348. "description": "Explanation of choice"
  17349. }
  17350. },
  17351. "required": ["label", "description"],
  17352. "additionalProperties": false
  17353. },
  17354. "QuestionInfo": {
  17355. "type": "object",
  17356. "properties": {
  17357. "question": {
  17358. "type": "string",
  17359. "description": "Complete question"
  17360. },
  17361. "header": {
  17362. "type": "string",
  17363. "description": "Very short label (max 30 chars)"
  17364. },
  17365. "options": {
  17366. "type": "array",
  17367. "items": {
  17368. "$ref": "#/components/schemas/QuestionOption"
  17369. },
  17370. "description": "Available choices"
  17371. },
  17372. "multiple": {
  17373. "type": "boolean"
  17374. },
  17375. "custom": {
  17376. "type": "boolean"
  17377. }
  17378. },
  17379. "required": ["question", "header", "options"],
  17380. "additionalProperties": false
  17381. },
  17382. "QuestionTool": {
  17383. "type": "object",
  17384. "properties": {
  17385. "messageID": {
  17386. "type": "string",
  17387. "pattern": "^msg"
  17388. },
  17389. "callID": {
  17390. "type": "string"
  17391. }
  17392. },
  17393. "required": ["messageID", "callID"],
  17394. "additionalProperties": false
  17395. },
  17396. "QuestionAnswer": {
  17397. "type": "array",
  17398. "items": {
  17399. "type": "string"
  17400. }
  17401. },
  17402. "GlobalEvent": {
  17403. "type": "object",
  17404. "properties": {
  17405. "directory": {
  17406. "type": "string"
  17407. },
  17408. "project": {
  17409. "type": "string"
  17410. },
  17411. "workspace": {
  17412. "type": "string"
  17413. },
  17414. "payload": {
  17415. "anyOf": [
  17416. {
  17417. "type": "object",
  17418. "properties": {
  17419. "id": {
  17420. "type": "string",
  17421. "pattern": "^evt_"
  17422. },
  17423. "type": {
  17424. "type": "string",
  17425. "enum": ["models-dev.refreshed"]
  17426. },
  17427. "properties": {
  17428. "type": "object",
  17429. "properties": {}
  17430. }
  17431. },
  17432. "required": ["id", "type", "properties"],
  17433. "additionalProperties": false
  17434. },
  17435. {
  17436. "type": "object",
  17437. "properties": {
  17438. "id": {
  17439. "type": "string",
  17440. "pattern": "^evt_"
  17441. },
  17442. "type": {
  17443. "type": "string",
  17444. "enum": ["integration.updated"]
  17445. },
  17446. "properties": {
  17447. "type": "object",
  17448. "properties": {}
  17449. }
  17450. },
  17451. "required": ["id", "type", "properties"],
  17452. "additionalProperties": false
  17453. },
  17454. {
  17455. "type": "object",
  17456. "properties": {
  17457. "id": {
  17458. "type": "string",
  17459. "pattern": "^evt_"
  17460. },
  17461. "type": {
  17462. "type": "string",
  17463. "enum": ["integration.connection.updated"]
  17464. },
  17465. "properties": {
  17466. "type": "object",
  17467. "properties": {
  17468. "integrationID": {
  17469. "type": "string"
  17470. }
  17471. },
  17472. "required": ["integrationID"],
  17473. "additionalProperties": false
  17474. }
  17475. },
  17476. "required": ["id", "type", "properties"],
  17477. "additionalProperties": false
  17478. },
  17479. {
  17480. "type": "object",
  17481. "properties": {
  17482. "id": {
  17483. "type": "string",
  17484. "pattern": "^evt_"
  17485. },
  17486. "type": {
  17487. "type": "string",
  17488. "enum": ["catalog.updated"]
  17489. },
  17490. "properties": {
  17491. "type": "object",
  17492. "properties": {}
  17493. }
  17494. },
  17495. "required": ["id", "type", "properties"],
  17496. "additionalProperties": false
  17497. },
  17498. {
  17499. "type": "object",
  17500. "properties": {
  17501. "id": {
  17502. "type": "string",
  17503. "pattern": "^evt_"
  17504. },
  17505. "type": {
  17506. "type": "string",
  17507. "enum": ["session.created"]
  17508. },
  17509. "properties": {
  17510. "type": "object",
  17511. "properties": {
  17512. "sessionID": {
  17513. "type": "string",
  17514. "pattern": "^ses"
  17515. },
  17516. "info": {
  17517. "$ref": "#/components/schemas/Session"
  17518. }
  17519. },
  17520. "required": ["sessionID", "info"],
  17521. "additionalProperties": false
  17522. }
  17523. },
  17524. "required": ["id", "type", "properties"],
  17525. "additionalProperties": false
  17526. },
  17527. {
  17528. "type": "object",
  17529. "properties": {
  17530. "id": {
  17531. "type": "string",
  17532. "pattern": "^evt_"
  17533. },
  17534. "type": {
  17535. "type": "string",
  17536. "enum": ["session.updated"]
  17537. },
  17538. "properties": {
  17539. "type": "object",
  17540. "properties": {
  17541. "sessionID": {
  17542. "type": "string",
  17543. "pattern": "^ses"
  17544. },
  17545. "info": {
  17546. "$ref": "#/components/schemas/Session"
  17547. }
  17548. },
  17549. "required": ["sessionID", "info"],
  17550. "additionalProperties": false
  17551. }
  17552. },
  17553. "required": ["id", "type", "properties"],
  17554. "additionalProperties": false
  17555. },
  17556. {
  17557. "type": "object",
  17558. "properties": {
  17559. "id": {
  17560. "type": "string",
  17561. "pattern": "^evt_"
  17562. },
  17563. "type": {
  17564. "type": "string",
  17565. "enum": ["session.deleted"]
  17566. },
  17567. "properties": {
  17568. "type": "object",
  17569. "properties": {
  17570. "sessionID": {
  17571. "type": "string",
  17572. "pattern": "^ses"
  17573. },
  17574. "info": {
  17575. "$ref": "#/components/schemas/Session"
  17576. }
  17577. },
  17578. "required": ["sessionID", "info"],
  17579. "additionalProperties": false
  17580. }
  17581. },
  17582. "required": ["id", "type", "properties"],
  17583. "additionalProperties": false
  17584. },
  17585. {
  17586. "type": "object",
  17587. "properties": {
  17588. "id": {
  17589. "type": "string",
  17590. "pattern": "^evt_"
  17591. },
  17592. "type": {
  17593. "type": "string",
  17594. "enum": ["message.updated"]
  17595. },
  17596. "properties": {
  17597. "type": "object",
  17598. "properties": {
  17599. "sessionID": {
  17600. "type": "string",
  17601. "pattern": "^ses"
  17602. },
  17603. "info": {
  17604. "$ref": "#/components/schemas/Message"
  17605. }
  17606. },
  17607. "required": ["sessionID", "info"],
  17608. "additionalProperties": false
  17609. }
  17610. },
  17611. "required": ["id", "type", "properties"],
  17612. "additionalProperties": false
  17613. },
  17614. {
  17615. "type": "object",
  17616. "properties": {
  17617. "id": {
  17618. "type": "string",
  17619. "pattern": "^evt_"
  17620. },
  17621. "type": {
  17622. "type": "string",
  17623. "enum": ["message.removed"]
  17624. },
  17625. "properties": {
  17626. "type": "object",
  17627. "properties": {
  17628. "sessionID": {
  17629. "type": "string",
  17630. "pattern": "^ses"
  17631. },
  17632. "messageID": {
  17633. "type": "string",
  17634. "pattern": "^msg"
  17635. }
  17636. },
  17637. "required": ["sessionID", "messageID"],
  17638. "additionalProperties": false
  17639. }
  17640. },
  17641. "required": ["id", "type", "properties"],
  17642. "additionalProperties": false
  17643. },
  17644. {
  17645. "type": "object",
  17646. "properties": {
  17647. "id": {
  17648. "type": "string",
  17649. "pattern": "^evt_"
  17650. },
  17651. "type": {
  17652. "type": "string",
  17653. "enum": ["message.part.updated"]
  17654. },
  17655. "properties": {
  17656. "type": "object",
  17657. "properties": {
  17658. "sessionID": {
  17659. "type": "string",
  17660. "pattern": "^ses"
  17661. },
  17662. "part": {
  17663. "$ref": "#/components/schemas/Part"
  17664. },
  17665. "time": {
  17666. "type": "number"
  17667. }
  17668. },
  17669. "required": ["sessionID", "part", "time"],
  17670. "additionalProperties": false
  17671. }
  17672. },
  17673. "required": ["id", "type", "properties"],
  17674. "additionalProperties": false
  17675. },
  17676. {
  17677. "type": "object",
  17678. "properties": {
  17679. "id": {
  17680. "type": "string",
  17681. "pattern": "^evt_"
  17682. },
  17683. "type": {
  17684. "type": "string",
  17685. "enum": ["message.part.removed"]
  17686. },
  17687. "properties": {
  17688. "type": "object",
  17689. "properties": {
  17690. "sessionID": {
  17691. "type": "string",
  17692. "pattern": "^ses"
  17693. },
  17694. "messageID": {
  17695. "type": "string",
  17696. "pattern": "^msg"
  17697. },
  17698. "partID": {
  17699. "type": "string",
  17700. "pattern": "^prt"
  17701. }
  17702. },
  17703. "required": ["sessionID", "messageID", "partID"],
  17704. "additionalProperties": false
  17705. }
  17706. },
  17707. "required": ["id", "type", "properties"],
  17708. "additionalProperties": false
  17709. },
  17710. {
  17711. "type": "object",
  17712. "properties": {
  17713. "id": {
  17714. "type": "string",
  17715. "pattern": "^evt_"
  17716. },
  17717. "type": {
  17718. "type": "string",
  17719. "enum": ["session.next.agent.switched"]
  17720. },
  17721. "properties": {
  17722. "type": "object",
  17723. "properties": {
  17724. "timestamp": {
  17725. "type": "number"
  17726. },
  17727. "sessionID": {
  17728. "type": "string",
  17729. "pattern": "^ses"
  17730. },
  17731. "messageID": {
  17732. "type": "string",
  17733. "pattern": "^msg_"
  17734. },
  17735. "agent": {
  17736. "type": "string"
  17737. }
  17738. },
  17739. "required": ["timestamp", "sessionID", "messageID", "agent"],
  17740. "additionalProperties": false
  17741. }
  17742. },
  17743. "required": ["id", "type", "properties"],
  17744. "additionalProperties": false
  17745. },
  17746. {
  17747. "type": "object",
  17748. "properties": {
  17749. "id": {
  17750. "type": "string",
  17751. "pattern": "^evt_"
  17752. },
  17753. "type": {
  17754. "type": "string",
  17755. "enum": ["session.next.model.switched"]
  17756. },
  17757. "properties": {
  17758. "type": "object",
  17759. "properties": {
  17760. "timestamp": {
  17761. "type": "number"
  17762. },
  17763. "sessionID": {
  17764. "type": "string",
  17765. "pattern": "^ses"
  17766. },
  17767. "messageID": {
  17768. "type": "string",
  17769. "pattern": "^msg_"
  17770. },
  17771. "model": {
  17772. "$ref": "#/components/schemas/ModelRef"
  17773. }
  17774. },
  17775. "required": ["timestamp", "sessionID", "messageID", "model"],
  17776. "additionalProperties": false
  17777. }
  17778. },
  17779. "required": ["id", "type", "properties"],
  17780. "additionalProperties": false
  17781. },
  17782. {
  17783. "type": "object",
  17784. "properties": {
  17785. "id": {
  17786. "type": "string",
  17787. "pattern": "^evt_"
  17788. },
  17789. "type": {
  17790. "type": "string",
  17791. "enum": ["session.next.moved"]
  17792. },
  17793. "properties": {
  17794. "type": "object",
  17795. "properties": {
  17796. "timestamp": {
  17797. "type": "number"
  17798. },
  17799. "sessionID": {
  17800. "type": "string",
  17801. "pattern": "^ses"
  17802. },
  17803. "location": {
  17804. "$ref": "#/components/schemas/LocationRef"
  17805. },
  17806. "subdirectory": {
  17807. "type": "string"
  17808. }
  17809. },
  17810. "required": ["timestamp", "sessionID", "location"],
  17811. "additionalProperties": false
  17812. }
  17813. },
  17814. "required": ["id", "type", "properties"],
  17815. "additionalProperties": false
  17816. },
  17817. {
  17818. "type": "object",
  17819. "properties": {
  17820. "id": {
  17821. "type": "string",
  17822. "pattern": "^evt_"
  17823. },
  17824. "type": {
  17825. "type": "string",
  17826. "enum": ["session.next.prompted"]
  17827. },
  17828. "properties": {
  17829. "type": "object",
  17830. "properties": {
  17831. "timestamp": {
  17832. "type": "number"
  17833. },
  17834. "sessionID": {
  17835. "type": "string",
  17836. "pattern": "^ses"
  17837. },
  17838. "messageID": {
  17839. "type": "string",
  17840. "pattern": "^msg_"
  17841. },
  17842. "prompt": {
  17843. "$ref": "#/components/schemas/Prompt"
  17844. },
  17845. "delivery": {
  17846. "type": "string",
  17847. "enum": ["steer", "queue"]
  17848. }
  17849. },
  17850. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17851. "additionalProperties": false
  17852. }
  17853. },
  17854. "required": ["id", "type", "properties"],
  17855. "additionalProperties": false
  17856. },
  17857. {
  17858. "type": "object",
  17859. "properties": {
  17860. "id": {
  17861. "type": "string",
  17862. "pattern": "^evt_"
  17863. },
  17864. "type": {
  17865. "type": "string",
  17866. "enum": ["session.next.prompt.admitted"]
  17867. },
  17868. "properties": {
  17869. "type": "object",
  17870. "properties": {
  17871. "timestamp": {
  17872. "type": "number"
  17873. },
  17874. "sessionID": {
  17875. "type": "string",
  17876. "pattern": "^ses"
  17877. },
  17878. "messageID": {
  17879. "type": "string",
  17880. "pattern": "^msg_"
  17881. },
  17882. "prompt": {
  17883. "$ref": "#/components/schemas/Prompt"
  17884. },
  17885. "delivery": {
  17886. "type": "string",
  17887. "enum": ["steer", "queue"]
  17888. }
  17889. },
  17890. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17891. "additionalProperties": false
  17892. }
  17893. },
  17894. "required": ["id", "type", "properties"],
  17895. "additionalProperties": false
  17896. },
  17897. {
  17898. "type": "object",
  17899. "properties": {
  17900. "id": {
  17901. "type": "string",
  17902. "pattern": "^evt_"
  17903. },
  17904. "type": {
  17905. "type": "string",
  17906. "enum": ["session.next.context.updated"]
  17907. },
  17908. "properties": {
  17909. "type": "object",
  17910. "properties": {
  17911. "timestamp": {
  17912. "type": "number"
  17913. },
  17914. "sessionID": {
  17915. "type": "string",
  17916. "pattern": "^ses"
  17917. },
  17918. "messageID": {
  17919. "type": "string",
  17920. "pattern": "^msg_"
  17921. },
  17922. "text": {
  17923. "type": "string"
  17924. }
  17925. },
  17926. "required": ["timestamp", "sessionID", "messageID", "text"],
  17927. "additionalProperties": false
  17928. }
  17929. },
  17930. "required": ["id", "type", "properties"],
  17931. "additionalProperties": false
  17932. },
  17933. {
  17934. "type": "object",
  17935. "properties": {
  17936. "id": {
  17937. "type": "string",
  17938. "pattern": "^evt_"
  17939. },
  17940. "type": {
  17941. "type": "string",
  17942. "enum": ["session.next.synthetic"]
  17943. },
  17944. "properties": {
  17945. "type": "object",
  17946. "properties": {
  17947. "timestamp": {
  17948. "type": "number"
  17949. },
  17950. "sessionID": {
  17951. "type": "string",
  17952. "pattern": "^ses"
  17953. },
  17954. "messageID": {
  17955. "type": "string",
  17956. "pattern": "^msg_"
  17957. },
  17958. "text": {
  17959. "type": "string"
  17960. }
  17961. },
  17962. "required": ["timestamp", "sessionID", "messageID", "text"],
  17963. "additionalProperties": false
  17964. }
  17965. },
  17966. "required": ["id", "type", "properties"],
  17967. "additionalProperties": false
  17968. },
  17969. {
  17970. "type": "object",
  17971. "properties": {
  17972. "id": {
  17973. "type": "string",
  17974. "pattern": "^evt_"
  17975. },
  17976. "type": {
  17977. "type": "string",
  17978. "enum": ["session.next.shell.started"]
  17979. },
  17980. "properties": {
  17981. "type": "object",
  17982. "properties": {
  17983. "timestamp": {
  17984. "type": "number"
  17985. },
  17986. "sessionID": {
  17987. "type": "string",
  17988. "pattern": "^ses"
  17989. },
  17990. "messageID": {
  17991. "type": "string",
  17992. "pattern": "^msg_"
  17993. },
  17994. "callID": {
  17995. "type": "string"
  17996. },
  17997. "command": {
  17998. "type": "string"
  17999. }
  18000. },
  18001. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  18002. "additionalProperties": false
  18003. }
  18004. },
  18005. "required": ["id", "type", "properties"],
  18006. "additionalProperties": false
  18007. },
  18008. {
  18009. "type": "object",
  18010. "properties": {
  18011. "id": {
  18012. "type": "string",
  18013. "pattern": "^evt_"
  18014. },
  18015. "type": {
  18016. "type": "string",
  18017. "enum": ["session.next.shell.ended"]
  18018. },
  18019. "properties": {
  18020. "type": "object",
  18021. "properties": {
  18022. "timestamp": {
  18023. "type": "number"
  18024. },
  18025. "sessionID": {
  18026. "type": "string",
  18027. "pattern": "^ses"
  18028. },
  18029. "callID": {
  18030. "type": "string"
  18031. },
  18032. "output": {
  18033. "type": "string"
  18034. }
  18035. },
  18036. "required": ["timestamp", "sessionID", "callID", "output"],
  18037. "additionalProperties": false
  18038. }
  18039. },
  18040. "required": ["id", "type", "properties"],
  18041. "additionalProperties": false
  18042. },
  18043. {
  18044. "type": "object",
  18045. "properties": {
  18046. "id": {
  18047. "type": "string",
  18048. "pattern": "^evt_"
  18049. },
  18050. "type": {
  18051. "type": "string",
  18052. "enum": ["session.next.step.started"]
  18053. },
  18054. "properties": {
  18055. "type": "object",
  18056. "properties": {
  18057. "timestamp": {
  18058. "type": "number"
  18059. },
  18060. "sessionID": {
  18061. "type": "string",
  18062. "pattern": "^ses"
  18063. },
  18064. "assistantMessageID": {
  18065. "type": "string",
  18066. "pattern": "^msg_"
  18067. },
  18068. "agent": {
  18069. "type": "string"
  18070. },
  18071. "model": {
  18072. "$ref": "#/components/schemas/ModelRef"
  18073. },
  18074. "snapshot": {
  18075. "type": "string"
  18076. }
  18077. },
  18078. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  18079. "additionalProperties": false
  18080. }
  18081. },
  18082. "required": ["id", "type", "properties"],
  18083. "additionalProperties": false
  18084. },
  18085. {
  18086. "type": "object",
  18087. "properties": {
  18088. "id": {
  18089. "type": "string",
  18090. "pattern": "^evt_"
  18091. },
  18092. "type": {
  18093. "type": "string",
  18094. "enum": ["session.next.step.ended"]
  18095. },
  18096. "properties": {
  18097. "type": "object",
  18098. "properties": {
  18099. "timestamp": {
  18100. "type": "number"
  18101. },
  18102. "sessionID": {
  18103. "type": "string",
  18104. "pattern": "^ses"
  18105. },
  18106. "assistantMessageID": {
  18107. "type": "string",
  18108. "pattern": "^msg_"
  18109. },
  18110. "finish": {
  18111. "type": "string"
  18112. },
  18113. "cost": {
  18114. "type": "number"
  18115. },
  18116. "tokens": {
  18117. "type": "object",
  18118. "properties": {
  18119. "input": {
  18120. "type": "number"
  18121. },
  18122. "output": {
  18123. "type": "number"
  18124. },
  18125. "reasoning": {
  18126. "type": "number"
  18127. },
  18128. "cache": {
  18129. "type": "object",
  18130. "properties": {
  18131. "read": {
  18132. "type": "number"
  18133. },
  18134. "write": {
  18135. "type": "number"
  18136. }
  18137. },
  18138. "required": ["read", "write"],
  18139. "additionalProperties": false
  18140. }
  18141. },
  18142. "required": ["input", "output", "reasoning", "cache"],
  18143. "additionalProperties": false
  18144. },
  18145. "snapshot": {
  18146. "type": "string"
  18147. },
  18148. "files": {
  18149. "type": "array",
  18150. "items": {
  18151. "type": "string"
  18152. }
  18153. }
  18154. },
  18155. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  18156. "additionalProperties": false
  18157. }
  18158. },
  18159. "required": ["id", "type", "properties"],
  18160. "additionalProperties": false
  18161. },
  18162. {
  18163. "type": "object",
  18164. "properties": {
  18165. "id": {
  18166. "type": "string",
  18167. "pattern": "^evt_"
  18168. },
  18169. "type": {
  18170. "type": "string",
  18171. "enum": ["session.next.step.failed"]
  18172. },
  18173. "properties": {
  18174. "type": "object",
  18175. "properties": {
  18176. "timestamp": {
  18177. "type": "number"
  18178. },
  18179. "sessionID": {
  18180. "type": "string",
  18181. "pattern": "^ses"
  18182. },
  18183. "assistantMessageID": {
  18184. "type": "string",
  18185. "pattern": "^msg_"
  18186. },
  18187. "error": {
  18188. "$ref": "#/components/schemas/SessionErrorUnknown"
  18189. }
  18190. },
  18191. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  18192. "additionalProperties": false
  18193. }
  18194. },
  18195. "required": ["id", "type", "properties"],
  18196. "additionalProperties": false
  18197. },
  18198. {
  18199. "type": "object",
  18200. "properties": {
  18201. "id": {
  18202. "type": "string",
  18203. "pattern": "^evt_"
  18204. },
  18205. "type": {
  18206. "type": "string",
  18207. "enum": ["session.next.text.started"]
  18208. },
  18209. "properties": {
  18210. "type": "object",
  18211. "properties": {
  18212. "timestamp": {
  18213. "type": "number"
  18214. },
  18215. "sessionID": {
  18216. "type": "string",
  18217. "pattern": "^ses"
  18218. },
  18219. "assistantMessageID": {
  18220. "type": "string",
  18221. "pattern": "^msg_"
  18222. },
  18223. "textID": {
  18224. "type": "string"
  18225. }
  18226. },
  18227. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  18228. "additionalProperties": false
  18229. }
  18230. },
  18231. "required": ["id", "type", "properties"],
  18232. "additionalProperties": false
  18233. },
  18234. {
  18235. "type": "object",
  18236. "properties": {
  18237. "id": {
  18238. "type": "string",
  18239. "pattern": "^evt_"
  18240. },
  18241. "type": {
  18242. "type": "string",
  18243. "enum": ["session.next.text.delta"]
  18244. },
  18245. "properties": {
  18246. "type": "object",
  18247. "properties": {
  18248. "timestamp": {
  18249. "type": "number"
  18250. },
  18251. "sessionID": {
  18252. "type": "string",
  18253. "pattern": "^ses"
  18254. },
  18255. "assistantMessageID": {
  18256. "type": "string",
  18257. "pattern": "^msg_"
  18258. },
  18259. "textID": {
  18260. "type": "string"
  18261. },
  18262. "delta": {
  18263. "type": "string"
  18264. }
  18265. },
  18266. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  18267. "additionalProperties": false
  18268. }
  18269. },
  18270. "required": ["id", "type", "properties"],
  18271. "additionalProperties": false
  18272. },
  18273. {
  18274. "type": "object",
  18275. "properties": {
  18276. "id": {
  18277. "type": "string",
  18278. "pattern": "^evt_"
  18279. },
  18280. "type": {
  18281. "type": "string",
  18282. "enum": ["session.next.text.ended"]
  18283. },
  18284. "properties": {
  18285. "type": "object",
  18286. "properties": {
  18287. "timestamp": {
  18288. "type": "number"
  18289. },
  18290. "sessionID": {
  18291. "type": "string",
  18292. "pattern": "^ses"
  18293. },
  18294. "assistantMessageID": {
  18295. "type": "string",
  18296. "pattern": "^msg_"
  18297. },
  18298. "textID": {
  18299. "type": "string"
  18300. },
  18301. "text": {
  18302. "type": "string"
  18303. }
  18304. },
  18305. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  18306. "additionalProperties": false
  18307. }
  18308. },
  18309. "required": ["id", "type", "properties"],
  18310. "additionalProperties": false
  18311. },
  18312. {
  18313. "type": "object",
  18314. "properties": {
  18315. "id": {
  18316. "type": "string",
  18317. "pattern": "^evt_"
  18318. },
  18319. "type": {
  18320. "type": "string",
  18321. "enum": ["session.next.reasoning.started"]
  18322. },
  18323. "properties": {
  18324. "type": "object",
  18325. "properties": {
  18326. "timestamp": {
  18327. "type": "number"
  18328. },
  18329. "sessionID": {
  18330. "type": "string",
  18331. "pattern": "^ses"
  18332. },
  18333. "assistantMessageID": {
  18334. "type": "string",
  18335. "pattern": "^msg_"
  18336. },
  18337. "reasoningID": {
  18338. "type": "string"
  18339. },
  18340. "providerMetadata": {
  18341. "$ref": "#/components/schemas/LLMProviderMetadata"
  18342. }
  18343. },
  18344. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  18345. "additionalProperties": false
  18346. }
  18347. },
  18348. "required": ["id", "type", "properties"],
  18349. "additionalProperties": false
  18350. },
  18351. {
  18352. "type": "object",
  18353. "properties": {
  18354. "id": {
  18355. "type": "string",
  18356. "pattern": "^evt_"
  18357. },
  18358. "type": {
  18359. "type": "string",
  18360. "enum": ["session.next.reasoning.delta"]
  18361. },
  18362. "properties": {
  18363. "type": "object",
  18364. "properties": {
  18365. "timestamp": {
  18366. "type": "number"
  18367. },
  18368. "sessionID": {
  18369. "type": "string",
  18370. "pattern": "^ses"
  18371. },
  18372. "assistantMessageID": {
  18373. "type": "string",
  18374. "pattern": "^msg_"
  18375. },
  18376. "reasoningID": {
  18377. "type": "string"
  18378. },
  18379. "delta": {
  18380. "type": "string"
  18381. }
  18382. },
  18383. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  18384. "additionalProperties": false
  18385. }
  18386. },
  18387. "required": ["id", "type", "properties"],
  18388. "additionalProperties": false
  18389. },
  18390. {
  18391. "type": "object",
  18392. "properties": {
  18393. "id": {
  18394. "type": "string",
  18395. "pattern": "^evt_"
  18396. },
  18397. "type": {
  18398. "type": "string",
  18399. "enum": ["session.next.reasoning.ended"]
  18400. },
  18401. "properties": {
  18402. "type": "object",
  18403. "properties": {
  18404. "timestamp": {
  18405. "type": "number"
  18406. },
  18407. "sessionID": {
  18408. "type": "string",
  18409. "pattern": "^ses"
  18410. },
  18411. "assistantMessageID": {
  18412. "type": "string",
  18413. "pattern": "^msg_"
  18414. },
  18415. "reasoningID": {
  18416. "type": "string"
  18417. },
  18418. "text": {
  18419. "type": "string"
  18420. },
  18421. "providerMetadata": {
  18422. "$ref": "#/components/schemas/LLMProviderMetadata"
  18423. }
  18424. },
  18425. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  18426. "additionalProperties": false
  18427. }
  18428. },
  18429. "required": ["id", "type", "properties"],
  18430. "additionalProperties": false
  18431. },
  18432. {
  18433. "type": "object",
  18434. "properties": {
  18435. "id": {
  18436. "type": "string",
  18437. "pattern": "^evt_"
  18438. },
  18439. "type": {
  18440. "type": "string",
  18441. "enum": ["session.next.tool.input.started"]
  18442. },
  18443. "properties": {
  18444. "type": "object",
  18445. "properties": {
  18446. "timestamp": {
  18447. "type": "number"
  18448. },
  18449. "sessionID": {
  18450. "type": "string",
  18451. "pattern": "^ses"
  18452. },
  18453. "assistantMessageID": {
  18454. "type": "string",
  18455. "pattern": "^msg_"
  18456. },
  18457. "callID": {
  18458. "type": "string"
  18459. },
  18460. "name": {
  18461. "type": "string"
  18462. }
  18463. },
  18464. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  18465. "additionalProperties": false
  18466. }
  18467. },
  18468. "required": ["id", "type", "properties"],
  18469. "additionalProperties": false
  18470. },
  18471. {
  18472. "type": "object",
  18473. "properties": {
  18474. "id": {
  18475. "type": "string",
  18476. "pattern": "^evt_"
  18477. },
  18478. "type": {
  18479. "type": "string",
  18480. "enum": ["session.next.tool.input.delta"]
  18481. },
  18482. "properties": {
  18483. "type": "object",
  18484. "properties": {
  18485. "timestamp": {
  18486. "type": "number"
  18487. },
  18488. "sessionID": {
  18489. "type": "string",
  18490. "pattern": "^ses"
  18491. },
  18492. "assistantMessageID": {
  18493. "type": "string",
  18494. "pattern": "^msg_"
  18495. },
  18496. "callID": {
  18497. "type": "string"
  18498. },
  18499. "delta": {
  18500. "type": "string"
  18501. }
  18502. },
  18503. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  18504. "additionalProperties": false
  18505. }
  18506. },
  18507. "required": ["id", "type", "properties"],
  18508. "additionalProperties": false
  18509. },
  18510. {
  18511. "type": "object",
  18512. "properties": {
  18513. "id": {
  18514. "type": "string",
  18515. "pattern": "^evt_"
  18516. },
  18517. "type": {
  18518. "type": "string",
  18519. "enum": ["session.next.tool.input.ended"]
  18520. },
  18521. "properties": {
  18522. "type": "object",
  18523. "properties": {
  18524. "timestamp": {
  18525. "type": "number"
  18526. },
  18527. "sessionID": {
  18528. "type": "string",
  18529. "pattern": "^ses"
  18530. },
  18531. "assistantMessageID": {
  18532. "type": "string",
  18533. "pattern": "^msg_"
  18534. },
  18535. "callID": {
  18536. "type": "string"
  18537. },
  18538. "text": {
  18539. "type": "string"
  18540. }
  18541. },
  18542. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  18543. "additionalProperties": false
  18544. }
  18545. },
  18546. "required": ["id", "type", "properties"],
  18547. "additionalProperties": false
  18548. },
  18549. {
  18550. "type": "object",
  18551. "properties": {
  18552. "id": {
  18553. "type": "string",
  18554. "pattern": "^evt_"
  18555. },
  18556. "type": {
  18557. "type": "string",
  18558. "enum": ["session.next.tool.called"]
  18559. },
  18560. "properties": {
  18561. "type": "object",
  18562. "properties": {
  18563. "timestamp": {
  18564. "type": "number"
  18565. },
  18566. "sessionID": {
  18567. "type": "string",
  18568. "pattern": "^ses"
  18569. },
  18570. "assistantMessageID": {
  18571. "type": "string",
  18572. "pattern": "^msg_"
  18573. },
  18574. "callID": {
  18575. "type": "string"
  18576. },
  18577. "tool": {
  18578. "type": "string"
  18579. },
  18580. "input": {
  18581. "type": "object"
  18582. },
  18583. "provider": {
  18584. "type": "object",
  18585. "properties": {
  18586. "executed": {
  18587. "type": "boolean"
  18588. },
  18589. "metadata": {
  18590. "$ref": "#/components/schemas/LLMProviderMetadata"
  18591. }
  18592. },
  18593. "required": ["executed"],
  18594. "additionalProperties": false
  18595. }
  18596. },
  18597. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  18598. "additionalProperties": false
  18599. }
  18600. },
  18601. "required": ["id", "type", "properties"],
  18602. "additionalProperties": false
  18603. },
  18604. {
  18605. "type": "object",
  18606. "properties": {
  18607. "id": {
  18608. "type": "string",
  18609. "pattern": "^evt_"
  18610. },
  18611. "type": {
  18612. "type": "string",
  18613. "enum": ["session.next.tool.progress"]
  18614. },
  18615. "properties": {
  18616. "type": "object",
  18617. "properties": {
  18618. "timestamp": {
  18619. "type": "number"
  18620. },
  18621. "sessionID": {
  18622. "type": "string",
  18623. "pattern": "^ses"
  18624. },
  18625. "assistantMessageID": {
  18626. "type": "string",
  18627. "pattern": "^msg_"
  18628. },
  18629. "callID": {
  18630. "type": "string"
  18631. },
  18632. "structured": {
  18633. "type": "object"
  18634. },
  18635. "content": {
  18636. "type": "array",
  18637. "items": {
  18638. "$ref": "#/components/schemas/LLMToolContent"
  18639. }
  18640. }
  18641. },
  18642. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  18643. "additionalProperties": false
  18644. }
  18645. },
  18646. "required": ["id", "type", "properties"],
  18647. "additionalProperties": false
  18648. },
  18649. {
  18650. "type": "object",
  18651. "properties": {
  18652. "id": {
  18653. "type": "string",
  18654. "pattern": "^evt_"
  18655. },
  18656. "type": {
  18657. "type": "string",
  18658. "enum": ["session.next.tool.success"]
  18659. },
  18660. "properties": {
  18661. "type": "object",
  18662. "properties": {
  18663. "timestamp": {
  18664. "type": "number"
  18665. },
  18666. "sessionID": {
  18667. "type": "string",
  18668. "pattern": "^ses"
  18669. },
  18670. "assistantMessageID": {
  18671. "type": "string",
  18672. "pattern": "^msg_"
  18673. },
  18674. "callID": {
  18675. "type": "string"
  18676. },
  18677. "structured": {
  18678. "type": "object"
  18679. },
  18680. "content": {
  18681. "type": "array",
  18682. "items": {
  18683. "$ref": "#/components/schemas/LLMToolContent"
  18684. }
  18685. },
  18686. "outputPaths": {
  18687. "type": "array",
  18688. "items": {
  18689. "type": "string"
  18690. }
  18691. },
  18692. "result": {},
  18693. "provider": {
  18694. "type": "object",
  18695. "properties": {
  18696. "executed": {
  18697. "type": "boolean"
  18698. },
  18699. "metadata": {
  18700. "$ref": "#/components/schemas/LLMProviderMetadata"
  18701. }
  18702. },
  18703. "required": ["executed"],
  18704. "additionalProperties": false
  18705. }
  18706. },
  18707. "required": [
  18708. "timestamp",
  18709. "sessionID",
  18710. "assistantMessageID",
  18711. "callID",
  18712. "structured",
  18713. "content",
  18714. "provider"
  18715. ],
  18716. "additionalProperties": false
  18717. }
  18718. },
  18719. "required": ["id", "type", "properties"],
  18720. "additionalProperties": false
  18721. },
  18722. {
  18723. "type": "object",
  18724. "properties": {
  18725. "id": {
  18726. "type": "string",
  18727. "pattern": "^evt_"
  18728. },
  18729. "type": {
  18730. "type": "string",
  18731. "enum": ["session.next.tool.failed"]
  18732. },
  18733. "properties": {
  18734. "type": "object",
  18735. "properties": {
  18736. "timestamp": {
  18737. "type": "number"
  18738. },
  18739. "sessionID": {
  18740. "type": "string",
  18741. "pattern": "^ses"
  18742. },
  18743. "assistantMessageID": {
  18744. "type": "string",
  18745. "pattern": "^msg_"
  18746. },
  18747. "callID": {
  18748. "type": "string"
  18749. },
  18750. "error": {
  18751. "$ref": "#/components/schemas/SessionErrorUnknown"
  18752. },
  18753. "result": {},
  18754. "provider": {
  18755. "type": "object",
  18756. "properties": {
  18757. "executed": {
  18758. "type": "boolean"
  18759. },
  18760. "metadata": {
  18761. "$ref": "#/components/schemas/LLMProviderMetadata"
  18762. }
  18763. },
  18764. "required": ["executed"],
  18765. "additionalProperties": false
  18766. }
  18767. },
  18768. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18769. "additionalProperties": false
  18770. }
  18771. },
  18772. "required": ["id", "type", "properties"],
  18773. "additionalProperties": false
  18774. },
  18775. {
  18776. "type": "object",
  18777. "properties": {
  18778. "id": {
  18779. "type": "string",
  18780. "pattern": "^evt_"
  18781. },
  18782. "type": {
  18783. "type": "string",
  18784. "enum": ["session.next.retried"]
  18785. },
  18786. "properties": {
  18787. "type": "object",
  18788. "properties": {
  18789. "timestamp": {
  18790. "type": "number"
  18791. },
  18792. "sessionID": {
  18793. "type": "string",
  18794. "pattern": "^ses"
  18795. },
  18796. "attempt": {
  18797. "type": "number"
  18798. },
  18799. "error": {
  18800. "$ref": "#/components/schemas/SessionNextRetry_error"
  18801. }
  18802. },
  18803. "required": ["timestamp", "sessionID", "attempt", "error"],
  18804. "additionalProperties": false
  18805. }
  18806. },
  18807. "required": ["id", "type", "properties"],
  18808. "additionalProperties": false
  18809. },
  18810. {
  18811. "type": "object",
  18812. "properties": {
  18813. "id": {
  18814. "type": "string",
  18815. "pattern": "^evt_"
  18816. },
  18817. "type": {
  18818. "type": "string",
  18819. "enum": ["session.next.compaction.started"]
  18820. },
  18821. "properties": {
  18822. "type": "object",
  18823. "properties": {
  18824. "timestamp": {
  18825. "type": "number"
  18826. },
  18827. "sessionID": {
  18828. "type": "string",
  18829. "pattern": "^ses"
  18830. },
  18831. "messageID": {
  18832. "type": "string",
  18833. "pattern": "^msg_"
  18834. },
  18835. "reason": {
  18836. "type": "string",
  18837. "enum": ["auto", "manual"]
  18838. }
  18839. },
  18840. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18841. "additionalProperties": false
  18842. }
  18843. },
  18844. "required": ["id", "type", "properties"],
  18845. "additionalProperties": false
  18846. },
  18847. {
  18848. "type": "object",
  18849. "properties": {
  18850. "id": {
  18851. "type": "string",
  18852. "pattern": "^evt_"
  18853. },
  18854. "type": {
  18855. "type": "string",
  18856. "enum": ["session.next.compaction.delta"]
  18857. },
  18858. "properties": {
  18859. "type": "object",
  18860. "properties": {
  18861. "timestamp": {
  18862. "type": "number"
  18863. },
  18864. "sessionID": {
  18865. "type": "string",
  18866. "pattern": "^ses"
  18867. },
  18868. "messageID": {
  18869. "type": "string",
  18870. "pattern": "^msg_"
  18871. },
  18872. "text": {
  18873. "type": "string"
  18874. }
  18875. },
  18876. "required": ["timestamp", "sessionID", "messageID", "text"],
  18877. "additionalProperties": false
  18878. }
  18879. },
  18880. "required": ["id", "type", "properties"],
  18881. "additionalProperties": false
  18882. },
  18883. {
  18884. "type": "object",
  18885. "properties": {
  18886. "id": {
  18887. "type": "string",
  18888. "pattern": "^evt_"
  18889. },
  18890. "type": {
  18891. "type": "string",
  18892. "enum": ["session.next.compaction.ended"]
  18893. },
  18894. "properties": {
  18895. "type": "object",
  18896. "properties": {
  18897. "timestamp": {
  18898. "type": "number"
  18899. },
  18900. "sessionID": {
  18901. "type": "string",
  18902. "pattern": "^ses"
  18903. },
  18904. "messageID": {
  18905. "type": "string",
  18906. "pattern": "^msg_"
  18907. },
  18908. "reason": {
  18909. "type": "string",
  18910. "enum": ["auto", "manual"]
  18911. },
  18912. "text": {
  18913. "type": "string"
  18914. },
  18915. "recent": {
  18916. "type": "string"
  18917. }
  18918. },
  18919. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18920. "additionalProperties": false
  18921. }
  18922. },
  18923. "required": ["id", "type", "properties"],
  18924. "additionalProperties": false
  18925. },
  18926. {
  18927. "type": "object",
  18928. "properties": {
  18929. "id": {
  18930. "type": "string",
  18931. "pattern": "^evt_"
  18932. },
  18933. "type": {
  18934. "type": "string",
  18935. "enum": ["session.next.revert.staged"]
  18936. },
  18937. "properties": {
  18938. "type": "object",
  18939. "properties": {
  18940. "timestamp": {
  18941. "type": "number"
  18942. },
  18943. "sessionID": {
  18944. "type": "string",
  18945. "pattern": "^ses"
  18946. },
  18947. "revert": {
  18948. "$ref": "#/components/schemas/RevertState"
  18949. }
  18950. },
  18951. "required": ["timestamp", "sessionID", "revert"],
  18952. "additionalProperties": false
  18953. }
  18954. },
  18955. "required": ["id", "type", "properties"],
  18956. "additionalProperties": false
  18957. },
  18958. {
  18959. "type": "object",
  18960. "properties": {
  18961. "id": {
  18962. "type": "string",
  18963. "pattern": "^evt_"
  18964. },
  18965. "type": {
  18966. "type": "string",
  18967. "enum": ["session.next.revert.cleared"]
  18968. },
  18969. "properties": {
  18970. "type": "object",
  18971. "properties": {
  18972. "timestamp": {
  18973. "type": "number"
  18974. },
  18975. "sessionID": {
  18976. "type": "string",
  18977. "pattern": "^ses"
  18978. }
  18979. },
  18980. "required": ["timestamp", "sessionID"],
  18981. "additionalProperties": false
  18982. }
  18983. },
  18984. "required": ["id", "type", "properties"],
  18985. "additionalProperties": false
  18986. },
  18987. {
  18988. "type": "object",
  18989. "properties": {
  18990. "id": {
  18991. "type": "string",
  18992. "pattern": "^evt_"
  18993. },
  18994. "type": {
  18995. "type": "string",
  18996. "enum": ["session.next.revert.committed"]
  18997. },
  18998. "properties": {
  18999. "type": "object",
  19000. "properties": {
  19001. "timestamp": {
  19002. "type": "number"
  19003. },
  19004. "sessionID": {
  19005. "type": "string",
  19006. "pattern": "^ses"
  19007. },
  19008. "messageID": {
  19009. "type": "string",
  19010. "pattern": "^msg_"
  19011. }
  19012. },
  19013. "required": ["timestamp", "sessionID", "messageID"],
  19014. "additionalProperties": false
  19015. }
  19016. },
  19017. "required": ["id", "type", "properties"],
  19018. "additionalProperties": false
  19019. },
  19020. {
  19021. "type": "object",
  19022. "properties": {
  19023. "id": {
  19024. "type": "string",
  19025. "pattern": "^evt_"
  19026. },
  19027. "type": {
  19028. "type": "string",
  19029. "enum": ["message.part.delta"]
  19030. },
  19031. "properties": {
  19032. "type": "object",
  19033. "properties": {
  19034. "sessionID": {
  19035. "type": "string",
  19036. "pattern": "^ses"
  19037. },
  19038. "messageID": {
  19039. "type": "string",
  19040. "pattern": "^msg"
  19041. },
  19042. "partID": {
  19043. "type": "string",
  19044. "pattern": "^prt"
  19045. },
  19046. "field": {
  19047. "type": "string"
  19048. },
  19049. "delta": {
  19050. "type": "string"
  19051. }
  19052. },
  19053. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  19054. "additionalProperties": false
  19055. }
  19056. },
  19057. "required": ["id", "type", "properties"],
  19058. "additionalProperties": false
  19059. },
  19060. {
  19061. "type": "object",
  19062. "properties": {
  19063. "id": {
  19064. "type": "string",
  19065. "pattern": "^evt_"
  19066. },
  19067. "type": {
  19068. "type": "string",
  19069. "enum": ["session.diff"]
  19070. },
  19071. "properties": {
  19072. "type": "object",
  19073. "properties": {
  19074. "sessionID": {
  19075. "type": "string",
  19076. "pattern": "^ses"
  19077. },
  19078. "diff": {
  19079. "type": "array",
  19080. "items": {
  19081. "$ref": "#/components/schemas/SnapshotFileDiff"
  19082. }
  19083. }
  19084. },
  19085. "required": ["sessionID", "diff"],
  19086. "additionalProperties": false
  19087. }
  19088. },
  19089. "required": ["id", "type", "properties"],
  19090. "additionalProperties": false
  19091. },
  19092. {
  19093. "type": "object",
  19094. "properties": {
  19095. "id": {
  19096. "type": "string",
  19097. "pattern": "^evt_"
  19098. },
  19099. "type": {
  19100. "type": "string",
  19101. "enum": ["session.error"]
  19102. },
  19103. "properties": {
  19104. "type": "object",
  19105. "properties": {
  19106. "sessionID": {
  19107. "type": "string",
  19108. "pattern": "^ses"
  19109. },
  19110. "error": {
  19111. "anyOf": [
  19112. {
  19113. "$ref": "#/components/schemas/ProviderAuthError"
  19114. },
  19115. {
  19116. "$ref": "#/components/schemas/UnknownError"
  19117. },
  19118. {
  19119. "$ref": "#/components/schemas/MessageOutputLengthError"
  19120. },
  19121. {
  19122. "$ref": "#/components/schemas/MessageAbortedError"
  19123. },
  19124. {
  19125. "$ref": "#/components/schemas/StructuredOutputError"
  19126. },
  19127. {
  19128. "$ref": "#/components/schemas/ContextOverflowError"
  19129. },
  19130. {
  19131. "$ref": "#/components/schemas/ContentFilterError"
  19132. },
  19133. {
  19134. "$ref": "#/components/schemas/APIError"
  19135. }
  19136. ]
  19137. }
  19138. },
  19139. "additionalProperties": false
  19140. }
  19141. },
  19142. "required": ["id", "type", "properties"],
  19143. "additionalProperties": false
  19144. },
  19145. {
  19146. "type": "object",
  19147. "properties": {
  19148. "id": {
  19149. "type": "string",
  19150. "pattern": "^evt_"
  19151. },
  19152. "type": {
  19153. "type": "string",
  19154. "enum": ["installation.updated"]
  19155. },
  19156. "properties": {
  19157. "type": "object",
  19158. "properties": {
  19159. "version": {
  19160. "type": "string"
  19161. }
  19162. },
  19163. "required": ["version"],
  19164. "additionalProperties": false
  19165. }
  19166. },
  19167. "required": ["id", "type", "properties"],
  19168. "additionalProperties": false
  19169. },
  19170. {
  19171. "type": "object",
  19172. "properties": {
  19173. "id": {
  19174. "type": "string",
  19175. "pattern": "^evt_"
  19176. },
  19177. "type": {
  19178. "type": "string",
  19179. "enum": ["installation.update-available"]
  19180. },
  19181. "properties": {
  19182. "type": "object",
  19183. "properties": {
  19184. "version": {
  19185. "type": "string"
  19186. }
  19187. },
  19188. "required": ["version"],
  19189. "additionalProperties": false
  19190. }
  19191. },
  19192. "required": ["id", "type", "properties"],
  19193. "additionalProperties": false
  19194. },
  19195. {
  19196. "type": "object",
  19197. "properties": {
  19198. "id": {
  19199. "type": "string",
  19200. "pattern": "^evt_"
  19201. },
  19202. "type": {
  19203. "type": "string",
  19204. "enum": ["file.edited"]
  19205. },
  19206. "properties": {
  19207. "type": "object",
  19208. "properties": {
  19209. "file": {
  19210. "type": "string"
  19211. }
  19212. },
  19213. "required": ["file"],
  19214. "additionalProperties": false
  19215. }
  19216. },
  19217. "required": ["id", "type", "properties"],
  19218. "additionalProperties": false
  19219. },
  19220. {
  19221. "type": "object",
  19222. "properties": {
  19223. "id": {
  19224. "type": "string",
  19225. "pattern": "^evt_"
  19226. },
  19227. "type": {
  19228. "type": "string",
  19229. "enum": ["reference.updated"]
  19230. },
  19231. "properties": {
  19232. "type": "object",
  19233. "properties": {}
  19234. }
  19235. },
  19236. "required": ["id", "type", "properties"],
  19237. "additionalProperties": false
  19238. },
  19239. {
  19240. "type": "object",
  19241. "properties": {
  19242. "id": {
  19243. "type": "string",
  19244. "pattern": "^evt_"
  19245. },
  19246. "type": {
  19247. "type": "string",
  19248. "enum": ["permission.v2.asked"]
  19249. },
  19250. "properties": {
  19251. "type": "object",
  19252. "properties": {
  19253. "id": {
  19254. "type": "string",
  19255. "pattern": "^per"
  19256. },
  19257. "sessionID": {
  19258. "type": "string",
  19259. "pattern": "^ses"
  19260. },
  19261. "action": {
  19262. "type": "string"
  19263. },
  19264. "resources": {
  19265. "type": "array",
  19266. "items": {
  19267. "type": "string"
  19268. }
  19269. },
  19270. "save": {
  19271. "type": "array",
  19272. "items": {
  19273. "type": "string"
  19274. }
  19275. },
  19276. "metadata": {
  19277. "type": "object"
  19278. },
  19279. "source": {
  19280. "$ref": "#/components/schemas/PermissionV2Source"
  19281. }
  19282. },
  19283. "required": ["id", "sessionID", "action", "resources"],
  19284. "additionalProperties": false
  19285. }
  19286. },
  19287. "required": ["id", "type", "properties"],
  19288. "additionalProperties": false
  19289. },
  19290. {
  19291. "type": "object",
  19292. "properties": {
  19293. "id": {
  19294. "type": "string",
  19295. "pattern": "^evt_"
  19296. },
  19297. "type": {
  19298. "type": "string",
  19299. "enum": ["permission.v2.replied"]
  19300. },
  19301. "properties": {
  19302. "type": "object",
  19303. "properties": {
  19304. "sessionID": {
  19305. "type": "string",
  19306. "pattern": "^ses"
  19307. },
  19308. "requestID": {
  19309. "type": "string",
  19310. "pattern": "^per"
  19311. },
  19312. "reply": {
  19313. "$ref": "#/components/schemas/PermissionV2Reply"
  19314. }
  19315. },
  19316. "required": ["sessionID", "requestID", "reply"],
  19317. "additionalProperties": false
  19318. }
  19319. },
  19320. "required": ["id", "type", "properties"],
  19321. "additionalProperties": false
  19322. },
  19323. {
  19324. "type": "object",
  19325. "properties": {
  19326. "id": {
  19327. "type": "string",
  19328. "pattern": "^evt_"
  19329. },
  19330. "type": {
  19331. "type": "string",
  19332. "enum": ["plugin.added"]
  19333. },
  19334. "properties": {
  19335. "type": "object",
  19336. "properties": {
  19337. "id": {
  19338. "type": "string"
  19339. }
  19340. },
  19341. "required": ["id"],
  19342. "additionalProperties": false
  19343. }
  19344. },
  19345. "required": ["id", "type", "properties"],
  19346. "additionalProperties": false
  19347. },
  19348. {
  19349. "type": "object",
  19350. "properties": {
  19351. "id": {
  19352. "type": "string",
  19353. "pattern": "^evt_"
  19354. },
  19355. "type": {
  19356. "type": "string",
  19357. "enum": ["project.directories.updated"]
  19358. },
  19359. "properties": {
  19360. "type": "object",
  19361. "properties": {
  19362. "projectID": {
  19363. "type": "string"
  19364. }
  19365. },
  19366. "required": ["projectID"],
  19367. "additionalProperties": false
  19368. }
  19369. },
  19370. "required": ["id", "type", "properties"],
  19371. "additionalProperties": false
  19372. },
  19373. {
  19374. "type": "object",
  19375. "properties": {
  19376. "id": {
  19377. "type": "string",
  19378. "pattern": "^evt_"
  19379. },
  19380. "type": {
  19381. "type": "string",
  19382. "enum": ["file.watcher.updated"]
  19383. },
  19384. "properties": {
  19385. "type": "object",
  19386. "properties": {
  19387. "file": {
  19388. "type": "string"
  19389. },
  19390. "event": {
  19391. "type": "string",
  19392. "enum": ["add", "change", "unlink"]
  19393. }
  19394. },
  19395. "required": ["file", "event"],
  19396. "additionalProperties": false
  19397. }
  19398. },
  19399. "required": ["id", "type", "properties"],
  19400. "additionalProperties": false
  19401. },
  19402. {
  19403. "type": "object",
  19404. "properties": {
  19405. "id": {
  19406. "type": "string",
  19407. "pattern": "^evt_"
  19408. },
  19409. "type": {
  19410. "type": "string",
  19411. "enum": ["pty.created"]
  19412. },
  19413. "properties": {
  19414. "type": "object",
  19415. "properties": {
  19416. "info": {
  19417. "$ref": "#/components/schemas/Pty"
  19418. }
  19419. },
  19420. "required": ["info"],
  19421. "additionalProperties": false
  19422. }
  19423. },
  19424. "required": ["id", "type", "properties"],
  19425. "additionalProperties": false
  19426. },
  19427. {
  19428. "type": "object",
  19429. "properties": {
  19430. "id": {
  19431. "type": "string",
  19432. "pattern": "^evt_"
  19433. },
  19434. "type": {
  19435. "type": "string",
  19436. "enum": ["pty.updated"]
  19437. },
  19438. "properties": {
  19439. "type": "object",
  19440. "properties": {
  19441. "info": {
  19442. "$ref": "#/components/schemas/Pty"
  19443. }
  19444. },
  19445. "required": ["info"],
  19446. "additionalProperties": false
  19447. }
  19448. },
  19449. "required": ["id", "type", "properties"],
  19450. "additionalProperties": false
  19451. },
  19452. {
  19453. "type": "object",
  19454. "properties": {
  19455. "id": {
  19456. "type": "string",
  19457. "pattern": "^evt_"
  19458. },
  19459. "type": {
  19460. "type": "string",
  19461. "enum": ["pty.exited"]
  19462. },
  19463. "properties": {
  19464. "type": "object",
  19465. "properties": {
  19466. "id": {
  19467. "type": "string",
  19468. "pattern": "^pty"
  19469. },
  19470. "exitCode": {
  19471. "type": "integer",
  19472. "minimum": 0
  19473. }
  19474. },
  19475. "required": ["id", "exitCode"],
  19476. "additionalProperties": false
  19477. }
  19478. },
  19479. "required": ["id", "type", "properties"],
  19480. "additionalProperties": false
  19481. },
  19482. {
  19483. "type": "object",
  19484. "properties": {
  19485. "id": {
  19486. "type": "string",
  19487. "pattern": "^evt_"
  19488. },
  19489. "type": {
  19490. "type": "string",
  19491. "enum": ["pty.deleted"]
  19492. },
  19493. "properties": {
  19494. "type": "object",
  19495. "properties": {
  19496. "id": {
  19497. "type": "string",
  19498. "pattern": "^pty"
  19499. }
  19500. },
  19501. "required": ["id"],
  19502. "additionalProperties": false
  19503. }
  19504. },
  19505. "required": ["id", "type", "properties"],
  19506. "additionalProperties": false
  19507. },
  19508. {
  19509. "type": "object",
  19510. "properties": {
  19511. "id": {
  19512. "type": "string",
  19513. "pattern": "^evt_"
  19514. },
  19515. "type": {
  19516. "type": "string",
  19517. "enum": ["question.v2.asked"]
  19518. },
  19519. "properties": {
  19520. "type": "object",
  19521. "properties": {
  19522. "id": {
  19523. "type": "string",
  19524. "pattern": "^que"
  19525. },
  19526. "sessionID": {
  19527. "type": "string",
  19528. "pattern": "^ses"
  19529. },
  19530. "questions": {
  19531. "type": "array",
  19532. "items": {
  19533. "$ref": "#/components/schemas/QuestionV2Info"
  19534. },
  19535. "description": "Questions to ask"
  19536. },
  19537. "tool": {
  19538. "$ref": "#/components/schemas/QuestionV2Tool"
  19539. }
  19540. },
  19541. "required": ["id", "sessionID", "questions"],
  19542. "additionalProperties": false
  19543. }
  19544. },
  19545. "required": ["id", "type", "properties"],
  19546. "additionalProperties": false
  19547. },
  19548. {
  19549. "type": "object",
  19550. "properties": {
  19551. "id": {
  19552. "type": "string",
  19553. "pattern": "^evt_"
  19554. },
  19555. "type": {
  19556. "type": "string",
  19557. "enum": ["question.v2.replied"]
  19558. },
  19559. "properties": {
  19560. "type": "object",
  19561. "properties": {
  19562. "sessionID": {
  19563. "type": "string",
  19564. "pattern": "^ses"
  19565. },
  19566. "requestID": {
  19567. "type": "string",
  19568. "pattern": "^que"
  19569. },
  19570. "answers": {
  19571. "type": "array",
  19572. "items": {
  19573. "$ref": "#/components/schemas/QuestionV2Answer"
  19574. }
  19575. }
  19576. },
  19577. "required": ["sessionID", "requestID", "answers"],
  19578. "additionalProperties": false
  19579. }
  19580. },
  19581. "required": ["id", "type", "properties"],
  19582. "additionalProperties": false
  19583. },
  19584. {
  19585. "type": "object",
  19586. "properties": {
  19587. "id": {
  19588. "type": "string",
  19589. "pattern": "^evt_"
  19590. },
  19591. "type": {
  19592. "type": "string",
  19593. "enum": ["question.v2.rejected"]
  19594. },
  19595. "properties": {
  19596. "type": "object",
  19597. "properties": {
  19598. "sessionID": {
  19599. "type": "string",
  19600. "pattern": "^ses"
  19601. },
  19602. "requestID": {
  19603. "type": "string",
  19604. "pattern": "^que"
  19605. }
  19606. },
  19607. "required": ["sessionID", "requestID"],
  19608. "additionalProperties": false
  19609. }
  19610. },
  19611. "required": ["id", "type", "properties"],
  19612. "additionalProperties": false
  19613. },
  19614. {
  19615. "type": "object",
  19616. "properties": {
  19617. "id": {
  19618. "type": "string",
  19619. "pattern": "^evt_"
  19620. },
  19621. "type": {
  19622. "type": "string",
  19623. "enum": ["todo.updated"]
  19624. },
  19625. "properties": {
  19626. "type": "object",
  19627. "properties": {
  19628. "sessionID": {
  19629. "type": "string",
  19630. "pattern": "^ses"
  19631. },
  19632. "todos": {
  19633. "type": "array",
  19634. "items": {
  19635. "$ref": "#/components/schemas/Todo"
  19636. }
  19637. }
  19638. },
  19639. "required": ["sessionID", "todos"],
  19640. "additionalProperties": false
  19641. }
  19642. },
  19643. "required": ["id", "type", "properties"],
  19644. "additionalProperties": false
  19645. },
  19646. {
  19647. "type": "object",
  19648. "properties": {
  19649. "id": {
  19650. "type": "string",
  19651. "pattern": "^evt_"
  19652. },
  19653. "type": {
  19654. "type": "string",
  19655. "enum": ["lsp.updated"]
  19656. },
  19657. "properties": {
  19658. "type": "object",
  19659. "properties": {}
  19660. }
  19661. },
  19662. "required": ["id", "type", "properties"],
  19663. "additionalProperties": false
  19664. },
  19665. {
  19666. "type": "object",
  19667. "properties": {
  19668. "id": {
  19669. "type": "string",
  19670. "pattern": "^evt_"
  19671. },
  19672. "type": {
  19673. "type": "string",
  19674. "enum": ["permission.asked"]
  19675. },
  19676. "properties": {
  19677. "type": "object",
  19678. "properties": {
  19679. "id": {
  19680. "type": "string",
  19681. "pattern": "^per"
  19682. },
  19683. "sessionID": {
  19684. "type": "string",
  19685. "pattern": "^ses"
  19686. },
  19687. "permission": {
  19688. "type": "string"
  19689. },
  19690. "patterns": {
  19691. "type": "array",
  19692. "items": {
  19693. "type": "string"
  19694. }
  19695. },
  19696. "metadata": {
  19697. "type": "object"
  19698. },
  19699. "always": {
  19700. "type": "array",
  19701. "items": {
  19702. "type": "string"
  19703. }
  19704. },
  19705. "tool": {
  19706. "type": "object",
  19707. "properties": {
  19708. "messageID": {
  19709. "type": "string"
  19710. },
  19711. "callID": {
  19712. "type": "string"
  19713. }
  19714. },
  19715. "required": ["messageID", "callID"],
  19716. "additionalProperties": false
  19717. }
  19718. },
  19719. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19720. "additionalProperties": false
  19721. }
  19722. },
  19723. "required": ["id", "type", "properties"],
  19724. "additionalProperties": false
  19725. },
  19726. {
  19727. "type": "object",
  19728. "properties": {
  19729. "id": {
  19730. "type": "string",
  19731. "pattern": "^evt_"
  19732. },
  19733. "type": {
  19734. "type": "string",
  19735. "enum": ["permission.replied"]
  19736. },
  19737. "properties": {
  19738. "type": "object",
  19739. "properties": {
  19740. "sessionID": {
  19741. "type": "string",
  19742. "pattern": "^ses"
  19743. },
  19744. "requestID": {
  19745. "type": "string",
  19746. "pattern": "^per"
  19747. },
  19748. "reply": {
  19749. "type": "string",
  19750. "enum": ["once", "always", "reject"]
  19751. }
  19752. },
  19753. "required": ["sessionID", "requestID", "reply"],
  19754. "additionalProperties": false
  19755. }
  19756. },
  19757. "required": ["id", "type", "properties"],
  19758. "additionalProperties": false
  19759. },
  19760. {
  19761. "type": "object",
  19762. "properties": {
  19763. "id": {
  19764. "type": "string",
  19765. "pattern": "^evt_"
  19766. },
  19767. "type": {
  19768. "type": "string",
  19769. "enum": ["tui.prompt.append"]
  19770. },
  19771. "properties": {
  19772. "type": "object",
  19773. "properties": {
  19774. "text": {
  19775. "type": "string"
  19776. }
  19777. },
  19778. "required": ["text"],
  19779. "additionalProperties": false
  19780. }
  19781. },
  19782. "required": ["id", "type", "properties"],
  19783. "additionalProperties": false
  19784. },
  19785. {
  19786. "type": "object",
  19787. "properties": {
  19788. "id": {
  19789. "type": "string",
  19790. "pattern": "^evt_"
  19791. },
  19792. "type": {
  19793. "type": "string",
  19794. "enum": ["tui.command.execute"]
  19795. },
  19796. "properties": {
  19797. "type": "object",
  19798. "properties": {
  19799. "command": {
  19800. "anyOf": [
  19801. {
  19802. "type": "string",
  19803. "enum": [
  19804. "session.list",
  19805. "session.new",
  19806. "session.share",
  19807. "session.interrupt",
  19808. "session.compact",
  19809. "session.page.up",
  19810. "session.page.down",
  19811. "session.line.up",
  19812. "session.line.down",
  19813. "session.half.page.up",
  19814. "session.half.page.down",
  19815. "session.first",
  19816. "session.last",
  19817. "prompt.clear",
  19818. "prompt.submit",
  19819. "agent.cycle"
  19820. ]
  19821. },
  19822. {
  19823. "type": "string"
  19824. }
  19825. ]
  19826. }
  19827. },
  19828. "required": ["command"],
  19829. "additionalProperties": false
  19830. }
  19831. },
  19832. "required": ["id", "type", "properties"],
  19833. "additionalProperties": false
  19834. },
  19835. {
  19836. "type": "object",
  19837. "properties": {
  19838. "id": {
  19839. "type": "string",
  19840. "pattern": "^evt_"
  19841. },
  19842. "type": {
  19843. "type": "string",
  19844. "enum": ["tui.toast.show"]
  19845. },
  19846. "properties": {
  19847. "type": "object",
  19848. "properties": {
  19849. "title": {
  19850. "type": "string"
  19851. },
  19852. "message": {
  19853. "type": "string"
  19854. },
  19855. "variant": {
  19856. "type": "string",
  19857. "enum": ["info", "success", "warning", "error"]
  19858. },
  19859. "duration": {
  19860. "type": "integer",
  19861. "exclusiveMinimum": 0
  19862. }
  19863. },
  19864. "required": ["message", "variant"],
  19865. "additionalProperties": false
  19866. }
  19867. },
  19868. "required": ["id", "type", "properties"],
  19869. "additionalProperties": false
  19870. },
  19871. {
  19872. "type": "object",
  19873. "properties": {
  19874. "id": {
  19875. "type": "string",
  19876. "pattern": "^evt_"
  19877. },
  19878. "type": {
  19879. "type": "string",
  19880. "enum": ["tui.session.select"]
  19881. },
  19882. "properties": {
  19883. "type": "object",
  19884. "properties": {
  19885. "sessionID": {
  19886. "type": "string",
  19887. "pattern": "^ses",
  19888. "description": "Session ID to navigate to"
  19889. }
  19890. },
  19891. "required": ["sessionID"],
  19892. "additionalProperties": false
  19893. }
  19894. },
  19895. "required": ["id", "type", "properties"],
  19896. "additionalProperties": false
  19897. },
  19898. {
  19899. "type": "object",
  19900. "properties": {
  19901. "id": {
  19902. "type": "string",
  19903. "pattern": "^evt_"
  19904. },
  19905. "type": {
  19906. "type": "string",
  19907. "enum": ["mcp.tools.changed"]
  19908. },
  19909. "properties": {
  19910. "type": "object",
  19911. "properties": {
  19912. "server": {
  19913. "type": "string"
  19914. }
  19915. },
  19916. "required": ["server"],
  19917. "additionalProperties": false
  19918. }
  19919. },
  19920. "required": ["id", "type", "properties"],
  19921. "additionalProperties": false
  19922. },
  19923. {
  19924. "type": "object",
  19925. "properties": {
  19926. "id": {
  19927. "type": "string",
  19928. "pattern": "^evt_"
  19929. },
  19930. "type": {
  19931. "type": "string",
  19932. "enum": ["mcp.browser.open.failed"]
  19933. },
  19934. "properties": {
  19935. "type": "object",
  19936. "properties": {
  19937. "mcpName": {
  19938. "type": "string"
  19939. },
  19940. "url": {
  19941. "type": "string"
  19942. }
  19943. },
  19944. "required": ["mcpName", "url"],
  19945. "additionalProperties": false
  19946. }
  19947. },
  19948. "required": ["id", "type", "properties"],
  19949. "additionalProperties": false
  19950. },
  19951. {
  19952. "type": "object",
  19953. "properties": {
  19954. "id": {
  19955. "type": "string",
  19956. "pattern": "^evt_"
  19957. },
  19958. "type": {
  19959. "type": "string",
  19960. "enum": ["command.executed"]
  19961. },
  19962. "properties": {
  19963. "type": "object",
  19964. "properties": {
  19965. "name": {
  19966. "type": "string"
  19967. },
  19968. "sessionID": {
  19969. "type": "string",
  19970. "pattern": "^ses"
  19971. },
  19972. "arguments": {
  19973. "type": "string"
  19974. },
  19975. "messageID": {
  19976. "type": "string",
  19977. "pattern": "^msg"
  19978. }
  19979. },
  19980. "required": ["name", "sessionID", "arguments", "messageID"],
  19981. "additionalProperties": false
  19982. }
  19983. },
  19984. "required": ["id", "type", "properties"],
  19985. "additionalProperties": false
  19986. },
  19987. {
  19988. "type": "object",
  19989. "properties": {
  19990. "id": {
  19991. "type": "string",
  19992. "pattern": "^evt_"
  19993. },
  19994. "type": {
  19995. "type": "string",
  19996. "enum": ["project.updated"]
  19997. },
  19998. "properties": {
  19999. "type": "object",
  20000. "properties": {
  20001. "id": {
  20002. "type": "string"
  20003. },
  20004. "worktree": {
  20005. "type": "string"
  20006. },
  20007. "vcs": {
  20008. "$ref": "#/components/schemas/ProjectVcs"
  20009. },
  20010. "name": {
  20011. "type": "string"
  20012. },
  20013. "icon": {
  20014. "$ref": "#/components/schemas/ProjectIcon"
  20015. },
  20016. "commands": {
  20017. "$ref": "#/components/schemas/ProjectCommands"
  20018. },
  20019. "time": {
  20020. "$ref": "#/components/schemas/ProjectTime"
  20021. },
  20022. "sandboxes": {
  20023. "type": "array",
  20024. "items": {
  20025. "type": "string"
  20026. }
  20027. }
  20028. },
  20029. "required": ["id", "worktree", "time", "sandboxes"],
  20030. "additionalProperties": false
  20031. }
  20032. },
  20033. "required": ["id", "type", "properties"],
  20034. "additionalProperties": false
  20035. },
  20036. {
  20037. "type": "object",
  20038. "properties": {
  20039. "id": {
  20040. "type": "string",
  20041. "pattern": "^evt_"
  20042. },
  20043. "type": {
  20044. "type": "string",
  20045. "enum": ["session.status"]
  20046. },
  20047. "properties": {
  20048. "type": "object",
  20049. "properties": {
  20050. "sessionID": {
  20051. "type": "string",
  20052. "pattern": "^ses"
  20053. },
  20054. "status": {
  20055. "$ref": "#/components/schemas/SessionStatus"
  20056. }
  20057. },
  20058. "required": ["sessionID", "status"],
  20059. "additionalProperties": false
  20060. }
  20061. },
  20062. "required": ["id", "type", "properties"],
  20063. "additionalProperties": false
  20064. },
  20065. {
  20066. "type": "object",
  20067. "properties": {
  20068. "id": {
  20069. "type": "string",
  20070. "pattern": "^evt_"
  20071. },
  20072. "type": {
  20073. "type": "string",
  20074. "enum": ["session.idle"]
  20075. },
  20076. "properties": {
  20077. "type": "object",
  20078. "properties": {
  20079. "sessionID": {
  20080. "type": "string",
  20081. "pattern": "^ses"
  20082. }
  20083. },
  20084. "required": ["sessionID"],
  20085. "additionalProperties": false
  20086. }
  20087. },
  20088. "required": ["id", "type", "properties"],
  20089. "additionalProperties": false
  20090. },
  20091. {
  20092. "type": "object",
  20093. "properties": {
  20094. "id": {
  20095. "type": "string",
  20096. "pattern": "^evt_"
  20097. },
  20098. "type": {
  20099. "type": "string",
  20100. "enum": ["question.asked"]
  20101. },
  20102. "properties": {
  20103. "type": "object",
  20104. "properties": {
  20105. "id": {
  20106. "type": "string",
  20107. "pattern": "^que"
  20108. },
  20109. "sessionID": {
  20110. "type": "string",
  20111. "pattern": "^ses"
  20112. },
  20113. "questions": {
  20114. "type": "array",
  20115. "items": {
  20116. "$ref": "#/components/schemas/QuestionInfo"
  20117. },
  20118. "description": "Questions to ask"
  20119. },
  20120. "tool": {
  20121. "$ref": "#/components/schemas/QuestionTool"
  20122. }
  20123. },
  20124. "required": ["id", "sessionID", "questions"],
  20125. "additionalProperties": false
  20126. }
  20127. },
  20128. "required": ["id", "type", "properties"],
  20129. "additionalProperties": false
  20130. },
  20131. {
  20132. "type": "object",
  20133. "properties": {
  20134. "id": {
  20135. "type": "string",
  20136. "pattern": "^evt_"
  20137. },
  20138. "type": {
  20139. "type": "string",
  20140. "enum": ["question.replied"]
  20141. },
  20142. "properties": {
  20143. "type": "object",
  20144. "properties": {
  20145. "sessionID": {
  20146. "type": "string",
  20147. "pattern": "^ses"
  20148. },
  20149. "requestID": {
  20150. "type": "string",
  20151. "pattern": "^que"
  20152. },
  20153. "answers": {
  20154. "type": "array",
  20155. "items": {
  20156. "$ref": "#/components/schemas/QuestionAnswer"
  20157. }
  20158. }
  20159. },
  20160. "required": ["sessionID", "requestID", "answers"],
  20161. "additionalProperties": false
  20162. }
  20163. },
  20164. "required": ["id", "type", "properties"],
  20165. "additionalProperties": false
  20166. },
  20167. {
  20168. "type": "object",
  20169. "properties": {
  20170. "id": {
  20171. "type": "string",
  20172. "pattern": "^evt_"
  20173. },
  20174. "type": {
  20175. "type": "string",
  20176. "enum": ["question.rejected"]
  20177. },
  20178. "properties": {
  20179. "type": "object",
  20180. "properties": {
  20181. "sessionID": {
  20182. "type": "string",
  20183. "pattern": "^ses"
  20184. },
  20185. "requestID": {
  20186. "type": "string",
  20187. "pattern": "^que"
  20188. }
  20189. },
  20190. "required": ["sessionID", "requestID"],
  20191. "additionalProperties": false
  20192. }
  20193. },
  20194. "required": ["id", "type", "properties"],
  20195. "additionalProperties": false
  20196. },
  20197. {
  20198. "type": "object",
  20199. "properties": {
  20200. "id": {
  20201. "type": "string",
  20202. "pattern": "^evt_"
  20203. },
  20204. "type": {
  20205. "type": "string",
  20206. "enum": ["session.compacted"]
  20207. },
  20208. "properties": {
  20209. "type": "object",
  20210. "properties": {
  20211. "sessionID": {
  20212. "type": "string",
  20213. "pattern": "^ses"
  20214. }
  20215. },
  20216. "required": ["sessionID"],
  20217. "additionalProperties": false
  20218. }
  20219. },
  20220. "required": ["id", "type", "properties"],
  20221. "additionalProperties": false
  20222. },
  20223. {
  20224. "type": "object",
  20225. "properties": {
  20226. "id": {
  20227. "type": "string",
  20228. "pattern": "^evt_"
  20229. },
  20230. "type": {
  20231. "type": "string",
  20232. "enum": ["vcs.branch.updated"]
  20233. },
  20234. "properties": {
  20235. "type": "object",
  20236. "properties": {
  20237. "branch": {
  20238. "type": "string"
  20239. }
  20240. },
  20241. "additionalProperties": false
  20242. }
  20243. },
  20244. "required": ["id", "type", "properties"],
  20245. "additionalProperties": false
  20246. },
  20247. {
  20248. "type": "object",
  20249. "properties": {
  20250. "id": {
  20251. "type": "string",
  20252. "pattern": "^evt_"
  20253. },
  20254. "type": {
  20255. "type": "string",
  20256. "enum": ["workspace.ready"]
  20257. },
  20258. "properties": {
  20259. "type": "object",
  20260. "properties": {
  20261. "name": {
  20262. "type": "string"
  20263. }
  20264. },
  20265. "required": ["name"],
  20266. "additionalProperties": false
  20267. }
  20268. },
  20269. "required": ["id", "type", "properties"],
  20270. "additionalProperties": false
  20271. },
  20272. {
  20273. "type": "object",
  20274. "properties": {
  20275. "id": {
  20276. "type": "string",
  20277. "pattern": "^evt_"
  20278. },
  20279. "type": {
  20280. "type": "string",
  20281. "enum": ["workspace.failed"]
  20282. },
  20283. "properties": {
  20284. "type": "object",
  20285. "properties": {
  20286. "message": {
  20287. "type": "string"
  20288. }
  20289. },
  20290. "required": ["message"],
  20291. "additionalProperties": false
  20292. }
  20293. },
  20294. "required": ["id", "type", "properties"],
  20295. "additionalProperties": false
  20296. },
  20297. {
  20298. "type": "object",
  20299. "properties": {
  20300. "id": {
  20301. "type": "string",
  20302. "pattern": "^evt_"
  20303. },
  20304. "type": {
  20305. "type": "string",
  20306. "enum": ["workspace.status"]
  20307. },
  20308. "properties": {
  20309. "type": "object",
  20310. "properties": {
  20311. "workspaceID": {
  20312. "type": "string",
  20313. "pattern": "^wrk"
  20314. },
  20315. "status": {
  20316. "type": "string",
  20317. "enum": ["connected", "connecting", "disconnected", "error"]
  20318. }
  20319. },
  20320. "required": ["workspaceID", "status"],
  20321. "additionalProperties": false
  20322. }
  20323. },
  20324. "required": ["id", "type", "properties"],
  20325. "additionalProperties": false
  20326. },
  20327. {
  20328. "type": "object",
  20329. "properties": {
  20330. "id": {
  20331. "type": "string",
  20332. "pattern": "^evt_"
  20333. },
  20334. "type": {
  20335. "type": "string",
  20336. "enum": ["worktree.ready"]
  20337. },
  20338. "properties": {
  20339. "type": "object",
  20340. "properties": {
  20341. "name": {
  20342. "type": "string"
  20343. },
  20344. "branch": {
  20345. "type": "string"
  20346. }
  20347. },
  20348. "required": ["name"],
  20349. "additionalProperties": false
  20350. }
  20351. },
  20352. "required": ["id", "type", "properties"],
  20353. "additionalProperties": false
  20354. },
  20355. {
  20356. "type": "object",
  20357. "properties": {
  20358. "id": {
  20359. "type": "string",
  20360. "pattern": "^evt_"
  20361. },
  20362. "type": {
  20363. "type": "string",
  20364. "enum": ["worktree.failed"]
  20365. },
  20366. "properties": {
  20367. "type": "object",
  20368. "properties": {
  20369. "message": {
  20370. "type": "string"
  20371. }
  20372. },
  20373. "required": ["message"],
  20374. "additionalProperties": false
  20375. }
  20376. },
  20377. "required": ["id", "type", "properties"],
  20378. "additionalProperties": false
  20379. },
  20380. {
  20381. "type": "object",
  20382. "properties": {
  20383. "id": {
  20384. "type": "string",
  20385. "pattern": "^evt_"
  20386. },
  20387. "type": {
  20388. "type": "string",
  20389. "enum": ["server.connected"]
  20390. },
  20391. "properties": {
  20392. "type": "object",
  20393. "properties": {}
  20394. }
  20395. },
  20396. "required": ["id", "type", "properties"],
  20397. "additionalProperties": false
  20398. },
  20399. {
  20400. "type": "object",
  20401. "properties": {
  20402. "id": {
  20403. "type": "string",
  20404. "pattern": "^evt_"
  20405. },
  20406. "type": {
  20407. "type": "string",
  20408. "enum": ["global.disposed"]
  20409. },
  20410. "properties": {
  20411. "type": "object",
  20412. "properties": {}
  20413. }
  20414. },
  20415. "required": ["id", "type", "properties"],
  20416. "additionalProperties": false
  20417. },
  20418. {
  20419. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  20420. },
  20421. {
  20422. "$ref": "#/components/schemas/SyncEventSessionCreated"
  20423. },
  20424. {
  20425. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  20426. },
  20427. {
  20428. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  20429. },
  20430. {
  20431. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  20432. },
  20433. {
  20434. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  20435. },
  20436. {
  20437. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  20438. },
  20439. {
  20440. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  20441. },
  20442. {
  20443. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  20444. },
  20445. {
  20446. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  20447. },
  20448. {
  20449. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  20450. },
  20451. {
  20452. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  20453. },
  20454. {
  20455. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  20456. },
  20457. {
  20458. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  20459. },
  20460. {
  20461. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  20462. },
  20463. {
  20464. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  20465. },
  20466. {
  20467. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  20468. },
  20469. {
  20470. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  20471. },
  20472. {
  20473. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  20474. },
  20475. {
  20476. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  20477. },
  20478. {
  20479. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  20480. },
  20481. {
  20482. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  20483. },
  20484. {
  20485. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  20486. },
  20487. {
  20488. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  20489. },
  20490. {
  20491. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  20492. },
  20493. {
  20494. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  20495. },
  20496. {
  20497. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  20498. },
  20499. {
  20500. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  20501. },
  20502. {
  20503. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  20504. },
  20505. {
  20506. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  20507. },
  20508. {
  20509. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  20510. },
  20511. {
  20512. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  20513. },
  20514. {
  20515. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  20516. },
  20517. {
  20518. "$ref": "#/components/schemas/SyncEventSessionNextRevertStaged"
  20519. },
  20520. {
  20521. "$ref": "#/components/schemas/SyncEventSessionNextRevertCleared"
  20522. },
  20523. {
  20524. "$ref": "#/components/schemas/SyncEventSessionNextRevertCommitted"
  20525. }
  20526. ]
  20527. }
  20528. },
  20529. "required": ["directory", "payload"],
  20530. "additionalProperties": false
  20531. },
  20532. "LogLevel": {
  20533. "type": "string",
  20534. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  20535. "description": "Log level"
  20536. },
  20537. "ServerConfig": {
  20538. "type": "object",
  20539. "properties": {
  20540. "port": {
  20541. "type": "integer",
  20542. "exclusiveMinimum": 0
  20543. },
  20544. "hostname": {
  20545. "type": "string"
  20546. },
  20547. "mdns": {
  20548. "type": "boolean"
  20549. },
  20550. "mdnsDomain": {
  20551. "type": "string"
  20552. },
  20553. "cors": {
  20554. "type": "array",
  20555. "items": {
  20556. "type": "string"
  20557. }
  20558. }
  20559. },
  20560. "additionalProperties": false,
  20561. "description": "Server configuration for opencode serve and web commands"
  20562. },
  20563. "PermissionActionConfig": {
  20564. "type": "string",
  20565. "enum": ["ask", "allow", "deny"]
  20566. },
  20567. "PermissionObjectConfig": {
  20568. "type": "object",
  20569. "additionalProperties": {
  20570. "$ref": "#/components/schemas/PermissionActionConfig"
  20571. }
  20572. },
  20573. "PermissionRuleConfig": {
  20574. "anyOf": [
  20575. {
  20576. "$ref": "#/components/schemas/PermissionActionConfig"
  20577. },
  20578. {
  20579. "$ref": "#/components/schemas/PermissionObjectConfig"
  20580. }
  20581. ]
  20582. },
  20583. "PermissionConfig": {
  20584. "anyOf": [
  20585. {
  20586. "$ref": "#/components/schemas/PermissionActionConfig"
  20587. },
  20588. {
  20589. "type": "object",
  20590. "properties": {
  20591. "read": {
  20592. "$ref": "#/components/schemas/PermissionRuleConfig"
  20593. },
  20594. "edit": {
  20595. "$ref": "#/components/schemas/PermissionRuleConfig"
  20596. },
  20597. "glob": {
  20598. "$ref": "#/components/schemas/PermissionRuleConfig"
  20599. },
  20600. "grep": {
  20601. "$ref": "#/components/schemas/PermissionRuleConfig"
  20602. },
  20603. "list": {
  20604. "$ref": "#/components/schemas/PermissionRuleConfig"
  20605. },
  20606. "bash": {
  20607. "$ref": "#/components/schemas/PermissionRuleConfig"
  20608. },
  20609. "task": {
  20610. "$ref": "#/components/schemas/PermissionRuleConfig"
  20611. },
  20612. "external_directory": {
  20613. "$ref": "#/components/schemas/PermissionRuleConfig"
  20614. },
  20615. "todowrite": {
  20616. "$ref": "#/components/schemas/PermissionActionConfig"
  20617. },
  20618. "question": {
  20619. "$ref": "#/components/schemas/PermissionActionConfig"
  20620. },
  20621. "webfetch": {
  20622. "$ref": "#/components/schemas/PermissionActionConfig"
  20623. },
  20624. "websearch": {
  20625. "$ref": "#/components/schemas/PermissionActionConfig"
  20626. },
  20627. "lsp": {
  20628. "$ref": "#/components/schemas/PermissionRuleConfig"
  20629. },
  20630. "doom_loop": {
  20631. "$ref": "#/components/schemas/PermissionActionConfig"
  20632. },
  20633. "skill": {
  20634. "$ref": "#/components/schemas/PermissionRuleConfig"
  20635. }
  20636. },
  20637. "additionalProperties": {
  20638. "$ref": "#/components/schemas/PermissionRuleConfig"
  20639. }
  20640. }
  20641. ]
  20642. },
  20643. "AgentConfig": {
  20644. "type": "object",
  20645. "properties": {
  20646. "model": {
  20647. "type": "string"
  20648. },
  20649. "variant": {
  20650. "type": "string"
  20651. },
  20652. "temperature": {
  20653. "type": "number"
  20654. },
  20655. "top_p": {
  20656. "type": "number"
  20657. },
  20658. "prompt": {
  20659. "type": "string"
  20660. },
  20661. "tools": {
  20662. "type": "object",
  20663. "additionalProperties": {
  20664. "type": "boolean"
  20665. }
  20666. },
  20667. "disable": {
  20668. "type": "boolean"
  20669. },
  20670. "description": {
  20671. "type": "string"
  20672. },
  20673. "mode": {
  20674. "type": "string",
  20675. "enum": ["subagent", "primary", "all"]
  20676. },
  20677. "hidden": {
  20678. "type": "boolean"
  20679. },
  20680. "options": {
  20681. "type": "object"
  20682. },
  20683. "color": {
  20684. "anyOf": [
  20685. {
  20686. "type": "string",
  20687. "pattern": "^#[0-9a-fA-F]{6}$"
  20688. },
  20689. {
  20690. "type": "string",
  20691. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  20692. }
  20693. ],
  20694. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  20695. },
  20696. "steps": {
  20697. "type": "integer",
  20698. "exclusiveMinimum": 0
  20699. },
  20700. "maxSteps": {
  20701. "type": "integer",
  20702. "exclusiveMinimum": 0
  20703. },
  20704. "permission": {
  20705. "$ref": "#/components/schemas/PermissionConfig"
  20706. }
  20707. },
  20708. "additionalProperties": {}
  20709. },
  20710. "ProviderConfig": {
  20711. "type": "object",
  20712. "properties": {
  20713. "api": {
  20714. "type": "string"
  20715. },
  20716. "name": {
  20717. "type": "string"
  20718. },
  20719. "env": {
  20720. "type": "array",
  20721. "items": {
  20722. "type": "string"
  20723. }
  20724. },
  20725. "id": {
  20726. "type": "string"
  20727. },
  20728. "npm": {
  20729. "type": "string"
  20730. },
  20731. "whitelist": {
  20732. "type": "array",
  20733. "items": {
  20734. "type": "string"
  20735. }
  20736. },
  20737. "blacklist": {
  20738. "type": "array",
  20739. "items": {
  20740. "type": "string"
  20741. }
  20742. },
  20743. "options": {
  20744. "type": "object",
  20745. "properties": {
  20746. "apiKey": {
  20747. "type": "string"
  20748. },
  20749. "baseURL": {
  20750. "type": "string"
  20751. },
  20752. "enterpriseUrl": {
  20753. "type": "string"
  20754. },
  20755. "setCacheKey": {
  20756. "type": "boolean"
  20757. },
  20758. "timeout": {
  20759. "anyOf": [
  20760. {
  20761. "type": "integer",
  20762. "exclusiveMinimum": 0
  20763. },
  20764. {
  20765. "type": "boolean",
  20766. "enum": [false]
  20767. }
  20768. ],
  20769. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20770. },
  20771. "headerTimeout": {
  20772. "anyOf": [
  20773. {
  20774. "type": "integer",
  20775. "exclusiveMinimum": 0
  20776. },
  20777. {
  20778. "type": "boolean",
  20779. "enum": [false]
  20780. }
  20781. ],
  20782. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20783. },
  20784. "chunkTimeout": {
  20785. "type": "integer",
  20786. "exclusiveMinimum": 0
  20787. }
  20788. },
  20789. "additionalProperties": {}
  20790. },
  20791. "models": {
  20792. "type": "object",
  20793. "additionalProperties": {
  20794. "type": "object",
  20795. "properties": {
  20796. "id": {
  20797. "type": "string"
  20798. },
  20799. "name": {
  20800. "type": "string"
  20801. },
  20802. "family": {
  20803. "type": "string"
  20804. },
  20805. "release_date": {
  20806. "type": "string"
  20807. },
  20808. "attachment": {
  20809. "type": "boolean"
  20810. },
  20811. "reasoning": {
  20812. "type": "boolean"
  20813. },
  20814. "temperature": {
  20815. "type": "boolean"
  20816. },
  20817. "tool_call": {
  20818. "type": "boolean"
  20819. },
  20820. "interleaved": {
  20821. "anyOf": [
  20822. {
  20823. "type": "boolean",
  20824. "enum": [true]
  20825. },
  20826. {
  20827. "type": "object",
  20828. "properties": {
  20829. "field": {
  20830. "type": "string",
  20831. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20832. }
  20833. },
  20834. "required": ["field"],
  20835. "additionalProperties": false
  20836. }
  20837. ]
  20838. },
  20839. "cost": {
  20840. "type": "object",
  20841. "properties": {
  20842. "input": {
  20843. "type": "number"
  20844. },
  20845. "output": {
  20846. "type": "number"
  20847. },
  20848. "cache_read": {
  20849. "type": "number"
  20850. },
  20851. "cache_write": {
  20852. "type": "number"
  20853. },
  20854. "context_over_200k": {
  20855. "type": "object",
  20856. "properties": {
  20857. "input": {
  20858. "type": "number"
  20859. },
  20860. "output": {
  20861. "type": "number"
  20862. },
  20863. "cache_read": {
  20864. "type": "number"
  20865. },
  20866. "cache_write": {
  20867. "type": "number"
  20868. }
  20869. },
  20870. "required": ["input", "output"],
  20871. "additionalProperties": false
  20872. }
  20873. },
  20874. "required": ["input", "output"],
  20875. "additionalProperties": false
  20876. },
  20877. "limit": {
  20878. "type": "object",
  20879. "properties": {
  20880. "context": {
  20881. "type": "number"
  20882. },
  20883. "input": {
  20884. "type": "number"
  20885. },
  20886. "output": {
  20887. "type": "number"
  20888. }
  20889. },
  20890. "required": ["context", "output"],
  20891. "additionalProperties": false
  20892. },
  20893. "modalities": {
  20894. "type": "object",
  20895. "properties": {
  20896. "input": {
  20897. "type": "array",
  20898. "items": {
  20899. "type": "string",
  20900. "enum": ["text", "audio", "image", "video", "pdf"]
  20901. }
  20902. },
  20903. "output": {
  20904. "type": "array",
  20905. "items": {
  20906. "type": "string",
  20907. "enum": ["text", "audio", "image", "video", "pdf"]
  20908. }
  20909. }
  20910. },
  20911. "additionalProperties": false
  20912. },
  20913. "experimental": {
  20914. "type": "boolean"
  20915. },
  20916. "status": {
  20917. "type": "string",
  20918. "enum": ["alpha", "beta", "deprecated", "active"]
  20919. },
  20920. "provider": {
  20921. "type": "object",
  20922. "properties": {
  20923. "npm": {
  20924. "type": "string"
  20925. },
  20926. "api": {
  20927. "type": "string"
  20928. }
  20929. },
  20930. "additionalProperties": false
  20931. },
  20932. "options": {
  20933. "type": "object"
  20934. },
  20935. "headers": {
  20936. "type": "object",
  20937. "additionalProperties": {
  20938. "type": "string"
  20939. }
  20940. },
  20941. "variants": {
  20942. "type": "object",
  20943. "additionalProperties": {
  20944. "type": "object",
  20945. "properties": {
  20946. "disabled": {
  20947. "type": "boolean"
  20948. }
  20949. },
  20950. "additionalProperties": {}
  20951. },
  20952. "description": "Variant-specific configuration"
  20953. }
  20954. },
  20955. "additionalProperties": false
  20956. }
  20957. }
  20958. },
  20959. "additionalProperties": false
  20960. },
  20961. "McpLocalConfig": {
  20962. "type": "object",
  20963. "properties": {
  20964. "type": {
  20965. "type": "string",
  20966. "enum": ["local"],
  20967. "description": "Type of MCP server connection"
  20968. },
  20969. "command": {
  20970. "type": "array",
  20971. "items": {
  20972. "type": "string"
  20973. },
  20974. "description": "Command and arguments to run the MCP server"
  20975. },
  20976. "cwd": {
  20977. "type": "string"
  20978. },
  20979. "environment": {
  20980. "type": "object",
  20981. "additionalProperties": {
  20982. "type": "string"
  20983. }
  20984. },
  20985. "enabled": {
  20986. "type": "boolean"
  20987. },
  20988. "timeout": {
  20989. "type": "integer",
  20990. "exclusiveMinimum": 0
  20991. }
  20992. },
  20993. "required": ["type", "command"],
  20994. "additionalProperties": false
  20995. },
  20996. "McpOAuthConfig": {
  20997. "type": "object",
  20998. "properties": {
  20999. "clientId": {
  21000. "type": "string"
  21001. },
  21002. "clientSecret": {
  21003. "type": "string"
  21004. },
  21005. "scope": {
  21006. "type": "string"
  21007. },
  21008. "callbackPort": {
  21009. "type": "integer",
  21010. "minimum": 1,
  21011. "maximum": 65535
  21012. },
  21013. "redirectUri": {
  21014. "type": "string"
  21015. }
  21016. },
  21017. "additionalProperties": false
  21018. },
  21019. "McpRemoteConfig": {
  21020. "type": "object",
  21021. "properties": {
  21022. "type": {
  21023. "type": "string",
  21024. "enum": ["remote"],
  21025. "description": "Type of MCP server connection"
  21026. },
  21027. "url": {
  21028. "type": "string",
  21029. "description": "URL of the remote MCP server"
  21030. },
  21031. "enabled": {
  21032. "type": "boolean"
  21033. },
  21034. "headers": {
  21035. "type": "object",
  21036. "additionalProperties": {
  21037. "type": "string"
  21038. }
  21039. },
  21040. "oauth": {
  21041. "anyOf": [
  21042. {
  21043. "$ref": "#/components/schemas/McpOAuthConfig"
  21044. },
  21045. {
  21046. "type": "boolean",
  21047. "enum": [false]
  21048. }
  21049. ],
  21050. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  21051. },
  21052. "timeout": {
  21053. "type": "integer",
  21054. "exclusiveMinimum": 0
  21055. }
  21056. },
  21057. "required": ["type", "url"],
  21058. "additionalProperties": false
  21059. },
  21060. "LayoutConfig": {
  21061. "type": "string",
  21062. "enum": ["auto", "stretch"],
  21063. "description": "@deprecated Always uses stretch layout."
  21064. },
  21065. "ImageAttachmentConfig": {
  21066. "type": "object",
  21067. "properties": {
  21068. "auto_resize": {
  21069. "type": "boolean"
  21070. },
  21071. "max_width": {
  21072. "type": "integer",
  21073. "exclusiveMinimum": 0
  21074. },
  21075. "max_height": {
  21076. "type": "integer",
  21077. "exclusiveMinimum": 0
  21078. },
  21079. "max_base64_bytes": {
  21080. "type": "integer",
  21081. "exclusiveMinimum": 0
  21082. }
  21083. },
  21084. "additionalProperties": false
  21085. },
  21086. "AttachmentConfig": {
  21087. "type": "object",
  21088. "properties": {
  21089. "image": {
  21090. "$ref": "#/components/schemas/ImageAttachmentConfig"
  21091. }
  21092. },
  21093. "additionalProperties": false
  21094. },
  21095. "Config": {
  21096. "type": "object",
  21097. "properties": {
  21098. "$schema": {
  21099. "type": "string"
  21100. },
  21101. "shell": {
  21102. "type": "string"
  21103. },
  21104. "logLevel": {
  21105. "$ref": "#/components/schemas/LogLevel"
  21106. },
  21107. "server": {
  21108. "$ref": "#/components/schemas/ServerConfig"
  21109. },
  21110. "command": {
  21111. "type": "object",
  21112. "additionalProperties": {
  21113. "type": "object",
  21114. "properties": {
  21115. "template": {
  21116. "type": "string"
  21117. },
  21118. "description": {
  21119. "type": "string"
  21120. },
  21121. "agent": {
  21122. "type": "string"
  21123. },
  21124. "model": {
  21125. "type": "string"
  21126. },
  21127. "variant": {
  21128. "type": "string"
  21129. },
  21130. "subtask": {
  21131. "type": "boolean"
  21132. }
  21133. },
  21134. "required": ["template"],
  21135. "additionalProperties": false
  21136. }
  21137. },
  21138. "skills": {
  21139. "type": "object",
  21140. "properties": {
  21141. "paths": {
  21142. "type": "array",
  21143. "items": {
  21144. "type": "string"
  21145. }
  21146. },
  21147. "urls": {
  21148. "type": "array",
  21149. "items": {
  21150. "type": "string"
  21151. }
  21152. }
  21153. },
  21154. "additionalProperties": false
  21155. },
  21156. "references": {
  21157. "type": "object",
  21158. "additionalProperties": {
  21159. "anyOf": [
  21160. {
  21161. "type": "string"
  21162. },
  21163. {
  21164. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21165. },
  21166. {
  21167. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21168. }
  21169. ]
  21170. }
  21171. },
  21172. "reference": {
  21173. "type": "object",
  21174. "additionalProperties": {
  21175. "anyOf": [
  21176. {
  21177. "type": "string"
  21178. },
  21179. {
  21180. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21181. },
  21182. {
  21183. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21184. }
  21185. ]
  21186. }
  21187. },
  21188. "watcher": {
  21189. "type": "object",
  21190. "properties": {
  21191. "ignore": {
  21192. "type": "array",
  21193. "items": {
  21194. "type": "string"
  21195. }
  21196. }
  21197. },
  21198. "additionalProperties": false
  21199. },
  21200. "snapshot": {
  21201. "type": "boolean"
  21202. },
  21203. "plugin": {
  21204. "type": "array",
  21205. "items": {
  21206. "anyOf": [
  21207. {
  21208. "type": "string"
  21209. },
  21210. {
  21211. "type": "array",
  21212. "prefixItems": [
  21213. {
  21214. "type": "string"
  21215. },
  21216. {
  21217. "type": "object"
  21218. }
  21219. ],
  21220. "maxItems": 2,
  21221. "minItems": 2
  21222. }
  21223. ]
  21224. }
  21225. },
  21226. "share": {
  21227. "type": "string",
  21228. "enum": ["manual", "auto", "disabled"]
  21229. },
  21230. "autoshare": {
  21231. "type": "boolean"
  21232. },
  21233. "autoupdate": {
  21234. "anyOf": [
  21235. {
  21236. "type": "boolean"
  21237. },
  21238. {
  21239. "type": "string",
  21240. "enum": ["notify"]
  21241. }
  21242. ],
  21243. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21244. },
  21245. "disabled_providers": {
  21246. "type": "array",
  21247. "items": {
  21248. "type": "string"
  21249. }
  21250. },
  21251. "enabled_providers": {
  21252. "type": "array",
  21253. "items": {
  21254. "type": "string"
  21255. }
  21256. },
  21257. "model": {
  21258. "type": "string"
  21259. },
  21260. "small_model": {
  21261. "type": "string"
  21262. },
  21263. "default_agent": {
  21264. "type": "string"
  21265. },
  21266. "subagent_depth": {
  21267. "type": "integer",
  21268. "minimum": 0
  21269. },
  21270. "username": {
  21271. "type": "string"
  21272. },
  21273. "mode": {
  21274. "type": "object",
  21275. "properties": {
  21276. "build": {
  21277. "$ref": "#/components/schemas/AgentConfig"
  21278. },
  21279. "plan": {
  21280. "$ref": "#/components/schemas/AgentConfig"
  21281. }
  21282. },
  21283. "additionalProperties": {
  21284. "$ref": "#/components/schemas/AgentConfig"
  21285. }
  21286. },
  21287. "agent": {
  21288. "type": "object",
  21289. "properties": {
  21290. "plan": {
  21291. "$ref": "#/components/schemas/AgentConfig"
  21292. },
  21293. "build": {
  21294. "$ref": "#/components/schemas/AgentConfig"
  21295. },
  21296. "general": {
  21297. "$ref": "#/components/schemas/AgentConfig"
  21298. },
  21299. "explore": {
  21300. "$ref": "#/components/schemas/AgentConfig"
  21301. },
  21302. "title": {
  21303. "$ref": "#/components/schemas/AgentConfig"
  21304. },
  21305. "summary": {
  21306. "$ref": "#/components/schemas/AgentConfig"
  21307. },
  21308. "compaction": {
  21309. "$ref": "#/components/schemas/AgentConfig"
  21310. }
  21311. },
  21312. "additionalProperties": {
  21313. "$ref": "#/components/schemas/AgentConfig"
  21314. }
  21315. },
  21316. "provider": {
  21317. "type": "object",
  21318. "additionalProperties": {
  21319. "$ref": "#/components/schemas/ProviderConfig"
  21320. }
  21321. },
  21322. "mcp": {
  21323. "type": "object",
  21324. "additionalProperties": {
  21325. "anyOf": [
  21326. {
  21327. "$ref": "#/components/schemas/McpLocalConfig"
  21328. },
  21329. {
  21330. "$ref": "#/components/schemas/McpRemoteConfig"
  21331. },
  21332. {
  21333. "type": "object",
  21334. "properties": {
  21335. "enabled": {
  21336. "type": "boolean"
  21337. }
  21338. },
  21339. "required": ["enabled"],
  21340. "additionalProperties": false
  21341. }
  21342. ]
  21343. }
  21344. },
  21345. "formatter": {
  21346. "anyOf": [
  21347. {
  21348. "type": "boolean"
  21349. },
  21350. {
  21351. "type": "object",
  21352. "additionalProperties": {
  21353. "type": "object",
  21354. "properties": {
  21355. "disabled": {
  21356. "type": "boolean"
  21357. },
  21358. "command": {
  21359. "type": "array",
  21360. "items": {
  21361. "type": "string"
  21362. }
  21363. },
  21364. "environment": {
  21365. "type": "object",
  21366. "additionalProperties": {
  21367. "type": "string"
  21368. }
  21369. },
  21370. "extensions": {
  21371. "type": "array",
  21372. "items": {
  21373. "type": "string"
  21374. }
  21375. }
  21376. },
  21377. "additionalProperties": false
  21378. }
  21379. }
  21380. ],
  21381. "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."
  21382. },
  21383. "lsp": {
  21384. "anyOf": [
  21385. {
  21386. "type": "boolean"
  21387. },
  21388. {
  21389. "type": "object",
  21390. "additionalProperties": {
  21391. "anyOf": [
  21392. {
  21393. "type": "object",
  21394. "properties": {
  21395. "disabled": {
  21396. "type": "boolean",
  21397. "enum": [true]
  21398. }
  21399. },
  21400. "required": ["disabled"],
  21401. "additionalProperties": false
  21402. },
  21403. {
  21404. "type": "object",
  21405. "properties": {
  21406. "command": {
  21407. "type": "array",
  21408. "items": {
  21409. "type": "string"
  21410. }
  21411. },
  21412. "extensions": {
  21413. "type": "array",
  21414. "items": {
  21415. "type": "string"
  21416. }
  21417. },
  21418. "disabled": {
  21419. "type": "boolean"
  21420. },
  21421. "env": {
  21422. "type": "object",
  21423. "additionalProperties": {
  21424. "type": "string"
  21425. }
  21426. },
  21427. "initialization": {
  21428. "type": "object"
  21429. }
  21430. },
  21431. "required": ["command"],
  21432. "additionalProperties": false
  21433. }
  21434. ]
  21435. }
  21436. }
  21437. ],
  21438. "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."
  21439. },
  21440. "instructions": {
  21441. "type": "array",
  21442. "items": {
  21443. "type": "string"
  21444. }
  21445. },
  21446. "layout": {
  21447. "$ref": "#/components/schemas/LayoutConfig"
  21448. },
  21449. "permission": {
  21450. "$ref": "#/components/schemas/PermissionConfig"
  21451. },
  21452. "tools": {
  21453. "type": "object",
  21454. "additionalProperties": {
  21455. "type": "boolean"
  21456. }
  21457. },
  21458. "attachment": {
  21459. "$ref": "#/components/schemas/AttachmentConfig"
  21460. },
  21461. "enterprise": {
  21462. "type": "object",
  21463. "properties": {
  21464. "url": {
  21465. "type": "string"
  21466. }
  21467. },
  21468. "additionalProperties": false
  21469. },
  21470. "tool_output": {
  21471. "type": "object",
  21472. "properties": {
  21473. "max_lines": {
  21474. "type": "integer",
  21475. "exclusiveMinimum": 0
  21476. },
  21477. "max_bytes": {
  21478. "type": "integer",
  21479. "exclusiveMinimum": 0
  21480. }
  21481. },
  21482. "additionalProperties": false
  21483. },
  21484. "compaction": {
  21485. "type": "object",
  21486. "properties": {
  21487. "auto": {
  21488. "type": "boolean"
  21489. },
  21490. "prune": {
  21491. "type": "boolean"
  21492. },
  21493. "tail_turns": {
  21494. "type": "integer",
  21495. "minimum": 0
  21496. },
  21497. "preserve_recent_tokens": {
  21498. "type": "integer",
  21499. "minimum": 0
  21500. },
  21501. "reserved": {
  21502. "type": "integer",
  21503. "minimum": 0
  21504. }
  21505. },
  21506. "additionalProperties": false
  21507. },
  21508. "experimental": {
  21509. "type": "object",
  21510. "properties": {
  21511. "disable_paste_summary": {
  21512. "type": "boolean"
  21513. },
  21514. "batch_tool": {
  21515. "type": "boolean"
  21516. },
  21517. "openTelemetry": {
  21518. "type": "boolean"
  21519. },
  21520. "primary_tools": {
  21521. "type": "array",
  21522. "items": {
  21523. "type": "string"
  21524. }
  21525. },
  21526. "continue_loop_on_deny": {
  21527. "type": "boolean"
  21528. },
  21529. "mcp_timeout": {
  21530. "type": "integer",
  21531. "exclusiveMinimum": 0
  21532. },
  21533. "policies": {
  21534. "type": "array",
  21535. "items": {
  21536. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21537. }
  21538. }
  21539. },
  21540. "additionalProperties": false
  21541. }
  21542. },
  21543. "additionalProperties": false
  21544. },
  21545. "Model": {
  21546. "type": "object",
  21547. "properties": {
  21548. "id": {
  21549. "type": "string"
  21550. },
  21551. "providerID": {
  21552. "type": "string"
  21553. },
  21554. "api": {
  21555. "type": "object",
  21556. "properties": {
  21557. "id": {
  21558. "type": "string"
  21559. },
  21560. "url": {
  21561. "type": "string"
  21562. },
  21563. "npm": {
  21564. "type": "string"
  21565. }
  21566. },
  21567. "required": ["id", "url", "npm"],
  21568. "additionalProperties": false
  21569. },
  21570. "name": {
  21571. "type": "string"
  21572. },
  21573. "family": {
  21574. "type": "string"
  21575. },
  21576. "capabilities": {
  21577. "type": "object",
  21578. "properties": {
  21579. "temperature": {
  21580. "type": "boolean"
  21581. },
  21582. "reasoning": {
  21583. "type": "boolean"
  21584. },
  21585. "attachment": {
  21586. "type": "boolean"
  21587. },
  21588. "toolcall": {
  21589. "type": "boolean"
  21590. },
  21591. "input": {
  21592. "type": "object",
  21593. "properties": {
  21594. "text": {
  21595. "type": "boolean"
  21596. },
  21597. "audio": {
  21598. "type": "boolean"
  21599. },
  21600. "image": {
  21601. "type": "boolean"
  21602. },
  21603. "video": {
  21604. "type": "boolean"
  21605. },
  21606. "pdf": {
  21607. "type": "boolean"
  21608. }
  21609. },
  21610. "required": ["text", "audio", "image", "video", "pdf"],
  21611. "additionalProperties": false
  21612. },
  21613. "output": {
  21614. "type": "object",
  21615. "properties": {
  21616. "text": {
  21617. "type": "boolean"
  21618. },
  21619. "audio": {
  21620. "type": "boolean"
  21621. },
  21622. "image": {
  21623. "type": "boolean"
  21624. },
  21625. "video": {
  21626. "type": "boolean"
  21627. },
  21628. "pdf": {
  21629. "type": "boolean"
  21630. }
  21631. },
  21632. "required": ["text", "audio", "image", "video", "pdf"],
  21633. "additionalProperties": false
  21634. },
  21635. "interleaved": {
  21636. "anyOf": [
  21637. {
  21638. "type": "boolean"
  21639. },
  21640. {
  21641. "type": "object",
  21642. "properties": {
  21643. "field": {
  21644. "type": "string",
  21645. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  21646. }
  21647. },
  21648. "required": ["field"],
  21649. "additionalProperties": false
  21650. }
  21651. ]
  21652. }
  21653. },
  21654. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21655. "additionalProperties": false
  21656. },
  21657. "cost": {
  21658. "type": "object",
  21659. "properties": {
  21660. "input": {
  21661. "type": "number"
  21662. },
  21663. "output": {
  21664. "type": "number"
  21665. },
  21666. "cache": {
  21667. "type": "object",
  21668. "properties": {
  21669. "read": {
  21670. "type": "number"
  21671. },
  21672. "write": {
  21673. "type": "number"
  21674. }
  21675. },
  21676. "required": ["read", "write"],
  21677. "additionalProperties": false
  21678. },
  21679. "tiers": {
  21680. "type": "array",
  21681. "items": {
  21682. "type": "object",
  21683. "properties": {
  21684. "input": {
  21685. "type": "number"
  21686. },
  21687. "output": {
  21688. "type": "number"
  21689. },
  21690. "cache": {
  21691. "type": "object",
  21692. "properties": {
  21693. "read": {
  21694. "type": "number"
  21695. },
  21696. "write": {
  21697. "type": "number"
  21698. }
  21699. },
  21700. "required": ["read", "write"],
  21701. "additionalProperties": false
  21702. },
  21703. "tier": {
  21704. "type": "object",
  21705. "properties": {
  21706. "type": {
  21707. "type": "string",
  21708. "enum": ["context"]
  21709. },
  21710. "size": {
  21711. "type": "number"
  21712. }
  21713. },
  21714. "required": ["type", "size"],
  21715. "additionalProperties": false
  21716. }
  21717. },
  21718. "required": ["input", "output", "cache", "tier"],
  21719. "additionalProperties": false
  21720. }
  21721. },
  21722. "experimentalOver200K": {
  21723. "type": "object",
  21724. "properties": {
  21725. "input": {
  21726. "type": "number"
  21727. },
  21728. "output": {
  21729. "type": "number"
  21730. },
  21731. "cache": {
  21732. "type": "object",
  21733. "properties": {
  21734. "read": {
  21735. "type": "number"
  21736. },
  21737. "write": {
  21738. "type": "number"
  21739. }
  21740. },
  21741. "required": ["read", "write"],
  21742. "additionalProperties": false
  21743. }
  21744. },
  21745. "required": ["input", "output", "cache"],
  21746. "additionalProperties": false
  21747. }
  21748. },
  21749. "required": ["input", "output", "cache"],
  21750. "additionalProperties": false
  21751. },
  21752. "limit": {
  21753. "type": "object",
  21754. "properties": {
  21755. "context": {
  21756. "type": "number"
  21757. },
  21758. "input": {
  21759. "type": "number"
  21760. },
  21761. "output": {
  21762. "type": "number"
  21763. }
  21764. },
  21765. "required": ["context", "output"],
  21766. "additionalProperties": false
  21767. },
  21768. "status": {
  21769. "type": "string",
  21770. "enum": ["alpha", "beta", "deprecated", "active"]
  21771. },
  21772. "options": {
  21773. "type": "object"
  21774. },
  21775. "headers": {
  21776. "type": "object",
  21777. "additionalProperties": {
  21778. "type": "string"
  21779. }
  21780. },
  21781. "release_date": {
  21782. "type": "string"
  21783. },
  21784. "variants": {
  21785. "type": "object",
  21786. "additionalProperties": {
  21787. "type": "object"
  21788. }
  21789. }
  21790. },
  21791. "required": [
  21792. "id",
  21793. "providerID",
  21794. "api",
  21795. "name",
  21796. "capabilities",
  21797. "cost",
  21798. "limit",
  21799. "status",
  21800. "options",
  21801. "headers",
  21802. "release_date"
  21803. ],
  21804. "additionalProperties": false
  21805. },
  21806. "Provider": {
  21807. "type": "object",
  21808. "properties": {
  21809. "id": {
  21810. "type": "string"
  21811. },
  21812. "name": {
  21813. "type": "string"
  21814. },
  21815. "source": {
  21816. "type": "string",
  21817. "enum": ["env", "config", "custom", "api"]
  21818. },
  21819. "env": {
  21820. "type": "array",
  21821. "items": {
  21822. "type": "string"
  21823. }
  21824. },
  21825. "key": {
  21826. "type": "string"
  21827. },
  21828. "options": {
  21829. "type": "object"
  21830. },
  21831. "models": {
  21832. "type": "object",
  21833. "additionalProperties": {
  21834. "$ref": "#/components/schemas/Model"
  21835. }
  21836. }
  21837. },
  21838. "required": ["id", "name", "source", "env", "options", "models"],
  21839. "additionalProperties": false
  21840. },
  21841. "ExperimentalCapabilities": {
  21842. "type": "object",
  21843. "properties": {
  21844. "backgroundSubagents": {
  21845. "type": "boolean"
  21846. }
  21847. },
  21848. "required": ["backgroundSubagents"],
  21849. "additionalProperties": false
  21850. },
  21851. "ConsoleState": {
  21852. "type": "object",
  21853. "properties": {
  21854. "consoleManagedProviders": {
  21855. "type": "array",
  21856. "items": {
  21857. "type": "string"
  21858. }
  21859. },
  21860. "activeOrgName": {
  21861. "type": "string"
  21862. },
  21863. "switchableOrgCount": {
  21864. "type": "integer",
  21865. "minimum": 0
  21866. }
  21867. },
  21868. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21869. "additionalProperties": false
  21870. },
  21871. "effect_HttpApiError_InternalServerError": {
  21872. "type": "object",
  21873. "properties": {
  21874. "_tag": {
  21875. "type": "string",
  21876. "enum": ["InternalServerError"]
  21877. }
  21878. },
  21879. "required": ["_tag"],
  21880. "additionalProperties": false
  21881. },
  21882. "ToolListItem": {
  21883. "type": "object",
  21884. "properties": {
  21885. "id": {
  21886. "type": "string"
  21887. },
  21888. "description": {
  21889. "type": "string"
  21890. },
  21891. "parameters": {}
  21892. },
  21893. "required": ["id", "description", "parameters"],
  21894. "additionalProperties": false
  21895. },
  21896. "ToolList": {
  21897. "type": "array",
  21898. "items": {
  21899. "$ref": "#/components/schemas/ToolListItem"
  21900. }
  21901. },
  21902. "ToolIDs": {
  21903. "type": "array",
  21904. "items": {
  21905. "type": "string"
  21906. }
  21907. },
  21908. "WorktreeError": {
  21909. "type": "object",
  21910. "properties": {
  21911. "name": {
  21912. "type": "string",
  21913. "enum": [
  21914. "WorktreeNotGitError",
  21915. "WorktreeNameGenerationFailedError",
  21916. "WorktreeCreateFailedError",
  21917. "WorktreeStartCommandFailedError",
  21918. "WorktreeRemoveFailedError",
  21919. "WorktreeResetFailedError",
  21920. "WorktreeListFailedError"
  21921. ]
  21922. },
  21923. "data": {
  21924. "type": "object",
  21925. "properties": {
  21926. "message": {
  21927. "type": "string"
  21928. }
  21929. },
  21930. "required": ["message"],
  21931. "additionalProperties": false
  21932. }
  21933. },
  21934. "required": ["name", "data"],
  21935. "additionalProperties": false
  21936. },
  21937. "WorktreeCreateInput": {
  21938. "type": "object",
  21939. "properties": {
  21940. "name": {
  21941. "type": "string"
  21942. },
  21943. "startCommand": {
  21944. "type": "string",
  21945. "description": "Additional startup script to run after the project's start command"
  21946. }
  21947. },
  21948. "additionalProperties": false
  21949. },
  21950. "Worktree": {
  21951. "type": "object",
  21952. "properties": {
  21953. "name": {
  21954. "type": "string"
  21955. },
  21956. "branch": {
  21957. "type": "string"
  21958. },
  21959. "directory": {
  21960. "type": "string"
  21961. }
  21962. },
  21963. "required": ["name", "directory"],
  21964. "additionalProperties": false
  21965. },
  21966. "WorktreeRemoveInput": {
  21967. "type": "object",
  21968. "properties": {
  21969. "directory": {
  21970. "type": "string"
  21971. }
  21972. },
  21973. "required": ["directory"],
  21974. "additionalProperties": false
  21975. },
  21976. "WorktreeResetInput": {
  21977. "type": "object",
  21978. "properties": {
  21979. "directory": {
  21980. "type": "string"
  21981. }
  21982. },
  21983. "required": ["directory"],
  21984. "additionalProperties": false
  21985. },
  21986. "ProjectSummary": {
  21987. "type": "object",
  21988. "properties": {
  21989. "id": {
  21990. "type": "string"
  21991. },
  21992. "name": {
  21993. "type": "string"
  21994. },
  21995. "worktree": {
  21996. "type": "string"
  21997. }
  21998. },
  21999. "required": ["id", "worktree"],
  22000. "additionalProperties": false
  22001. },
  22002. "GlobalSession": {
  22003. "type": "object",
  22004. "properties": {
  22005. "id": {
  22006. "type": "string",
  22007. "pattern": "^ses"
  22008. },
  22009. "slug": {
  22010. "type": "string"
  22011. },
  22012. "projectID": {
  22013. "type": "string"
  22014. },
  22015. "workspaceID": {
  22016. "type": "string",
  22017. "pattern": "^wrk"
  22018. },
  22019. "directory": {
  22020. "type": "string"
  22021. },
  22022. "path": {
  22023. "type": "string"
  22024. },
  22025. "parentID": {
  22026. "type": "string",
  22027. "pattern": "^ses"
  22028. },
  22029. "summary": {
  22030. "type": "object",
  22031. "properties": {
  22032. "additions": {
  22033. "type": "number"
  22034. },
  22035. "deletions": {
  22036. "type": "number"
  22037. },
  22038. "files": {
  22039. "type": "number"
  22040. },
  22041. "diffs": {
  22042. "type": "array",
  22043. "items": {
  22044. "$ref": "#/components/schemas/SnapshotFileDiff"
  22045. }
  22046. }
  22047. },
  22048. "required": ["additions", "deletions", "files"],
  22049. "additionalProperties": false
  22050. },
  22051. "cost": {
  22052. "type": "number"
  22053. },
  22054. "tokens": {
  22055. "type": "object",
  22056. "properties": {
  22057. "input": {
  22058. "type": "number"
  22059. },
  22060. "output": {
  22061. "type": "number"
  22062. },
  22063. "reasoning": {
  22064. "type": "number"
  22065. },
  22066. "cache": {
  22067. "type": "object",
  22068. "properties": {
  22069. "read": {
  22070. "type": "number"
  22071. },
  22072. "write": {
  22073. "type": "number"
  22074. }
  22075. },
  22076. "required": ["read", "write"],
  22077. "additionalProperties": false
  22078. }
  22079. },
  22080. "required": ["input", "output", "reasoning", "cache"],
  22081. "additionalProperties": false
  22082. },
  22083. "share": {
  22084. "type": "object",
  22085. "properties": {
  22086. "url": {
  22087. "type": "string"
  22088. }
  22089. },
  22090. "required": ["url"],
  22091. "additionalProperties": false
  22092. },
  22093. "title": {
  22094. "type": "string"
  22095. },
  22096. "agent": {
  22097. "type": "string"
  22098. },
  22099. "model": {
  22100. "type": "object",
  22101. "properties": {
  22102. "id": {
  22103. "type": "string"
  22104. },
  22105. "providerID": {
  22106. "type": "string"
  22107. },
  22108. "variant": {
  22109. "type": "string"
  22110. }
  22111. },
  22112. "required": ["id", "providerID"],
  22113. "additionalProperties": false
  22114. },
  22115. "version": {
  22116. "type": "string"
  22117. },
  22118. "metadata": {
  22119. "type": "object"
  22120. },
  22121. "time": {
  22122. "type": "object",
  22123. "properties": {
  22124. "created": {
  22125. "type": "integer",
  22126. "minimum": 0
  22127. },
  22128. "updated": {
  22129. "type": "integer",
  22130. "minimum": 0
  22131. },
  22132. "compacting": {
  22133. "type": "integer",
  22134. "minimum": 0
  22135. },
  22136. "archived": {
  22137. "type": "number"
  22138. }
  22139. },
  22140. "required": ["created", "updated"],
  22141. "additionalProperties": false
  22142. },
  22143. "permission": {
  22144. "$ref": "#/components/schemas/PermissionRuleset"
  22145. },
  22146. "revert": {
  22147. "type": "object",
  22148. "properties": {
  22149. "messageID": {
  22150. "type": "string",
  22151. "pattern": "^msg"
  22152. },
  22153. "partID": {
  22154. "type": "string",
  22155. "pattern": "^prt"
  22156. },
  22157. "snapshot": {
  22158. "type": "string"
  22159. },
  22160. "diff": {
  22161. "type": "string"
  22162. }
  22163. },
  22164. "required": ["messageID"],
  22165. "additionalProperties": false
  22166. },
  22167. "project": {
  22168. "anyOf": [
  22169. {
  22170. "$ref": "#/components/schemas/ProjectSummary"
  22171. },
  22172. {
  22173. "type": "null"
  22174. }
  22175. ]
  22176. }
  22177. },
  22178. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22179. "additionalProperties": false
  22180. },
  22181. "McpResource": {
  22182. "type": "object",
  22183. "properties": {
  22184. "name": {
  22185. "type": "string"
  22186. },
  22187. "uri": {
  22188. "type": "string"
  22189. },
  22190. "description": {
  22191. "type": "string"
  22192. },
  22193. "mimeType": {
  22194. "type": "string"
  22195. },
  22196. "client": {
  22197. "type": "string"
  22198. }
  22199. },
  22200. "required": ["name", "uri", "client"],
  22201. "additionalProperties": false
  22202. },
  22203. "Symbol": {
  22204. "type": "object",
  22205. "properties": {
  22206. "name": {
  22207. "type": "string"
  22208. },
  22209. "kind": {
  22210. "type": "integer",
  22211. "minimum": 0
  22212. },
  22213. "location": {
  22214. "type": "object",
  22215. "properties": {
  22216. "uri": {
  22217. "type": "string"
  22218. },
  22219. "range": {
  22220. "$ref": "#/components/schemas/Range"
  22221. }
  22222. },
  22223. "required": ["uri", "range"],
  22224. "additionalProperties": false
  22225. }
  22226. },
  22227. "required": ["name", "kind", "location"],
  22228. "additionalProperties": false
  22229. },
  22230. "FileNode": {
  22231. "type": "object",
  22232. "properties": {
  22233. "name": {
  22234. "type": "string"
  22235. },
  22236. "path": {
  22237. "type": "string"
  22238. },
  22239. "absolute": {
  22240. "type": "string"
  22241. },
  22242. "type": {
  22243. "type": "string",
  22244. "enum": ["file", "directory"]
  22245. },
  22246. "ignored": {
  22247. "type": "boolean"
  22248. }
  22249. },
  22250. "required": ["name", "path", "absolute", "type", "ignored"],
  22251. "additionalProperties": false
  22252. },
  22253. "FileContent": {
  22254. "type": "object",
  22255. "properties": {
  22256. "type": {
  22257. "type": "string",
  22258. "enum": ["text", "binary"]
  22259. },
  22260. "content": {
  22261. "type": "string"
  22262. },
  22263. "diff": {
  22264. "type": "string"
  22265. },
  22266. "patch": {
  22267. "type": "object",
  22268. "properties": {
  22269. "oldFileName": {
  22270. "type": "string"
  22271. },
  22272. "newFileName": {
  22273. "type": "string"
  22274. },
  22275. "oldHeader": {
  22276. "type": "string"
  22277. },
  22278. "newHeader": {
  22279. "type": "string"
  22280. },
  22281. "hunks": {
  22282. "type": "array",
  22283. "items": {
  22284. "type": "object",
  22285. "properties": {
  22286. "oldStart": {
  22287. "type": "integer",
  22288. "minimum": 0
  22289. },
  22290. "oldLines": {
  22291. "type": "integer",
  22292. "minimum": 0
  22293. },
  22294. "newStart": {
  22295. "type": "integer",
  22296. "minimum": 0
  22297. },
  22298. "newLines": {
  22299. "type": "integer",
  22300. "minimum": 0
  22301. },
  22302. "lines": {
  22303. "type": "array",
  22304. "items": {
  22305. "type": "string"
  22306. }
  22307. }
  22308. },
  22309. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22310. "additionalProperties": false
  22311. }
  22312. },
  22313. "index": {
  22314. "type": "string"
  22315. }
  22316. },
  22317. "required": ["oldFileName", "newFileName", "hunks"],
  22318. "additionalProperties": false
  22319. },
  22320. "encoding": {
  22321. "type": "string",
  22322. "enum": ["base64"]
  22323. },
  22324. "mimeType": {
  22325. "type": "string"
  22326. }
  22327. },
  22328. "required": ["type", "content"],
  22329. "additionalProperties": false
  22330. },
  22331. "File": {
  22332. "type": "object",
  22333. "properties": {
  22334. "path": {
  22335. "type": "string"
  22336. },
  22337. "added": {
  22338. "type": "integer",
  22339. "minimum": 0
  22340. },
  22341. "removed": {
  22342. "type": "integer",
  22343. "minimum": 0
  22344. },
  22345. "status": {
  22346. "type": "string",
  22347. "enum": ["added", "deleted", "modified"]
  22348. }
  22349. },
  22350. "required": ["path", "added", "removed", "status"],
  22351. "additionalProperties": false
  22352. },
  22353. "Path": {
  22354. "type": "object",
  22355. "properties": {
  22356. "home": {
  22357. "type": "string"
  22358. },
  22359. "state": {
  22360. "type": "string"
  22361. },
  22362. "config": {
  22363. "type": "string"
  22364. },
  22365. "worktree": {
  22366. "type": "string"
  22367. },
  22368. "directory": {
  22369. "type": "string"
  22370. }
  22371. },
  22372. "required": ["home", "state", "config", "worktree", "directory"],
  22373. "additionalProperties": false
  22374. },
  22375. "VcsInfo": {
  22376. "type": "object",
  22377. "properties": {
  22378. "branch": {
  22379. "type": "string"
  22380. },
  22381. "default_branch": {
  22382. "type": "string"
  22383. }
  22384. },
  22385. "additionalProperties": false
  22386. },
  22387. "VcsFileStatus": {
  22388. "type": "object",
  22389. "properties": {
  22390. "file": {
  22391. "type": "string"
  22392. },
  22393. "additions": {
  22394. "type": "number"
  22395. },
  22396. "deletions": {
  22397. "type": "number"
  22398. },
  22399. "status": {
  22400. "type": "string",
  22401. "enum": ["added", "deleted", "modified"]
  22402. }
  22403. },
  22404. "required": ["file", "additions", "deletions", "status"],
  22405. "additionalProperties": false
  22406. },
  22407. "VcsFileDiff": {
  22408. "type": "object",
  22409. "properties": {
  22410. "file": {
  22411. "type": "string"
  22412. },
  22413. "patch": {
  22414. "type": "string"
  22415. },
  22416. "additions": {
  22417. "type": "number"
  22418. },
  22419. "deletions": {
  22420. "type": "number"
  22421. },
  22422. "status": {
  22423. "type": "string",
  22424. "enum": ["added", "deleted", "modified"]
  22425. }
  22426. },
  22427. "required": ["file", "additions", "deletions"],
  22428. "additionalProperties": false
  22429. },
  22430. "VcsApplyError": {
  22431. "type": "object",
  22432. "properties": {
  22433. "name": {
  22434. "type": "string",
  22435. "enum": ["VcsApplyError"]
  22436. },
  22437. "data": {
  22438. "type": "object",
  22439. "properties": {
  22440. "message": {
  22441. "type": "string"
  22442. },
  22443. "reason": {
  22444. "type": "string",
  22445. "enum": ["non-git", "not-clean"]
  22446. }
  22447. },
  22448. "required": ["message", "reason"],
  22449. "additionalProperties": false
  22450. }
  22451. },
  22452. "required": ["name", "data"],
  22453. "additionalProperties": false
  22454. },
  22455. "Command": {
  22456. "type": "object",
  22457. "properties": {
  22458. "name": {
  22459. "type": "string"
  22460. },
  22461. "description": {
  22462. "type": "string"
  22463. },
  22464. "agent": {
  22465. "type": "string"
  22466. },
  22467. "model": {
  22468. "type": "string"
  22469. },
  22470. "source": {
  22471. "type": "string",
  22472. "enum": ["command", "mcp", "skill"]
  22473. },
  22474. "template": {
  22475. "type": "string"
  22476. },
  22477. "subtask": {
  22478. "type": "boolean"
  22479. },
  22480. "hints": {
  22481. "type": "array",
  22482. "items": {
  22483. "type": "string"
  22484. }
  22485. }
  22486. },
  22487. "required": ["name", "template", "hints"],
  22488. "additionalProperties": false
  22489. },
  22490. "Agent": {
  22491. "type": "object",
  22492. "properties": {
  22493. "name": {
  22494. "type": "string"
  22495. },
  22496. "description": {
  22497. "type": "string"
  22498. },
  22499. "mode": {
  22500. "type": "string",
  22501. "enum": ["subagent", "primary", "all"]
  22502. },
  22503. "native": {
  22504. "type": "boolean"
  22505. },
  22506. "hidden": {
  22507. "type": "boolean"
  22508. },
  22509. "topP": {
  22510. "type": "number"
  22511. },
  22512. "temperature": {
  22513. "type": "number"
  22514. },
  22515. "color": {
  22516. "type": "string"
  22517. },
  22518. "permission": {
  22519. "$ref": "#/components/schemas/PermissionRuleset"
  22520. },
  22521. "model": {
  22522. "type": "object",
  22523. "properties": {
  22524. "modelID": {
  22525. "type": "string"
  22526. },
  22527. "providerID": {
  22528. "type": "string"
  22529. }
  22530. },
  22531. "required": ["modelID", "providerID"],
  22532. "additionalProperties": false
  22533. },
  22534. "variant": {
  22535. "type": "string"
  22536. },
  22537. "prompt": {
  22538. "type": "string"
  22539. },
  22540. "options": {
  22541. "type": "object"
  22542. },
  22543. "steps": {
  22544. "type": "number"
  22545. }
  22546. },
  22547. "required": ["name", "mode", "permission", "options"],
  22548. "additionalProperties": false
  22549. },
  22550. "LSPStatus": {
  22551. "type": "object",
  22552. "properties": {
  22553. "id": {
  22554. "type": "string"
  22555. },
  22556. "name": {
  22557. "type": "string"
  22558. },
  22559. "root": {
  22560. "type": "string"
  22561. },
  22562. "status": {
  22563. "type": "string",
  22564. "enum": ["connected", "error"]
  22565. }
  22566. },
  22567. "required": ["id", "name", "root", "status"],
  22568. "additionalProperties": false
  22569. },
  22570. "FormatterStatus": {
  22571. "type": "object",
  22572. "properties": {
  22573. "name": {
  22574. "type": "string"
  22575. },
  22576. "extensions": {
  22577. "type": "array",
  22578. "items": {
  22579. "type": "string"
  22580. }
  22581. },
  22582. "enabled": {
  22583. "type": "boolean"
  22584. }
  22585. },
  22586. "required": ["name", "extensions", "enabled"],
  22587. "additionalProperties": false
  22588. },
  22589. "MCPStatusConnected": {
  22590. "type": "object",
  22591. "properties": {
  22592. "status": {
  22593. "type": "string",
  22594. "enum": ["connected"]
  22595. }
  22596. },
  22597. "required": ["status"],
  22598. "additionalProperties": false
  22599. },
  22600. "MCPStatusDisabled": {
  22601. "type": "object",
  22602. "properties": {
  22603. "status": {
  22604. "type": "string",
  22605. "enum": ["disabled"]
  22606. }
  22607. },
  22608. "required": ["status"],
  22609. "additionalProperties": false
  22610. },
  22611. "MCPStatusFailed": {
  22612. "type": "object",
  22613. "properties": {
  22614. "status": {
  22615. "type": "string",
  22616. "enum": ["failed"]
  22617. },
  22618. "error": {
  22619. "type": "string"
  22620. }
  22621. },
  22622. "required": ["status", "error"],
  22623. "additionalProperties": false
  22624. },
  22625. "MCPStatusNeedsAuth": {
  22626. "type": "object",
  22627. "properties": {
  22628. "status": {
  22629. "type": "string",
  22630. "enum": ["needs_auth"]
  22631. }
  22632. },
  22633. "required": ["status"],
  22634. "additionalProperties": false
  22635. },
  22636. "MCPStatusNeedsClientRegistration": {
  22637. "type": "object",
  22638. "properties": {
  22639. "status": {
  22640. "type": "string",
  22641. "enum": ["needs_client_registration"]
  22642. },
  22643. "error": {
  22644. "type": "string"
  22645. }
  22646. },
  22647. "required": ["status", "error"],
  22648. "additionalProperties": false
  22649. },
  22650. "MCPStatus": {
  22651. "anyOf": [
  22652. {
  22653. "$ref": "#/components/schemas/MCPStatusConnected"
  22654. },
  22655. {
  22656. "$ref": "#/components/schemas/MCPStatusDisabled"
  22657. },
  22658. {
  22659. "$ref": "#/components/schemas/MCPStatusFailed"
  22660. },
  22661. {
  22662. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22663. },
  22664. {
  22665. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22666. }
  22667. ]
  22668. },
  22669. "McpUnsupportedOAuthError": {
  22670. "type": "object",
  22671. "properties": {
  22672. "error": {
  22673. "type": "string"
  22674. }
  22675. },
  22676. "required": ["error"],
  22677. "additionalProperties": false
  22678. },
  22679. "McpServerNotFoundError": {
  22680. "type": "object",
  22681. "properties": {
  22682. "_tag": {
  22683. "type": "string",
  22684. "enum": ["McpServerNotFoundError"]
  22685. },
  22686. "name": {
  22687. "type": "string"
  22688. },
  22689. "message": {
  22690. "type": "string"
  22691. }
  22692. },
  22693. "required": ["_tag", "name", "message"],
  22694. "additionalProperties": false
  22695. },
  22696. "Project": {
  22697. "type": "object",
  22698. "properties": {
  22699. "id": {
  22700. "type": "string"
  22701. },
  22702. "worktree": {
  22703. "type": "string"
  22704. },
  22705. "vcs": {
  22706. "$ref": "#/components/schemas/ProjectVcs"
  22707. },
  22708. "name": {
  22709. "type": "string"
  22710. },
  22711. "icon": {
  22712. "$ref": "#/components/schemas/ProjectIcon"
  22713. },
  22714. "commands": {
  22715. "$ref": "#/components/schemas/ProjectCommands"
  22716. },
  22717. "time": {
  22718. "$ref": "#/components/schemas/ProjectTime"
  22719. },
  22720. "sandboxes": {
  22721. "type": "array",
  22722. "items": {
  22723. "type": "string"
  22724. }
  22725. }
  22726. },
  22727. "required": ["id", "worktree", "time", "sandboxes"],
  22728. "additionalProperties": false
  22729. },
  22730. "ProjectNotFoundError": {
  22731. "type": "object",
  22732. "properties": {
  22733. "_tag": {
  22734. "type": "string",
  22735. "enum": ["ProjectNotFoundError"]
  22736. },
  22737. "projectID": {
  22738. "type": "string"
  22739. },
  22740. "message": {
  22741. "type": "string"
  22742. }
  22743. },
  22744. "required": ["_tag", "projectID", "message"],
  22745. "additionalProperties": false
  22746. },
  22747. "PtyNotFoundError": {
  22748. "type": "object",
  22749. "properties": {
  22750. "_tag": {
  22751. "type": "string",
  22752. "enum": ["PtyNotFoundError"]
  22753. },
  22754. "ptyID": {
  22755. "type": "string"
  22756. },
  22757. "message": {
  22758. "type": "string"
  22759. }
  22760. },
  22761. "required": ["_tag", "ptyID", "message"],
  22762. "additionalProperties": false
  22763. },
  22764. "PtyForbiddenError": {
  22765. "type": "object",
  22766. "properties": {
  22767. "_tag": {
  22768. "type": "string",
  22769. "enum": ["PtyForbiddenError"]
  22770. },
  22771. "message": {
  22772. "type": "string"
  22773. }
  22774. },
  22775. "required": ["_tag", "message"],
  22776. "additionalProperties": false
  22777. },
  22778. "QuestionRequest": {
  22779. "type": "object",
  22780. "properties": {
  22781. "id": {
  22782. "type": "string",
  22783. "pattern": "^que"
  22784. },
  22785. "sessionID": {
  22786. "type": "string",
  22787. "pattern": "^ses"
  22788. },
  22789. "questions": {
  22790. "type": "array",
  22791. "items": {
  22792. "$ref": "#/components/schemas/QuestionInfo"
  22793. },
  22794. "description": "Questions to ask"
  22795. },
  22796. "tool": {
  22797. "$ref": "#/components/schemas/QuestionTool"
  22798. }
  22799. },
  22800. "required": ["id", "sessionID", "questions"],
  22801. "additionalProperties": false
  22802. },
  22803. "QuestionNotFoundError": {
  22804. "type": "object",
  22805. "properties": {
  22806. "_tag": {
  22807. "type": "string",
  22808. "enum": ["QuestionNotFoundError"]
  22809. },
  22810. "requestID": {
  22811. "type": "string"
  22812. },
  22813. "message": {
  22814. "type": "string"
  22815. }
  22816. },
  22817. "required": ["_tag", "requestID", "message"],
  22818. "additionalProperties": false
  22819. },
  22820. "PermissionRequest": {
  22821. "type": "object",
  22822. "properties": {
  22823. "id": {
  22824. "type": "string",
  22825. "pattern": "^per"
  22826. },
  22827. "sessionID": {
  22828. "type": "string",
  22829. "pattern": "^ses"
  22830. },
  22831. "permission": {
  22832. "type": "string"
  22833. },
  22834. "patterns": {
  22835. "type": "array",
  22836. "items": {
  22837. "type": "string"
  22838. }
  22839. },
  22840. "metadata": {
  22841. "type": "object"
  22842. },
  22843. "always": {
  22844. "type": "array",
  22845. "items": {
  22846. "type": "string"
  22847. }
  22848. },
  22849. "tool": {
  22850. "type": "object",
  22851. "properties": {
  22852. "messageID": {
  22853. "type": "string"
  22854. },
  22855. "callID": {
  22856. "type": "string"
  22857. }
  22858. },
  22859. "required": ["messageID", "callID"],
  22860. "additionalProperties": false
  22861. }
  22862. },
  22863. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22864. "additionalProperties": false
  22865. },
  22866. "PermissionNotFoundError": {
  22867. "type": "object",
  22868. "properties": {
  22869. "_tag": {
  22870. "type": "string",
  22871. "enum": ["PermissionNotFoundError"]
  22872. },
  22873. "requestID": {
  22874. "type": "string"
  22875. },
  22876. "message": {
  22877. "type": "string"
  22878. }
  22879. },
  22880. "required": ["_tag", "requestID", "message"],
  22881. "additionalProperties": false
  22882. },
  22883. "ProviderAuthMethod": {
  22884. "type": "object",
  22885. "properties": {
  22886. "type": {
  22887. "type": "string",
  22888. "enum": ["oauth", "api"]
  22889. },
  22890. "label": {
  22891. "type": "string"
  22892. },
  22893. "prompts": {
  22894. "type": "array",
  22895. "items": {
  22896. "anyOf": [
  22897. {
  22898. "type": "object",
  22899. "properties": {
  22900. "type": {
  22901. "type": "string",
  22902. "enum": ["text"]
  22903. },
  22904. "key": {
  22905. "type": "string"
  22906. },
  22907. "message": {
  22908. "type": "string"
  22909. },
  22910. "placeholder": {
  22911. "type": "string"
  22912. },
  22913. "when": {
  22914. "type": "object",
  22915. "properties": {
  22916. "key": {
  22917. "type": "string"
  22918. },
  22919. "op": {
  22920. "type": "string",
  22921. "enum": ["eq", "neq"]
  22922. },
  22923. "value": {
  22924. "type": "string"
  22925. }
  22926. },
  22927. "required": ["key", "op", "value"],
  22928. "additionalProperties": false
  22929. }
  22930. },
  22931. "required": ["type", "key", "message"],
  22932. "additionalProperties": false
  22933. },
  22934. {
  22935. "type": "object",
  22936. "properties": {
  22937. "type": {
  22938. "type": "string",
  22939. "enum": ["select"]
  22940. },
  22941. "key": {
  22942. "type": "string"
  22943. },
  22944. "message": {
  22945. "type": "string"
  22946. },
  22947. "options": {
  22948. "type": "array",
  22949. "items": {
  22950. "type": "object",
  22951. "properties": {
  22952. "label": {
  22953. "type": "string"
  22954. },
  22955. "value": {
  22956. "type": "string"
  22957. },
  22958. "hint": {
  22959. "type": "string"
  22960. }
  22961. },
  22962. "required": ["label", "value"],
  22963. "additionalProperties": false
  22964. }
  22965. },
  22966. "when": {
  22967. "type": "object",
  22968. "properties": {
  22969. "key": {
  22970. "type": "string"
  22971. },
  22972. "op": {
  22973. "type": "string",
  22974. "enum": ["eq", "neq"]
  22975. },
  22976. "value": {
  22977. "type": "string"
  22978. }
  22979. },
  22980. "required": ["key", "op", "value"],
  22981. "additionalProperties": false
  22982. }
  22983. },
  22984. "required": ["type", "key", "message", "options"],
  22985. "additionalProperties": false
  22986. }
  22987. ]
  22988. }
  22989. }
  22990. },
  22991. "required": ["type", "label"],
  22992. "additionalProperties": false
  22993. },
  22994. "ProviderAuthAuthorization": {
  22995. "type": "object",
  22996. "properties": {
  22997. "url": {
  22998. "type": "string"
  22999. },
  23000. "method": {
  23001. "type": "string",
  23002. "enum": ["auto", "code"]
  23003. },
  23004. "instructions": {
  23005. "type": "string"
  23006. }
  23007. },
  23008. "required": ["url", "method", "instructions"],
  23009. "additionalProperties": false
  23010. },
  23011. "ProviderAuthError1": {
  23012. "type": "object",
  23013. "properties": {
  23014. "name": {
  23015. "type": "string",
  23016. "enum": [
  23017. "BadRequest",
  23018. "ProviderAuthOauthMissing",
  23019. "ProviderAuthOauthCodeMissing",
  23020. "ProviderAuthOauthCallbackFailed",
  23021. "ProviderAuthValidationFailed"
  23022. ]
  23023. },
  23024. "data": {
  23025. "type": "object",
  23026. "properties": {
  23027. "providerID": {
  23028. "type": "string"
  23029. },
  23030. "field": {
  23031. "type": "string"
  23032. },
  23033. "message": {
  23034. "type": "string"
  23035. },
  23036. "kind": {
  23037. "type": "string"
  23038. }
  23039. },
  23040. "additionalProperties": false
  23041. }
  23042. },
  23043. "required": ["name", "data"],
  23044. "additionalProperties": false
  23045. },
  23046. "NotFoundError": {
  23047. "type": "object",
  23048. "required": ["name", "data"],
  23049. "properties": {
  23050. "name": {
  23051. "type": "string",
  23052. "enum": ["NotFoundError"]
  23053. },
  23054. "data": {
  23055. "type": "object",
  23056. "required": ["message"],
  23057. "properties": {
  23058. "message": {
  23059. "type": "string"
  23060. }
  23061. }
  23062. }
  23063. }
  23064. },
  23065. "TextPartInput": {
  23066. "type": "object",
  23067. "properties": {
  23068. "id": {
  23069. "type": "string",
  23070. "pattern": "^prt"
  23071. },
  23072. "type": {
  23073. "type": "string",
  23074. "enum": ["text"]
  23075. },
  23076. "text": {
  23077. "type": "string"
  23078. },
  23079. "synthetic": {
  23080. "type": "boolean"
  23081. },
  23082. "ignored": {
  23083. "type": "boolean"
  23084. },
  23085. "time": {
  23086. "type": "object",
  23087. "properties": {
  23088. "start": {
  23089. "type": "integer",
  23090. "minimum": 0
  23091. },
  23092. "end": {
  23093. "type": "integer",
  23094. "minimum": 0
  23095. }
  23096. },
  23097. "required": ["start"],
  23098. "additionalProperties": false
  23099. },
  23100. "metadata": {
  23101. "type": "object"
  23102. }
  23103. },
  23104. "required": ["type", "text"],
  23105. "additionalProperties": false
  23106. },
  23107. "FilePartInput": {
  23108. "type": "object",
  23109. "properties": {
  23110. "id": {
  23111. "type": "string",
  23112. "pattern": "^prt"
  23113. },
  23114. "type": {
  23115. "type": "string",
  23116. "enum": ["file"]
  23117. },
  23118. "mime": {
  23119. "type": "string"
  23120. },
  23121. "filename": {
  23122. "type": "string"
  23123. },
  23124. "url": {
  23125. "type": "string"
  23126. },
  23127. "source": {
  23128. "$ref": "#/components/schemas/FilePartSource"
  23129. }
  23130. },
  23131. "required": ["type", "mime", "url"],
  23132. "additionalProperties": false
  23133. },
  23134. "AgentPartInput": {
  23135. "type": "object",
  23136. "properties": {
  23137. "id": {
  23138. "type": "string",
  23139. "pattern": "^prt"
  23140. },
  23141. "type": {
  23142. "type": "string",
  23143. "enum": ["agent"]
  23144. },
  23145. "name": {
  23146. "type": "string"
  23147. },
  23148. "source": {
  23149. "type": "object",
  23150. "properties": {
  23151. "value": {
  23152. "type": "string"
  23153. },
  23154. "start": {
  23155. "type": "integer",
  23156. "minimum": 0
  23157. },
  23158. "end": {
  23159. "type": "integer",
  23160. "minimum": 0
  23161. }
  23162. },
  23163. "required": ["value", "start", "end"],
  23164. "additionalProperties": false
  23165. }
  23166. },
  23167. "required": ["type", "name"],
  23168. "additionalProperties": false
  23169. },
  23170. "SubtaskPartInput": {
  23171. "type": "object",
  23172. "properties": {
  23173. "id": {
  23174. "type": "string",
  23175. "pattern": "^prt"
  23176. },
  23177. "type": {
  23178. "type": "string",
  23179. "enum": ["subtask"]
  23180. },
  23181. "prompt": {
  23182. "type": "string"
  23183. },
  23184. "description": {
  23185. "type": "string"
  23186. },
  23187. "agent": {
  23188. "type": "string"
  23189. },
  23190. "model": {
  23191. "type": "object",
  23192. "properties": {
  23193. "providerID": {
  23194. "type": "string"
  23195. },
  23196. "modelID": {
  23197. "type": "string"
  23198. }
  23199. },
  23200. "required": ["providerID", "modelID"],
  23201. "additionalProperties": false
  23202. },
  23203. "command": {
  23204. "type": "string"
  23205. }
  23206. },
  23207. "required": ["type", "prompt", "description", "agent"],
  23208. "additionalProperties": false
  23209. },
  23210. "SessionBusyError": {
  23211. "type": "object",
  23212. "properties": {
  23213. "_tag": {
  23214. "type": "string",
  23215. "enum": ["SessionBusyError"]
  23216. },
  23217. "sessionID": {
  23218. "type": "string"
  23219. },
  23220. "message": {
  23221. "type": "string"
  23222. }
  23223. },
  23224. "required": ["_tag", "sessionID", "message"],
  23225. "additionalProperties": false
  23226. },
  23227. "EventTuiPromptAppend": {
  23228. "type": "object",
  23229. "properties": {
  23230. "type": {
  23231. "type": "string",
  23232. "enum": ["tui.prompt.append"]
  23233. },
  23234. "properties": {
  23235. "type": "object",
  23236. "properties": {
  23237. "text": {
  23238. "type": "string"
  23239. }
  23240. },
  23241. "required": ["text"],
  23242. "additionalProperties": false
  23243. }
  23244. },
  23245. "required": ["type", "properties"],
  23246. "additionalProperties": false
  23247. },
  23248. "EventTuiCommandExecute": {
  23249. "type": "object",
  23250. "properties": {
  23251. "type": {
  23252. "type": "string",
  23253. "enum": ["tui.command.execute"]
  23254. },
  23255. "properties": {
  23256. "type": "object",
  23257. "properties": {
  23258. "command": {
  23259. "anyOf": [
  23260. {
  23261. "type": "string",
  23262. "enum": [
  23263. "session.list",
  23264. "session.new",
  23265. "session.share",
  23266. "session.interrupt",
  23267. "session.compact",
  23268. "session.page.up",
  23269. "session.page.down",
  23270. "session.line.up",
  23271. "session.line.down",
  23272. "session.half.page.up",
  23273. "session.half.page.down",
  23274. "session.first",
  23275. "session.last",
  23276. "prompt.clear",
  23277. "prompt.submit",
  23278. "agent.cycle"
  23279. ]
  23280. },
  23281. {
  23282. "type": "string"
  23283. }
  23284. ]
  23285. }
  23286. },
  23287. "required": ["command"],
  23288. "additionalProperties": false
  23289. }
  23290. },
  23291. "required": ["type", "properties"],
  23292. "additionalProperties": false
  23293. },
  23294. "EventTuiToastShow": {
  23295. "type": "object",
  23296. "properties": {
  23297. "type": {
  23298. "type": "string",
  23299. "enum": ["tui.toast.show"]
  23300. },
  23301. "properties": {
  23302. "type": "object",
  23303. "properties": {
  23304. "title": {
  23305. "type": "string"
  23306. },
  23307. "message": {
  23308. "type": "string"
  23309. },
  23310. "variant": {
  23311. "type": "string",
  23312. "enum": ["info", "success", "warning", "error"]
  23313. },
  23314. "duration": {
  23315. "type": "integer",
  23316. "exclusiveMinimum": 0
  23317. }
  23318. },
  23319. "required": ["message", "variant"],
  23320. "additionalProperties": false
  23321. }
  23322. },
  23323. "required": ["type", "properties"],
  23324. "additionalProperties": false
  23325. },
  23326. "EventTuiSessionSelect": {
  23327. "type": "object",
  23328. "properties": {
  23329. "type": {
  23330. "type": "string",
  23331. "enum": ["tui.session.select"]
  23332. },
  23333. "properties": {
  23334. "type": "object",
  23335. "properties": {
  23336. "sessionID": {
  23337. "type": "string",
  23338. "pattern": "^ses",
  23339. "description": "Session ID to navigate to"
  23340. }
  23341. },
  23342. "required": ["sessionID"],
  23343. "additionalProperties": false
  23344. }
  23345. },
  23346. "required": ["type", "properties"],
  23347. "additionalProperties": false
  23348. },
  23349. "Workspace": {
  23350. "type": "object",
  23351. "properties": {
  23352. "id": {
  23353. "type": "string",
  23354. "pattern": "^wrk"
  23355. },
  23356. "type": {
  23357. "type": "string"
  23358. },
  23359. "name": {
  23360. "type": "string"
  23361. },
  23362. "branch": {
  23363. "anyOf": [
  23364. {
  23365. "type": "string"
  23366. },
  23367. {
  23368. "type": "null"
  23369. }
  23370. ]
  23371. },
  23372. "directory": {
  23373. "anyOf": [
  23374. {
  23375. "type": "string"
  23376. },
  23377. {
  23378. "type": "null"
  23379. }
  23380. ]
  23381. },
  23382. "extra": {
  23383. "anyOf": [
  23384. {},
  23385. {
  23386. "type": "null"
  23387. }
  23388. ]
  23389. },
  23390. "projectID": {
  23391. "type": "string"
  23392. },
  23393. "timeUsed": {
  23394. "anyOf": [
  23395. {
  23396. "type": "number"
  23397. },
  23398. {
  23399. "type": "string",
  23400. "enum": ["NaN"]
  23401. },
  23402. {
  23403. "type": "string",
  23404. "enum": ["Infinity"]
  23405. },
  23406. {
  23407. "type": "string",
  23408. "enum": ["-Infinity"]
  23409. },
  23410. {
  23411. "type": "string",
  23412. "enum": ["Infinity", "-Infinity", "NaN"]
  23413. }
  23414. ]
  23415. }
  23416. },
  23417. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23418. "additionalProperties": false
  23419. },
  23420. "WorkspaceCreateError": {
  23421. "type": "object",
  23422. "properties": {
  23423. "name": {
  23424. "type": "string",
  23425. "enum": ["WorkspaceCreateError"]
  23426. },
  23427. "data": {
  23428. "type": "object",
  23429. "properties": {
  23430. "message": {
  23431. "type": "string"
  23432. }
  23433. },
  23434. "required": ["message"],
  23435. "additionalProperties": false
  23436. }
  23437. },
  23438. "required": ["name", "data"],
  23439. "additionalProperties": false
  23440. },
  23441. "WorkspaceWarpError": {
  23442. "type": "object",
  23443. "properties": {
  23444. "name": {
  23445. "type": "string",
  23446. "enum": ["WorkspaceWarpError"]
  23447. },
  23448. "data": {
  23449. "type": "object",
  23450. "properties": {
  23451. "message": {
  23452. "type": "string"
  23453. }
  23454. },
  23455. "required": ["message"],
  23456. "additionalProperties": false
  23457. }
  23458. },
  23459. "required": ["name", "data"],
  23460. "additionalProperties": false
  23461. },
  23462. "UnauthorizedError": {
  23463. "type": "object",
  23464. "properties": {
  23465. "_tag": {
  23466. "type": "string",
  23467. "enum": ["UnauthorizedError"]
  23468. },
  23469. "message": {
  23470. "type": "string"
  23471. }
  23472. },
  23473. "required": ["_tag", "message"],
  23474. "additionalProperties": false
  23475. },
  23476. "SessionsResponse": {
  23477. "type": "object",
  23478. "properties": {
  23479. "data": {
  23480. "type": "array",
  23481. "items": {
  23482. "$ref": "#/components/schemas/SessionV2Info"
  23483. }
  23484. },
  23485. "cursor": {
  23486. "type": "object",
  23487. "properties": {
  23488. "previous": {
  23489. "type": "string"
  23490. },
  23491. "next": {
  23492. "type": "string"
  23493. }
  23494. },
  23495. "additionalProperties": false
  23496. }
  23497. },
  23498. "required": ["data", "cursor"],
  23499. "additionalProperties": false
  23500. },
  23501. "InvalidCursorError": {
  23502. "type": "object",
  23503. "properties": {
  23504. "_tag": {
  23505. "type": "string",
  23506. "enum": ["InvalidCursorError"]
  23507. },
  23508. "message": {
  23509. "type": "string"
  23510. }
  23511. },
  23512. "required": ["_tag", "message"],
  23513. "additionalProperties": false
  23514. },
  23515. "SessionActive": {
  23516. "type": "object",
  23517. "properties": {
  23518. "type": {
  23519. "type": "string",
  23520. "enum": ["running"]
  23521. }
  23522. },
  23523. "required": ["type"],
  23524. "additionalProperties": false
  23525. },
  23526. "SessionNotFoundError": {
  23527. "type": "object",
  23528. "properties": {
  23529. "_tag": {
  23530. "type": "string",
  23531. "enum": ["SessionNotFoundError"]
  23532. },
  23533. "sessionID": {
  23534. "type": "string"
  23535. },
  23536. "message": {
  23537. "type": "string"
  23538. }
  23539. },
  23540. "required": ["_tag", "sessionID", "message"],
  23541. "additionalProperties": false
  23542. },
  23543. "PromptInput": {
  23544. "type": "object",
  23545. "properties": {
  23546. "text": {
  23547. "type": "string"
  23548. },
  23549. "files": {
  23550. "type": "array",
  23551. "items": {
  23552. "$ref": "#/components/schemas/PromptInputFileAttachment"
  23553. }
  23554. },
  23555. "agents": {
  23556. "type": "array",
  23557. "items": {
  23558. "$ref": "#/components/schemas/PromptAgentAttachment"
  23559. }
  23560. }
  23561. },
  23562. "required": ["text"],
  23563. "additionalProperties": false
  23564. },
  23565. "ConflictError": {
  23566. "type": "object",
  23567. "properties": {
  23568. "_tag": {
  23569. "type": "string",
  23570. "enum": ["ConflictError"]
  23571. },
  23572. "message": {
  23573. "type": "string"
  23574. },
  23575. "resource": {
  23576. "type": "string"
  23577. }
  23578. },
  23579. "required": ["_tag", "message"],
  23580. "additionalProperties": false
  23581. },
  23582. "ServiceUnavailableError": {
  23583. "type": "object",
  23584. "properties": {
  23585. "_tag": {
  23586. "type": "string",
  23587. "enum": ["ServiceUnavailableError"]
  23588. },
  23589. "message": {
  23590. "type": "string"
  23591. },
  23592. "service": {
  23593. "type": "string"
  23594. }
  23595. },
  23596. "required": ["_tag", "message"],
  23597. "additionalProperties": false
  23598. },
  23599. "MessageNotFoundError": {
  23600. "type": "object",
  23601. "properties": {
  23602. "_tag": {
  23603. "type": "string",
  23604. "enum": ["MessageNotFoundError"]
  23605. },
  23606. "sessionID": {
  23607. "type": "string"
  23608. },
  23609. "messageID": {
  23610. "type": "string"
  23611. },
  23612. "message": {
  23613. "type": "string"
  23614. }
  23615. },
  23616. "required": ["_tag", "sessionID", "messageID", "message"],
  23617. "additionalProperties": false
  23618. },
  23619. "UnknownError1": {
  23620. "type": "object",
  23621. "properties": {
  23622. "_tag": {
  23623. "type": "string",
  23624. "enum": ["UnknownError"]
  23625. },
  23626. "message": {
  23627. "type": "string"
  23628. },
  23629. "ref": {
  23630. "type": "string"
  23631. }
  23632. },
  23633. "required": ["_tag", "message"],
  23634. "additionalProperties": false
  23635. },
  23636. "SessionDurableEvent": {
  23637. "oneOf": [
  23638. {
  23639. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23640. },
  23641. {
  23642. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23643. },
  23644. {
  23645. "$ref": "#/components/schemas/SessionNextMoved"
  23646. },
  23647. {
  23648. "$ref": "#/components/schemas/SessionNextPrompted"
  23649. },
  23650. {
  23651. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23652. },
  23653. {
  23654. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23655. },
  23656. {
  23657. "$ref": "#/components/schemas/SessionNextSynthetic"
  23658. },
  23659. {
  23660. "$ref": "#/components/schemas/SessionNextShellStarted"
  23661. },
  23662. {
  23663. "$ref": "#/components/schemas/SessionNextShellEnded"
  23664. },
  23665. {
  23666. "$ref": "#/components/schemas/SessionNextStepStarted"
  23667. },
  23668. {
  23669. "$ref": "#/components/schemas/SessionNextStepEnded"
  23670. },
  23671. {
  23672. "$ref": "#/components/schemas/SessionNextStepFailed"
  23673. },
  23674. {
  23675. "$ref": "#/components/schemas/SessionNextTextStarted"
  23676. },
  23677. {
  23678. "$ref": "#/components/schemas/SessionNextTextEnded"
  23679. },
  23680. {
  23681. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23682. },
  23683. {
  23684. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23685. },
  23686. {
  23687. "$ref": "#/components/schemas/SessionNextToolCalled"
  23688. },
  23689. {
  23690. "$ref": "#/components/schemas/SessionNextToolProgress"
  23691. },
  23692. {
  23693. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23694. },
  23695. {
  23696. "$ref": "#/components/schemas/SessionNextToolFailed"
  23697. },
  23698. {
  23699. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23700. },
  23701. {
  23702. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23703. },
  23704. {
  23705. "$ref": "#/components/schemas/SessionNextRetried"
  23706. },
  23707. {
  23708. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23709. },
  23710. {
  23711. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23712. },
  23713. {
  23714. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23715. },
  23716. {
  23717. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23718. },
  23719. {
  23720. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23721. }
  23722. ]
  23723. },
  23724. "SessionHistory": {
  23725. "type": "object",
  23726. "properties": {
  23727. "data": {
  23728. "type": "array",
  23729. "items": {
  23730. "$ref": "#/components/schemas/SessionDurableEvent"
  23731. }
  23732. },
  23733. "hasMore": {
  23734. "type": "boolean"
  23735. }
  23736. },
  23737. "required": ["data", "hasMore"],
  23738. "additionalProperties": false
  23739. },
  23740. "SessionDurableEventStream": {
  23741. "type": "string",
  23742. "contentSchema": {
  23743. "$ref": "#/components/schemas/SessionDurableEvent"
  23744. },
  23745. "contentMediaType": "application/json"
  23746. },
  23747. "SessionMessagesResponse": {
  23748. "type": "object",
  23749. "properties": {
  23750. "data": {
  23751. "type": "array",
  23752. "items": {
  23753. "$ref": "#/components/schemas/SessionMessage"
  23754. }
  23755. },
  23756. "cursor": {
  23757. "type": "object",
  23758. "properties": {
  23759. "previous": {
  23760. "type": "string"
  23761. },
  23762. "next": {
  23763. "type": "string"
  23764. }
  23765. },
  23766. "additionalProperties": false
  23767. }
  23768. },
  23769. "required": ["data", "cursor"],
  23770. "additionalProperties": false
  23771. },
  23772. "ProviderNotFoundError": {
  23773. "type": "object",
  23774. "properties": {
  23775. "_tag": {
  23776. "type": "string",
  23777. "enum": ["ProviderNotFoundError"]
  23778. },
  23779. "providerID": {
  23780. "type": "string"
  23781. },
  23782. "message": {
  23783. "type": "string"
  23784. }
  23785. },
  23786. "required": ["_tag", "providerID", "message"],
  23787. "additionalProperties": false
  23788. },
  23789. "OutputFormat1": {
  23790. "anyOf": [
  23791. {
  23792. "type": "object",
  23793. "properties": {
  23794. "type": {
  23795. "type": "string",
  23796. "enum": ["text"]
  23797. }
  23798. },
  23799. "required": ["type"],
  23800. "additionalProperties": false
  23801. },
  23802. {
  23803. "type": "object",
  23804. "properties": {
  23805. "type": {
  23806. "type": "string",
  23807. "enum": ["json_schema"]
  23808. },
  23809. "schema": {
  23810. "$ref": "#/components/schemas/JSONSchema"
  23811. },
  23812. "retryCount": {
  23813. "type": "integer",
  23814. "minimum": 0
  23815. }
  23816. },
  23817. "required": ["type", "schema"],
  23818. "additionalProperties": false
  23819. }
  23820. ]
  23821. },
  23822. "session.status": {
  23823. "type": "object",
  23824. "properties": {
  23825. "id": {
  23826. "type": "string",
  23827. "pattern": "^evt_"
  23828. },
  23829. "metadata": {
  23830. "type": "object"
  23831. },
  23832. "type": {
  23833. "type": "string",
  23834. "enum": ["session.status"]
  23835. },
  23836. "durable": {
  23837. "type": "object",
  23838. "properties": {
  23839. "aggregateID": {
  23840. "type": "string"
  23841. },
  23842. "seq": {
  23843. "type": "integer"
  23844. },
  23845. "version": {
  23846. "type": "integer"
  23847. }
  23848. },
  23849. "required": ["aggregateID", "seq", "version"],
  23850. "additionalProperties": false
  23851. },
  23852. "location": {
  23853. "$ref": "#/components/schemas/LocationRef"
  23854. },
  23855. "data": {
  23856. "type": "object",
  23857. "properties": {
  23858. "sessionID": {
  23859. "type": "string",
  23860. "pattern": "^ses"
  23861. },
  23862. "status": {
  23863. "$ref": "#/components/schemas/SessionStatus"
  23864. }
  23865. },
  23866. "required": ["sessionID", "status"],
  23867. "additionalProperties": false
  23868. }
  23869. },
  23870. "required": ["id", "type", "data"],
  23871. "additionalProperties": false
  23872. },
  23873. "question.replied": {
  23874. "type": "object",
  23875. "properties": {
  23876. "id": {
  23877. "type": "string",
  23878. "pattern": "^evt_"
  23879. },
  23880. "metadata": {
  23881. "type": "object"
  23882. },
  23883. "type": {
  23884. "type": "string",
  23885. "enum": ["question.replied"]
  23886. },
  23887. "durable": {
  23888. "type": "object",
  23889. "properties": {
  23890. "aggregateID": {
  23891. "type": "string"
  23892. },
  23893. "seq": {
  23894. "type": "integer"
  23895. },
  23896. "version": {
  23897. "type": "integer"
  23898. }
  23899. },
  23900. "required": ["aggregateID", "seq", "version"],
  23901. "additionalProperties": false
  23902. },
  23903. "location": {
  23904. "$ref": "#/components/schemas/LocationRef"
  23905. },
  23906. "data": {
  23907. "type": "object",
  23908. "properties": {
  23909. "sessionID": {
  23910. "type": "string",
  23911. "pattern": "^ses"
  23912. },
  23913. "requestID": {
  23914. "type": "string",
  23915. "pattern": "^que"
  23916. },
  23917. "answers": {
  23918. "type": "array",
  23919. "items": {
  23920. "$ref": "#/components/schemas/QuestionAnswer"
  23921. }
  23922. }
  23923. },
  23924. "required": ["sessionID", "requestID", "answers"],
  23925. "additionalProperties": false
  23926. }
  23927. },
  23928. "required": ["id", "type", "data"],
  23929. "additionalProperties": false
  23930. },
  23931. "question.rejected": {
  23932. "type": "object",
  23933. "properties": {
  23934. "id": {
  23935. "type": "string",
  23936. "pattern": "^evt_"
  23937. },
  23938. "metadata": {
  23939. "type": "object"
  23940. },
  23941. "type": {
  23942. "type": "string",
  23943. "enum": ["question.rejected"]
  23944. },
  23945. "durable": {
  23946. "type": "object",
  23947. "properties": {
  23948. "aggregateID": {
  23949. "type": "string"
  23950. },
  23951. "seq": {
  23952. "type": "integer"
  23953. },
  23954. "version": {
  23955. "type": "integer"
  23956. }
  23957. },
  23958. "required": ["aggregateID", "seq", "version"],
  23959. "additionalProperties": false
  23960. },
  23961. "location": {
  23962. "$ref": "#/components/schemas/LocationRef"
  23963. },
  23964. "data": {
  23965. "type": "object",
  23966. "properties": {
  23967. "sessionID": {
  23968. "type": "string",
  23969. "pattern": "^ses"
  23970. },
  23971. "requestID": {
  23972. "type": "string",
  23973. "pattern": "^que"
  23974. }
  23975. },
  23976. "required": ["sessionID", "requestID"],
  23977. "additionalProperties": false
  23978. }
  23979. },
  23980. "required": ["id", "type", "data"],
  23981. "additionalProperties": false
  23982. },
  23983. "V2Event": {
  23984. "anyOf": [
  23985. {
  23986. "$ref": "#/components/schemas/Models-devRefreshed"
  23987. },
  23988. {
  23989. "$ref": "#/components/schemas/IntegrationUpdated"
  23990. },
  23991. {
  23992. "$ref": "#/components/schemas/IntegrationConnectionUpdated"
  23993. },
  23994. {
  23995. "$ref": "#/components/schemas/CatalogUpdated"
  23996. },
  23997. {
  23998. "$ref": "#/components/schemas/SessionCreated"
  23999. },
  24000. {
  24001. "$ref": "#/components/schemas/SessionUpdated"
  24002. },
  24003. {
  24004. "$ref": "#/components/schemas/SessionDeleted"
  24005. },
  24006. {
  24007. "$ref": "#/components/schemas/MessageUpdated"
  24008. },
  24009. {
  24010. "$ref": "#/components/schemas/MessageRemoved"
  24011. },
  24012. {
  24013. "$ref": "#/components/schemas/MessagePartUpdated"
  24014. },
  24015. {
  24016. "$ref": "#/components/schemas/MessagePartRemoved"
  24017. },
  24018. {
  24019. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  24020. },
  24021. {
  24022. "$ref": "#/components/schemas/SessionNextModelSwitched"
  24023. },
  24024. {
  24025. "$ref": "#/components/schemas/SessionNextMoved"
  24026. },
  24027. {
  24028. "$ref": "#/components/schemas/SessionNextPrompted"
  24029. },
  24030. {
  24031. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  24032. },
  24033. {
  24034. "$ref": "#/components/schemas/SessionNextContextUpdated"
  24035. },
  24036. {
  24037. "$ref": "#/components/schemas/SessionNextSynthetic"
  24038. },
  24039. {
  24040. "$ref": "#/components/schemas/SessionNextShellStarted"
  24041. },
  24042. {
  24043. "$ref": "#/components/schemas/SessionNextShellEnded"
  24044. },
  24045. {
  24046. "$ref": "#/components/schemas/SessionNextStepStarted"
  24047. },
  24048. {
  24049. "$ref": "#/components/schemas/SessionNextStepEnded"
  24050. },
  24051. {
  24052. "$ref": "#/components/schemas/SessionNextStepFailed"
  24053. },
  24054. {
  24055. "$ref": "#/components/schemas/SessionNextTextStarted"
  24056. },
  24057. {
  24058. "$ref": "#/components/schemas/SessionNextTextDelta"
  24059. },
  24060. {
  24061. "$ref": "#/components/schemas/SessionNextTextEnded"
  24062. },
  24063. {
  24064. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  24065. },
  24066. {
  24067. "$ref": "#/components/schemas/SessionNextReasoningDelta"
  24068. },
  24069. {
  24070. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  24071. },
  24072. {
  24073. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  24074. },
  24075. {
  24076. "$ref": "#/components/schemas/SessionNextToolInputDelta"
  24077. },
  24078. {
  24079. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  24080. },
  24081. {
  24082. "$ref": "#/components/schemas/SessionNextToolCalled"
  24083. },
  24084. {
  24085. "$ref": "#/components/schemas/SessionNextToolProgress"
  24086. },
  24087. {
  24088. "$ref": "#/components/schemas/SessionNextToolSuccess"
  24089. },
  24090. {
  24091. "$ref": "#/components/schemas/SessionNextToolFailed"
  24092. },
  24093. {
  24094. "$ref": "#/components/schemas/SessionNextRetried"
  24095. },
  24096. {
  24097. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  24098. },
  24099. {
  24100. "$ref": "#/components/schemas/SessionNextCompactionDelta"
  24101. },
  24102. {
  24103. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  24104. },
  24105. {
  24106. "$ref": "#/components/schemas/SessionNextRevertStaged"
  24107. },
  24108. {
  24109. "$ref": "#/components/schemas/SessionNextRevertCleared"
  24110. },
  24111. {
  24112. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  24113. },
  24114. {
  24115. "$ref": "#/components/schemas/MessagePartDelta"
  24116. },
  24117. {
  24118. "$ref": "#/components/schemas/SessionDiff"
  24119. },
  24120. {
  24121. "$ref": "#/components/schemas/SessionError"
  24122. },
  24123. {
  24124. "$ref": "#/components/schemas/InstallationUpdated"
  24125. },
  24126. {
  24127. "$ref": "#/components/schemas/InstallationUpdate-available"
  24128. },
  24129. {
  24130. "$ref": "#/components/schemas/FileEdited"
  24131. },
  24132. {
  24133. "$ref": "#/components/schemas/ReferenceUpdated"
  24134. },
  24135. {
  24136. "$ref": "#/components/schemas/PermissionV2Asked"
  24137. },
  24138. {
  24139. "$ref": "#/components/schemas/PermissionV2Replied"
  24140. },
  24141. {
  24142. "$ref": "#/components/schemas/PluginAdded"
  24143. },
  24144. {
  24145. "$ref": "#/components/schemas/ProjectDirectoriesUpdated"
  24146. },
  24147. {
  24148. "$ref": "#/components/schemas/FileWatcherUpdated"
  24149. },
  24150. {
  24151. "$ref": "#/components/schemas/PtyCreated"
  24152. },
  24153. {
  24154. "$ref": "#/components/schemas/PtyUpdated"
  24155. },
  24156. {
  24157. "$ref": "#/components/schemas/PtyExited"
  24158. },
  24159. {
  24160. "$ref": "#/components/schemas/PtyDeleted"
  24161. },
  24162. {
  24163. "$ref": "#/components/schemas/QuestionV2Asked"
  24164. },
  24165. {
  24166. "$ref": "#/components/schemas/QuestionV2Replied"
  24167. },
  24168. {
  24169. "$ref": "#/components/schemas/QuestionV2Rejected"
  24170. },
  24171. {
  24172. "$ref": "#/components/schemas/TodoUpdated"
  24173. },
  24174. {
  24175. "$ref": "#/components/schemas/LspUpdated"
  24176. },
  24177. {
  24178. "$ref": "#/components/schemas/PermissionAsked"
  24179. },
  24180. {
  24181. "$ref": "#/components/schemas/PermissionReplied"
  24182. },
  24183. {
  24184. "$ref": "#/components/schemas/TuiPromptAppend"
  24185. },
  24186. {
  24187. "$ref": "#/components/schemas/TuiCommandExecute"
  24188. },
  24189. {
  24190. "$ref": "#/components/schemas/TuiToastShow"
  24191. },
  24192. {
  24193. "$ref": "#/components/schemas/TuiSessionSelect"
  24194. },
  24195. {
  24196. "$ref": "#/components/schemas/McpToolsChanged"
  24197. },
  24198. {
  24199. "$ref": "#/components/schemas/McpBrowserOpenFailed"
  24200. },
  24201. {
  24202. "$ref": "#/components/schemas/CommandExecuted"
  24203. },
  24204. {
  24205. "$ref": "#/components/schemas/ProjectUpdated"
  24206. },
  24207. {
  24208. "$ref": "#/components/schemas/session.status"
  24209. },
  24210. {
  24211. "$ref": "#/components/schemas/SessionIdle"
  24212. },
  24213. {
  24214. "$ref": "#/components/schemas/QuestionAsked"
  24215. },
  24216. {
  24217. "$ref": "#/components/schemas/question.replied"
  24218. },
  24219. {
  24220. "$ref": "#/components/schemas/question.rejected"
  24221. },
  24222. {
  24223. "$ref": "#/components/schemas/SessionCompacted"
  24224. },
  24225. {
  24226. "$ref": "#/components/schemas/VcsBranchUpdated"
  24227. },
  24228. {
  24229. "$ref": "#/components/schemas/WorkspaceReady"
  24230. },
  24231. {
  24232. "$ref": "#/components/schemas/WorkspaceFailed"
  24233. },
  24234. {
  24235. "$ref": "#/components/schemas/WorkspaceStatus"
  24236. },
  24237. {
  24238. "$ref": "#/components/schemas/WorktreeReady"
  24239. },
  24240. {
  24241. "$ref": "#/components/schemas/WorktreeFailed"
  24242. },
  24243. {
  24244. "$ref": "#/components/schemas/ServerConnected"
  24245. },
  24246. {
  24247. "$ref": "#/components/schemas/GlobalDisposed"
  24248. }
  24249. ]
  24250. },
  24251. "V2EventStream": {
  24252. "type": "string",
  24253. "contentSchema": {
  24254. "$ref": "#/components/schemas/V2Event"
  24255. },
  24256. "contentMediaType": "application/json"
  24257. },
  24258. "ForbiddenError": {
  24259. "type": "object",
  24260. "properties": {
  24261. "_tag": {
  24262. "type": "string",
  24263. "enum": ["ForbiddenError"]
  24264. },
  24265. "message": {
  24266. "type": "string"
  24267. }
  24268. },
  24269. "required": ["_tag", "message"],
  24270. "additionalProperties": false
  24271. },
  24272. "ProjectCopyError": {
  24273. "type": "object",
  24274. "properties": {
  24275. "name": {
  24276. "type": "string",
  24277. "enum": ["ProjectCopyError"]
  24278. },
  24279. "data": {
  24280. "type": "object",
  24281. "properties": {
  24282. "message": {
  24283. "type": "string"
  24284. },
  24285. "forceRequired": {
  24286. "type": "boolean"
  24287. }
  24288. },
  24289. "required": ["message"],
  24290. "additionalProperties": false
  24291. }
  24292. },
  24293. "required": ["name", "data"],
  24294. "additionalProperties": false
  24295. },
  24296. "effect_HttpApiError_Forbidden": {
  24297. "type": "object",
  24298. "properties": {
  24299. "_tag": {
  24300. "type": "string",
  24301. "enum": ["Forbidden"]
  24302. }
  24303. },
  24304. "required": ["_tag"],
  24305. "additionalProperties": false
  24306. },
  24307. "Event.tui.prompt.append": {
  24308. "type": "object",
  24309. "properties": {
  24310. "id": {
  24311. "type": "string",
  24312. "pattern": "^evt_"
  24313. },
  24314. "type": {
  24315. "type": "string",
  24316. "enum": ["tui.prompt.append"]
  24317. },
  24318. "properties": {
  24319. "type": "object",
  24320. "properties": {
  24321. "text": {
  24322. "type": "string"
  24323. }
  24324. },
  24325. "required": ["text"],
  24326. "additionalProperties": false
  24327. }
  24328. },
  24329. "required": ["id", "type", "properties"],
  24330. "additionalProperties": false
  24331. },
  24332. "Event.tui.command.execute": {
  24333. "type": "object",
  24334. "properties": {
  24335. "id": {
  24336. "type": "string",
  24337. "pattern": "^evt_"
  24338. },
  24339. "type": {
  24340. "type": "string",
  24341. "enum": ["tui.command.execute"]
  24342. },
  24343. "properties": {
  24344. "type": "object",
  24345. "properties": {
  24346. "command": {
  24347. "anyOf": [
  24348. {
  24349. "type": "string",
  24350. "enum": [
  24351. "session.list",
  24352. "session.new",
  24353. "session.share",
  24354. "session.interrupt",
  24355. "session.compact",
  24356. "session.page.up",
  24357. "session.page.down",
  24358. "session.line.up",
  24359. "session.line.down",
  24360. "session.half.page.up",
  24361. "session.half.page.down",
  24362. "session.first",
  24363. "session.last",
  24364. "prompt.clear",
  24365. "prompt.submit",
  24366. "agent.cycle"
  24367. ]
  24368. },
  24369. {
  24370. "type": "string"
  24371. }
  24372. ]
  24373. }
  24374. },
  24375. "required": ["command"],
  24376. "additionalProperties": false
  24377. }
  24378. },
  24379. "required": ["id", "type", "properties"],
  24380. "additionalProperties": false
  24381. },
  24382. "Event.tui.toast.show": {
  24383. "type": "object",
  24384. "properties": {
  24385. "id": {
  24386. "type": "string",
  24387. "pattern": "^evt_"
  24388. },
  24389. "type": {
  24390. "type": "string",
  24391. "enum": ["tui.toast.show"]
  24392. },
  24393. "properties": {
  24394. "type": "object",
  24395. "properties": {
  24396. "title": {
  24397. "type": "string"
  24398. },
  24399. "message": {
  24400. "type": "string"
  24401. },
  24402. "variant": {
  24403. "type": "string",
  24404. "enum": ["info", "success", "warning", "error"]
  24405. },
  24406. "duration": {
  24407. "type": "integer",
  24408. "exclusiveMinimum": 0
  24409. }
  24410. },
  24411. "required": ["message", "variant"],
  24412. "additionalProperties": false
  24413. }
  24414. },
  24415. "required": ["id", "type", "properties"],
  24416. "additionalProperties": false
  24417. },
  24418. "Event.tui.session.select": {
  24419. "type": "object",
  24420. "properties": {
  24421. "id": {
  24422. "type": "string",
  24423. "pattern": "^evt_"
  24424. },
  24425. "type": {
  24426. "type": "string",
  24427. "enum": ["tui.session.select"]
  24428. },
  24429. "properties": {
  24430. "type": "object",
  24431. "properties": {
  24432. "sessionID": {
  24433. "type": "string",
  24434. "pattern": "^ses",
  24435. "description": "Session ID to navigate to"
  24436. }
  24437. },
  24438. "required": ["sessionID"],
  24439. "additionalProperties": false
  24440. }
  24441. },
  24442. "required": ["id", "type", "properties"],
  24443. "additionalProperties": false
  24444. },
  24445. "CredentialValue": {
  24446. "anyOf": [
  24447. {
  24448. "$ref": "#/components/schemas/CredentialOAuth"
  24449. },
  24450. {
  24451. "$ref": "#/components/schemas/CredentialKey"
  24452. }
  24453. ]
  24454. },
  24455. "IntegrationInputs": {
  24456. "type": "object",
  24457. "additionalProperties": {
  24458. "type": "string"
  24459. }
  24460. },
  24461. "IntegrationMethod": {
  24462. "anyOf": [
  24463. {
  24464. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24465. },
  24466. {
  24467. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24468. },
  24469. {
  24470. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24471. }
  24472. ]
  24473. },
  24474. "IntegrationRef": {
  24475. "type": "object",
  24476. "properties": {
  24477. "id": {
  24478. "type": "string"
  24479. },
  24480. "name": {
  24481. "type": "string"
  24482. }
  24483. },
  24484. "required": ["id", "name"],
  24485. "additionalProperties": false
  24486. },
  24487. "SkillV2Source": {
  24488. "anyOf": [
  24489. {
  24490. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24491. },
  24492. {
  24493. "$ref": "#/components/schemas/SkillV2UrlSource"
  24494. },
  24495. {
  24496. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24497. }
  24498. ]
  24499. },
  24500. "MoveSessionDestination": {
  24501. "type": "object",
  24502. "properties": {
  24503. "directory": {
  24504. "type": "string"
  24505. }
  24506. },
  24507. "required": ["directory"],
  24508. "additionalProperties": false
  24509. },
  24510. "ModelRef": {
  24511. "type": "object",
  24512. "properties": {
  24513. "id": {
  24514. "type": "string"
  24515. },
  24516. "providerID": {
  24517. "type": "string"
  24518. },
  24519. "variant": {
  24520. "type": "string"
  24521. }
  24522. },
  24523. "required": ["id", "providerID"],
  24524. "additionalProperties": false
  24525. },
  24526. "LocationRef": {
  24527. "type": "object",
  24528. "properties": {
  24529. "directory": {
  24530. "type": "string"
  24531. },
  24532. "workspaceID": {
  24533. "type": "string",
  24534. "pattern": "^wrk"
  24535. }
  24536. },
  24537. "required": ["directory"],
  24538. "additionalProperties": false
  24539. },
  24540. "PromptSource": {
  24541. "type": "object",
  24542. "properties": {
  24543. "start": {
  24544. "type": "number"
  24545. },
  24546. "end": {
  24547. "type": "number"
  24548. },
  24549. "text": {
  24550. "type": "string"
  24551. }
  24552. },
  24553. "required": ["start", "end", "text"],
  24554. "additionalProperties": false
  24555. },
  24556. "PromptFileAttachment": {
  24557. "type": "object",
  24558. "properties": {
  24559. "uri": {
  24560. "type": "string"
  24561. },
  24562. "mime": {
  24563. "type": "string"
  24564. },
  24565. "name": {
  24566. "type": "string"
  24567. },
  24568. "description": {
  24569. "type": "string"
  24570. },
  24571. "source": {
  24572. "$ref": "#/components/schemas/PromptSource"
  24573. }
  24574. },
  24575. "required": ["uri", "mime"],
  24576. "additionalProperties": false
  24577. },
  24578. "PromptAgentAttachment": {
  24579. "type": "object",
  24580. "properties": {
  24581. "name": {
  24582. "type": "string"
  24583. },
  24584. "source": {
  24585. "$ref": "#/components/schemas/PromptSource"
  24586. }
  24587. },
  24588. "required": ["name"],
  24589. "additionalProperties": false
  24590. },
  24591. "SessionErrorUnknown": {
  24592. "type": "object",
  24593. "properties": {
  24594. "type": {
  24595. "type": "string",
  24596. "enum": ["unknown"]
  24597. },
  24598. "message": {
  24599. "type": "string"
  24600. }
  24601. },
  24602. "required": ["type", "message"],
  24603. "additionalProperties": false
  24604. },
  24605. "LLMProviderMetadata": {
  24606. "type": "object",
  24607. "additionalProperties": {
  24608. "type": "object"
  24609. }
  24610. },
  24611. "ToolTextContent": {
  24612. "type": "object",
  24613. "properties": {
  24614. "type": {
  24615. "type": "string",
  24616. "enum": ["text"]
  24617. },
  24618. "text": {
  24619. "type": "string"
  24620. }
  24621. },
  24622. "required": ["type", "text"],
  24623. "additionalProperties": false
  24624. },
  24625. "ToolFileContent": {
  24626. "type": "object",
  24627. "properties": {
  24628. "type": {
  24629. "type": "string",
  24630. "enum": ["file"]
  24631. },
  24632. "uri": {
  24633. "type": "string"
  24634. },
  24635. "mime": {
  24636. "type": "string"
  24637. },
  24638. "name": {
  24639. "type": "string"
  24640. }
  24641. },
  24642. "required": ["type", "uri", "mime"],
  24643. "additionalProperties": false
  24644. },
  24645. "LLMToolContent": {
  24646. "anyOf": [
  24647. {
  24648. "$ref": "#/components/schemas/ToolTextContent"
  24649. },
  24650. {
  24651. "$ref": "#/components/schemas/ToolFileContent"
  24652. }
  24653. ]
  24654. },
  24655. "SessionNextRetry_error": {
  24656. "type": "object",
  24657. "properties": {
  24658. "message": {
  24659. "type": "string"
  24660. },
  24661. "statusCode": {
  24662. "type": "number"
  24663. },
  24664. "isRetryable": {
  24665. "type": "boolean"
  24666. },
  24667. "responseHeaders": {
  24668. "type": "object",
  24669. "additionalProperties": {
  24670. "type": "string"
  24671. }
  24672. },
  24673. "responseBody": {
  24674. "type": "string"
  24675. },
  24676. "metadata": {
  24677. "type": "object",
  24678. "additionalProperties": {
  24679. "type": "string"
  24680. }
  24681. }
  24682. },
  24683. "required": ["message", "isRetryable"],
  24684. "additionalProperties": false
  24685. },
  24686. "FileDiff": {
  24687. "type": "object",
  24688. "properties": {
  24689. "path": {
  24690. "type": "string"
  24691. },
  24692. "status": {
  24693. "type": "string",
  24694. "enum": ["added", "modified", "deleted"]
  24695. },
  24696. "additions": {
  24697. "type": "integer",
  24698. "minimum": 0
  24699. },
  24700. "deletions": {
  24701. "type": "integer",
  24702. "minimum": 0
  24703. },
  24704. "patch": {
  24705. "type": "string"
  24706. }
  24707. },
  24708. "required": ["path", "status", "additions", "deletions", "patch"],
  24709. "additionalProperties": false
  24710. },
  24711. "RevertState": {
  24712. "type": "object",
  24713. "properties": {
  24714. "messageID": {
  24715. "type": "string",
  24716. "pattern": "^msg_"
  24717. },
  24718. "partID": {
  24719. "type": "string"
  24720. },
  24721. "snapshot": {
  24722. "type": "string"
  24723. },
  24724. "diff": {
  24725. "type": "string"
  24726. },
  24727. "files": {
  24728. "type": "array",
  24729. "items": {
  24730. "$ref": "#/components/schemas/FileDiff"
  24731. }
  24732. }
  24733. },
  24734. "required": ["messageID"],
  24735. "additionalProperties": false
  24736. },
  24737. "PermissionV2Source": {
  24738. "type": "object",
  24739. "properties": {
  24740. "type": {
  24741. "type": "string",
  24742. "enum": ["tool"]
  24743. },
  24744. "messageID": {
  24745. "type": "string"
  24746. },
  24747. "callID": {
  24748. "type": "string"
  24749. }
  24750. },
  24751. "required": ["type", "messageID", "callID"],
  24752. "additionalProperties": false
  24753. },
  24754. "PermissionV2Reply": {
  24755. "type": "string",
  24756. "enum": ["once", "always", "reject"]
  24757. },
  24758. "QuestionV2Option": {
  24759. "type": "object",
  24760. "properties": {
  24761. "label": {
  24762. "type": "string",
  24763. "description": "Display text (1-5 words, concise)"
  24764. },
  24765. "description": {
  24766. "type": "string",
  24767. "description": "Explanation of choice"
  24768. }
  24769. },
  24770. "required": ["label", "description"],
  24771. "additionalProperties": false
  24772. },
  24773. "QuestionV2Info": {
  24774. "type": "object",
  24775. "properties": {
  24776. "question": {
  24777. "type": "string",
  24778. "description": "Complete question"
  24779. },
  24780. "header": {
  24781. "type": "string",
  24782. "description": "Very short label (max 30 chars)"
  24783. },
  24784. "options": {
  24785. "type": "array",
  24786. "items": {
  24787. "$ref": "#/components/schemas/QuestionV2Option"
  24788. },
  24789. "description": "Available choices"
  24790. },
  24791. "multiple": {
  24792. "type": "boolean"
  24793. },
  24794. "custom": {
  24795. "type": "boolean"
  24796. }
  24797. },
  24798. "required": ["question", "header", "options"],
  24799. "additionalProperties": false
  24800. },
  24801. "QuestionV2Tool": {
  24802. "type": "object",
  24803. "properties": {
  24804. "messageID": {
  24805. "type": "string"
  24806. },
  24807. "callID": {
  24808. "type": "string"
  24809. }
  24810. },
  24811. "required": ["messageID", "callID"],
  24812. "additionalProperties": false
  24813. },
  24814. "QuestionV2Answer": {
  24815. "type": "array",
  24816. "items": {
  24817. "type": "string"
  24818. }
  24819. },
  24820. "ProjectVcs": {
  24821. "type": "string",
  24822. "enum": ["git"]
  24823. },
  24824. "ProjectIcon": {
  24825. "type": "object",
  24826. "properties": {
  24827. "url": {
  24828. "type": "string"
  24829. },
  24830. "override": {
  24831. "type": "string"
  24832. },
  24833. "color": {
  24834. "type": "string"
  24835. }
  24836. },
  24837. "additionalProperties": false
  24838. },
  24839. "ProjectCommands": {
  24840. "type": "object",
  24841. "properties": {
  24842. "start": {
  24843. "type": "string",
  24844. "description": "Startup script to run when creating a new workspace (worktree)"
  24845. }
  24846. },
  24847. "additionalProperties": false
  24848. },
  24849. "ProjectTime": {
  24850. "type": "object",
  24851. "properties": {
  24852. "created": {
  24853. "type": "integer",
  24854. "minimum": 0
  24855. },
  24856. "updated": {
  24857. "type": "integer",
  24858. "minimum": 0
  24859. },
  24860. "initialized": {
  24861. "type": "integer",
  24862. "minimum": 0
  24863. }
  24864. },
  24865. "required": ["created", "updated"],
  24866. "additionalProperties": false
  24867. },
  24868. "EventServerInstanceDisposed": {
  24869. "type": "object",
  24870. "properties": {
  24871. "id": {
  24872. "type": "string"
  24873. },
  24874. "type": {
  24875. "type": "string",
  24876. "enum": ["server.instance.disposed"]
  24877. },
  24878. "properties": {
  24879. "type": "object",
  24880. "properties": {
  24881. "directory": {
  24882. "type": "string"
  24883. }
  24884. },
  24885. "required": ["directory"],
  24886. "additionalProperties": false
  24887. }
  24888. },
  24889. "required": ["id", "type", "properties"],
  24890. "additionalProperties": false
  24891. },
  24892. "SyncEventSessionCreated": {
  24893. "type": "object",
  24894. "properties": {
  24895. "type": {
  24896. "type": "string",
  24897. "enum": ["sync"]
  24898. },
  24899. "id": {
  24900. "type": "string",
  24901. "pattern": "^evt_"
  24902. },
  24903. "syncEvent": {
  24904. "type": "object",
  24905. "properties": {
  24906. "type": {
  24907. "type": "string",
  24908. "enum": ["session.created.1"]
  24909. },
  24910. "id": {
  24911. "type": "string",
  24912. "pattern": "^evt_"
  24913. },
  24914. "seq": {
  24915. "type": "number"
  24916. },
  24917. "aggregateID": {
  24918. "type": "string"
  24919. },
  24920. "data": {
  24921. "type": "object",
  24922. "properties": {
  24923. "sessionID": {
  24924. "type": "string",
  24925. "pattern": "^ses"
  24926. },
  24927. "info": {
  24928. "$ref": "#/components/schemas/Session"
  24929. }
  24930. },
  24931. "required": ["sessionID", "info"],
  24932. "additionalProperties": false
  24933. }
  24934. },
  24935. "required": ["type", "id", "seq", "aggregateID", "data"],
  24936. "additionalProperties": false
  24937. }
  24938. },
  24939. "required": ["type", "id", "syncEvent"],
  24940. "additionalProperties": false
  24941. },
  24942. "SyncEventSessionUpdated": {
  24943. "type": "object",
  24944. "properties": {
  24945. "type": {
  24946. "type": "string",
  24947. "enum": ["sync"]
  24948. },
  24949. "id": {
  24950. "type": "string",
  24951. "pattern": "^evt_"
  24952. },
  24953. "syncEvent": {
  24954. "type": "object",
  24955. "properties": {
  24956. "type": {
  24957. "type": "string",
  24958. "enum": ["session.updated.1"]
  24959. },
  24960. "id": {
  24961. "type": "string",
  24962. "pattern": "^evt_"
  24963. },
  24964. "seq": {
  24965. "type": "number"
  24966. },
  24967. "aggregateID": {
  24968. "type": "string"
  24969. },
  24970. "data": {
  24971. "type": "object",
  24972. "properties": {
  24973. "sessionID": {
  24974. "type": "string",
  24975. "pattern": "^ses"
  24976. },
  24977. "info": {
  24978. "$ref": "#/components/schemas/Session"
  24979. }
  24980. },
  24981. "required": ["sessionID", "info"],
  24982. "additionalProperties": false
  24983. }
  24984. },
  24985. "required": ["type", "id", "seq", "aggregateID", "data"],
  24986. "additionalProperties": false
  24987. }
  24988. },
  24989. "required": ["type", "id", "syncEvent"],
  24990. "additionalProperties": false
  24991. },
  24992. "SyncEventSessionDeleted": {
  24993. "type": "object",
  24994. "properties": {
  24995. "type": {
  24996. "type": "string",
  24997. "enum": ["sync"]
  24998. },
  24999. "id": {
  25000. "type": "string",
  25001. "pattern": "^evt_"
  25002. },
  25003. "syncEvent": {
  25004. "type": "object",
  25005. "properties": {
  25006. "type": {
  25007. "type": "string",
  25008. "enum": ["session.deleted.1"]
  25009. },
  25010. "id": {
  25011. "type": "string",
  25012. "pattern": "^evt_"
  25013. },
  25014. "seq": {
  25015. "type": "number"
  25016. },
  25017. "aggregateID": {
  25018. "type": "string"
  25019. },
  25020. "data": {
  25021. "type": "object",
  25022. "properties": {
  25023. "sessionID": {
  25024. "type": "string",
  25025. "pattern": "^ses"
  25026. },
  25027. "info": {
  25028. "$ref": "#/components/schemas/Session"
  25029. }
  25030. },
  25031. "required": ["sessionID", "info"],
  25032. "additionalProperties": false
  25033. }
  25034. },
  25035. "required": ["type", "id", "seq", "aggregateID", "data"],
  25036. "additionalProperties": false
  25037. }
  25038. },
  25039. "required": ["type", "id", "syncEvent"],
  25040. "additionalProperties": false
  25041. },
  25042. "SyncEventMessageUpdated": {
  25043. "type": "object",
  25044. "properties": {
  25045. "type": {
  25046. "type": "string",
  25047. "enum": ["sync"]
  25048. },
  25049. "id": {
  25050. "type": "string",
  25051. "pattern": "^evt_"
  25052. },
  25053. "syncEvent": {
  25054. "type": "object",
  25055. "properties": {
  25056. "type": {
  25057. "type": "string",
  25058. "enum": ["message.updated.1"]
  25059. },
  25060. "id": {
  25061. "type": "string",
  25062. "pattern": "^evt_"
  25063. },
  25064. "seq": {
  25065. "type": "number"
  25066. },
  25067. "aggregateID": {
  25068. "type": "string"
  25069. },
  25070. "data": {
  25071. "type": "object",
  25072. "properties": {
  25073. "sessionID": {
  25074. "type": "string",
  25075. "pattern": "^ses"
  25076. },
  25077. "info": {
  25078. "$ref": "#/components/schemas/Message"
  25079. }
  25080. },
  25081. "required": ["sessionID", "info"],
  25082. "additionalProperties": false
  25083. }
  25084. },
  25085. "required": ["type", "id", "seq", "aggregateID", "data"],
  25086. "additionalProperties": false
  25087. }
  25088. },
  25089. "required": ["type", "id", "syncEvent"],
  25090. "additionalProperties": false
  25091. },
  25092. "SyncEventMessageRemoved": {
  25093. "type": "object",
  25094. "properties": {
  25095. "type": {
  25096. "type": "string",
  25097. "enum": ["sync"]
  25098. },
  25099. "id": {
  25100. "type": "string",
  25101. "pattern": "^evt_"
  25102. },
  25103. "syncEvent": {
  25104. "type": "object",
  25105. "properties": {
  25106. "type": {
  25107. "type": "string",
  25108. "enum": ["message.removed.1"]
  25109. },
  25110. "id": {
  25111. "type": "string",
  25112. "pattern": "^evt_"
  25113. },
  25114. "seq": {
  25115. "type": "number"
  25116. },
  25117. "aggregateID": {
  25118. "type": "string"
  25119. },
  25120. "data": {
  25121. "type": "object",
  25122. "properties": {
  25123. "sessionID": {
  25124. "type": "string",
  25125. "pattern": "^ses"
  25126. },
  25127. "messageID": {
  25128. "type": "string",
  25129. "pattern": "^msg"
  25130. }
  25131. },
  25132. "required": ["sessionID", "messageID"],
  25133. "additionalProperties": false
  25134. }
  25135. },
  25136. "required": ["type", "id", "seq", "aggregateID", "data"],
  25137. "additionalProperties": false
  25138. }
  25139. },
  25140. "required": ["type", "id", "syncEvent"],
  25141. "additionalProperties": false
  25142. },
  25143. "SyncEventMessagePartUpdated": {
  25144. "type": "object",
  25145. "properties": {
  25146. "type": {
  25147. "type": "string",
  25148. "enum": ["sync"]
  25149. },
  25150. "id": {
  25151. "type": "string",
  25152. "pattern": "^evt_"
  25153. },
  25154. "syncEvent": {
  25155. "type": "object",
  25156. "properties": {
  25157. "type": {
  25158. "type": "string",
  25159. "enum": ["message.part.updated.1"]
  25160. },
  25161. "id": {
  25162. "type": "string",
  25163. "pattern": "^evt_"
  25164. },
  25165. "seq": {
  25166. "type": "number"
  25167. },
  25168. "aggregateID": {
  25169. "type": "string"
  25170. },
  25171. "data": {
  25172. "type": "object",
  25173. "properties": {
  25174. "sessionID": {
  25175. "type": "string",
  25176. "pattern": "^ses"
  25177. },
  25178. "part": {
  25179. "$ref": "#/components/schemas/Part"
  25180. },
  25181. "time": {
  25182. "type": "number"
  25183. }
  25184. },
  25185. "required": ["sessionID", "part", "time"],
  25186. "additionalProperties": false
  25187. }
  25188. },
  25189. "required": ["type", "id", "seq", "aggregateID", "data"],
  25190. "additionalProperties": false
  25191. }
  25192. },
  25193. "required": ["type", "id", "syncEvent"],
  25194. "additionalProperties": false
  25195. },
  25196. "SyncEventMessagePartRemoved": {
  25197. "type": "object",
  25198. "properties": {
  25199. "type": {
  25200. "type": "string",
  25201. "enum": ["sync"]
  25202. },
  25203. "id": {
  25204. "type": "string",
  25205. "pattern": "^evt_"
  25206. },
  25207. "syncEvent": {
  25208. "type": "object",
  25209. "properties": {
  25210. "type": {
  25211. "type": "string",
  25212. "enum": ["message.part.removed.1"]
  25213. },
  25214. "id": {
  25215. "type": "string",
  25216. "pattern": "^evt_"
  25217. },
  25218. "seq": {
  25219. "type": "number"
  25220. },
  25221. "aggregateID": {
  25222. "type": "string"
  25223. },
  25224. "data": {
  25225. "type": "object",
  25226. "properties": {
  25227. "sessionID": {
  25228. "type": "string",
  25229. "pattern": "^ses"
  25230. },
  25231. "messageID": {
  25232. "type": "string",
  25233. "pattern": "^msg"
  25234. },
  25235. "partID": {
  25236. "type": "string",
  25237. "pattern": "^prt"
  25238. }
  25239. },
  25240. "required": ["sessionID", "messageID", "partID"],
  25241. "additionalProperties": false
  25242. }
  25243. },
  25244. "required": ["type", "id", "seq", "aggregateID", "data"],
  25245. "additionalProperties": false
  25246. }
  25247. },
  25248. "required": ["type", "id", "syncEvent"],
  25249. "additionalProperties": false
  25250. },
  25251. "SyncEventSessionNextAgentSwitched": {
  25252. "type": "object",
  25253. "properties": {
  25254. "type": {
  25255. "type": "string",
  25256. "enum": ["sync"]
  25257. },
  25258. "id": {
  25259. "type": "string",
  25260. "pattern": "^evt_"
  25261. },
  25262. "syncEvent": {
  25263. "type": "object",
  25264. "properties": {
  25265. "type": {
  25266. "type": "string",
  25267. "enum": ["session.next.agent.switched.1"]
  25268. },
  25269. "id": {
  25270. "type": "string",
  25271. "pattern": "^evt_"
  25272. },
  25273. "seq": {
  25274. "type": "number"
  25275. },
  25276. "aggregateID": {
  25277. "type": "string"
  25278. },
  25279. "data": {
  25280. "type": "object",
  25281. "properties": {
  25282. "timestamp": {
  25283. "type": "number"
  25284. },
  25285. "sessionID": {
  25286. "type": "string",
  25287. "pattern": "^ses"
  25288. },
  25289. "messageID": {
  25290. "type": "string",
  25291. "pattern": "^msg_"
  25292. },
  25293. "agent": {
  25294. "type": "string"
  25295. }
  25296. },
  25297. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25298. "additionalProperties": false
  25299. }
  25300. },
  25301. "required": ["type", "id", "seq", "aggregateID", "data"],
  25302. "additionalProperties": false
  25303. }
  25304. },
  25305. "required": ["type", "id", "syncEvent"],
  25306. "additionalProperties": false
  25307. },
  25308. "SyncEventSessionNextModelSwitched": {
  25309. "type": "object",
  25310. "properties": {
  25311. "type": {
  25312. "type": "string",
  25313. "enum": ["sync"]
  25314. },
  25315. "id": {
  25316. "type": "string",
  25317. "pattern": "^evt_"
  25318. },
  25319. "syncEvent": {
  25320. "type": "object",
  25321. "properties": {
  25322. "type": {
  25323. "type": "string",
  25324. "enum": ["session.next.model.switched.1"]
  25325. },
  25326. "id": {
  25327. "type": "string",
  25328. "pattern": "^evt_"
  25329. },
  25330. "seq": {
  25331. "type": "number"
  25332. },
  25333. "aggregateID": {
  25334. "type": "string"
  25335. },
  25336. "data": {
  25337. "type": "object",
  25338. "properties": {
  25339. "timestamp": {
  25340. "type": "number"
  25341. },
  25342. "sessionID": {
  25343. "type": "string",
  25344. "pattern": "^ses"
  25345. },
  25346. "messageID": {
  25347. "type": "string",
  25348. "pattern": "^msg_"
  25349. },
  25350. "model": {
  25351. "$ref": "#/components/schemas/ModelRef"
  25352. }
  25353. },
  25354. "required": ["timestamp", "sessionID", "messageID", "model"],
  25355. "additionalProperties": false
  25356. }
  25357. },
  25358. "required": ["type", "id", "seq", "aggregateID", "data"],
  25359. "additionalProperties": false
  25360. }
  25361. },
  25362. "required": ["type", "id", "syncEvent"],
  25363. "additionalProperties": false
  25364. },
  25365. "SyncEventSessionNextMoved": {
  25366. "type": "object",
  25367. "properties": {
  25368. "type": {
  25369. "type": "string",
  25370. "enum": ["sync"]
  25371. },
  25372. "id": {
  25373. "type": "string",
  25374. "pattern": "^evt_"
  25375. },
  25376. "syncEvent": {
  25377. "type": "object",
  25378. "properties": {
  25379. "type": {
  25380. "type": "string",
  25381. "enum": ["session.next.moved.1"]
  25382. },
  25383. "id": {
  25384. "type": "string",
  25385. "pattern": "^evt_"
  25386. },
  25387. "seq": {
  25388. "type": "number"
  25389. },
  25390. "aggregateID": {
  25391. "type": "string"
  25392. },
  25393. "data": {
  25394. "type": "object",
  25395. "properties": {
  25396. "timestamp": {
  25397. "type": "number"
  25398. },
  25399. "sessionID": {
  25400. "type": "string",
  25401. "pattern": "^ses"
  25402. },
  25403. "location": {
  25404. "$ref": "#/components/schemas/LocationRef"
  25405. },
  25406. "subdirectory": {
  25407. "type": "string"
  25408. }
  25409. },
  25410. "required": ["timestamp", "sessionID", "location"],
  25411. "additionalProperties": false
  25412. }
  25413. },
  25414. "required": ["type", "id", "seq", "aggregateID", "data"],
  25415. "additionalProperties": false
  25416. }
  25417. },
  25418. "required": ["type", "id", "syncEvent"],
  25419. "additionalProperties": false
  25420. },
  25421. "SyncEventSessionNextPrompted": {
  25422. "type": "object",
  25423. "properties": {
  25424. "type": {
  25425. "type": "string",
  25426. "enum": ["sync"]
  25427. },
  25428. "id": {
  25429. "type": "string",
  25430. "pattern": "^evt_"
  25431. },
  25432. "syncEvent": {
  25433. "type": "object",
  25434. "properties": {
  25435. "type": {
  25436. "type": "string",
  25437. "enum": ["session.next.prompted.1"]
  25438. },
  25439. "id": {
  25440. "type": "string",
  25441. "pattern": "^evt_"
  25442. },
  25443. "seq": {
  25444. "type": "number"
  25445. },
  25446. "aggregateID": {
  25447. "type": "string"
  25448. },
  25449. "data": {
  25450. "type": "object",
  25451. "properties": {
  25452. "timestamp": {
  25453. "type": "number"
  25454. },
  25455. "sessionID": {
  25456. "type": "string",
  25457. "pattern": "^ses"
  25458. },
  25459. "messageID": {
  25460. "type": "string",
  25461. "pattern": "^msg_"
  25462. },
  25463. "prompt": {
  25464. "$ref": "#/components/schemas/Prompt"
  25465. },
  25466. "delivery": {
  25467. "type": "string",
  25468. "enum": ["steer", "queue"]
  25469. }
  25470. },
  25471. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25472. "additionalProperties": false
  25473. }
  25474. },
  25475. "required": ["type", "id", "seq", "aggregateID", "data"],
  25476. "additionalProperties": false
  25477. }
  25478. },
  25479. "required": ["type", "id", "syncEvent"],
  25480. "additionalProperties": false
  25481. },
  25482. "SyncEventSessionNextPromptAdmitted": {
  25483. "type": "object",
  25484. "properties": {
  25485. "type": {
  25486. "type": "string",
  25487. "enum": ["sync"]
  25488. },
  25489. "id": {
  25490. "type": "string",
  25491. "pattern": "^evt_"
  25492. },
  25493. "syncEvent": {
  25494. "type": "object",
  25495. "properties": {
  25496. "type": {
  25497. "type": "string",
  25498. "enum": ["session.next.prompt.admitted.1"]
  25499. },
  25500. "id": {
  25501. "type": "string",
  25502. "pattern": "^evt_"
  25503. },
  25504. "seq": {
  25505. "type": "number"
  25506. },
  25507. "aggregateID": {
  25508. "type": "string"
  25509. },
  25510. "data": {
  25511. "type": "object",
  25512. "properties": {
  25513. "timestamp": {
  25514. "type": "number"
  25515. },
  25516. "sessionID": {
  25517. "type": "string",
  25518. "pattern": "^ses"
  25519. },
  25520. "messageID": {
  25521. "type": "string",
  25522. "pattern": "^msg_"
  25523. },
  25524. "prompt": {
  25525. "$ref": "#/components/schemas/Prompt"
  25526. },
  25527. "delivery": {
  25528. "type": "string",
  25529. "enum": ["steer", "queue"]
  25530. }
  25531. },
  25532. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25533. "additionalProperties": false
  25534. }
  25535. },
  25536. "required": ["type", "id", "seq", "aggregateID", "data"],
  25537. "additionalProperties": false
  25538. }
  25539. },
  25540. "required": ["type", "id", "syncEvent"],
  25541. "additionalProperties": false
  25542. },
  25543. "SyncEventSessionNextContextUpdated": {
  25544. "type": "object",
  25545. "properties": {
  25546. "type": {
  25547. "type": "string",
  25548. "enum": ["sync"]
  25549. },
  25550. "id": {
  25551. "type": "string",
  25552. "pattern": "^evt_"
  25553. },
  25554. "syncEvent": {
  25555. "type": "object",
  25556. "properties": {
  25557. "type": {
  25558. "type": "string",
  25559. "enum": ["session.next.context.updated.1"]
  25560. },
  25561. "id": {
  25562. "type": "string",
  25563. "pattern": "^evt_"
  25564. },
  25565. "seq": {
  25566. "type": "number"
  25567. },
  25568. "aggregateID": {
  25569. "type": "string"
  25570. },
  25571. "data": {
  25572. "type": "object",
  25573. "properties": {
  25574. "timestamp": {
  25575. "type": "number"
  25576. },
  25577. "sessionID": {
  25578. "type": "string",
  25579. "pattern": "^ses"
  25580. },
  25581. "messageID": {
  25582. "type": "string",
  25583. "pattern": "^msg_"
  25584. },
  25585. "text": {
  25586. "type": "string"
  25587. }
  25588. },
  25589. "required": ["timestamp", "sessionID", "messageID", "text"],
  25590. "additionalProperties": false
  25591. }
  25592. },
  25593. "required": ["type", "id", "seq", "aggregateID", "data"],
  25594. "additionalProperties": false
  25595. }
  25596. },
  25597. "required": ["type", "id", "syncEvent"],
  25598. "additionalProperties": false
  25599. },
  25600. "SyncEventSessionNextSynthetic": {
  25601. "type": "object",
  25602. "properties": {
  25603. "type": {
  25604. "type": "string",
  25605. "enum": ["sync"]
  25606. },
  25607. "id": {
  25608. "type": "string",
  25609. "pattern": "^evt_"
  25610. },
  25611. "syncEvent": {
  25612. "type": "object",
  25613. "properties": {
  25614. "type": {
  25615. "type": "string",
  25616. "enum": ["session.next.synthetic.1"]
  25617. },
  25618. "id": {
  25619. "type": "string",
  25620. "pattern": "^evt_"
  25621. },
  25622. "seq": {
  25623. "type": "number"
  25624. },
  25625. "aggregateID": {
  25626. "type": "string"
  25627. },
  25628. "data": {
  25629. "type": "object",
  25630. "properties": {
  25631. "timestamp": {
  25632. "type": "number"
  25633. },
  25634. "sessionID": {
  25635. "type": "string",
  25636. "pattern": "^ses"
  25637. },
  25638. "messageID": {
  25639. "type": "string",
  25640. "pattern": "^msg_"
  25641. },
  25642. "text": {
  25643. "type": "string"
  25644. }
  25645. },
  25646. "required": ["timestamp", "sessionID", "messageID", "text"],
  25647. "additionalProperties": false
  25648. }
  25649. },
  25650. "required": ["type", "id", "seq", "aggregateID", "data"],
  25651. "additionalProperties": false
  25652. }
  25653. },
  25654. "required": ["type", "id", "syncEvent"],
  25655. "additionalProperties": false
  25656. },
  25657. "SyncEventSessionNextShellStarted": {
  25658. "type": "object",
  25659. "properties": {
  25660. "type": {
  25661. "type": "string",
  25662. "enum": ["sync"]
  25663. },
  25664. "id": {
  25665. "type": "string",
  25666. "pattern": "^evt_"
  25667. },
  25668. "syncEvent": {
  25669. "type": "object",
  25670. "properties": {
  25671. "type": {
  25672. "type": "string",
  25673. "enum": ["session.next.shell.started.1"]
  25674. },
  25675. "id": {
  25676. "type": "string",
  25677. "pattern": "^evt_"
  25678. },
  25679. "seq": {
  25680. "type": "number"
  25681. },
  25682. "aggregateID": {
  25683. "type": "string"
  25684. },
  25685. "data": {
  25686. "type": "object",
  25687. "properties": {
  25688. "timestamp": {
  25689. "type": "number"
  25690. },
  25691. "sessionID": {
  25692. "type": "string",
  25693. "pattern": "^ses"
  25694. },
  25695. "messageID": {
  25696. "type": "string",
  25697. "pattern": "^msg_"
  25698. },
  25699. "callID": {
  25700. "type": "string"
  25701. },
  25702. "command": {
  25703. "type": "string"
  25704. }
  25705. },
  25706. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25707. "additionalProperties": false
  25708. }
  25709. },
  25710. "required": ["type", "id", "seq", "aggregateID", "data"],
  25711. "additionalProperties": false
  25712. }
  25713. },
  25714. "required": ["type", "id", "syncEvent"],
  25715. "additionalProperties": false
  25716. },
  25717. "SyncEventSessionNextShellEnded": {
  25718. "type": "object",
  25719. "properties": {
  25720. "type": {
  25721. "type": "string",
  25722. "enum": ["sync"]
  25723. },
  25724. "id": {
  25725. "type": "string",
  25726. "pattern": "^evt_"
  25727. },
  25728. "syncEvent": {
  25729. "type": "object",
  25730. "properties": {
  25731. "type": {
  25732. "type": "string",
  25733. "enum": ["session.next.shell.ended.1"]
  25734. },
  25735. "id": {
  25736. "type": "string",
  25737. "pattern": "^evt_"
  25738. },
  25739. "seq": {
  25740. "type": "number"
  25741. },
  25742. "aggregateID": {
  25743. "type": "string"
  25744. },
  25745. "data": {
  25746. "type": "object",
  25747. "properties": {
  25748. "timestamp": {
  25749. "type": "number"
  25750. },
  25751. "sessionID": {
  25752. "type": "string",
  25753. "pattern": "^ses"
  25754. },
  25755. "callID": {
  25756. "type": "string"
  25757. },
  25758. "output": {
  25759. "type": "string"
  25760. }
  25761. },
  25762. "required": ["timestamp", "sessionID", "callID", "output"],
  25763. "additionalProperties": false
  25764. }
  25765. },
  25766. "required": ["type", "id", "seq", "aggregateID", "data"],
  25767. "additionalProperties": false
  25768. }
  25769. },
  25770. "required": ["type", "id", "syncEvent"],
  25771. "additionalProperties": false
  25772. },
  25773. "SyncEventSessionNextStepStarted": {
  25774. "type": "object",
  25775. "properties": {
  25776. "type": {
  25777. "type": "string",
  25778. "enum": ["sync"]
  25779. },
  25780. "id": {
  25781. "type": "string",
  25782. "pattern": "^evt_"
  25783. },
  25784. "syncEvent": {
  25785. "type": "object",
  25786. "properties": {
  25787. "type": {
  25788. "type": "string",
  25789. "enum": ["session.next.step.started.1"]
  25790. },
  25791. "id": {
  25792. "type": "string",
  25793. "pattern": "^evt_"
  25794. },
  25795. "seq": {
  25796. "type": "number"
  25797. },
  25798. "aggregateID": {
  25799. "type": "string"
  25800. },
  25801. "data": {
  25802. "type": "object",
  25803. "properties": {
  25804. "timestamp": {
  25805. "type": "number"
  25806. },
  25807. "sessionID": {
  25808. "type": "string",
  25809. "pattern": "^ses"
  25810. },
  25811. "assistantMessageID": {
  25812. "type": "string",
  25813. "pattern": "^msg_"
  25814. },
  25815. "agent": {
  25816. "type": "string"
  25817. },
  25818. "model": {
  25819. "$ref": "#/components/schemas/ModelRef"
  25820. },
  25821. "snapshot": {
  25822. "type": "string"
  25823. }
  25824. },
  25825. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25826. "additionalProperties": false
  25827. }
  25828. },
  25829. "required": ["type", "id", "seq", "aggregateID", "data"],
  25830. "additionalProperties": false
  25831. }
  25832. },
  25833. "required": ["type", "id", "syncEvent"],
  25834. "additionalProperties": false
  25835. },
  25836. "SyncEventSessionNextStepEnded": {
  25837. "type": "object",
  25838. "properties": {
  25839. "type": {
  25840. "type": "string",
  25841. "enum": ["sync"]
  25842. },
  25843. "id": {
  25844. "type": "string",
  25845. "pattern": "^evt_"
  25846. },
  25847. "syncEvent": {
  25848. "type": "object",
  25849. "properties": {
  25850. "type": {
  25851. "type": "string",
  25852. "enum": ["session.next.step.ended.2"]
  25853. },
  25854. "id": {
  25855. "type": "string",
  25856. "pattern": "^evt_"
  25857. },
  25858. "seq": {
  25859. "type": "number"
  25860. },
  25861. "aggregateID": {
  25862. "type": "string"
  25863. },
  25864. "data": {
  25865. "type": "object",
  25866. "properties": {
  25867. "timestamp": {
  25868. "type": "number"
  25869. },
  25870. "sessionID": {
  25871. "type": "string",
  25872. "pattern": "^ses"
  25873. },
  25874. "assistantMessageID": {
  25875. "type": "string",
  25876. "pattern": "^msg_"
  25877. },
  25878. "finish": {
  25879. "type": "string"
  25880. },
  25881. "cost": {
  25882. "type": "number"
  25883. },
  25884. "tokens": {
  25885. "type": "object",
  25886. "properties": {
  25887. "input": {
  25888. "type": "number"
  25889. },
  25890. "output": {
  25891. "type": "number"
  25892. },
  25893. "reasoning": {
  25894. "type": "number"
  25895. },
  25896. "cache": {
  25897. "type": "object",
  25898. "properties": {
  25899. "read": {
  25900. "type": "number"
  25901. },
  25902. "write": {
  25903. "type": "number"
  25904. }
  25905. },
  25906. "required": ["read", "write"],
  25907. "additionalProperties": false
  25908. }
  25909. },
  25910. "required": ["input", "output", "reasoning", "cache"],
  25911. "additionalProperties": false
  25912. },
  25913. "snapshot": {
  25914. "type": "string"
  25915. },
  25916. "files": {
  25917. "type": "array",
  25918. "items": {
  25919. "type": "string"
  25920. }
  25921. }
  25922. },
  25923. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25924. "additionalProperties": false
  25925. }
  25926. },
  25927. "required": ["type", "id", "seq", "aggregateID", "data"],
  25928. "additionalProperties": false
  25929. }
  25930. },
  25931. "required": ["type", "id", "syncEvent"],
  25932. "additionalProperties": false
  25933. },
  25934. "SyncEventSessionNextStepFailed": {
  25935. "type": "object",
  25936. "properties": {
  25937. "type": {
  25938. "type": "string",
  25939. "enum": ["sync"]
  25940. },
  25941. "id": {
  25942. "type": "string",
  25943. "pattern": "^evt_"
  25944. },
  25945. "syncEvent": {
  25946. "type": "object",
  25947. "properties": {
  25948. "type": {
  25949. "type": "string",
  25950. "enum": ["session.next.step.failed.2"]
  25951. },
  25952. "id": {
  25953. "type": "string",
  25954. "pattern": "^evt_"
  25955. },
  25956. "seq": {
  25957. "type": "number"
  25958. },
  25959. "aggregateID": {
  25960. "type": "string"
  25961. },
  25962. "data": {
  25963. "type": "object",
  25964. "properties": {
  25965. "timestamp": {
  25966. "type": "number"
  25967. },
  25968. "sessionID": {
  25969. "type": "string",
  25970. "pattern": "^ses"
  25971. },
  25972. "assistantMessageID": {
  25973. "type": "string",
  25974. "pattern": "^msg_"
  25975. },
  25976. "error": {
  25977. "$ref": "#/components/schemas/SessionErrorUnknown"
  25978. }
  25979. },
  25980. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25981. "additionalProperties": false
  25982. }
  25983. },
  25984. "required": ["type", "id", "seq", "aggregateID", "data"],
  25985. "additionalProperties": false
  25986. }
  25987. },
  25988. "required": ["type", "id", "syncEvent"],
  25989. "additionalProperties": false
  25990. },
  25991. "SyncEventSessionNextTextStarted": {
  25992. "type": "object",
  25993. "properties": {
  25994. "type": {
  25995. "type": "string",
  25996. "enum": ["sync"]
  25997. },
  25998. "id": {
  25999. "type": "string",
  26000. "pattern": "^evt_"
  26001. },
  26002. "syncEvent": {
  26003. "type": "object",
  26004. "properties": {
  26005. "type": {
  26006. "type": "string",
  26007. "enum": ["session.next.text.started.1"]
  26008. },
  26009. "id": {
  26010. "type": "string",
  26011. "pattern": "^evt_"
  26012. },
  26013. "seq": {
  26014. "type": "number"
  26015. },
  26016. "aggregateID": {
  26017. "type": "string"
  26018. },
  26019. "data": {
  26020. "type": "object",
  26021. "properties": {
  26022. "timestamp": {
  26023. "type": "number"
  26024. },
  26025. "sessionID": {
  26026. "type": "string",
  26027. "pattern": "^ses"
  26028. },
  26029. "assistantMessageID": {
  26030. "type": "string",
  26031. "pattern": "^msg_"
  26032. },
  26033. "textID": {
  26034. "type": "string"
  26035. }
  26036. },
  26037. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26038. "additionalProperties": false
  26039. }
  26040. },
  26041. "required": ["type", "id", "seq", "aggregateID", "data"],
  26042. "additionalProperties": false
  26043. }
  26044. },
  26045. "required": ["type", "id", "syncEvent"],
  26046. "additionalProperties": false
  26047. },
  26048. "SyncEventSessionNextTextEnded": {
  26049. "type": "object",
  26050. "properties": {
  26051. "type": {
  26052. "type": "string",
  26053. "enum": ["sync"]
  26054. },
  26055. "id": {
  26056. "type": "string",
  26057. "pattern": "^evt_"
  26058. },
  26059. "syncEvent": {
  26060. "type": "object",
  26061. "properties": {
  26062. "type": {
  26063. "type": "string",
  26064. "enum": ["session.next.text.ended.1"]
  26065. },
  26066. "id": {
  26067. "type": "string",
  26068. "pattern": "^evt_"
  26069. },
  26070. "seq": {
  26071. "type": "number"
  26072. },
  26073. "aggregateID": {
  26074. "type": "string"
  26075. },
  26076. "data": {
  26077. "type": "object",
  26078. "properties": {
  26079. "timestamp": {
  26080. "type": "number"
  26081. },
  26082. "sessionID": {
  26083. "type": "string",
  26084. "pattern": "^ses"
  26085. },
  26086. "assistantMessageID": {
  26087. "type": "string",
  26088. "pattern": "^msg_"
  26089. },
  26090. "textID": {
  26091. "type": "string"
  26092. },
  26093. "text": {
  26094. "type": "string"
  26095. }
  26096. },
  26097. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26098. "additionalProperties": false
  26099. }
  26100. },
  26101. "required": ["type", "id", "seq", "aggregateID", "data"],
  26102. "additionalProperties": false
  26103. }
  26104. },
  26105. "required": ["type", "id", "syncEvent"],
  26106. "additionalProperties": false
  26107. },
  26108. "SyncEventSessionNextReasoningStarted": {
  26109. "type": "object",
  26110. "properties": {
  26111. "type": {
  26112. "type": "string",
  26113. "enum": ["sync"]
  26114. },
  26115. "id": {
  26116. "type": "string",
  26117. "pattern": "^evt_"
  26118. },
  26119. "syncEvent": {
  26120. "type": "object",
  26121. "properties": {
  26122. "type": {
  26123. "type": "string",
  26124. "enum": ["session.next.reasoning.started.1"]
  26125. },
  26126. "id": {
  26127. "type": "string",
  26128. "pattern": "^evt_"
  26129. },
  26130. "seq": {
  26131. "type": "number"
  26132. },
  26133. "aggregateID": {
  26134. "type": "string"
  26135. },
  26136. "data": {
  26137. "type": "object",
  26138. "properties": {
  26139. "timestamp": {
  26140. "type": "number"
  26141. },
  26142. "sessionID": {
  26143. "type": "string",
  26144. "pattern": "^ses"
  26145. },
  26146. "assistantMessageID": {
  26147. "type": "string",
  26148. "pattern": "^msg_"
  26149. },
  26150. "reasoningID": {
  26151. "type": "string"
  26152. },
  26153. "providerMetadata": {
  26154. "$ref": "#/components/schemas/LLMProviderMetadata"
  26155. }
  26156. },
  26157. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26158. "additionalProperties": false
  26159. }
  26160. },
  26161. "required": ["type", "id", "seq", "aggregateID", "data"],
  26162. "additionalProperties": false
  26163. }
  26164. },
  26165. "required": ["type", "id", "syncEvent"],
  26166. "additionalProperties": false
  26167. },
  26168. "SyncEventSessionNextReasoningEnded": {
  26169. "type": "object",
  26170. "properties": {
  26171. "type": {
  26172. "type": "string",
  26173. "enum": ["sync"]
  26174. },
  26175. "id": {
  26176. "type": "string",
  26177. "pattern": "^evt_"
  26178. },
  26179. "syncEvent": {
  26180. "type": "object",
  26181. "properties": {
  26182. "type": {
  26183. "type": "string",
  26184. "enum": ["session.next.reasoning.ended.1"]
  26185. },
  26186. "id": {
  26187. "type": "string",
  26188. "pattern": "^evt_"
  26189. },
  26190. "seq": {
  26191. "type": "number"
  26192. },
  26193. "aggregateID": {
  26194. "type": "string"
  26195. },
  26196. "data": {
  26197. "type": "object",
  26198. "properties": {
  26199. "timestamp": {
  26200. "type": "number"
  26201. },
  26202. "sessionID": {
  26203. "type": "string",
  26204. "pattern": "^ses"
  26205. },
  26206. "assistantMessageID": {
  26207. "type": "string",
  26208. "pattern": "^msg_"
  26209. },
  26210. "reasoningID": {
  26211. "type": "string"
  26212. },
  26213. "text": {
  26214. "type": "string"
  26215. },
  26216. "providerMetadata": {
  26217. "$ref": "#/components/schemas/LLMProviderMetadata"
  26218. }
  26219. },
  26220. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26221. "additionalProperties": false
  26222. }
  26223. },
  26224. "required": ["type", "id", "seq", "aggregateID", "data"],
  26225. "additionalProperties": false
  26226. }
  26227. },
  26228. "required": ["type", "id", "syncEvent"],
  26229. "additionalProperties": false
  26230. },
  26231. "SyncEventSessionNextToolInputStarted": {
  26232. "type": "object",
  26233. "properties": {
  26234. "type": {
  26235. "type": "string",
  26236. "enum": ["sync"]
  26237. },
  26238. "id": {
  26239. "type": "string",
  26240. "pattern": "^evt_"
  26241. },
  26242. "syncEvent": {
  26243. "type": "object",
  26244. "properties": {
  26245. "type": {
  26246. "type": "string",
  26247. "enum": ["session.next.tool.input.started.1"]
  26248. },
  26249. "id": {
  26250. "type": "string",
  26251. "pattern": "^evt_"
  26252. },
  26253. "seq": {
  26254. "type": "number"
  26255. },
  26256. "aggregateID": {
  26257. "type": "string"
  26258. },
  26259. "data": {
  26260. "type": "object",
  26261. "properties": {
  26262. "timestamp": {
  26263. "type": "number"
  26264. },
  26265. "sessionID": {
  26266. "type": "string",
  26267. "pattern": "^ses"
  26268. },
  26269. "assistantMessageID": {
  26270. "type": "string",
  26271. "pattern": "^msg_"
  26272. },
  26273. "callID": {
  26274. "type": "string"
  26275. },
  26276. "name": {
  26277. "type": "string"
  26278. }
  26279. },
  26280. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26281. "additionalProperties": false
  26282. }
  26283. },
  26284. "required": ["type", "id", "seq", "aggregateID", "data"],
  26285. "additionalProperties": false
  26286. }
  26287. },
  26288. "required": ["type", "id", "syncEvent"],
  26289. "additionalProperties": false
  26290. },
  26291. "SyncEventSessionNextToolInputEnded": {
  26292. "type": "object",
  26293. "properties": {
  26294. "type": {
  26295. "type": "string",
  26296. "enum": ["sync"]
  26297. },
  26298. "id": {
  26299. "type": "string",
  26300. "pattern": "^evt_"
  26301. },
  26302. "syncEvent": {
  26303. "type": "object",
  26304. "properties": {
  26305. "type": {
  26306. "type": "string",
  26307. "enum": ["session.next.tool.input.ended.1"]
  26308. },
  26309. "id": {
  26310. "type": "string",
  26311. "pattern": "^evt_"
  26312. },
  26313. "seq": {
  26314. "type": "number"
  26315. },
  26316. "aggregateID": {
  26317. "type": "string"
  26318. },
  26319. "data": {
  26320. "type": "object",
  26321. "properties": {
  26322. "timestamp": {
  26323. "type": "number"
  26324. },
  26325. "sessionID": {
  26326. "type": "string",
  26327. "pattern": "^ses"
  26328. },
  26329. "assistantMessageID": {
  26330. "type": "string",
  26331. "pattern": "^msg_"
  26332. },
  26333. "callID": {
  26334. "type": "string"
  26335. },
  26336. "text": {
  26337. "type": "string"
  26338. }
  26339. },
  26340. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26341. "additionalProperties": false
  26342. }
  26343. },
  26344. "required": ["type", "id", "seq", "aggregateID", "data"],
  26345. "additionalProperties": false
  26346. }
  26347. },
  26348. "required": ["type", "id", "syncEvent"],
  26349. "additionalProperties": false
  26350. },
  26351. "SyncEventSessionNextToolCalled": {
  26352. "type": "object",
  26353. "properties": {
  26354. "type": {
  26355. "type": "string",
  26356. "enum": ["sync"]
  26357. },
  26358. "id": {
  26359. "type": "string",
  26360. "pattern": "^evt_"
  26361. },
  26362. "syncEvent": {
  26363. "type": "object",
  26364. "properties": {
  26365. "type": {
  26366. "type": "string",
  26367. "enum": ["session.next.tool.called.1"]
  26368. },
  26369. "id": {
  26370. "type": "string",
  26371. "pattern": "^evt_"
  26372. },
  26373. "seq": {
  26374. "type": "number"
  26375. },
  26376. "aggregateID": {
  26377. "type": "string"
  26378. },
  26379. "data": {
  26380. "type": "object",
  26381. "properties": {
  26382. "timestamp": {
  26383. "type": "number"
  26384. },
  26385. "sessionID": {
  26386. "type": "string",
  26387. "pattern": "^ses"
  26388. },
  26389. "assistantMessageID": {
  26390. "type": "string",
  26391. "pattern": "^msg_"
  26392. },
  26393. "callID": {
  26394. "type": "string"
  26395. },
  26396. "tool": {
  26397. "type": "string"
  26398. },
  26399. "input": {
  26400. "type": "object"
  26401. },
  26402. "provider": {
  26403. "type": "object",
  26404. "properties": {
  26405. "executed": {
  26406. "type": "boolean"
  26407. },
  26408. "metadata": {
  26409. "$ref": "#/components/schemas/LLMProviderMetadata"
  26410. }
  26411. },
  26412. "required": ["executed"],
  26413. "additionalProperties": false
  26414. }
  26415. },
  26416. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26417. "additionalProperties": false
  26418. }
  26419. },
  26420. "required": ["type", "id", "seq", "aggregateID", "data"],
  26421. "additionalProperties": false
  26422. }
  26423. },
  26424. "required": ["type", "id", "syncEvent"],
  26425. "additionalProperties": false
  26426. },
  26427. "SyncEventSessionNextToolProgress": {
  26428. "type": "object",
  26429. "properties": {
  26430. "type": {
  26431. "type": "string",
  26432. "enum": ["sync"]
  26433. },
  26434. "id": {
  26435. "type": "string",
  26436. "pattern": "^evt_"
  26437. },
  26438. "syncEvent": {
  26439. "type": "object",
  26440. "properties": {
  26441. "type": {
  26442. "type": "string",
  26443. "enum": ["session.next.tool.progress.1"]
  26444. },
  26445. "id": {
  26446. "type": "string",
  26447. "pattern": "^evt_"
  26448. },
  26449. "seq": {
  26450. "type": "number"
  26451. },
  26452. "aggregateID": {
  26453. "type": "string"
  26454. },
  26455. "data": {
  26456. "type": "object",
  26457. "properties": {
  26458. "timestamp": {
  26459. "type": "number"
  26460. },
  26461. "sessionID": {
  26462. "type": "string",
  26463. "pattern": "^ses"
  26464. },
  26465. "assistantMessageID": {
  26466. "type": "string",
  26467. "pattern": "^msg_"
  26468. },
  26469. "callID": {
  26470. "type": "string"
  26471. },
  26472. "structured": {
  26473. "type": "object"
  26474. },
  26475. "content": {
  26476. "type": "array",
  26477. "items": {
  26478. "$ref": "#/components/schemas/LLMToolContent"
  26479. }
  26480. }
  26481. },
  26482. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26483. "additionalProperties": false
  26484. }
  26485. },
  26486. "required": ["type", "id", "seq", "aggregateID", "data"],
  26487. "additionalProperties": false
  26488. }
  26489. },
  26490. "required": ["type", "id", "syncEvent"],
  26491. "additionalProperties": false
  26492. },
  26493. "SyncEventSessionNextToolSuccess": {
  26494. "type": "object",
  26495. "properties": {
  26496. "type": {
  26497. "type": "string",
  26498. "enum": ["sync"]
  26499. },
  26500. "id": {
  26501. "type": "string",
  26502. "pattern": "^evt_"
  26503. },
  26504. "syncEvent": {
  26505. "type": "object",
  26506. "properties": {
  26507. "type": {
  26508. "type": "string",
  26509. "enum": ["session.next.tool.success.1"]
  26510. },
  26511. "id": {
  26512. "type": "string",
  26513. "pattern": "^evt_"
  26514. },
  26515. "seq": {
  26516. "type": "number"
  26517. },
  26518. "aggregateID": {
  26519. "type": "string"
  26520. },
  26521. "data": {
  26522. "type": "object",
  26523. "properties": {
  26524. "timestamp": {
  26525. "type": "number"
  26526. },
  26527. "sessionID": {
  26528. "type": "string",
  26529. "pattern": "^ses"
  26530. },
  26531. "assistantMessageID": {
  26532. "type": "string",
  26533. "pattern": "^msg_"
  26534. },
  26535. "callID": {
  26536. "type": "string"
  26537. },
  26538. "structured": {
  26539. "type": "object"
  26540. },
  26541. "content": {
  26542. "type": "array",
  26543. "items": {
  26544. "$ref": "#/components/schemas/LLMToolContent"
  26545. }
  26546. },
  26547. "outputPaths": {
  26548. "type": "array",
  26549. "items": {
  26550. "type": "string"
  26551. }
  26552. },
  26553. "result": {},
  26554. "provider": {
  26555. "type": "object",
  26556. "properties": {
  26557. "executed": {
  26558. "type": "boolean"
  26559. },
  26560. "metadata": {
  26561. "$ref": "#/components/schemas/LLMProviderMetadata"
  26562. }
  26563. },
  26564. "required": ["executed"],
  26565. "additionalProperties": false
  26566. }
  26567. },
  26568. "required": [
  26569. "timestamp",
  26570. "sessionID",
  26571. "assistantMessageID",
  26572. "callID",
  26573. "structured",
  26574. "content",
  26575. "provider"
  26576. ],
  26577. "additionalProperties": false
  26578. }
  26579. },
  26580. "required": ["type", "id", "seq", "aggregateID", "data"],
  26581. "additionalProperties": false
  26582. }
  26583. },
  26584. "required": ["type", "id", "syncEvent"],
  26585. "additionalProperties": false
  26586. },
  26587. "SyncEventSessionNextToolFailed": {
  26588. "type": "object",
  26589. "properties": {
  26590. "type": {
  26591. "type": "string",
  26592. "enum": ["sync"]
  26593. },
  26594. "id": {
  26595. "type": "string",
  26596. "pattern": "^evt_"
  26597. },
  26598. "syncEvent": {
  26599. "type": "object",
  26600. "properties": {
  26601. "type": {
  26602. "type": "string",
  26603. "enum": ["session.next.tool.failed.1"]
  26604. },
  26605. "id": {
  26606. "type": "string",
  26607. "pattern": "^evt_"
  26608. },
  26609. "seq": {
  26610. "type": "number"
  26611. },
  26612. "aggregateID": {
  26613. "type": "string"
  26614. },
  26615. "data": {
  26616. "type": "object",
  26617. "properties": {
  26618. "timestamp": {
  26619. "type": "number"
  26620. },
  26621. "sessionID": {
  26622. "type": "string",
  26623. "pattern": "^ses"
  26624. },
  26625. "assistantMessageID": {
  26626. "type": "string",
  26627. "pattern": "^msg_"
  26628. },
  26629. "callID": {
  26630. "type": "string"
  26631. },
  26632. "error": {
  26633. "$ref": "#/components/schemas/SessionErrorUnknown"
  26634. },
  26635. "result": {},
  26636. "provider": {
  26637. "type": "object",
  26638. "properties": {
  26639. "executed": {
  26640. "type": "boolean"
  26641. },
  26642. "metadata": {
  26643. "$ref": "#/components/schemas/LLMProviderMetadata"
  26644. }
  26645. },
  26646. "required": ["executed"],
  26647. "additionalProperties": false
  26648. }
  26649. },
  26650. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26651. "additionalProperties": false
  26652. }
  26653. },
  26654. "required": ["type", "id", "seq", "aggregateID", "data"],
  26655. "additionalProperties": false
  26656. }
  26657. },
  26658. "required": ["type", "id", "syncEvent"],
  26659. "additionalProperties": false
  26660. },
  26661. "SyncEventSessionNextRetried": {
  26662. "type": "object",
  26663. "properties": {
  26664. "type": {
  26665. "type": "string",
  26666. "enum": ["sync"]
  26667. },
  26668. "id": {
  26669. "type": "string",
  26670. "pattern": "^evt_"
  26671. },
  26672. "syncEvent": {
  26673. "type": "object",
  26674. "properties": {
  26675. "type": {
  26676. "type": "string",
  26677. "enum": ["session.next.retried.1"]
  26678. },
  26679. "id": {
  26680. "type": "string",
  26681. "pattern": "^evt_"
  26682. },
  26683. "seq": {
  26684. "type": "number"
  26685. },
  26686. "aggregateID": {
  26687. "type": "string"
  26688. },
  26689. "data": {
  26690. "type": "object",
  26691. "properties": {
  26692. "timestamp": {
  26693. "type": "number"
  26694. },
  26695. "sessionID": {
  26696. "type": "string",
  26697. "pattern": "^ses"
  26698. },
  26699. "attempt": {
  26700. "type": "number"
  26701. },
  26702. "error": {
  26703. "$ref": "#/components/schemas/SessionNextRetry_error"
  26704. }
  26705. },
  26706. "required": ["timestamp", "sessionID", "attempt", "error"],
  26707. "additionalProperties": false
  26708. }
  26709. },
  26710. "required": ["type", "id", "seq", "aggregateID", "data"],
  26711. "additionalProperties": false
  26712. }
  26713. },
  26714. "required": ["type", "id", "syncEvent"],
  26715. "additionalProperties": false
  26716. },
  26717. "SyncEventSessionNextCompactionStarted": {
  26718. "type": "object",
  26719. "properties": {
  26720. "type": {
  26721. "type": "string",
  26722. "enum": ["sync"]
  26723. },
  26724. "id": {
  26725. "type": "string",
  26726. "pattern": "^evt_"
  26727. },
  26728. "syncEvent": {
  26729. "type": "object",
  26730. "properties": {
  26731. "type": {
  26732. "type": "string",
  26733. "enum": ["session.next.compaction.started.1"]
  26734. },
  26735. "id": {
  26736. "type": "string",
  26737. "pattern": "^evt_"
  26738. },
  26739. "seq": {
  26740. "type": "number"
  26741. },
  26742. "aggregateID": {
  26743. "type": "string"
  26744. },
  26745. "data": {
  26746. "type": "object",
  26747. "properties": {
  26748. "timestamp": {
  26749. "type": "number"
  26750. },
  26751. "sessionID": {
  26752. "type": "string",
  26753. "pattern": "^ses"
  26754. },
  26755. "messageID": {
  26756. "type": "string",
  26757. "pattern": "^msg_"
  26758. },
  26759. "reason": {
  26760. "type": "string",
  26761. "enum": ["auto", "manual"]
  26762. }
  26763. },
  26764. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26765. "additionalProperties": false
  26766. }
  26767. },
  26768. "required": ["type", "id", "seq", "aggregateID", "data"],
  26769. "additionalProperties": false
  26770. }
  26771. },
  26772. "required": ["type", "id", "syncEvent"],
  26773. "additionalProperties": false
  26774. },
  26775. "SyncEventSessionNextCompactionEnded": {
  26776. "type": "object",
  26777. "properties": {
  26778. "type": {
  26779. "type": "string",
  26780. "enum": ["sync"]
  26781. },
  26782. "id": {
  26783. "type": "string",
  26784. "pattern": "^evt_"
  26785. },
  26786. "syncEvent": {
  26787. "type": "object",
  26788. "properties": {
  26789. "type": {
  26790. "type": "string",
  26791. "enum": ["session.next.compaction.ended.1"]
  26792. },
  26793. "id": {
  26794. "type": "string",
  26795. "pattern": "^evt_"
  26796. },
  26797. "seq": {
  26798. "type": "number"
  26799. },
  26800. "aggregateID": {
  26801. "type": "string"
  26802. },
  26803. "data": {
  26804. "type": "object",
  26805. "properties": {
  26806. "timestamp": {
  26807. "type": "number"
  26808. },
  26809. "sessionID": {
  26810. "type": "string",
  26811. "pattern": "^ses"
  26812. },
  26813. "messageID": {
  26814. "type": "string",
  26815. "pattern": "^msg_"
  26816. },
  26817. "reason": {
  26818. "type": "string",
  26819. "enum": ["auto", "manual"]
  26820. },
  26821. "text": {
  26822. "type": "string"
  26823. },
  26824. "recent": {
  26825. "type": "string"
  26826. }
  26827. },
  26828. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26829. "additionalProperties": false
  26830. }
  26831. },
  26832. "required": ["type", "id", "seq", "aggregateID", "data"],
  26833. "additionalProperties": false
  26834. }
  26835. },
  26836. "required": ["type", "id", "syncEvent"],
  26837. "additionalProperties": false
  26838. },
  26839. "SyncEventSessionNextRevertStaged": {
  26840. "type": "object",
  26841. "properties": {
  26842. "type": {
  26843. "type": "string",
  26844. "enum": ["sync"]
  26845. },
  26846. "id": {
  26847. "type": "string",
  26848. "pattern": "^evt_"
  26849. },
  26850. "syncEvent": {
  26851. "type": "object",
  26852. "properties": {
  26853. "type": {
  26854. "type": "string",
  26855. "enum": ["session.next.revert.staged.1"]
  26856. },
  26857. "id": {
  26858. "type": "string",
  26859. "pattern": "^evt_"
  26860. },
  26861. "seq": {
  26862. "type": "number"
  26863. },
  26864. "aggregateID": {
  26865. "type": "string"
  26866. },
  26867. "data": {
  26868. "type": "object",
  26869. "properties": {
  26870. "timestamp": {
  26871. "type": "number"
  26872. },
  26873. "sessionID": {
  26874. "type": "string",
  26875. "pattern": "^ses"
  26876. },
  26877. "revert": {
  26878. "$ref": "#/components/schemas/RevertState"
  26879. }
  26880. },
  26881. "required": ["timestamp", "sessionID", "revert"],
  26882. "additionalProperties": false
  26883. }
  26884. },
  26885. "required": ["type", "id", "seq", "aggregateID", "data"],
  26886. "additionalProperties": false
  26887. }
  26888. },
  26889. "required": ["type", "id", "syncEvent"],
  26890. "additionalProperties": false
  26891. },
  26892. "SyncEventSessionNextRevertCleared": {
  26893. "type": "object",
  26894. "properties": {
  26895. "type": {
  26896. "type": "string",
  26897. "enum": ["sync"]
  26898. },
  26899. "id": {
  26900. "type": "string",
  26901. "pattern": "^evt_"
  26902. },
  26903. "syncEvent": {
  26904. "type": "object",
  26905. "properties": {
  26906. "type": {
  26907. "type": "string",
  26908. "enum": ["session.next.revert.cleared.1"]
  26909. },
  26910. "id": {
  26911. "type": "string",
  26912. "pattern": "^evt_"
  26913. },
  26914. "seq": {
  26915. "type": "number"
  26916. },
  26917. "aggregateID": {
  26918. "type": "string"
  26919. },
  26920. "data": {
  26921. "type": "object",
  26922. "properties": {
  26923. "timestamp": {
  26924. "type": "number"
  26925. },
  26926. "sessionID": {
  26927. "type": "string",
  26928. "pattern": "^ses"
  26929. }
  26930. },
  26931. "required": ["timestamp", "sessionID"],
  26932. "additionalProperties": false
  26933. }
  26934. },
  26935. "required": ["type", "id", "seq", "aggregateID", "data"],
  26936. "additionalProperties": false
  26937. }
  26938. },
  26939. "required": ["type", "id", "syncEvent"],
  26940. "additionalProperties": false
  26941. },
  26942. "SyncEventSessionNextRevertCommitted": {
  26943. "type": "object",
  26944. "properties": {
  26945. "type": {
  26946. "type": "string",
  26947. "enum": ["sync"]
  26948. },
  26949. "id": {
  26950. "type": "string",
  26951. "pattern": "^evt_"
  26952. },
  26953. "syncEvent": {
  26954. "type": "object",
  26955. "properties": {
  26956. "type": {
  26957. "type": "string",
  26958. "enum": ["session.next.revert.committed.1"]
  26959. },
  26960. "id": {
  26961. "type": "string",
  26962. "pattern": "^evt_"
  26963. },
  26964. "seq": {
  26965. "type": "number"
  26966. },
  26967. "aggregateID": {
  26968. "type": "string"
  26969. },
  26970. "data": {
  26971. "type": "object",
  26972. "properties": {
  26973. "timestamp": {
  26974. "type": "number"
  26975. },
  26976. "sessionID": {
  26977. "type": "string",
  26978. "pattern": "^ses"
  26979. },
  26980. "messageID": {
  26981. "type": "string",
  26982. "pattern": "^msg_"
  26983. }
  26984. },
  26985. "required": ["timestamp", "sessionID", "messageID"],
  26986. "additionalProperties": false
  26987. }
  26988. },
  26989. "required": ["type", "id", "seq", "aggregateID", "data"],
  26990. "additionalProperties": false
  26991. }
  26992. },
  26993. "required": ["type", "id", "syncEvent"],
  26994. "additionalProperties": false
  26995. },
  26996. "ConfigV2ReferenceGit": {
  26997. "type": "object",
  26998. "properties": {
  26999. "repository": {
  27000. "type": "string"
  27001. },
  27002. "branch": {
  27003. "type": "string"
  27004. },
  27005. "description": {
  27006. "type": "string"
  27007. },
  27008. "hidden": {
  27009. "type": "boolean"
  27010. }
  27011. },
  27012. "required": ["repository"],
  27013. "additionalProperties": false
  27014. },
  27015. "ConfigV2ReferenceLocal": {
  27016. "type": "object",
  27017. "properties": {
  27018. "path": {
  27019. "type": "string"
  27020. },
  27021. "description": {
  27022. "type": "string"
  27023. },
  27024. "hidden": {
  27025. "type": "boolean"
  27026. }
  27027. },
  27028. "required": ["path"],
  27029. "additionalProperties": false
  27030. },
  27031. "PolicyEffect": {
  27032. "type": "string",
  27033. "enum": ["allow", "deny"]
  27034. },
  27035. "ConfigV2ExperimentalPolicy": {
  27036. "type": "object",
  27037. "properties": {
  27038. "action": {
  27039. "type": "string",
  27040. "enum": ["provider.use"]
  27041. },
  27042. "effect": {
  27043. "$ref": "#/components/schemas/PolicyEffect"
  27044. },
  27045. "resource": {
  27046. "type": "string"
  27047. }
  27048. },
  27049. "required": ["action", "effect", "resource"],
  27050. "additionalProperties": false
  27051. },
  27052. "ProjectDirectories": {
  27053. "type": "array",
  27054. "items": {
  27055. "type": "object",
  27056. "properties": {
  27057. "directory": {
  27058. "type": "string"
  27059. },
  27060. "strategy": {
  27061. "type": "string"
  27062. }
  27063. },
  27064. "required": ["directory"],
  27065. "additionalProperties": false
  27066. }
  27067. },
  27068. "PtyTicketConnectToken": {
  27069. "type": "object",
  27070. "properties": {
  27071. "ticket": {
  27072. "type": "string"
  27073. },
  27074. "expires_in": {
  27075. "type": "integer",
  27076. "exclusiveMinimum": 0
  27077. }
  27078. },
  27079. "required": ["ticket", "expires_in"],
  27080. "additionalProperties": false
  27081. },
  27082. "WorkspaceEventConnectionStatus": {
  27083. "type": "object",
  27084. "properties": {
  27085. "workspaceID": {
  27086. "type": "string",
  27087. "pattern": "^wrk"
  27088. },
  27089. "status": {
  27090. "type": "string",
  27091. "enum": ["connected", "connecting", "disconnected", "error"]
  27092. }
  27093. },
  27094. "required": ["workspaceID", "status"],
  27095. "additionalProperties": false
  27096. },
  27097. "LocationInfo": {
  27098. "type": "object",
  27099. "properties": {
  27100. "directory": {
  27101. "type": "string"
  27102. },
  27103. "workspaceID": {
  27104. "type": "string",
  27105. "pattern": "^wrk"
  27106. },
  27107. "project": {
  27108. "type": "object",
  27109. "properties": {
  27110. "id": {
  27111. "type": "string"
  27112. },
  27113. "directory": {
  27114. "type": "string"
  27115. }
  27116. },
  27117. "required": ["id", "directory"],
  27118. "additionalProperties": false
  27119. }
  27120. },
  27121. "required": ["directory", "project"],
  27122. "additionalProperties": false
  27123. },
  27124. "ProviderRequest": {
  27125. "type": "object",
  27126. "properties": {
  27127. "headers": {
  27128. "type": "object",
  27129. "additionalProperties": {
  27130. "type": "string"
  27131. }
  27132. },
  27133. "body": {
  27134. "type": "object"
  27135. }
  27136. },
  27137. "required": ["headers", "body"],
  27138. "additionalProperties": false
  27139. },
  27140. "AgentColor": {
  27141. "anyOf": [
  27142. {
  27143. "type": "string",
  27144. "pattern": "^#[0-9a-fA-F]{6}$"
  27145. },
  27146. {
  27147. "type": "string",
  27148. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  27149. }
  27150. ]
  27151. },
  27152. "PermissionV2Effect": {
  27153. "type": "string",
  27154. "enum": ["allow", "deny", "ask"]
  27155. },
  27156. "PermissionV2Rule": {
  27157. "type": "object",
  27158. "properties": {
  27159. "action": {
  27160. "type": "string"
  27161. },
  27162. "resource": {
  27163. "type": "string"
  27164. },
  27165. "effect": {
  27166. "$ref": "#/components/schemas/PermissionV2Effect"
  27167. }
  27168. },
  27169. "required": ["action", "resource", "effect"],
  27170. "additionalProperties": false
  27171. },
  27172. "PermissionV2Ruleset": {
  27173. "type": "array",
  27174. "items": {
  27175. "$ref": "#/components/schemas/PermissionV2Rule"
  27176. }
  27177. },
  27178. "AgentV2Info": {
  27179. "type": "object",
  27180. "properties": {
  27181. "id": {
  27182. "type": "string"
  27183. },
  27184. "model": {
  27185. "$ref": "#/components/schemas/ModelRef"
  27186. },
  27187. "request": {
  27188. "$ref": "#/components/schemas/ProviderRequest"
  27189. },
  27190. "system": {
  27191. "type": "string"
  27192. },
  27193. "description": {
  27194. "type": "string"
  27195. },
  27196. "mode": {
  27197. "type": "string",
  27198. "enum": ["subagent", "primary", "all"]
  27199. },
  27200. "hidden": {
  27201. "type": "boolean"
  27202. },
  27203. "color": {
  27204. "$ref": "#/components/schemas/AgentColor"
  27205. },
  27206. "steps": {
  27207. "type": "integer",
  27208. "exclusiveMinimum": 0
  27209. },
  27210. "permissions": {
  27211. "$ref": "#/components/schemas/PermissionV2Ruleset"
  27212. }
  27213. },
  27214. "required": ["id", "request", "mode", "hidden", "permissions"],
  27215. "additionalProperties": false
  27216. },
  27217. "SessionV2Info": {
  27218. "type": "object",
  27219. "properties": {
  27220. "id": {
  27221. "type": "string",
  27222. "pattern": "^ses"
  27223. },
  27224. "parentID": {
  27225. "type": "string",
  27226. "pattern": "^ses"
  27227. },
  27228. "projectID": {
  27229. "type": "string"
  27230. },
  27231. "agent": {
  27232. "type": "string"
  27233. },
  27234. "model": {
  27235. "$ref": "#/components/schemas/ModelRef"
  27236. },
  27237. "cost": {
  27238. "type": "number"
  27239. },
  27240. "tokens": {
  27241. "type": "object",
  27242. "properties": {
  27243. "input": {
  27244. "type": "number"
  27245. },
  27246. "output": {
  27247. "type": "number"
  27248. },
  27249. "reasoning": {
  27250. "type": "number"
  27251. },
  27252. "cache": {
  27253. "type": "object",
  27254. "properties": {
  27255. "read": {
  27256. "type": "number"
  27257. },
  27258. "write": {
  27259. "type": "number"
  27260. }
  27261. },
  27262. "required": ["read", "write"],
  27263. "additionalProperties": false
  27264. }
  27265. },
  27266. "required": ["input", "output", "reasoning", "cache"],
  27267. "additionalProperties": false
  27268. },
  27269. "time": {
  27270. "type": "object",
  27271. "properties": {
  27272. "created": {
  27273. "type": "number"
  27274. },
  27275. "updated": {
  27276. "type": "number"
  27277. },
  27278. "archived": {
  27279. "type": "number"
  27280. }
  27281. },
  27282. "required": ["created", "updated"],
  27283. "additionalProperties": false
  27284. },
  27285. "title": {
  27286. "type": "string"
  27287. },
  27288. "location": {
  27289. "$ref": "#/components/schemas/LocationRef"
  27290. },
  27291. "subpath": {
  27292. "type": "string"
  27293. },
  27294. "revert": {
  27295. "$ref": "#/components/schemas/RevertState"
  27296. }
  27297. },
  27298. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  27299. "additionalProperties": false
  27300. },
  27301. "PromptInputFileAttachment": {
  27302. "type": "object",
  27303. "properties": {
  27304. "uri": {
  27305. "type": "string"
  27306. },
  27307. "name": {
  27308. "type": "string"
  27309. },
  27310. "description": {
  27311. "type": "string"
  27312. },
  27313. "source": {
  27314. "$ref": "#/components/schemas/PromptSource"
  27315. }
  27316. },
  27317. "required": ["uri"],
  27318. "additionalProperties": false
  27319. },
  27320. "SessionInputAdmitted": {
  27321. "type": "object",
  27322. "properties": {
  27323. "admittedSeq": {
  27324. "type": "integer",
  27325. "minimum": 0
  27326. },
  27327. "id": {
  27328. "type": "string",
  27329. "pattern": "^msg_"
  27330. },
  27331. "sessionID": {
  27332. "type": "string",
  27333. "pattern": "^ses"
  27334. },
  27335. "prompt": {
  27336. "$ref": "#/components/schemas/Prompt"
  27337. },
  27338. "delivery": {
  27339. "type": "string",
  27340. "enum": ["steer", "queue"]
  27341. },
  27342. "timeCreated": {
  27343. "type": "number"
  27344. },
  27345. "promotedSeq": {
  27346. "type": "integer",
  27347. "minimum": 0
  27348. }
  27349. },
  27350. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27351. "additionalProperties": false
  27352. },
  27353. "SessionMessageAgentSwitched": {
  27354. "type": "object",
  27355. "properties": {
  27356. "id": {
  27357. "type": "string",
  27358. "pattern": "^msg_"
  27359. },
  27360. "metadata": {
  27361. "type": "object"
  27362. },
  27363. "time": {
  27364. "type": "object",
  27365. "properties": {
  27366. "created": {
  27367. "type": "number"
  27368. }
  27369. },
  27370. "required": ["created"],
  27371. "additionalProperties": false
  27372. },
  27373. "type": {
  27374. "type": "string",
  27375. "enum": ["agent-switched"]
  27376. },
  27377. "agent": {
  27378. "type": "string"
  27379. }
  27380. },
  27381. "required": ["id", "time", "type", "agent"],
  27382. "additionalProperties": false
  27383. },
  27384. "SessionMessageModelSwitched": {
  27385. "type": "object",
  27386. "properties": {
  27387. "id": {
  27388. "type": "string",
  27389. "pattern": "^msg_"
  27390. },
  27391. "metadata": {
  27392. "type": "object"
  27393. },
  27394. "time": {
  27395. "type": "object",
  27396. "properties": {
  27397. "created": {
  27398. "type": "number"
  27399. }
  27400. },
  27401. "required": ["created"],
  27402. "additionalProperties": false
  27403. },
  27404. "type": {
  27405. "type": "string",
  27406. "enum": ["model-switched"]
  27407. },
  27408. "model": {
  27409. "$ref": "#/components/schemas/ModelRef"
  27410. }
  27411. },
  27412. "required": ["id", "time", "type", "model"],
  27413. "additionalProperties": false
  27414. },
  27415. "SessionMessageUser": {
  27416. "type": "object",
  27417. "properties": {
  27418. "id": {
  27419. "type": "string",
  27420. "pattern": "^msg_"
  27421. },
  27422. "metadata": {
  27423. "type": "object"
  27424. },
  27425. "time": {
  27426. "type": "object",
  27427. "properties": {
  27428. "created": {
  27429. "type": "number"
  27430. }
  27431. },
  27432. "required": ["created"],
  27433. "additionalProperties": false
  27434. },
  27435. "text": {
  27436. "type": "string"
  27437. },
  27438. "files": {
  27439. "type": "array",
  27440. "items": {
  27441. "$ref": "#/components/schemas/PromptFileAttachment"
  27442. }
  27443. },
  27444. "agents": {
  27445. "type": "array",
  27446. "items": {
  27447. "$ref": "#/components/schemas/PromptAgentAttachment"
  27448. }
  27449. },
  27450. "type": {
  27451. "type": "string",
  27452. "enum": ["user"]
  27453. }
  27454. },
  27455. "required": ["id", "time", "text", "type"],
  27456. "additionalProperties": false
  27457. },
  27458. "SessionMessageSynthetic": {
  27459. "type": "object",
  27460. "properties": {
  27461. "id": {
  27462. "type": "string",
  27463. "pattern": "^msg_"
  27464. },
  27465. "metadata": {
  27466. "type": "object"
  27467. },
  27468. "time": {
  27469. "type": "object",
  27470. "properties": {
  27471. "created": {
  27472. "type": "number"
  27473. }
  27474. },
  27475. "required": ["created"],
  27476. "additionalProperties": false
  27477. },
  27478. "sessionID": {
  27479. "type": "string",
  27480. "pattern": "^ses"
  27481. },
  27482. "text": {
  27483. "type": "string"
  27484. },
  27485. "type": {
  27486. "type": "string",
  27487. "enum": ["synthetic"]
  27488. }
  27489. },
  27490. "required": ["id", "time", "sessionID", "text", "type"],
  27491. "additionalProperties": false
  27492. },
  27493. "SessionMessageSystem": {
  27494. "type": "object",
  27495. "properties": {
  27496. "id": {
  27497. "type": "string",
  27498. "pattern": "^msg_"
  27499. },
  27500. "metadata": {
  27501. "type": "object"
  27502. },
  27503. "time": {
  27504. "type": "object",
  27505. "properties": {
  27506. "created": {
  27507. "type": "number"
  27508. }
  27509. },
  27510. "required": ["created"],
  27511. "additionalProperties": false
  27512. },
  27513. "type": {
  27514. "type": "string",
  27515. "enum": ["system"]
  27516. },
  27517. "text": {
  27518. "type": "string"
  27519. }
  27520. },
  27521. "required": ["id", "time", "type", "text"],
  27522. "additionalProperties": false
  27523. },
  27524. "SessionMessageShell": {
  27525. "type": "object",
  27526. "properties": {
  27527. "id": {
  27528. "type": "string",
  27529. "pattern": "^msg_"
  27530. },
  27531. "metadata": {
  27532. "type": "object"
  27533. },
  27534. "time": {
  27535. "type": "object",
  27536. "properties": {
  27537. "created": {
  27538. "type": "number"
  27539. },
  27540. "completed": {
  27541. "type": "number"
  27542. }
  27543. },
  27544. "required": ["created"],
  27545. "additionalProperties": false
  27546. },
  27547. "type": {
  27548. "type": "string",
  27549. "enum": ["shell"]
  27550. },
  27551. "callID": {
  27552. "type": "string"
  27553. },
  27554. "command": {
  27555. "type": "string"
  27556. },
  27557. "output": {
  27558. "type": "string"
  27559. }
  27560. },
  27561. "required": ["id", "time", "type", "callID", "command", "output"],
  27562. "additionalProperties": false
  27563. },
  27564. "SessionMessageAssistantText": {
  27565. "type": "object",
  27566. "properties": {
  27567. "type": {
  27568. "type": "string",
  27569. "enum": ["text"]
  27570. },
  27571. "id": {
  27572. "type": "string"
  27573. },
  27574. "text": {
  27575. "type": "string"
  27576. }
  27577. },
  27578. "required": ["type", "id", "text"],
  27579. "additionalProperties": false
  27580. },
  27581. "SessionMessageAssistantReasoning": {
  27582. "type": "object",
  27583. "properties": {
  27584. "type": {
  27585. "type": "string",
  27586. "enum": ["reasoning"]
  27587. },
  27588. "id": {
  27589. "type": "string"
  27590. },
  27591. "text": {
  27592. "type": "string"
  27593. },
  27594. "providerMetadata": {
  27595. "$ref": "#/components/schemas/LLMProviderMetadata"
  27596. },
  27597. "time": {
  27598. "type": "object",
  27599. "properties": {
  27600. "created": {
  27601. "type": "number"
  27602. },
  27603. "completed": {
  27604. "type": "number"
  27605. }
  27606. },
  27607. "required": ["created"],
  27608. "additionalProperties": false
  27609. }
  27610. },
  27611. "required": ["type", "id", "text"],
  27612. "additionalProperties": false
  27613. },
  27614. "SessionMessageToolStatePending": {
  27615. "type": "object",
  27616. "properties": {
  27617. "status": {
  27618. "type": "string",
  27619. "enum": ["pending"]
  27620. },
  27621. "input": {
  27622. "type": "string"
  27623. }
  27624. },
  27625. "required": ["status", "input"],
  27626. "additionalProperties": false
  27627. },
  27628. "SessionMessageToolStateRunning": {
  27629. "type": "object",
  27630. "properties": {
  27631. "status": {
  27632. "type": "string",
  27633. "enum": ["running"]
  27634. },
  27635. "input": {
  27636. "type": "object"
  27637. },
  27638. "structured": {
  27639. "type": "object"
  27640. },
  27641. "content": {
  27642. "type": "array",
  27643. "items": {
  27644. "$ref": "#/components/schemas/LLMToolContent"
  27645. }
  27646. }
  27647. },
  27648. "required": ["status", "input", "structured", "content"],
  27649. "additionalProperties": false
  27650. },
  27651. "SessionMessageToolStateCompleted": {
  27652. "type": "object",
  27653. "properties": {
  27654. "status": {
  27655. "type": "string",
  27656. "enum": ["completed"]
  27657. },
  27658. "input": {
  27659. "type": "object"
  27660. },
  27661. "attachments": {
  27662. "type": "array",
  27663. "items": {
  27664. "$ref": "#/components/schemas/PromptFileAttachment"
  27665. }
  27666. },
  27667. "content": {
  27668. "type": "array",
  27669. "items": {
  27670. "$ref": "#/components/schemas/LLMToolContent"
  27671. }
  27672. },
  27673. "outputPaths": {
  27674. "type": "array",
  27675. "items": {
  27676. "type": "string"
  27677. }
  27678. },
  27679. "structured": {
  27680. "type": "object"
  27681. },
  27682. "result": {}
  27683. },
  27684. "required": ["status", "input", "content", "structured"],
  27685. "additionalProperties": false
  27686. },
  27687. "SessionMessageToolStateError": {
  27688. "type": "object",
  27689. "properties": {
  27690. "status": {
  27691. "type": "string",
  27692. "enum": ["error"]
  27693. },
  27694. "input": {
  27695. "type": "object"
  27696. },
  27697. "content": {
  27698. "type": "array",
  27699. "items": {
  27700. "$ref": "#/components/schemas/LLMToolContent"
  27701. }
  27702. },
  27703. "structured": {
  27704. "type": "object"
  27705. },
  27706. "error": {
  27707. "$ref": "#/components/schemas/SessionErrorUnknown"
  27708. },
  27709. "result": {}
  27710. },
  27711. "required": ["status", "input", "content", "structured", "error"],
  27712. "additionalProperties": false
  27713. },
  27714. "SessionMessageAssistantTool": {
  27715. "type": "object",
  27716. "properties": {
  27717. "type": {
  27718. "type": "string",
  27719. "enum": ["tool"]
  27720. },
  27721. "id": {
  27722. "type": "string"
  27723. },
  27724. "name": {
  27725. "type": "string"
  27726. },
  27727. "provider": {
  27728. "type": "object",
  27729. "properties": {
  27730. "executed": {
  27731. "type": "boolean"
  27732. },
  27733. "metadata": {
  27734. "$ref": "#/components/schemas/LLMProviderMetadata"
  27735. },
  27736. "resultMetadata": {
  27737. "$ref": "#/components/schemas/LLMProviderMetadata"
  27738. }
  27739. },
  27740. "required": ["executed"],
  27741. "additionalProperties": false
  27742. },
  27743. "state": {
  27744. "anyOf": [
  27745. {
  27746. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27747. },
  27748. {
  27749. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27750. },
  27751. {
  27752. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27753. },
  27754. {
  27755. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27756. }
  27757. ]
  27758. },
  27759. "time": {
  27760. "type": "object",
  27761. "properties": {
  27762. "created": {
  27763. "type": "number"
  27764. },
  27765. "ran": {
  27766. "type": "number"
  27767. },
  27768. "completed": {
  27769. "type": "number"
  27770. },
  27771. "pruned": {
  27772. "type": "number"
  27773. }
  27774. },
  27775. "required": ["created"],
  27776. "additionalProperties": false
  27777. }
  27778. },
  27779. "required": ["type", "id", "name", "state", "time"],
  27780. "additionalProperties": false
  27781. },
  27782. "SessionMessageAssistant": {
  27783. "type": "object",
  27784. "properties": {
  27785. "id": {
  27786. "type": "string",
  27787. "pattern": "^msg_"
  27788. },
  27789. "metadata": {
  27790. "type": "object"
  27791. },
  27792. "time": {
  27793. "type": "object",
  27794. "properties": {
  27795. "created": {
  27796. "type": "number"
  27797. },
  27798. "completed": {
  27799. "type": "number"
  27800. }
  27801. },
  27802. "required": ["created"],
  27803. "additionalProperties": false
  27804. },
  27805. "type": {
  27806. "type": "string",
  27807. "enum": ["assistant"]
  27808. },
  27809. "agent": {
  27810. "type": "string"
  27811. },
  27812. "model": {
  27813. "$ref": "#/components/schemas/ModelRef"
  27814. },
  27815. "content": {
  27816. "type": "array",
  27817. "items": {
  27818. "anyOf": [
  27819. {
  27820. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27821. },
  27822. {
  27823. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27824. },
  27825. {
  27826. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27827. }
  27828. ]
  27829. }
  27830. },
  27831. "snapshot": {
  27832. "type": "object",
  27833. "properties": {
  27834. "start": {
  27835. "type": "string"
  27836. },
  27837. "end": {
  27838. "type": "string"
  27839. },
  27840. "files": {
  27841. "type": "array",
  27842. "items": {
  27843. "type": "string"
  27844. }
  27845. }
  27846. },
  27847. "additionalProperties": false
  27848. },
  27849. "finish": {
  27850. "type": "string"
  27851. },
  27852. "cost": {
  27853. "type": "number"
  27854. },
  27855. "tokens": {
  27856. "type": "object",
  27857. "properties": {
  27858. "input": {
  27859. "type": "number"
  27860. },
  27861. "output": {
  27862. "type": "number"
  27863. },
  27864. "reasoning": {
  27865. "type": "number"
  27866. },
  27867. "cache": {
  27868. "type": "object",
  27869. "properties": {
  27870. "read": {
  27871. "type": "number"
  27872. },
  27873. "write": {
  27874. "type": "number"
  27875. }
  27876. },
  27877. "required": ["read", "write"],
  27878. "additionalProperties": false
  27879. }
  27880. },
  27881. "required": ["input", "output", "reasoning", "cache"],
  27882. "additionalProperties": false
  27883. },
  27884. "error": {
  27885. "$ref": "#/components/schemas/SessionErrorUnknown"
  27886. }
  27887. },
  27888. "required": ["id", "time", "type", "agent", "model", "content"],
  27889. "additionalProperties": false
  27890. },
  27891. "SessionMessageCompaction": {
  27892. "type": "object",
  27893. "properties": {
  27894. "type": {
  27895. "type": "string",
  27896. "enum": ["compaction"]
  27897. },
  27898. "reason": {
  27899. "type": "string",
  27900. "enum": ["auto", "manual"]
  27901. },
  27902. "summary": {
  27903. "type": "string"
  27904. },
  27905. "recent": {
  27906. "type": "string"
  27907. },
  27908. "id": {
  27909. "type": "string",
  27910. "pattern": "^msg_"
  27911. },
  27912. "metadata": {
  27913. "type": "object"
  27914. },
  27915. "time": {
  27916. "type": "object",
  27917. "properties": {
  27918. "created": {
  27919. "type": "number"
  27920. }
  27921. },
  27922. "required": ["created"],
  27923. "additionalProperties": false
  27924. }
  27925. },
  27926. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27927. "additionalProperties": false
  27928. },
  27929. "SessionMessage": {
  27930. "anyOf": [
  27931. {
  27932. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27933. },
  27934. {
  27935. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27936. },
  27937. {
  27938. "$ref": "#/components/schemas/SessionMessageUser"
  27939. },
  27940. {
  27941. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27942. },
  27943. {
  27944. "$ref": "#/components/schemas/SessionMessageSystem"
  27945. },
  27946. {
  27947. "$ref": "#/components/schemas/SessionMessageShell"
  27948. },
  27949. {
  27950. "$ref": "#/components/schemas/SessionMessageAssistant"
  27951. },
  27952. {
  27953. "$ref": "#/components/schemas/SessionMessageCompaction"
  27954. }
  27955. ]
  27956. },
  27957. "SessionNextAgentSwitched": {
  27958. "type": "object",
  27959. "properties": {
  27960. "id": {
  27961. "type": "string",
  27962. "pattern": "^evt_"
  27963. },
  27964. "metadata": {
  27965. "type": "object"
  27966. },
  27967. "type": {
  27968. "type": "string",
  27969. "enum": ["session.next.agent.switched"]
  27970. },
  27971. "durable": {
  27972. "type": "object",
  27973. "properties": {
  27974. "aggregateID": {
  27975. "type": "string"
  27976. },
  27977. "seq": {
  27978. "type": "integer"
  27979. },
  27980. "version": {
  27981. "type": "integer"
  27982. }
  27983. },
  27984. "required": ["aggregateID", "seq", "version"],
  27985. "additionalProperties": false
  27986. },
  27987. "location": {
  27988. "$ref": "#/components/schemas/LocationRef"
  27989. },
  27990. "data": {
  27991. "type": "object",
  27992. "properties": {
  27993. "timestamp": {
  27994. "type": "number"
  27995. },
  27996. "sessionID": {
  27997. "type": "string",
  27998. "pattern": "^ses"
  27999. },
  28000. "messageID": {
  28001. "type": "string",
  28002. "pattern": "^msg_"
  28003. },
  28004. "agent": {
  28005. "type": "string"
  28006. }
  28007. },
  28008. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28009. "additionalProperties": false
  28010. }
  28011. },
  28012. "required": ["id", "type", "data"],
  28013. "additionalProperties": false
  28014. },
  28015. "SessionNextModelSwitched": {
  28016. "type": "object",
  28017. "properties": {
  28018. "id": {
  28019. "type": "string",
  28020. "pattern": "^evt_"
  28021. },
  28022. "metadata": {
  28023. "type": "object"
  28024. },
  28025. "type": {
  28026. "type": "string",
  28027. "enum": ["session.next.model.switched"]
  28028. },
  28029. "durable": {
  28030. "type": "object",
  28031. "properties": {
  28032. "aggregateID": {
  28033. "type": "string"
  28034. },
  28035. "seq": {
  28036. "type": "integer"
  28037. },
  28038. "version": {
  28039. "type": "integer"
  28040. }
  28041. },
  28042. "required": ["aggregateID", "seq", "version"],
  28043. "additionalProperties": false
  28044. },
  28045. "location": {
  28046. "$ref": "#/components/schemas/LocationRef"
  28047. },
  28048. "data": {
  28049. "type": "object",
  28050. "properties": {
  28051. "timestamp": {
  28052. "type": "number"
  28053. },
  28054. "sessionID": {
  28055. "type": "string",
  28056. "pattern": "^ses"
  28057. },
  28058. "messageID": {
  28059. "type": "string",
  28060. "pattern": "^msg_"
  28061. },
  28062. "model": {
  28063. "$ref": "#/components/schemas/ModelRef"
  28064. }
  28065. },
  28066. "required": ["timestamp", "sessionID", "messageID", "model"],
  28067. "additionalProperties": false
  28068. }
  28069. },
  28070. "required": ["id", "type", "data"],
  28071. "additionalProperties": false
  28072. },
  28073. "SessionNextMoved": {
  28074. "type": "object",
  28075. "properties": {
  28076. "id": {
  28077. "type": "string",
  28078. "pattern": "^evt_"
  28079. },
  28080. "metadata": {
  28081. "type": "object"
  28082. },
  28083. "type": {
  28084. "type": "string",
  28085. "enum": ["session.next.moved"]
  28086. },
  28087. "durable": {
  28088. "type": "object",
  28089. "properties": {
  28090. "aggregateID": {
  28091. "type": "string"
  28092. },
  28093. "seq": {
  28094. "type": "integer"
  28095. },
  28096. "version": {
  28097. "type": "integer"
  28098. }
  28099. },
  28100. "required": ["aggregateID", "seq", "version"],
  28101. "additionalProperties": false
  28102. },
  28103. "location": {
  28104. "$ref": "#/components/schemas/LocationRef"
  28105. },
  28106. "data": {
  28107. "type": "object",
  28108. "properties": {
  28109. "timestamp": {
  28110. "type": "number"
  28111. },
  28112. "sessionID": {
  28113. "type": "string",
  28114. "pattern": "^ses"
  28115. },
  28116. "location": {
  28117. "$ref": "#/components/schemas/LocationRef"
  28118. },
  28119. "subdirectory": {
  28120. "type": "string"
  28121. }
  28122. },
  28123. "required": ["timestamp", "sessionID", "location"],
  28124. "additionalProperties": false
  28125. }
  28126. },
  28127. "required": ["id", "type", "data"],
  28128. "additionalProperties": false
  28129. },
  28130. "SessionNextPrompted": {
  28131. "type": "object",
  28132. "properties": {
  28133. "id": {
  28134. "type": "string",
  28135. "pattern": "^evt_"
  28136. },
  28137. "metadata": {
  28138. "type": "object"
  28139. },
  28140. "type": {
  28141. "type": "string",
  28142. "enum": ["session.next.prompted"]
  28143. },
  28144. "durable": {
  28145. "type": "object",
  28146. "properties": {
  28147. "aggregateID": {
  28148. "type": "string"
  28149. },
  28150. "seq": {
  28151. "type": "integer"
  28152. },
  28153. "version": {
  28154. "type": "integer"
  28155. }
  28156. },
  28157. "required": ["aggregateID", "seq", "version"],
  28158. "additionalProperties": false
  28159. },
  28160. "location": {
  28161. "$ref": "#/components/schemas/LocationRef"
  28162. },
  28163. "data": {
  28164. "type": "object",
  28165. "properties": {
  28166. "timestamp": {
  28167. "type": "number"
  28168. },
  28169. "sessionID": {
  28170. "type": "string",
  28171. "pattern": "^ses"
  28172. },
  28173. "messageID": {
  28174. "type": "string",
  28175. "pattern": "^msg_"
  28176. },
  28177. "prompt": {
  28178. "$ref": "#/components/schemas/Prompt"
  28179. },
  28180. "delivery": {
  28181. "type": "string",
  28182. "enum": ["steer", "queue"]
  28183. }
  28184. },
  28185. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28186. "additionalProperties": false
  28187. }
  28188. },
  28189. "required": ["id", "type", "data"],
  28190. "additionalProperties": false
  28191. },
  28192. "SessionNextPromptAdmitted": {
  28193. "type": "object",
  28194. "properties": {
  28195. "id": {
  28196. "type": "string",
  28197. "pattern": "^evt_"
  28198. },
  28199. "metadata": {
  28200. "type": "object"
  28201. },
  28202. "type": {
  28203. "type": "string",
  28204. "enum": ["session.next.prompt.admitted"]
  28205. },
  28206. "durable": {
  28207. "type": "object",
  28208. "properties": {
  28209. "aggregateID": {
  28210. "type": "string"
  28211. },
  28212. "seq": {
  28213. "type": "integer"
  28214. },
  28215. "version": {
  28216. "type": "integer"
  28217. }
  28218. },
  28219. "required": ["aggregateID", "seq", "version"],
  28220. "additionalProperties": false
  28221. },
  28222. "location": {
  28223. "$ref": "#/components/schemas/LocationRef"
  28224. },
  28225. "data": {
  28226. "type": "object",
  28227. "properties": {
  28228. "timestamp": {
  28229. "type": "number"
  28230. },
  28231. "sessionID": {
  28232. "type": "string",
  28233. "pattern": "^ses"
  28234. },
  28235. "messageID": {
  28236. "type": "string",
  28237. "pattern": "^msg_"
  28238. },
  28239. "prompt": {
  28240. "$ref": "#/components/schemas/Prompt"
  28241. },
  28242. "delivery": {
  28243. "type": "string",
  28244. "enum": ["steer", "queue"]
  28245. }
  28246. },
  28247. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28248. "additionalProperties": false
  28249. }
  28250. },
  28251. "required": ["id", "type", "data"],
  28252. "additionalProperties": false
  28253. },
  28254. "SessionNextContextUpdated": {
  28255. "type": "object",
  28256. "properties": {
  28257. "id": {
  28258. "type": "string",
  28259. "pattern": "^evt_"
  28260. },
  28261. "metadata": {
  28262. "type": "object"
  28263. },
  28264. "type": {
  28265. "type": "string",
  28266. "enum": ["session.next.context.updated"]
  28267. },
  28268. "durable": {
  28269. "type": "object",
  28270. "properties": {
  28271. "aggregateID": {
  28272. "type": "string"
  28273. },
  28274. "seq": {
  28275. "type": "integer"
  28276. },
  28277. "version": {
  28278. "type": "integer"
  28279. }
  28280. },
  28281. "required": ["aggregateID", "seq", "version"],
  28282. "additionalProperties": false
  28283. },
  28284. "location": {
  28285. "$ref": "#/components/schemas/LocationRef"
  28286. },
  28287. "data": {
  28288. "type": "object",
  28289. "properties": {
  28290. "timestamp": {
  28291. "type": "number"
  28292. },
  28293. "sessionID": {
  28294. "type": "string",
  28295. "pattern": "^ses"
  28296. },
  28297. "messageID": {
  28298. "type": "string",
  28299. "pattern": "^msg_"
  28300. },
  28301. "text": {
  28302. "type": "string"
  28303. }
  28304. },
  28305. "required": ["timestamp", "sessionID", "messageID", "text"],
  28306. "additionalProperties": false
  28307. }
  28308. },
  28309. "required": ["id", "type", "data"],
  28310. "additionalProperties": false
  28311. },
  28312. "SessionNextSynthetic": {
  28313. "type": "object",
  28314. "properties": {
  28315. "id": {
  28316. "type": "string",
  28317. "pattern": "^evt_"
  28318. },
  28319. "metadata": {
  28320. "type": "object"
  28321. },
  28322. "type": {
  28323. "type": "string",
  28324. "enum": ["session.next.synthetic"]
  28325. },
  28326. "durable": {
  28327. "type": "object",
  28328. "properties": {
  28329. "aggregateID": {
  28330. "type": "string"
  28331. },
  28332. "seq": {
  28333. "type": "integer"
  28334. },
  28335. "version": {
  28336. "type": "integer"
  28337. }
  28338. },
  28339. "required": ["aggregateID", "seq", "version"],
  28340. "additionalProperties": false
  28341. },
  28342. "location": {
  28343. "$ref": "#/components/schemas/LocationRef"
  28344. },
  28345. "data": {
  28346. "type": "object",
  28347. "properties": {
  28348. "timestamp": {
  28349. "type": "number"
  28350. },
  28351. "sessionID": {
  28352. "type": "string",
  28353. "pattern": "^ses"
  28354. },
  28355. "messageID": {
  28356. "type": "string",
  28357. "pattern": "^msg_"
  28358. },
  28359. "text": {
  28360. "type": "string"
  28361. }
  28362. },
  28363. "required": ["timestamp", "sessionID", "messageID", "text"],
  28364. "additionalProperties": false
  28365. }
  28366. },
  28367. "required": ["id", "type", "data"],
  28368. "additionalProperties": false
  28369. },
  28370. "SessionNextShellStarted": {
  28371. "type": "object",
  28372. "properties": {
  28373. "id": {
  28374. "type": "string",
  28375. "pattern": "^evt_"
  28376. },
  28377. "metadata": {
  28378. "type": "object"
  28379. },
  28380. "type": {
  28381. "type": "string",
  28382. "enum": ["session.next.shell.started"]
  28383. },
  28384. "durable": {
  28385. "type": "object",
  28386. "properties": {
  28387. "aggregateID": {
  28388. "type": "string"
  28389. },
  28390. "seq": {
  28391. "type": "integer"
  28392. },
  28393. "version": {
  28394. "type": "integer"
  28395. }
  28396. },
  28397. "required": ["aggregateID", "seq", "version"],
  28398. "additionalProperties": false
  28399. },
  28400. "location": {
  28401. "$ref": "#/components/schemas/LocationRef"
  28402. },
  28403. "data": {
  28404. "type": "object",
  28405. "properties": {
  28406. "timestamp": {
  28407. "type": "number"
  28408. },
  28409. "sessionID": {
  28410. "type": "string",
  28411. "pattern": "^ses"
  28412. },
  28413. "messageID": {
  28414. "type": "string",
  28415. "pattern": "^msg_"
  28416. },
  28417. "callID": {
  28418. "type": "string"
  28419. },
  28420. "command": {
  28421. "type": "string"
  28422. }
  28423. },
  28424. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28425. "additionalProperties": false
  28426. }
  28427. },
  28428. "required": ["id", "type", "data"],
  28429. "additionalProperties": false
  28430. },
  28431. "SessionNextShellEnded": {
  28432. "type": "object",
  28433. "properties": {
  28434. "id": {
  28435. "type": "string",
  28436. "pattern": "^evt_"
  28437. },
  28438. "metadata": {
  28439. "type": "object"
  28440. },
  28441. "type": {
  28442. "type": "string",
  28443. "enum": ["session.next.shell.ended"]
  28444. },
  28445. "durable": {
  28446. "type": "object",
  28447. "properties": {
  28448. "aggregateID": {
  28449. "type": "string"
  28450. },
  28451. "seq": {
  28452. "type": "integer"
  28453. },
  28454. "version": {
  28455. "type": "integer"
  28456. }
  28457. },
  28458. "required": ["aggregateID", "seq", "version"],
  28459. "additionalProperties": false
  28460. },
  28461. "location": {
  28462. "$ref": "#/components/schemas/LocationRef"
  28463. },
  28464. "data": {
  28465. "type": "object",
  28466. "properties": {
  28467. "timestamp": {
  28468. "type": "number"
  28469. },
  28470. "sessionID": {
  28471. "type": "string",
  28472. "pattern": "^ses"
  28473. },
  28474. "callID": {
  28475. "type": "string"
  28476. },
  28477. "output": {
  28478. "type": "string"
  28479. }
  28480. },
  28481. "required": ["timestamp", "sessionID", "callID", "output"],
  28482. "additionalProperties": false
  28483. }
  28484. },
  28485. "required": ["id", "type", "data"],
  28486. "additionalProperties": false
  28487. },
  28488. "SessionNextStepStarted": {
  28489. "type": "object",
  28490. "properties": {
  28491. "id": {
  28492. "type": "string",
  28493. "pattern": "^evt_"
  28494. },
  28495. "metadata": {
  28496. "type": "object"
  28497. },
  28498. "type": {
  28499. "type": "string",
  28500. "enum": ["session.next.step.started"]
  28501. },
  28502. "durable": {
  28503. "type": "object",
  28504. "properties": {
  28505. "aggregateID": {
  28506. "type": "string"
  28507. },
  28508. "seq": {
  28509. "type": "integer"
  28510. },
  28511. "version": {
  28512. "type": "integer"
  28513. }
  28514. },
  28515. "required": ["aggregateID", "seq", "version"],
  28516. "additionalProperties": false
  28517. },
  28518. "location": {
  28519. "$ref": "#/components/schemas/LocationRef"
  28520. },
  28521. "data": {
  28522. "type": "object",
  28523. "properties": {
  28524. "timestamp": {
  28525. "type": "number"
  28526. },
  28527. "sessionID": {
  28528. "type": "string",
  28529. "pattern": "^ses"
  28530. },
  28531. "assistantMessageID": {
  28532. "type": "string",
  28533. "pattern": "^msg_"
  28534. },
  28535. "agent": {
  28536. "type": "string"
  28537. },
  28538. "model": {
  28539. "$ref": "#/components/schemas/ModelRef"
  28540. },
  28541. "snapshot": {
  28542. "type": "string"
  28543. }
  28544. },
  28545. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28546. "additionalProperties": false
  28547. }
  28548. },
  28549. "required": ["id", "type", "data"],
  28550. "additionalProperties": false
  28551. },
  28552. "SessionNextStepEnded": {
  28553. "type": "object",
  28554. "properties": {
  28555. "id": {
  28556. "type": "string",
  28557. "pattern": "^evt_"
  28558. },
  28559. "metadata": {
  28560. "type": "object"
  28561. },
  28562. "type": {
  28563. "type": "string",
  28564. "enum": ["session.next.step.ended"]
  28565. },
  28566. "durable": {
  28567. "type": "object",
  28568. "properties": {
  28569. "aggregateID": {
  28570. "type": "string"
  28571. },
  28572. "seq": {
  28573. "type": "integer"
  28574. },
  28575. "version": {
  28576. "type": "integer"
  28577. }
  28578. },
  28579. "required": ["aggregateID", "seq", "version"],
  28580. "additionalProperties": false
  28581. },
  28582. "location": {
  28583. "$ref": "#/components/schemas/LocationRef"
  28584. },
  28585. "data": {
  28586. "type": "object",
  28587. "properties": {
  28588. "timestamp": {
  28589. "type": "number"
  28590. },
  28591. "sessionID": {
  28592. "type": "string",
  28593. "pattern": "^ses"
  28594. },
  28595. "assistantMessageID": {
  28596. "type": "string",
  28597. "pattern": "^msg_"
  28598. },
  28599. "finish": {
  28600. "type": "string"
  28601. },
  28602. "cost": {
  28603. "type": "number"
  28604. },
  28605. "tokens": {
  28606. "type": "object",
  28607. "properties": {
  28608. "input": {
  28609. "type": "number"
  28610. },
  28611. "output": {
  28612. "type": "number"
  28613. },
  28614. "reasoning": {
  28615. "type": "number"
  28616. },
  28617. "cache": {
  28618. "type": "object",
  28619. "properties": {
  28620. "read": {
  28621. "type": "number"
  28622. },
  28623. "write": {
  28624. "type": "number"
  28625. }
  28626. },
  28627. "required": ["read", "write"],
  28628. "additionalProperties": false
  28629. }
  28630. },
  28631. "required": ["input", "output", "reasoning", "cache"],
  28632. "additionalProperties": false
  28633. },
  28634. "snapshot": {
  28635. "type": "string"
  28636. },
  28637. "files": {
  28638. "type": "array",
  28639. "items": {
  28640. "type": "string"
  28641. }
  28642. }
  28643. },
  28644. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28645. "additionalProperties": false
  28646. }
  28647. },
  28648. "required": ["id", "type", "data"],
  28649. "additionalProperties": false
  28650. },
  28651. "SessionNextStepFailed": {
  28652. "type": "object",
  28653. "properties": {
  28654. "id": {
  28655. "type": "string",
  28656. "pattern": "^evt_"
  28657. },
  28658. "metadata": {
  28659. "type": "object"
  28660. },
  28661. "type": {
  28662. "type": "string",
  28663. "enum": ["session.next.step.failed"]
  28664. },
  28665. "durable": {
  28666. "type": "object",
  28667. "properties": {
  28668. "aggregateID": {
  28669. "type": "string"
  28670. },
  28671. "seq": {
  28672. "type": "integer"
  28673. },
  28674. "version": {
  28675. "type": "integer"
  28676. }
  28677. },
  28678. "required": ["aggregateID", "seq", "version"],
  28679. "additionalProperties": false
  28680. },
  28681. "location": {
  28682. "$ref": "#/components/schemas/LocationRef"
  28683. },
  28684. "data": {
  28685. "type": "object",
  28686. "properties": {
  28687. "timestamp": {
  28688. "type": "number"
  28689. },
  28690. "sessionID": {
  28691. "type": "string",
  28692. "pattern": "^ses"
  28693. },
  28694. "assistantMessageID": {
  28695. "type": "string",
  28696. "pattern": "^msg_"
  28697. },
  28698. "error": {
  28699. "$ref": "#/components/schemas/SessionErrorUnknown"
  28700. }
  28701. },
  28702. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28703. "additionalProperties": false
  28704. }
  28705. },
  28706. "required": ["id", "type", "data"],
  28707. "additionalProperties": false
  28708. },
  28709. "SessionNextTextStarted": {
  28710. "type": "object",
  28711. "properties": {
  28712. "id": {
  28713. "type": "string",
  28714. "pattern": "^evt_"
  28715. },
  28716. "metadata": {
  28717. "type": "object"
  28718. },
  28719. "type": {
  28720. "type": "string",
  28721. "enum": ["session.next.text.started"]
  28722. },
  28723. "durable": {
  28724. "type": "object",
  28725. "properties": {
  28726. "aggregateID": {
  28727. "type": "string"
  28728. },
  28729. "seq": {
  28730. "type": "integer"
  28731. },
  28732. "version": {
  28733. "type": "integer"
  28734. }
  28735. },
  28736. "required": ["aggregateID", "seq", "version"],
  28737. "additionalProperties": false
  28738. },
  28739. "location": {
  28740. "$ref": "#/components/schemas/LocationRef"
  28741. },
  28742. "data": {
  28743. "type": "object",
  28744. "properties": {
  28745. "timestamp": {
  28746. "type": "number"
  28747. },
  28748. "sessionID": {
  28749. "type": "string",
  28750. "pattern": "^ses"
  28751. },
  28752. "assistantMessageID": {
  28753. "type": "string",
  28754. "pattern": "^msg_"
  28755. },
  28756. "textID": {
  28757. "type": "string"
  28758. }
  28759. },
  28760. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28761. "additionalProperties": false
  28762. }
  28763. },
  28764. "required": ["id", "type", "data"],
  28765. "additionalProperties": false
  28766. },
  28767. "SessionNextTextEnded": {
  28768. "type": "object",
  28769. "properties": {
  28770. "id": {
  28771. "type": "string",
  28772. "pattern": "^evt_"
  28773. },
  28774. "metadata": {
  28775. "type": "object"
  28776. },
  28777. "type": {
  28778. "type": "string",
  28779. "enum": ["session.next.text.ended"]
  28780. },
  28781. "durable": {
  28782. "type": "object",
  28783. "properties": {
  28784. "aggregateID": {
  28785. "type": "string"
  28786. },
  28787. "seq": {
  28788. "type": "integer"
  28789. },
  28790. "version": {
  28791. "type": "integer"
  28792. }
  28793. },
  28794. "required": ["aggregateID", "seq", "version"],
  28795. "additionalProperties": false
  28796. },
  28797. "location": {
  28798. "$ref": "#/components/schemas/LocationRef"
  28799. },
  28800. "data": {
  28801. "type": "object",
  28802. "properties": {
  28803. "timestamp": {
  28804. "type": "number"
  28805. },
  28806. "sessionID": {
  28807. "type": "string",
  28808. "pattern": "^ses"
  28809. },
  28810. "assistantMessageID": {
  28811. "type": "string",
  28812. "pattern": "^msg_"
  28813. },
  28814. "textID": {
  28815. "type": "string"
  28816. },
  28817. "text": {
  28818. "type": "string"
  28819. }
  28820. },
  28821. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28822. "additionalProperties": false
  28823. }
  28824. },
  28825. "required": ["id", "type", "data"],
  28826. "additionalProperties": false
  28827. },
  28828. "SessionNextToolInputStarted": {
  28829. "type": "object",
  28830. "properties": {
  28831. "id": {
  28832. "type": "string",
  28833. "pattern": "^evt_"
  28834. },
  28835. "metadata": {
  28836. "type": "object"
  28837. },
  28838. "type": {
  28839. "type": "string",
  28840. "enum": ["session.next.tool.input.started"]
  28841. },
  28842. "durable": {
  28843. "type": "object",
  28844. "properties": {
  28845. "aggregateID": {
  28846. "type": "string"
  28847. },
  28848. "seq": {
  28849. "type": "integer"
  28850. },
  28851. "version": {
  28852. "type": "integer"
  28853. }
  28854. },
  28855. "required": ["aggregateID", "seq", "version"],
  28856. "additionalProperties": false
  28857. },
  28858. "location": {
  28859. "$ref": "#/components/schemas/LocationRef"
  28860. },
  28861. "data": {
  28862. "type": "object",
  28863. "properties": {
  28864. "timestamp": {
  28865. "type": "number"
  28866. },
  28867. "sessionID": {
  28868. "type": "string",
  28869. "pattern": "^ses"
  28870. },
  28871. "assistantMessageID": {
  28872. "type": "string",
  28873. "pattern": "^msg_"
  28874. },
  28875. "callID": {
  28876. "type": "string"
  28877. },
  28878. "name": {
  28879. "type": "string"
  28880. }
  28881. },
  28882. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28883. "additionalProperties": false
  28884. }
  28885. },
  28886. "required": ["id", "type", "data"],
  28887. "additionalProperties": false
  28888. },
  28889. "SessionNextToolInputEnded": {
  28890. "type": "object",
  28891. "properties": {
  28892. "id": {
  28893. "type": "string",
  28894. "pattern": "^evt_"
  28895. },
  28896. "metadata": {
  28897. "type": "object"
  28898. },
  28899. "type": {
  28900. "type": "string",
  28901. "enum": ["session.next.tool.input.ended"]
  28902. },
  28903. "durable": {
  28904. "type": "object",
  28905. "properties": {
  28906. "aggregateID": {
  28907. "type": "string"
  28908. },
  28909. "seq": {
  28910. "type": "integer"
  28911. },
  28912. "version": {
  28913. "type": "integer"
  28914. }
  28915. },
  28916. "required": ["aggregateID", "seq", "version"],
  28917. "additionalProperties": false
  28918. },
  28919. "location": {
  28920. "$ref": "#/components/schemas/LocationRef"
  28921. },
  28922. "data": {
  28923. "type": "object",
  28924. "properties": {
  28925. "timestamp": {
  28926. "type": "number"
  28927. },
  28928. "sessionID": {
  28929. "type": "string",
  28930. "pattern": "^ses"
  28931. },
  28932. "assistantMessageID": {
  28933. "type": "string",
  28934. "pattern": "^msg_"
  28935. },
  28936. "callID": {
  28937. "type": "string"
  28938. },
  28939. "text": {
  28940. "type": "string"
  28941. }
  28942. },
  28943. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28944. "additionalProperties": false
  28945. }
  28946. },
  28947. "required": ["id", "type", "data"],
  28948. "additionalProperties": false
  28949. },
  28950. "SessionNextToolCalled": {
  28951. "type": "object",
  28952. "properties": {
  28953. "id": {
  28954. "type": "string",
  28955. "pattern": "^evt_"
  28956. },
  28957. "metadata": {
  28958. "type": "object"
  28959. },
  28960. "type": {
  28961. "type": "string",
  28962. "enum": ["session.next.tool.called"]
  28963. },
  28964. "durable": {
  28965. "type": "object",
  28966. "properties": {
  28967. "aggregateID": {
  28968. "type": "string"
  28969. },
  28970. "seq": {
  28971. "type": "integer"
  28972. },
  28973. "version": {
  28974. "type": "integer"
  28975. }
  28976. },
  28977. "required": ["aggregateID", "seq", "version"],
  28978. "additionalProperties": false
  28979. },
  28980. "location": {
  28981. "$ref": "#/components/schemas/LocationRef"
  28982. },
  28983. "data": {
  28984. "type": "object",
  28985. "properties": {
  28986. "timestamp": {
  28987. "type": "number"
  28988. },
  28989. "sessionID": {
  28990. "type": "string",
  28991. "pattern": "^ses"
  28992. },
  28993. "assistantMessageID": {
  28994. "type": "string",
  28995. "pattern": "^msg_"
  28996. },
  28997. "callID": {
  28998. "type": "string"
  28999. },
  29000. "tool": {
  29001. "type": "string"
  29002. },
  29003. "input": {
  29004. "type": "object"
  29005. },
  29006. "provider": {
  29007. "type": "object",
  29008. "properties": {
  29009. "executed": {
  29010. "type": "boolean"
  29011. },
  29012. "metadata": {
  29013. "$ref": "#/components/schemas/LLMProviderMetadata"
  29014. }
  29015. },
  29016. "required": ["executed"],
  29017. "additionalProperties": false
  29018. }
  29019. },
  29020. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29021. "additionalProperties": false
  29022. }
  29023. },
  29024. "required": ["id", "type", "data"],
  29025. "additionalProperties": false
  29026. },
  29027. "SessionNextToolProgress": {
  29028. "type": "object",
  29029. "properties": {
  29030. "id": {
  29031. "type": "string",
  29032. "pattern": "^evt_"
  29033. },
  29034. "metadata": {
  29035. "type": "object"
  29036. },
  29037. "type": {
  29038. "type": "string",
  29039. "enum": ["session.next.tool.progress"]
  29040. },
  29041. "durable": {
  29042. "type": "object",
  29043. "properties": {
  29044. "aggregateID": {
  29045. "type": "string"
  29046. },
  29047. "seq": {
  29048. "type": "integer"
  29049. },
  29050. "version": {
  29051. "type": "integer"
  29052. }
  29053. },
  29054. "required": ["aggregateID", "seq", "version"],
  29055. "additionalProperties": false
  29056. },
  29057. "location": {
  29058. "$ref": "#/components/schemas/LocationRef"
  29059. },
  29060. "data": {
  29061. "type": "object",
  29062. "properties": {
  29063. "timestamp": {
  29064. "type": "number"
  29065. },
  29066. "sessionID": {
  29067. "type": "string",
  29068. "pattern": "^ses"
  29069. },
  29070. "assistantMessageID": {
  29071. "type": "string",
  29072. "pattern": "^msg_"
  29073. },
  29074. "callID": {
  29075. "type": "string"
  29076. },
  29077. "structured": {
  29078. "type": "object"
  29079. },
  29080. "content": {
  29081. "type": "array",
  29082. "items": {
  29083. "$ref": "#/components/schemas/LLMToolContent"
  29084. }
  29085. }
  29086. },
  29087. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29088. "additionalProperties": false
  29089. }
  29090. },
  29091. "required": ["id", "type", "data"],
  29092. "additionalProperties": false
  29093. },
  29094. "SessionNextToolSuccess": {
  29095. "type": "object",
  29096. "properties": {
  29097. "id": {
  29098. "type": "string",
  29099. "pattern": "^evt_"
  29100. },
  29101. "metadata": {
  29102. "type": "object"
  29103. },
  29104. "type": {
  29105. "type": "string",
  29106. "enum": ["session.next.tool.success"]
  29107. },
  29108. "durable": {
  29109. "type": "object",
  29110. "properties": {
  29111. "aggregateID": {
  29112. "type": "string"
  29113. },
  29114. "seq": {
  29115. "type": "integer"
  29116. },
  29117. "version": {
  29118. "type": "integer"
  29119. }
  29120. },
  29121. "required": ["aggregateID", "seq", "version"],
  29122. "additionalProperties": false
  29123. },
  29124. "location": {
  29125. "$ref": "#/components/schemas/LocationRef"
  29126. },
  29127. "data": {
  29128. "type": "object",
  29129. "properties": {
  29130. "timestamp": {
  29131. "type": "number"
  29132. },
  29133. "sessionID": {
  29134. "type": "string",
  29135. "pattern": "^ses"
  29136. },
  29137. "assistantMessageID": {
  29138. "type": "string",
  29139. "pattern": "^msg_"
  29140. },
  29141. "callID": {
  29142. "type": "string"
  29143. },
  29144. "structured": {
  29145. "type": "object"
  29146. },
  29147. "content": {
  29148. "type": "array",
  29149. "items": {
  29150. "$ref": "#/components/schemas/LLMToolContent"
  29151. }
  29152. },
  29153. "outputPaths": {
  29154. "type": "array",
  29155. "items": {
  29156. "type": "string"
  29157. }
  29158. },
  29159. "result": {},
  29160. "provider": {
  29161. "type": "object",
  29162. "properties": {
  29163. "executed": {
  29164. "type": "boolean"
  29165. },
  29166. "metadata": {
  29167. "$ref": "#/components/schemas/LLMProviderMetadata"
  29168. }
  29169. },
  29170. "required": ["executed"],
  29171. "additionalProperties": false
  29172. }
  29173. },
  29174. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29175. "additionalProperties": false
  29176. }
  29177. },
  29178. "required": ["id", "type", "data"],
  29179. "additionalProperties": false
  29180. },
  29181. "SessionNextToolFailed": {
  29182. "type": "object",
  29183. "properties": {
  29184. "id": {
  29185. "type": "string",
  29186. "pattern": "^evt_"
  29187. },
  29188. "metadata": {
  29189. "type": "object"
  29190. },
  29191. "type": {
  29192. "type": "string",
  29193. "enum": ["session.next.tool.failed"]
  29194. },
  29195. "durable": {
  29196. "type": "object",
  29197. "properties": {
  29198. "aggregateID": {
  29199. "type": "string"
  29200. },
  29201. "seq": {
  29202. "type": "integer"
  29203. },
  29204. "version": {
  29205. "type": "integer"
  29206. }
  29207. },
  29208. "required": ["aggregateID", "seq", "version"],
  29209. "additionalProperties": false
  29210. },
  29211. "location": {
  29212. "$ref": "#/components/schemas/LocationRef"
  29213. },
  29214. "data": {
  29215. "type": "object",
  29216. "properties": {
  29217. "timestamp": {
  29218. "type": "number"
  29219. },
  29220. "sessionID": {
  29221. "type": "string",
  29222. "pattern": "^ses"
  29223. },
  29224. "assistantMessageID": {
  29225. "type": "string",
  29226. "pattern": "^msg_"
  29227. },
  29228. "callID": {
  29229. "type": "string"
  29230. },
  29231. "error": {
  29232. "$ref": "#/components/schemas/SessionErrorUnknown"
  29233. },
  29234. "result": {},
  29235. "provider": {
  29236. "type": "object",
  29237. "properties": {
  29238. "executed": {
  29239. "type": "boolean"
  29240. },
  29241. "metadata": {
  29242. "$ref": "#/components/schemas/LLMProviderMetadata"
  29243. }
  29244. },
  29245. "required": ["executed"],
  29246. "additionalProperties": false
  29247. }
  29248. },
  29249. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29250. "additionalProperties": false
  29251. }
  29252. },
  29253. "required": ["id", "type", "data"],
  29254. "additionalProperties": false
  29255. },
  29256. "SessionNextReasoningStarted": {
  29257. "type": "object",
  29258. "properties": {
  29259. "id": {
  29260. "type": "string",
  29261. "pattern": "^evt_"
  29262. },
  29263. "metadata": {
  29264. "type": "object"
  29265. },
  29266. "type": {
  29267. "type": "string",
  29268. "enum": ["session.next.reasoning.started"]
  29269. },
  29270. "durable": {
  29271. "type": "object",
  29272. "properties": {
  29273. "aggregateID": {
  29274. "type": "string"
  29275. },
  29276. "seq": {
  29277. "type": "integer"
  29278. },
  29279. "version": {
  29280. "type": "integer"
  29281. }
  29282. },
  29283. "required": ["aggregateID", "seq", "version"],
  29284. "additionalProperties": false
  29285. },
  29286. "location": {
  29287. "$ref": "#/components/schemas/LocationRef"
  29288. },
  29289. "data": {
  29290. "type": "object",
  29291. "properties": {
  29292. "timestamp": {
  29293. "type": "number"
  29294. },
  29295. "sessionID": {
  29296. "type": "string",
  29297. "pattern": "^ses"
  29298. },
  29299. "assistantMessageID": {
  29300. "type": "string",
  29301. "pattern": "^msg_"
  29302. },
  29303. "reasoningID": {
  29304. "type": "string"
  29305. },
  29306. "providerMetadata": {
  29307. "$ref": "#/components/schemas/LLMProviderMetadata"
  29308. }
  29309. },
  29310. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29311. "additionalProperties": false
  29312. }
  29313. },
  29314. "required": ["id", "type", "data"],
  29315. "additionalProperties": false
  29316. },
  29317. "SessionNextReasoningEnded": {
  29318. "type": "object",
  29319. "properties": {
  29320. "id": {
  29321. "type": "string",
  29322. "pattern": "^evt_"
  29323. },
  29324. "metadata": {
  29325. "type": "object"
  29326. },
  29327. "type": {
  29328. "type": "string",
  29329. "enum": ["session.next.reasoning.ended"]
  29330. },
  29331. "durable": {
  29332. "type": "object",
  29333. "properties": {
  29334. "aggregateID": {
  29335. "type": "string"
  29336. },
  29337. "seq": {
  29338. "type": "integer"
  29339. },
  29340. "version": {
  29341. "type": "integer"
  29342. }
  29343. },
  29344. "required": ["aggregateID", "seq", "version"],
  29345. "additionalProperties": false
  29346. },
  29347. "location": {
  29348. "$ref": "#/components/schemas/LocationRef"
  29349. },
  29350. "data": {
  29351. "type": "object",
  29352. "properties": {
  29353. "timestamp": {
  29354. "type": "number"
  29355. },
  29356. "sessionID": {
  29357. "type": "string",
  29358. "pattern": "^ses"
  29359. },
  29360. "assistantMessageID": {
  29361. "type": "string",
  29362. "pattern": "^msg_"
  29363. },
  29364. "reasoningID": {
  29365. "type": "string"
  29366. },
  29367. "text": {
  29368. "type": "string"
  29369. },
  29370. "providerMetadata": {
  29371. "$ref": "#/components/schemas/LLMProviderMetadata"
  29372. }
  29373. },
  29374. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29375. "additionalProperties": false
  29376. }
  29377. },
  29378. "required": ["id", "type", "data"],
  29379. "additionalProperties": false
  29380. },
  29381. "SessionNextRetried": {
  29382. "type": "object",
  29383. "properties": {
  29384. "id": {
  29385. "type": "string",
  29386. "pattern": "^evt_"
  29387. },
  29388. "metadata": {
  29389. "type": "object"
  29390. },
  29391. "type": {
  29392. "type": "string",
  29393. "enum": ["session.next.retried"]
  29394. },
  29395. "durable": {
  29396. "type": "object",
  29397. "properties": {
  29398. "aggregateID": {
  29399. "type": "string"
  29400. },
  29401. "seq": {
  29402. "type": "integer"
  29403. },
  29404. "version": {
  29405. "type": "integer"
  29406. }
  29407. },
  29408. "required": ["aggregateID", "seq", "version"],
  29409. "additionalProperties": false
  29410. },
  29411. "location": {
  29412. "$ref": "#/components/schemas/LocationRef"
  29413. },
  29414. "data": {
  29415. "type": "object",
  29416. "properties": {
  29417. "timestamp": {
  29418. "type": "number"
  29419. },
  29420. "sessionID": {
  29421. "type": "string",
  29422. "pattern": "^ses"
  29423. },
  29424. "attempt": {
  29425. "type": "number"
  29426. },
  29427. "error": {
  29428. "$ref": "#/components/schemas/SessionNextRetry_error"
  29429. }
  29430. },
  29431. "required": ["timestamp", "sessionID", "attempt", "error"],
  29432. "additionalProperties": false
  29433. }
  29434. },
  29435. "required": ["id", "type", "data"],
  29436. "additionalProperties": false
  29437. },
  29438. "SessionNextCompactionStarted": {
  29439. "type": "object",
  29440. "properties": {
  29441. "id": {
  29442. "type": "string",
  29443. "pattern": "^evt_"
  29444. },
  29445. "metadata": {
  29446. "type": "object"
  29447. },
  29448. "type": {
  29449. "type": "string",
  29450. "enum": ["session.next.compaction.started"]
  29451. },
  29452. "durable": {
  29453. "type": "object",
  29454. "properties": {
  29455. "aggregateID": {
  29456. "type": "string"
  29457. },
  29458. "seq": {
  29459. "type": "integer"
  29460. },
  29461. "version": {
  29462. "type": "integer"
  29463. }
  29464. },
  29465. "required": ["aggregateID", "seq", "version"],
  29466. "additionalProperties": false
  29467. },
  29468. "location": {
  29469. "$ref": "#/components/schemas/LocationRef"
  29470. },
  29471. "data": {
  29472. "type": "object",
  29473. "properties": {
  29474. "timestamp": {
  29475. "type": "number"
  29476. },
  29477. "sessionID": {
  29478. "type": "string",
  29479. "pattern": "^ses"
  29480. },
  29481. "messageID": {
  29482. "type": "string",
  29483. "pattern": "^msg_"
  29484. },
  29485. "reason": {
  29486. "type": "string",
  29487. "enum": ["auto", "manual"]
  29488. }
  29489. },
  29490. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29491. "additionalProperties": false
  29492. }
  29493. },
  29494. "required": ["id", "type", "data"],
  29495. "additionalProperties": false
  29496. },
  29497. "SessionNextCompactionEnded": {
  29498. "type": "object",
  29499. "properties": {
  29500. "id": {
  29501. "type": "string",
  29502. "pattern": "^evt_"
  29503. },
  29504. "metadata": {
  29505. "type": "object"
  29506. },
  29507. "type": {
  29508. "type": "string",
  29509. "enum": ["session.next.compaction.ended"]
  29510. },
  29511. "durable": {
  29512. "type": "object",
  29513. "properties": {
  29514. "aggregateID": {
  29515. "type": "string"
  29516. },
  29517. "seq": {
  29518. "type": "integer"
  29519. },
  29520. "version": {
  29521. "type": "integer"
  29522. }
  29523. },
  29524. "required": ["aggregateID", "seq", "version"],
  29525. "additionalProperties": false
  29526. },
  29527. "location": {
  29528. "$ref": "#/components/schemas/LocationRef"
  29529. },
  29530. "data": {
  29531. "type": "object",
  29532. "properties": {
  29533. "timestamp": {
  29534. "type": "number"
  29535. },
  29536. "sessionID": {
  29537. "type": "string",
  29538. "pattern": "^ses"
  29539. },
  29540. "messageID": {
  29541. "type": "string",
  29542. "pattern": "^msg_"
  29543. },
  29544. "reason": {
  29545. "type": "string",
  29546. "enum": ["auto", "manual"]
  29547. },
  29548. "text": {
  29549. "type": "string"
  29550. },
  29551. "recent": {
  29552. "type": "string"
  29553. }
  29554. },
  29555. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29556. "additionalProperties": false
  29557. }
  29558. },
  29559. "required": ["id", "type", "data"],
  29560. "additionalProperties": false
  29561. },
  29562. "SessionNextRevertStaged": {
  29563. "type": "object",
  29564. "properties": {
  29565. "id": {
  29566. "type": "string",
  29567. "pattern": "^evt_"
  29568. },
  29569. "metadata": {
  29570. "type": "object"
  29571. },
  29572. "type": {
  29573. "type": "string",
  29574. "enum": ["session.next.revert.staged"]
  29575. },
  29576. "durable": {
  29577. "type": "object",
  29578. "properties": {
  29579. "aggregateID": {
  29580. "type": "string"
  29581. },
  29582. "seq": {
  29583. "type": "integer"
  29584. },
  29585. "version": {
  29586. "type": "integer"
  29587. }
  29588. },
  29589. "required": ["aggregateID", "seq", "version"],
  29590. "additionalProperties": false
  29591. },
  29592. "location": {
  29593. "$ref": "#/components/schemas/LocationRef"
  29594. },
  29595. "data": {
  29596. "type": "object",
  29597. "properties": {
  29598. "timestamp": {
  29599. "type": "number"
  29600. },
  29601. "sessionID": {
  29602. "type": "string",
  29603. "pattern": "^ses"
  29604. },
  29605. "revert": {
  29606. "$ref": "#/components/schemas/RevertState"
  29607. }
  29608. },
  29609. "required": ["timestamp", "sessionID", "revert"],
  29610. "additionalProperties": false
  29611. }
  29612. },
  29613. "required": ["id", "type", "data"],
  29614. "additionalProperties": false
  29615. },
  29616. "SessionNextRevertCleared": {
  29617. "type": "object",
  29618. "properties": {
  29619. "id": {
  29620. "type": "string",
  29621. "pattern": "^evt_"
  29622. },
  29623. "metadata": {
  29624. "type": "object"
  29625. },
  29626. "type": {
  29627. "type": "string",
  29628. "enum": ["session.next.revert.cleared"]
  29629. },
  29630. "durable": {
  29631. "type": "object",
  29632. "properties": {
  29633. "aggregateID": {
  29634. "type": "string"
  29635. },
  29636. "seq": {
  29637. "type": "integer"
  29638. },
  29639. "version": {
  29640. "type": "integer"
  29641. }
  29642. },
  29643. "required": ["aggregateID", "seq", "version"],
  29644. "additionalProperties": false
  29645. },
  29646. "location": {
  29647. "$ref": "#/components/schemas/LocationRef"
  29648. },
  29649. "data": {
  29650. "type": "object",
  29651. "properties": {
  29652. "timestamp": {
  29653. "type": "number"
  29654. },
  29655. "sessionID": {
  29656. "type": "string",
  29657. "pattern": "^ses"
  29658. }
  29659. },
  29660. "required": ["timestamp", "sessionID"],
  29661. "additionalProperties": false
  29662. }
  29663. },
  29664. "required": ["id", "type", "data"],
  29665. "additionalProperties": false
  29666. },
  29667. "SessionNextRevertCommitted": {
  29668. "type": "object",
  29669. "properties": {
  29670. "id": {
  29671. "type": "string",
  29672. "pattern": "^evt_"
  29673. },
  29674. "metadata": {
  29675. "type": "object"
  29676. },
  29677. "type": {
  29678. "type": "string",
  29679. "enum": ["session.next.revert.committed"]
  29680. },
  29681. "durable": {
  29682. "type": "object",
  29683. "properties": {
  29684. "aggregateID": {
  29685. "type": "string"
  29686. },
  29687. "seq": {
  29688. "type": "integer"
  29689. },
  29690. "version": {
  29691. "type": "integer"
  29692. }
  29693. },
  29694. "required": ["aggregateID", "seq", "version"],
  29695. "additionalProperties": false
  29696. },
  29697. "location": {
  29698. "$ref": "#/components/schemas/LocationRef"
  29699. },
  29700. "data": {
  29701. "type": "object",
  29702. "properties": {
  29703. "timestamp": {
  29704. "type": "number"
  29705. },
  29706. "sessionID": {
  29707. "type": "string",
  29708. "pattern": "^ses"
  29709. },
  29710. "messageID": {
  29711. "type": "string",
  29712. "pattern": "^msg_"
  29713. }
  29714. },
  29715. "required": ["timestamp", "sessionID", "messageID"],
  29716. "additionalProperties": false
  29717. }
  29718. },
  29719. "required": ["id", "type", "data"],
  29720. "additionalProperties": false
  29721. },
  29722. "ModelApi": {
  29723. "anyOf": [
  29724. {
  29725. "type": "object",
  29726. "properties": {
  29727. "id": {
  29728. "type": "string"
  29729. },
  29730. "type": {
  29731. "type": "string",
  29732. "enum": ["aisdk"]
  29733. },
  29734. "package": {
  29735. "type": "string"
  29736. },
  29737. "url": {
  29738. "type": "string"
  29739. },
  29740. "settings": {
  29741. "type": "object"
  29742. }
  29743. },
  29744. "required": ["id", "type", "package"],
  29745. "additionalProperties": false
  29746. },
  29747. {
  29748. "type": "object",
  29749. "properties": {
  29750. "id": {
  29751. "type": "string"
  29752. },
  29753. "type": {
  29754. "type": "string",
  29755. "enum": ["native"]
  29756. },
  29757. "url": {
  29758. "type": "string"
  29759. },
  29760. "settings": {
  29761. "type": "object"
  29762. }
  29763. },
  29764. "required": ["id", "type", "settings"],
  29765. "additionalProperties": false
  29766. }
  29767. ]
  29768. },
  29769. "ModelCapabilities": {
  29770. "type": "object",
  29771. "properties": {
  29772. "tools": {
  29773. "type": "boolean"
  29774. },
  29775. "input": {
  29776. "type": "array",
  29777. "items": {
  29778. "type": "string"
  29779. }
  29780. },
  29781. "output": {
  29782. "type": "array",
  29783. "items": {
  29784. "type": "string"
  29785. }
  29786. }
  29787. },
  29788. "required": ["tools", "input", "output"],
  29789. "additionalProperties": false
  29790. },
  29791. "ModelCost": {
  29792. "type": "object",
  29793. "properties": {
  29794. "tier": {
  29795. "type": "object",
  29796. "properties": {
  29797. "type": {
  29798. "type": "string",
  29799. "enum": ["context"]
  29800. },
  29801. "size": {
  29802. "type": "integer"
  29803. }
  29804. },
  29805. "required": ["type", "size"],
  29806. "additionalProperties": false
  29807. },
  29808. "input": {
  29809. "type": "number"
  29810. },
  29811. "output": {
  29812. "type": "number"
  29813. },
  29814. "cache": {
  29815. "type": "object",
  29816. "properties": {
  29817. "read": {
  29818. "type": "number"
  29819. },
  29820. "write": {
  29821. "type": "number"
  29822. }
  29823. },
  29824. "required": ["read", "write"],
  29825. "additionalProperties": false
  29826. }
  29827. },
  29828. "required": ["input", "output", "cache"],
  29829. "additionalProperties": false
  29830. },
  29831. "ModelV2Info": {
  29832. "type": "object",
  29833. "properties": {
  29834. "id": {
  29835. "type": "string"
  29836. },
  29837. "providerID": {
  29838. "type": "string"
  29839. },
  29840. "family": {
  29841. "type": "string"
  29842. },
  29843. "name": {
  29844. "type": "string"
  29845. },
  29846. "api": {
  29847. "$ref": "#/components/schemas/ModelApi"
  29848. },
  29849. "capabilities": {
  29850. "$ref": "#/components/schemas/ModelCapabilities"
  29851. },
  29852. "request": {
  29853. "type": "object",
  29854. "properties": {
  29855. "headers": {
  29856. "type": "object",
  29857. "additionalProperties": {
  29858. "type": "string"
  29859. }
  29860. },
  29861. "body": {
  29862. "type": "object"
  29863. },
  29864. "variant": {
  29865. "type": "string"
  29866. }
  29867. },
  29868. "required": ["headers", "body"],
  29869. "additionalProperties": false
  29870. },
  29871. "variants": {
  29872. "type": "array",
  29873. "items": {
  29874. "type": "object",
  29875. "properties": {
  29876. "id": {
  29877. "type": "string"
  29878. },
  29879. "headers": {
  29880. "type": "object",
  29881. "additionalProperties": {
  29882. "type": "string"
  29883. }
  29884. },
  29885. "body": {
  29886. "type": "object"
  29887. }
  29888. },
  29889. "required": ["id", "headers", "body"],
  29890. "additionalProperties": false
  29891. }
  29892. },
  29893. "time": {
  29894. "type": "object",
  29895. "properties": {
  29896. "released": {
  29897. "type": "number"
  29898. }
  29899. },
  29900. "required": ["released"],
  29901. "additionalProperties": false
  29902. },
  29903. "cost": {
  29904. "type": "array",
  29905. "items": {
  29906. "$ref": "#/components/schemas/ModelCost"
  29907. }
  29908. },
  29909. "status": {
  29910. "type": "string",
  29911. "enum": ["alpha", "beta", "deprecated", "active"]
  29912. },
  29913. "enabled": {
  29914. "type": "boolean"
  29915. },
  29916. "limit": {
  29917. "type": "object",
  29918. "properties": {
  29919. "context": {
  29920. "type": "integer"
  29921. },
  29922. "input": {
  29923. "type": "integer"
  29924. },
  29925. "output": {
  29926. "type": "integer"
  29927. }
  29928. },
  29929. "required": ["context", "output"],
  29930. "additionalProperties": false
  29931. }
  29932. },
  29933. "required": [
  29934. "id",
  29935. "providerID",
  29936. "name",
  29937. "api",
  29938. "capabilities",
  29939. "request",
  29940. "variants",
  29941. "time",
  29942. "cost",
  29943. "status",
  29944. "enabled",
  29945. "limit"
  29946. ],
  29947. "additionalProperties": false
  29948. },
  29949. "ProviderAISDK": {
  29950. "type": "object",
  29951. "properties": {
  29952. "type": {
  29953. "type": "string",
  29954. "enum": ["aisdk"]
  29955. },
  29956. "package": {
  29957. "type": "string"
  29958. },
  29959. "url": {
  29960. "type": "string"
  29961. },
  29962. "settings": {
  29963. "type": "object"
  29964. }
  29965. },
  29966. "required": ["type", "package"],
  29967. "additionalProperties": false
  29968. },
  29969. "ProviderNative": {
  29970. "type": "object",
  29971. "properties": {
  29972. "type": {
  29973. "type": "string",
  29974. "enum": ["native"]
  29975. },
  29976. "url": {
  29977. "type": "string"
  29978. },
  29979. "settings": {
  29980. "type": "object"
  29981. }
  29982. },
  29983. "required": ["type", "settings"],
  29984. "additionalProperties": false
  29985. },
  29986. "ProviderApi": {
  29987. "anyOf": [
  29988. {
  29989. "$ref": "#/components/schemas/ProviderAISDK"
  29990. },
  29991. {
  29992. "$ref": "#/components/schemas/ProviderNative"
  29993. }
  29994. ]
  29995. },
  29996. "ProviderV2Info": {
  29997. "type": "object",
  29998. "properties": {
  29999. "id": {
  30000. "type": "string"
  30001. },
  30002. "integrationID": {
  30003. "type": "string"
  30004. },
  30005. "name": {
  30006. "type": "string"
  30007. },
  30008. "disabled": {
  30009. "type": "boolean"
  30010. },
  30011. "api": {
  30012. "$ref": "#/components/schemas/ProviderApi"
  30013. },
  30014. "request": {
  30015. "$ref": "#/components/schemas/ProviderRequest"
  30016. }
  30017. },
  30018. "required": ["id", "name", "api", "request"],
  30019. "additionalProperties": false
  30020. },
  30021. "IntegrationWhen": {
  30022. "type": "object",
  30023. "properties": {
  30024. "key": {
  30025. "type": "string"
  30026. },
  30027. "op": {
  30028. "type": "string",
  30029. "enum": ["eq", "neq"]
  30030. },
  30031. "value": {
  30032. "type": "string"
  30033. }
  30034. },
  30035. "required": ["key", "op", "value"],
  30036. "additionalProperties": false
  30037. },
  30038. "IntegrationTextPrompt": {
  30039. "type": "object",
  30040. "properties": {
  30041. "type": {
  30042. "type": "string",
  30043. "enum": ["text"]
  30044. },
  30045. "key": {
  30046. "type": "string"
  30047. },
  30048. "message": {
  30049. "type": "string"
  30050. },
  30051. "placeholder": {
  30052. "type": "string"
  30053. },
  30054. "when": {
  30055. "$ref": "#/components/schemas/IntegrationWhen"
  30056. }
  30057. },
  30058. "required": ["type", "key", "message"],
  30059. "additionalProperties": false
  30060. },
  30061. "IntegrationSelectPrompt": {
  30062. "type": "object",
  30063. "properties": {
  30064. "type": {
  30065. "type": "string",
  30066. "enum": ["select"]
  30067. },
  30068. "key": {
  30069. "type": "string"
  30070. },
  30071. "message": {
  30072. "type": "string"
  30073. },
  30074. "options": {
  30075. "type": "array",
  30076. "items": {
  30077. "type": "object",
  30078. "properties": {
  30079. "label": {
  30080. "type": "string"
  30081. },
  30082. "value": {
  30083. "type": "string"
  30084. },
  30085. "hint": {
  30086. "type": "string"
  30087. }
  30088. },
  30089. "required": ["label", "value"],
  30090. "additionalProperties": false
  30091. }
  30092. },
  30093. "when": {
  30094. "$ref": "#/components/schemas/IntegrationWhen"
  30095. }
  30096. },
  30097. "required": ["type", "key", "message", "options"],
  30098. "additionalProperties": false
  30099. },
  30100. "IntegrationOAuthMethod": {
  30101. "type": "object",
  30102. "properties": {
  30103. "id": {
  30104. "type": "string"
  30105. },
  30106. "type": {
  30107. "type": "string",
  30108. "enum": ["oauth"]
  30109. },
  30110. "label": {
  30111. "type": "string"
  30112. },
  30113. "prompts": {
  30114. "type": "array",
  30115. "items": {
  30116. "anyOf": [
  30117. {
  30118. "$ref": "#/components/schemas/IntegrationTextPrompt"
  30119. },
  30120. {
  30121. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  30122. }
  30123. ]
  30124. }
  30125. }
  30126. },
  30127. "required": ["id", "type", "label"],
  30128. "additionalProperties": false
  30129. },
  30130. "IntegrationKeyMethod": {
  30131. "type": "object",
  30132. "properties": {
  30133. "type": {
  30134. "type": "string",
  30135. "enum": ["key"]
  30136. },
  30137. "label": {
  30138. "type": "string"
  30139. }
  30140. },
  30141. "required": ["type"],
  30142. "additionalProperties": false
  30143. },
  30144. "IntegrationEnvMethod": {
  30145. "type": "object",
  30146. "properties": {
  30147. "type": {
  30148. "type": "string",
  30149. "enum": ["env"]
  30150. },
  30151. "names": {
  30152. "type": "array",
  30153. "items": {
  30154. "type": "string"
  30155. }
  30156. }
  30157. },
  30158. "required": ["type", "names"],
  30159. "additionalProperties": false
  30160. },
  30161. "ConnectionCredentialInfo": {
  30162. "type": "object",
  30163. "properties": {
  30164. "type": {
  30165. "type": "string",
  30166. "enum": ["credential"]
  30167. },
  30168. "id": {
  30169. "type": "string"
  30170. },
  30171. "label": {
  30172. "type": "string"
  30173. }
  30174. },
  30175. "required": ["type", "id", "label"],
  30176. "additionalProperties": false
  30177. },
  30178. "ConnectionEnvInfo": {
  30179. "type": "object",
  30180. "properties": {
  30181. "type": {
  30182. "type": "string",
  30183. "enum": ["env"]
  30184. },
  30185. "name": {
  30186. "type": "string"
  30187. }
  30188. },
  30189. "required": ["type", "name"],
  30190. "additionalProperties": false
  30191. },
  30192. "ConnectionInfo": {
  30193. "anyOf": [
  30194. {
  30195. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30196. },
  30197. {
  30198. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30199. }
  30200. ]
  30201. },
  30202. "IntegrationInfo": {
  30203. "type": "object",
  30204. "properties": {
  30205. "id": {
  30206. "type": "string"
  30207. },
  30208. "name": {
  30209. "type": "string"
  30210. },
  30211. "methods": {
  30212. "type": "array",
  30213. "items": {
  30214. "$ref": "#/components/schemas/IntegrationMethod"
  30215. }
  30216. },
  30217. "connections": {
  30218. "type": "array",
  30219. "items": {
  30220. "$ref": "#/components/schemas/ConnectionInfo"
  30221. }
  30222. }
  30223. },
  30224. "required": ["id", "name", "methods", "connections"],
  30225. "additionalProperties": false
  30226. },
  30227. "IntegrationAttempt": {
  30228. "type": "object",
  30229. "properties": {
  30230. "attemptID": {
  30231. "type": "string"
  30232. },
  30233. "url": {
  30234. "type": "string"
  30235. },
  30236. "instructions": {
  30237. "type": "string"
  30238. },
  30239. "mode": {
  30240. "type": "string",
  30241. "enum": ["auto", "code"]
  30242. },
  30243. "time": {
  30244. "type": "object",
  30245. "properties": {
  30246. "created": {
  30247. "anyOf": [
  30248. {
  30249. "type": "number"
  30250. },
  30251. {
  30252. "type": "string",
  30253. "enum": ["NaN"]
  30254. },
  30255. {
  30256. "type": "string",
  30257. "enum": ["Infinity"]
  30258. },
  30259. {
  30260. "type": "string",
  30261. "enum": ["-Infinity"]
  30262. },
  30263. {
  30264. "type": "string",
  30265. "enum": ["Infinity", "-Infinity", "NaN"]
  30266. }
  30267. ]
  30268. },
  30269. "expires": {
  30270. "anyOf": [
  30271. {
  30272. "type": "number"
  30273. },
  30274. {
  30275. "type": "string",
  30276. "enum": ["NaN"]
  30277. },
  30278. {
  30279. "type": "string",
  30280. "enum": ["Infinity"]
  30281. },
  30282. {
  30283. "type": "string",
  30284. "enum": ["-Infinity"]
  30285. },
  30286. {
  30287. "type": "string",
  30288. "enum": ["Infinity", "-Infinity", "NaN"]
  30289. }
  30290. ]
  30291. }
  30292. },
  30293. "required": ["created", "expires"],
  30294. "additionalProperties": false
  30295. }
  30296. },
  30297. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30298. "additionalProperties": false
  30299. },
  30300. "IntegrationAttemptStatus": {
  30301. "anyOf": [
  30302. {
  30303. "type": "object",
  30304. "properties": {
  30305. "status": {
  30306. "type": "string",
  30307. "enum": ["pending"]
  30308. },
  30309. "time": {
  30310. "type": "object",
  30311. "properties": {
  30312. "created": {
  30313. "anyOf": [
  30314. {
  30315. "type": "number"
  30316. },
  30317. {
  30318. "type": "string",
  30319. "enum": ["NaN"]
  30320. },
  30321. {
  30322. "type": "string",
  30323. "enum": ["Infinity"]
  30324. },
  30325. {
  30326. "type": "string",
  30327. "enum": ["-Infinity"]
  30328. },
  30329. {
  30330. "type": "string",
  30331. "enum": ["Infinity", "-Infinity", "NaN"]
  30332. }
  30333. ]
  30334. },
  30335. "expires": {
  30336. "anyOf": [
  30337. {
  30338. "type": "number"
  30339. },
  30340. {
  30341. "type": "string",
  30342. "enum": ["NaN"]
  30343. },
  30344. {
  30345. "type": "string",
  30346. "enum": ["Infinity"]
  30347. },
  30348. {
  30349. "type": "string",
  30350. "enum": ["-Infinity"]
  30351. },
  30352. {
  30353. "type": "string",
  30354. "enum": ["Infinity", "-Infinity", "NaN"]
  30355. }
  30356. ]
  30357. }
  30358. },
  30359. "required": ["created", "expires"],
  30360. "additionalProperties": false
  30361. }
  30362. },
  30363. "required": ["status", "time"],
  30364. "additionalProperties": false
  30365. },
  30366. {
  30367. "type": "object",
  30368. "properties": {
  30369. "status": {
  30370. "type": "string",
  30371. "enum": ["complete"]
  30372. },
  30373. "time": {
  30374. "type": "object",
  30375. "properties": {
  30376. "created": {
  30377. "anyOf": [
  30378. {
  30379. "type": "number"
  30380. },
  30381. {
  30382. "type": "string",
  30383. "enum": ["NaN"]
  30384. },
  30385. {
  30386. "type": "string",
  30387. "enum": ["Infinity"]
  30388. },
  30389. {
  30390. "type": "string",
  30391. "enum": ["-Infinity"]
  30392. },
  30393. {
  30394. "type": "string",
  30395. "enum": ["Infinity", "-Infinity", "NaN"]
  30396. }
  30397. ]
  30398. },
  30399. "expires": {
  30400. "anyOf": [
  30401. {
  30402. "type": "number"
  30403. },
  30404. {
  30405. "type": "string",
  30406. "enum": ["NaN"]
  30407. },
  30408. {
  30409. "type": "string",
  30410. "enum": ["Infinity"]
  30411. },
  30412. {
  30413. "type": "string",
  30414. "enum": ["-Infinity"]
  30415. },
  30416. {
  30417. "type": "string",
  30418. "enum": ["Infinity", "-Infinity", "NaN"]
  30419. }
  30420. ]
  30421. }
  30422. },
  30423. "required": ["created", "expires"],
  30424. "additionalProperties": false
  30425. }
  30426. },
  30427. "required": ["status", "time"],
  30428. "additionalProperties": false
  30429. },
  30430. {
  30431. "type": "object",
  30432. "properties": {
  30433. "status": {
  30434. "type": "string",
  30435. "enum": ["failed"]
  30436. },
  30437. "message": {
  30438. "type": "string"
  30439. },
  30440. "time": {
  30441. "type": "object",
  30442. "properties": {
  30443. "created": {
  30444. "anyOf": [
  30445. {
  30446. "type": "number"
  30447. },
  30448. {
  30449. "type": "string",
  30450. "enum": ["NaN"]
  30451. },
  30452. {
  30453. "type": "string",
  30454. "enum": ["Infinity"]
  30455. },
  30456. {
  30457. "type": "string",
  30458. "enum": ["-Infinity"]
  30459. },
  30460. {
  30461. "type": "string",
  30462. "enum": ["Infinity", "-Infinity", "NaN"]
  30463. }
  30464. ]
  30465. },
  30466. "expires": {
  30467. "anyOf": [
  30468. {
  30469. "type": "number"
  30470. },
  30471. {
  30472. "type": "string",
  30473. "enum": ["NaN"]
  30474. },
  30475. {
  30476. "type": "string",
  30477. "enum": ["Infinity"]
  30478. },
  30479. {
  30480. "type": "string",
  30481. "enum": ["-Infinity"]
  30482. },
  30483. {
  30484. "type": "string",
  30485. "enum": ["Infinity", "-Infinity", "NaN"]
  30486. }
  30487. ]
  30488. }
  30489. },
  30490. "required": ["created", "expires"],
  30491. "additionalProperties": false
  30492. }
  30493. },
  30494. "required": ["status", "message", "time"],
  30495. "additionalProperties": false
  30496. },
  30497. {
  30498. "type": "object",
  30499. "properties": {
  30500. "status": {
  30501. "type": "string",
  30502. "enum": ["expired"]
  30503. },
  30504. "time": {
  30505. "type": "object",
  30506. "properties": {
  30507. "created": {
  30508. "anyOf": [
  30509. {
  30510. "type": "number"
  30511. },
  30512. {
  30513. "type": "string",
  30514. "enum": ["NaN"]
  30515. },
  30516. {
  30517. "type": "string",
  30518. "enum": ["Infinity"]
  30519. },
  30520. {
  30521. "type": "string",
  30522. "enum": ["-Infinity"]
  30523. },
  30524. {
  30525. "type": "string",
  30526. "enum": ["Infinity", "-Infinity", "NaN"]
  30527. }
  30528. ]
  30529. },
  30530. "expires": {
  30531. "anyOf": [
  30532. {
  30533. "type": "number"
  30534. },
  30535. {
  30536. "type": "string",
  30537. "enum": ["NaN"]
  30538. },
  30539. {
  30540. "type": "string",
  30541. "enum": ["Infinity"]
  30542. },
  30543. {
  30544. "type": "string",
  30545. "enum": ["-Infinity"]
  30546. },
  30547. {
  30548. "type": "string",
  30549. "enum": ["Infinity", "-Infinity", "NaN"]
  30550. }
  30551. ]
  30552. }
  30553. },
  30554. "required": ["created", "expires"],
  30555. "additionalProperties": false
  30556. }
  30557. },
  30558. "required": ["status", "time"],
  30559. "additionalProperties": false
  30560. }
  30561. ]
  30562. },
  30563. "PermissionV2Request": {
  30564. "type": "object",
  30565. "properties": {
  30566. "id": {
  30567. "type": "string",
  30568. "pattern": "^per"
  30569. },
  30570. "sessionID": {
  30571. "type": "string",
  30572. "pattern": "^ses"
  30573. },
  30574. "action": {
  30575. "type": "string"
  30576. },
  30577. "resources": {
  30578. "type": "array",
  30579. "items": {
  30580. "type": "string"
  30581. }
  30582. },
  30583. "save": {
  30584. "type": "array",
  30585. "items": {
  30586. "type": "string"
  30587. }
  30588. },
  30589. "metadata": {
  30590. "type": "object"
  30591. },
  30592. "source": {
  30593. "$ref": "#/components/schemas/PermissionV2Source"
  30594. }
  30595. },
  30596. "required": ["id", "sessionID", "action", "resources"],
  30597. "additionalProperties": false
  30598. },
  30599. "PermissionSavedInfo": {
  30600. "type": "object",
  30601. "properties": {
  30602. "id": {
  30603. "type": "string"
  30604. },
  30605. "projectID": {
  30606. "type": "string"
  30607. },
  30608. "action": {
  30609. "type": "string"
  30610. },
  30611. "resource": {
  30612. "type": "string"
  30613. }
  30614. },
  30615. "required": ["id", "projectID", "action", "resource"],
  30616. "additionalProperties": false
  30617. },
  30618. "FileSystemEntry": {
  30619. "type": "object",
  30620. "properties": {
  30621. "path": {
  30622. "type": "string"
  30623. },
  30624. "type": {
  30625. "type": "string",
  30626. "enum": ["file", "directory"]
  30627. }
  30628. },
  30629. "required": ["path", "type"],
  30630. "additionalProperties": false
  30631. },
  30632. "CommandV2Info": {
  30633. "type": "object",
  30634. "properties": {
  30635. "name": {
  30636. "type": "string"
  30637. },
  30638. "template": {
  30639. "type": "string"
  30640. },
  30641. "description": {
  30642. "type": "string"
  30643. },
  30644. "agent": {
  30645. "type": "string"
  30646. },
  30647. "model": {
  30648. "$ref": "#/components/schemas/ModelRef"
  30649. },
  30650. "subtask": {
  30651. "type": "boolean"
  30652. }
  30653. },
  30654. "required": ["name", "template"],
  30655. "additionalProperties": false
  30656. },
  30657. "SkillV2Info": {
  30658. "type": "object",
  30659. "properties": {
  30660. "name": {
  30661. "type": "string"
  30662. },
  30663. "description": {
  30664. "type": "string"
  30665. },
  30666. "slash": {
  30667. "type": "boolean"
  30668. },
  30669. "location": {
  30670. "type": "string"
  30671. },
  30672. "content": {
  30673. "type": "string"
  30674. }
  30675. },
  30676. "required": ["name", "location", "content"],
  30677. "additionalProperties": false
  30678. },
  30679. "Models-devRefreshed": {
  30680. "type": "object",
  30681. "properties": {
  30682. "id": {
  30683. "type": "string",
  30684. "pattern": "^evt_"
  30685. },
  30686. "metadata": {
  30687. "type": "object"
  30688. },
  30689. "type": {
  30690. "type": "string",
  30691. "enum": ["models-dev.refreshed"]
  30692. },
  30693. "durable": {
  30694. "type": "object",
  30695. "properties": {
  30696. "aggregateID": {
  30697. "type": "string"
  30698. },
  30699. "seq": {
  30700. "type": "integer"
  30701. },
  30702. "version": {
  30703. "type": "integer"
  30704. }
  30705. },
  30706. "required": ["aggregateID", "seq", "version"],
  30707. "additionalProperties": false
  30708. },
  30709. "location": {
  30710. "$ref": "#/components/schemas/LocationRef"
  30711. },
  30712. "data": {
  30713. "type": "object",
  30714. "properties": {}
  30715. }
  30716. },
  30717. "required": ["id", "type", "data"],
  30718. "additionalProperties": false
  30719. },
  30720. "IntegrationUpdated": {
  30721. "type": "object",
  30722. "properties": {
  30723. "id": {
  30724. "type": "string",
  30725. "pattern": "^evt_"
  30726. },
  30727. "metadata": {
  30728. "type": "object"
  30729. },
  30730. "type": {
  30731. "type": "string",
  30732. "enum": ["integration.updated"]
  30733. },
  30734. "durable": {
  30735. "type": "object",
  30736. "properties": {
  30737. "aggregateID": {
  30738. "type": "string"
  30739. },
  30740. "seq": {
  30741. "type": "integer"
  30742. },
  30743. "version": {
  30744. "type": "integer"
  30745. }
  30746. },
  30747. "required": ["aggregateID", "seq", "version"],
  30748. "additionalProperties": false
  30749. },
  30750. "location": {
  30751. "$ref": "#/components/schemas/LocationRef"
  30752. },
  30753. "data": {
  30754. "type": "object",
  30755. "properties": {}
  30756. }
  30757. },
  30758. "required": ["id", "type", "data"],
  30759. "additionalProperties": false
  30760. },
  30761. "IntegrationConnectionUpdated": {
  30762. "type": "object",
  30763. "properties": {
  30764. "id": {
  30765. "type": "string",
  30766. "pattern": "^evt_"
  30767. },
  30768. "metadata": {
  30769. "type": "object"
  30770. },
  30771. "type": {
  30772. "type": "string",
  30773. "enum": ["integration.connection.updated"]
  30774. },
  30775. "durable": {
  30776. "type": "object",
  30777. "properties": {
  30778. "aggregateID": {
  30779. "type": "string"
  30780. },
  30781. "seq": {
  30782. "type": "integer"
  30783. },
  30784. "version": {
  30785. "type": "integer"
  30786. }
  30787. },
  30788. "required": ["aggregateID", "seq", "version"],
  30789. "additionalProperties": false
  30790. },
  30791. "location": {
  30792. "$ref": "#/components/schemas/LocationRef"
  30793. },
  30794. "data": {
  30795. "type": "object",
  30796. "properties": {
  30797. "integrationID": {
  30798. "type": "string"
  30799. }
  30800. },
  30801. "required": ["integrationID"],
  30802. "additionalProperties": false
  30803. }
  30804. },
  30805. "required": ["id", "type", "data"],
  30806. "additionalProperties": false
  30807. },
  30808. "CatalogUpdated": {
  30809. "type": "object",
  30810. "properties": {
  30811. "id": {
  30812. "type": "string",
  30813. "pattern": "^evt_"
  30814. },
  30815. "metadata": {
  30816. "type": "object"
  30817. },
  30818. "type": {
  30819. "type": "string",
  30820. "enum": ["catalog.updated"]
  30821. },
  30822. "durable": {
  30823. "type": "object",
  30824. "properties": {
  30825. "aggregateID": {
  30826. "type": "string"
  30827. },
  30828. "seq": {
  30829. "type": "integer"
  30830. },
  30831. "version": {
  30832. "type": "integer"
  30833. }
  30834. },
  30835. "required": ["aggregateID", "seq", "version"],
  30836. "additionalProperties": false
  30837. },
  30838. "location": {
  30839. "$ref": "#/components/schemas/LocationRef"
  30840. },
  30841. "data": {
  30842. "type": "object",
  30843. "properties": {}
  30844. }
  30845. },
  30846. "required": ["id", "type", "data"],
  30847. "additionalProperties": false
  30848. },
  30849. "SessionCreated": {
  30850. "type": "object",
  30851. "properties": {
  30852. "id": {
  30853. "type": "string",
  30854. "pattern": "^evt_"
  30855. },
  30856. "metadata": {
  30857. "type": "object"
  30858. },
  30859. "type": {
  30860. "type": "string",
  30861. "enum": ["session.created"]
  30862. },
  30863. "durable": {
  30864. "type": "object",
  30865. "properties": {
  30866. "aggregateID": {
  30867. "type": "string"
  30868. },
  30869. "seq": {
  30870. "type": "integer"
  30871. },
  30872. "version": {
  30873. "type": "integer"
  30874. }
  30875. },
  30876. "required": ["aggregateID", "seq", "version"],
  30877. "additionalProperties": false
  30878. },
  30879. "location": {
  30880. "$ref": "#/components/schemas/LocationRef"
  30881. },
  30882. "data": {
  30883. "type": "object",
  30884. "properties": {
  30885. "sessionID": {
  30886. "type": "string",
  30887. "pattern": "^ses"
  30888. },
  30889. "info": {
  30890. "$ref": "#/components/schemas/Session"
  30891. }
  30892. },
  30893. "required": ["sessionID", "info"],
  30894. "additionalProperties": false
  30895. }
  30896. },
  30897. "required": ["id", "type", "data"],
  30898. "additionalProperties": false
  30899. },
  30900. "SessionUpdated": {
  30901. "type": "object",
  30902. "properties": {
  30903. "id": {
  30904. "type": "string",
  30905. "pattern": "^evt_"
  30906. },
  30907. "metadata": {
  30908. "type": "object"
  30909. },
  30910. "type": {
  30911. "type": "string",
  30912. "enum": ["session.updated"]
  30913. },
  30914. "durable": {
  30915. "type": "object",
  30916. "properties": {
  30917. "aggregateID": {
  30918. "type": "string"
  30919. },
  30920. "seq": {
  30921. "type": "integer"
  30922. },
  30923. "version": {
  30924. "type": "integer"
  30925. }
  30926. },
  30927. "required": ["aggregateID", "seq", "version"],
  30928. "additionalProperties": false
  30929. },
  30930. "location": {
  30931. "$ref": "#/components/schemas/LocationRef"
  30932. },
  30933. "data": {
  30934. "type": "object",
  30935. "properties": {
  30936. "sessionID": {
  30937. "type": "string",
  30938. "pattern": "^ses"
  30939. },
  30940. "info": {
  30941. "$ref": "#/components/schemas/Session"
  30942. }
  30943. },
  30944. "required": ["sessionID", "info"],
  30945. "additionalProperties": false
  30946. }
  30947. },
  30948. "required": ["id", "type", "data"],
  30949. "additionalProperties": false
  30950. },
  30951. "SessionDeleted": {
  30952. "type": "object",
  30953. "properties": {
  30954. "id": {
  30955. "type": "string",
  30956. "pattern": "^evt_"
  30957. },
  30958. "metadata": {
  30959. "type": "object"
  30960. },
  30961. "type": {
  30962. "type": "string",
  30963. "enum": ["session.deleted"]
  30964. },
  30965. "durable": {
  30966. "type": "object",
  30967. "properties": {
  30968. "aggregateID": {
  30969. "type": "string"
  30970. },
  30971. "seq": {
  30972. "type": "integer"
  30973. },
  30974. "version": {
  30975. "type": "integer"
  30976. }
  30977. },
  30978. "required": ["aggregateID", "seq", "version"],
  30979. "additionalProperties": false
  30980. },
  30981. "location": {
  30982. "$ref": "#/components/schemas/LocationRef"
  30983. },
  30984. "data": {
  30985. "type": "object",
  30986. "properties": {
  30987. "sessionID": {
  30988. "type": "string",
  30989. "pattern": "^ses"
  30990. },
  30991. "info": {
  30992. "$ref": "#/components/schemas/Session"
  30993. }
  30994. },
  30995. "required": ["sessionID", "info"],
  30996. "additionalProperties": false
  30997. }
  30998. },
  30999. "required": ["id", "type", "data"],
  31000. "additionalProperties": false
  31001. },
  31002. "MessageUpdated": {
  31003. "type": "object",
  31004. "properties": {
  31005. "id": {
  31006. "type": "string",
  31007. "pattern": "^evt_"
  31008. },
  31009. "metadata": {
  31010. "type": "object"
  31011. },
  31012. "type": {
  31013. "type": "string",
  31014. "enum": ["message.updated"]
  31015. },
  31016. "durable": {
  31017. "type": "object",
  31018. "properties": {
  31019. "aggregateID": {
  31020. "type": "string"
  31021. },
  31022. "seq": {
  31023. "type": "integer"
  31024. },
  31025. "version": {
  31026. "type": "integer"
  31027. }
  31028. },
  31029. "required": ["aggregateID", "seq", "version"],
  31030. "additionalProperties": false
  31031. },
  31032. "location": {
  31033. "$ref": "#/components/schemas/LocationRef"
  31034. },
  31035. "data": {
  31036. "type": "object",
  31037. "properties": {
  31038. "sessionID": {
  31039. "type": "string",
  31040. "pattern": "^ses"
  31041. },
  31042. "info": {
  31043. "$ref": "#/components/schemas/Message"
  31044. }
  31045. },
  31046. "required": ["sessionID", "info"],
  31047. "additionalProperties": false
  31048. }
  31049. },
  31050. "required": ["id", "type", "data"],
  31051. "additionalProperties": false
  31052. },
  31053. "MessageRemoved": {
  31054. "type": "object",
  31055. "properties": {
  31056. "id": {
  31057. "type": "string",
  31058. "pattern": "^evt_"
  31059. },
  31060. "metadata": {
  31061. "type": "object"
  31062. },
  31063. "type": {
  31064. "type": "string",
  31065. "enum": ["message.removed"]
  31066. },
  31067. "durable": {
  31068. "type": "object",
  31069. "properties": {
  31070. "aggregateID": {
  31071. "type": "string"
  31072. },
  31073. "seq": {
  31074. "type": "integer"
  31075. },
  31076. "version": {
  31077. "type": "integer"
  31078. }
  31079. },
  31080. "required": ["aggregateID", "seq", "version"],
  31081. "additionalProperties": false
  31082. },
  31083. "location": {
  31084. "$ref": "#/components/schemas/LocationRef"
  31085. },
  31086. "data": {
  31087. "type": "object",
  31088. "properties": {
  31089. "sessionID": {
  31090. "type": "string",
  31091. "pattern": "^ses"
  31092. },
  31093. "messageID": {
  31094. "type": "string",
  31095. "pattern": "^msg"
  31096. }
  31097. },
  31098. "required": ["sessionID", "messageID"],
  31099. "additionalProperties": false
  31100. }
  31101. },
  31102. "required": ["id", "type", "data"],
  31103. "additionalProperties": false
  31104. },
  31105. "MessagePartUpdated": {
  31106. "type": "object",
  31107. "properties": {
  31108. "id": {
  31109. "type": "string",
  31110. "pattern": "^evt_"
  31111. },
  31112. "metadata": {
  31113. "type": "object"
  31114. },
  31115. "type": {
  31116. "type": "string",
  31117. "enum": ["message.part.updated"]
  31118. },
  31119. "durable": {
  31120. "type": "object",
  31121. "properties": {
  31122. "aggregateID": {
  31123. "type": "string"
  31124. },
  31125. "seq": {
  31126. "type": "integer"
  31127. },
  31128. "version": {
  31129. "type": "integer"
  31130. }
  31131. },
  31132. "required": ["aggregateID", "seq", "version"],
  31133. "additionalProperties": false
  31134. },
  31135. "location": {
  31136. "$ref": "#/components/schemas/LocationRef"
  31137. },
  31138. "data": {
  31139. "type": "object",
  31140. "properties": {
  31141. "sessionID": {
  31142. "type": "string",
  31143. "pattern": "^ses"
  31144. },
  31145. "part": {
  31146. "$ref": "#/components/schemas/Part"
  31147. },
  31148. "time": {
  31149. "type": "number"
  31150. }
  31151. },
  31152. "required": ["sessionID", "part", "time"],
  31153. "additionalProperties": false
  31154. }
  31155. },
  31156. "required": ["id", "type", "data"],
  31157. "additionalProperties": false
  31158. },
  31159. "MessagePartRemoved": {
  31160. "type": "object",
  31161. "properties": {
  31162. "id": {
  31163. "type": "string",
  31164. "pattern": "^evt_"
  31165. },
  31166. "metadata": {
  31167. "type": "object"
  31168. },
  31169. "type": {
  31170. "type": "string",
  31171. "enum": ["message.part.removed"]
  31172. },
  31173. "durable": {
  31174. "type": "object",
  31175. "properties": {
  31176. "aggregateID": {
  31177. "type": "string"
  31178. },
  31179. "seq": {
  31180. "type": "integer"
  31181. },
  31182. "version": {
  31183. "type": "integer"
  31184. }
  31185. },
  31186. "required": ["aggregateID", "seq", "version"],
  31187. "additionalProperties": false
  31188. },
  31189. "location": {
  31190. "$ref": "#/components/schemas/LocationRef"
  31191. },
  31192. "data": {
  31193. "type": "object",
  31194. "properties": {
  31195. "sessionID": {
  31196. "type": "string",
  31197. "pattern": "^ses"
  31198. },
  31199. "messageID": {
  31200. "type": "string",
  31201. "pattern": "^msg"
  31202. },
  31203. "partID": {
  31204. "type": "string",
  31205. "pattern": "^prt"
  31206. }
  31207. },
  31208. "required": ["sessionID", "messageID", "partID"],
  31209. "additionalProperties": false
  31210. }
  31211. },
  31212. "required": ["id", "type", "data"],
  31213. "additionalProperties": false
  31214. },
  31215. "SessionNextTextDelta": {
  31216. "type": "object",
  31217. "properties": {
  31218. "id": {
  31219. "type": "string",
  31220. "pattern": "^evt_"
  31221. },
  31222. "metadata": {
  31223. "type": "object"
  31224. },
  31225. "type": {
  31226. "type": "string",
  31227. "enum": ["session.next.text.delta"]
  31228. },
  31229. "durable": {
  31230. "type": "object",
  31231. "properties": {
  31232. "aggregateID": {
  31233. "type": "string"
  31234. },
  31235. "seq": {
  31236. "type": "integer"
  31237. },
  31238. "version": {
  31239. "type": "integer"
  31240. }
  31241. },
  31242. "required": ["aggregateID", "seq", "version"],
  31243. "additionalProperties": false
  31244. },
  31245. "location": {
  31246. "$ref": "#/components/schemas/LocationRef"
  31247. },
  31248. "data": {
  31249. "type": "object",
  31250. "properties": {
  31251. "timestamp": {
  31252. "type": "number"
  31253. },
  31254. "sessionID": {
  31255. "type": "string",
  31256. "pattern": "^ses"
  31257. },
  31258. "assistantMessageID": {
  31259. "type": "string",
  31260. "pattern": "^msg_"
  31261. },
  31262. "textID": {
  31263. "type": "string"
  31264. },
  31265. "delta": {
  31266. "type": "string"
  31267. }
  31268. },
  31269. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  31270. "additionalProperties": false
  31271. }
  31272. },
  31273. "required": ["id", "type", "data"],
  31274. "additionalProperties": false
  31275. },
  31276. "SessionNextReasoningDelta": {
  31277. "type": "object",
  31278. "properties": {
  31279. "id": {
  31280. "type": "string",
  31281. "pattern": "^evt_"
  31282. },
  31283. "metadata": {
  31284. "type": "object"
  31285. },
  31286. "type": {
  31287. "type": "string",
  31288. "enum": ["session.next.reasoning.delta"]
  31289. },
  31290. "durable": {
  31291. "type": "object",
  31292. "properties": {
  31293. "aggregateID": {
  31294. "type": "string"
  31295. },
  31296. "seq": {
  31297. "type": "integer"
  31298. },
  31299. "version": {
  31300. "type": "integer"
  31301. }
  31302. },
  31303. "required": ["aggregateID", "seq", "version"],
  31304. "additionalProperties": false
  31305. },
  31306. "location": {
  31307. "$ref": "#/components/schemas/LocationRef"
  31308. },
  31309. "data": {
  31310. "type": "object",
  31311. "properties": {
  31312. "timestamp": {
  31313. "type": "number"
  31314. },
  31315. "sessionID": {
  31316. "type": "string",
  31317. "pattern": "^ses"
  31318. },
  31319. "assistantMessageID": {
  31320. "type": "string",
  31321. "pattern": "^msg_"
  31322. },
  31323. "reasoningID": {
  31324. "type": "string"
  31325. },
  31326. "delta": {
  31327. "type": "string"
  31328. }
  31329. },
  31330. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  31331. "additionalProperties": false
  31332. }
  31333. },
  31334. "required": ["id", "type", "data"],
  31335. "additionalProperties": false
  31336. },
  31337. "SessionNextToolInputDelta": {
  31338. "type": "object",
  31339. "properties": {
  31340. "id": {
  31341. "type": "string",
  31342. "pattern": "^evt_"
  31343. },
  31344. "metadata": {
  31345. "type": "object"
  31346. },
  31347. "type": {
  31348. "type": "string",
  31349. "enum": ["session.next.tool.input.delta"]
  31350. },
  31351. "durable": {
  31352. "type": "object",
  31353. "properties": {
  31354. "aggregateID": {
  31355. "type": "string"
  31356. },
  31357. "seq": {
  31358. "type": "integer"
  31359. },
  31360. "version": {
  31361. "type": "integer"
  31362. }
  31363. },
  31364. "required": ["aggregateID", "seq", "version"],
  31365. "additionalProperties": false
  31366. },
  31367. "location": {
  31368. "$ref": "#/components/schemas/LocationRef"
  31369. },
  31370. "data": {
  31371. "type": "object",
  31372. "properties": {
  31373. "timestamp": {
  31374. "type": "number"
  31375. },
  31376. "sessionID": {
  31377. "type": "string",
  31378. "pattern": "^ses"
  31379. },
  31380. "assistantMessageID": {
  31381. "type": "string",
  31382. "pattern": "^msg_"
  31383. },
  31384. "callID": {
  31385. "type": "string"
  31386. },
  31387. "delta": {
  31388. "type": "string"
  31389. }
  31390. },
  31391. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  31392. "additionalProperties": false
  31393. }
  31394. },
  31395. "required": ["id", "type", "data"],
  31396. "additionalProperties": false
  31397. },
  31398. "SessionNextCompactionDelta": {
  31399. "type": "object",
  31400. "properties": {
  31401. "id": {
  31402. "type": "string",
  31403. "pattern": "^evt_"
  31404. },
  31405. "metadata": {
  31406. "type": "object"
  31407. },
  31408. "type": {
  31409. "type": "string",
  31410. "enum": ["session.next.compaction.delta"]
  31411. },
  31412. "durable": {
  31413. "type": "object",
  31414. "properties": {
  31415. "aggregateID": {
  31416. "type": "string"
  31417. },
  31418. "seq": {
  31419. "type": "integer"
  31420. },
  31421. "version": {
  31422. "type": "integer"
  31423. }
  31424. },
  31425. "required": ["aggregateID", "seq", "version"],
  31426. "additionalProperties": false
  31427. },
  31428. "location": {
  31429. "$ref": "#/components/schemas/LocationRef"
  31430. },
  31431. "data": {
  31432. "type": "object",
  31433. "properties": {
  31434. "timestamp": {
  31435. "type": "number"
  31436. },
  31437. "sessionID": {
  31438. "type": "string",
  31439. "pattern": "^ses"
  31440. },
  31441. "messageID": {
  31442. "type": "string",
  31443. "pattern": "^msg_"
  31444. },
  31445. "text": {
  31446. "type": "string"
  31447. }
  31448. },
  31449. "required": ["timestamp", "sessionID", "messageID", "text"],
  31450. "additionalProperties": false
  31451. }
  31452. },
  31453. "required": ["id", "type", "data"],
  31454. "additionalProperties": false
  31455. },
  31456. "MessagePartDelta": {
  31457. "type": "object",
  31458. "properties": {
  31459. "id": {
  31460. "type": "string",
  31461. "pattern": "^evt_"
  31462. },
  31463. "metadata": {
  31464. "type": "object"
  31465. },
  31466. "type": {
  31467. "type": "string",
  31468. "enum": ["message.part.delta"]
  31469. },
  31470. "durable": {
  31471. "type": "object",
  31472. "properties": {
  31473. "aggregateID": {
  31474. "type": "string"
  31475. },
  31476. "seq": {
  31477. "type": "integer"
  31478. },
  31479. "version": {
  31480. "type": "integer"
  31481. }
  31482. },
  31483. "required": ["aggregateID", "seq", "version"],
  31484. "additionalProperties": false
  31485. },
  31486. "location": {
  31487. "$ref": "#/components/schemas/LocationRef"
  31488. },
  31489. "data": {
  31490. "type": "object",
  31491. "properties": {
  31492. "sessionID": {
  31493. "type": "string",
  31494. "pattern": "^ses"
  31495. },
  31496. "messageID": {
  31497. "type": "string",
  31498. "pattern": "^msg"
  31499. },
  31500. "partID": {
  31501. "type": "string",
  31502. "pattern": "^prt"
  31503. },
  31504. "field": {
  31505. "type": "string"
  31506. },
  31507. "delta": {
  31508. "type": "string"
  31509. }
  31510. },
  31511. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  31512. "additionalProperties": false
  31513. }
  31514. },
  31515. "required": ["id", "type", "data"],
  31516. "additionalProperties": false
  31517. },
  31518. "SessionDiff": {
  31519. "type": "object",
  31520. "properties": {
  31521. "id": {
  31522. "type": "string",
  31523. "pattern": "^evt_"
  31524. },
  31525. "metadata": {
  31526. "type": "object"
  31527. },
  31528. "type": {
  31529. "type": "string",
  31530. "enum": ["session.diff"]
  31531. },
  31532. "durable": {
  31533. "type": "object",
  31534. "properties": {
  31535. "aggregateID": {
  31536. "type": "string"
  31537. },
  31538. "seq": {
  31539. "type": "integer"
  31540. },
  31541. "version": {
  31542. "type": "integer"
  31543. }
  31544. },
  31545. "required": ["aggregateID", "seq", "version"],
  31546. "additionalProperties": false
  31547. },
  31548. "location": {
  31549. "$ref": "#/components/schemas/LocationRef"
  31550. },
  31551. "data": {
  31552. "type": "object",
  31553. "properties": {
  31554. "sessionID": {
  31555. "type": "string",
  31556. "pattern": "^ses"
  31557. },
  31558. "diff": {
  31559. "type": "array",
  31560. "items": {
  31561. "$ref": "#/components/schemas/SnapshotFileDiff"
  31562. }
  31563. }
  31564. },
  31565. "required": ["sessionID", "diff"],
  31566. "additionalProperties": false
  31567. }
  31568. },
  31569. "required": ["id", "type", "data"],
  31570. "additionalProperties": false
  31571. },
  31572. "SessionError": {
  31573. "type": "object",
  31574. "properties": {
  31575. "id": {
  31576. "type": "string",
  31577. "pattern": "^evt_"
  31578. },
  31579. "metadata": {
  31580. "type": "object"
  31581. },
  31582. "type": {
  31583. "type": "string",
  31584. "enum": ["session.error"]
  31585. },
  31586. "durable": {
  31587. "type": "object",
  31588. "properties": {
  31589. "aggregateID": {
  31590. "type": "string"
  31591. },
  31592. "seq": {
  31593. "type": "integer"
  31594. },
  31595. "version": {
  31596. "type": "integer"
  31597. }
  31598. },
  31599. "required": ["aggregateID", "seq", "version"],
  31600. "additionalProperties": false
  31601. },
  31602. "location": {
  31603. "$ref": "#/components/schemas/LocationRef"
  31604. },
  31605. "data": {
  31606. "type": "object",
  31607. "properties": {
  31608. "sessionID": {
  31609. "type": "string",
  31610. "pattern": "^ses"
  31611. },
  31612. "error": {
  31613. "anyOf": [
  31614. {
  31615. "$ref": "#/components/schemas/ProviderAuthError"
  31616. },
  31617. {
  31618. "$ref": "#/components/schemas/UnknownError"
  31619. },
  31620. {
  31621. "$ref": "#/components/schemas/MessageOutputLengthError"
  31622. },
  31623. {
  31624. "$ref": "#/components/schemas/MessageAbortedError"
  31625. },
  31626. {
  31627. "$ref": "#/components/schemas/StructuredOutputError"
  31628. },
  31629. {
  31630. "$ref": "#/components/schemas/ContextOverflowError"
  31631. },
  31632. {
  31633. "$ref": "#/components/schemas/ContentFilterError"
  31634. },
  31635. {
  31636. "$ref": "#/components/schemas/APIError"
  31637. }
  31638. ]
  31639. }
  31640. },
  31641. "additionalProperties": false
  31642. }
  31643. },
  31644. "required": ["id", "type", "data"],
  31645. "additionalProperties": false
  31646. },
  31647. "InstallationUpdated": {
  31648. "type": "object",
  31649. "properties": {
  31650. "id": {
  31651. "type": "string",
  31652. "pattern": "^evt_"
  31653. },
  31654. "metadata": {
  31655. "type": "object"
  31656. },
  31657. "type": {
  31658. "type": "string",
  31659. "enum": ["installation.updated"]
  31660. },
  31661. "durable": {
  31662. "type": "object",
  31663. "properties": {
  31664. "aggregateID": {
  31665. "type": "string"
  31666. },
  31667. "seq": {
  31668. "type": "integer"
  31669. },
  31670. "version": {
  31671. "type": "integer"
  31672. }
  31673. },
  31674. "required": ["aggregateID", "seq", "version"],
  31675. "additionalProperties": false
  31676. },
  31677. "location": {
  31678. "$ref": "#/components/schemas/LocationRef"
  31679. },
  31680. "data": {
  31681. "type": "object",
  31682. "properties": {
  31683. "version": {
  31684. "type": "string"
  31685. }
  31686. },
  31687. "required": ["version"],
  31688. "additionalProperties": false
  31689. }
  31690. },
  31691. "required": ["id", "type", "data"],
  31692. "additionalProperties": false
  31693. },
  31694. "InstallationUpdate-available": {
  31695. "type": "object",
  31696. "properties": {
  31697. "id": {
  31698. "type": "string",
  31699. "pattern": "^evt_"
  31700. },
  31701. "metadata": {
  31702. "type": "object"
  31703. },
  31704. "type": {
  31705. "type": "string",
  31706. "enum": ["installation.update-available"]
  31707. },
  31708. "durable": {
  31709. "type": "object",
  31710. "properties": {
  31711. "aggregateID": {
  31712. "type": "string"
  31713. },
  31714. "seq": {
  31715. "type": "integer"
  31716. },
  31717. "version": {
  31718. "type": "integer"
  31719. }
  31720. },
  31721. "required": ["aggregateID", "seq", "version"],
  31722. "additionalProperties": false
  31723. },
  31724. "location": {
  31725. "$ref": "#/components/schemas/LocationRef"
  31726. },
  31727. "data": {
  31728. "type": "object",
  31729. "properties": {
  31730. "version": {
  31731. "type": "string"
  31732. }
  31733. },
  31734. "required": ["version"],
  31735. "additionalProperties": false
  31736. }
  31737. },
  31738. "required": ["id", "type", "data"],
  31739. "additionalProperties": false
  31740. },
  31741. "FileEdited": {
  31742. "type": "object",
  31743. "properties": {
  31744. "id": {
  31745. "type": "string",
  31746. "pattern": "^evt_"
  31747. },
  31748. "metadata": {
  31749. "type": "object"
  31750. },
  31751. "type": {
  31752. "type": "string",
  31753. "enum": ["file.edited"]
  31754. },
  31755. "durable": {
  31756. "type": "object",
  31757. "properties": {
  31758. "aggregateID": {
  31759. "type": "string"
  31760. },
  31761. "seq": {
  31762. "type": "integer"
  31763. },
  31764. "version": {
  31765. "type": "integer"
  31766. }
  31767. },
  31768. "required": ["aggregateID", "seq", "version"],
  31769. "additionalProperties": false
  31770. },
  31771. "location": {
  31772. "$ref": "#/components/schemas/LocationRef"
  31773. },
  31774. "data": {
  31775. "type": "object",
  31776. "properties": {
  31777. "file": {
  31778. "type": "string"
  31779. }
  31780. },
  31781. "required": ["file"],
  31782. "additionalProperties": false
  31783. }
  31784. },
  31785. "required": ["id", "type", "data"],
  31786. "additionalProperties": false
  31787. },
  31788. "ReferenceUpdated": {
  31789. "type": "object",
  31790. "properties": {
  31791. "id": {
  31792. "type": "string",
  31793. "pattern": "^evt_"
  31794. },
  31795. "metadata": {
  31796. "type": "object"
  31797. },
  31798. "type": {
  31799. "type": "string",
  31800. "enum": ["reference.updated"]
  31801. },
  31802. "durable": {
  31803. "type": "object",
  31804. "properties": {
  31805. "aggregateID": {
  31806. "type": "string"
  31807. },
  31808. "seq": {
  31809. "type": "integer"
  31810. },
  31811. "version": {
  31812. "type": "integer"
  31813. }
  31814. },
  31815. "required": ["aggregateID", "seq", "version"],
  31816. "additionalProperties": false
  31817. },
  31818. "location": {
  31819. "$ref": "#/components/schemas/LocationRef"
  31820. },
  31821. "data": {
  31822. "type": "object",
  31823. "properties": {}
  31824. }
  31825. },
  31826. "required": ["id", "type", "data"],
  31827. "additionalProperties": false
  31828. },
  31829. "PermissionV2Asked": {
  31830. "type": "object",
  31831. "properties": {
  31832. "id": {
  31833. "type": "string",
  31834. "pattern": "^evt_"
  31835. },
  31836. "metadata": {
  31837. "type": "object"
  31838. },
  31839. "type": {
  31840. "type": "string",
  31841. "enum": ["permission.v2.asked"]
  31842. },
  31843. "durable": {
  31844. "type": "object",
  31845. "properties": {
  31846. "aggregateID": {
  31847. "type": "string"
  31848. },
  31849. "seq": {
  31850. "type": "integer"
  31851. },
  31852. "version": {
  31853. "type": "integer"
  31854. }
  31855. },
  31856. "required": ["aggregateID", "seq", "version"],
  31857. "additionalProperties": false
  31858. },
  31859. "location": {
  31860. "$ref": "#/components/schemas/LocationRef"
  31861. },
  31862. "data": {
  31863. "type": "object",
  31864. "properties": {
  31865. "id": {
  31866. "type": "string",
  31867. "pattern": "^per"
  31868. },
  31869. "sessionID": {
  31870. "type": "string",
  31871. "pattern": "^ses"
  31872. },
  31873. "action": {
  31874. "type": "string"
  31875. },
  31876. "resources": {
  31877. "type": "array",
  31878. "items": {
  31879. "type": "string"
  31880. }
  31881. },
  31882. "save": {
  31883. "type": "array",
  31884. "items": {
  31885. "type": "string"
  31886. }
  31887. },
  31888. "metadata": {
  31889. "type": "object"
  31890. },
  31891. "source": {
  31892. "$ref": "#/components/schemas/PermissionV2Source"
  31893. }
  31894. },
  31895. "required": ["id", "sessionID", "action", "resources"],
  31896. "additionalProperties": false
  31897. }
  31898. },
  31899. "required": ["id", "type", "data"],
  31900. "additionalProperties": false
  31901. },
  31902. "PermissionV2Replied": {
  31903. "type": "object",
  31904. "properties": {
  31905. "id": {
  31906. "type": "string",
  31907. "pattern": "^evt_"
  31908. },
  31909. "metadata": {
  31910. "type": "object"
  31911. },
  31912. "type": {
  31913. "type": "string",
  31914. "enum": ["permission.v2.replied"]
  31915. },
  31916. "durable": {
  31917. "type": "object",
  31918. "properties": {
  31919. "aggregateID": {
  31920. "type": "string"
  31921. },
  31922. "seq": {
  31923. "type": "integer"
  31924. },
  31925. "version": {
  31926. "type": "integer"
  31927. }
  31928. },
  31929. "required": ["aggregateID", "seq", "version"],
  31930. "additionalProperties": false
  31931. },
  31932. "location": {
  31933. "$ref": "#/components/schemas/LocationRef"
  31934. },
  31935. "data": {
  31936. "type": "object",
  31937. "properties": {
  31938. "sessionID": {
  31939. "type": "string",
  31940. "pattern": "^ses"
  31941. },
  31942. "requestID": {
  31943. "type": "string",
  31944. "pattern": "^per"
  31945. },
  31946. "reply": {
  31947. "$ref": "#/components/schemas/PermissionV2Reply"
  31948. }
  31949. },
  31950. "required": ["sessionID", "requestID", "reply"],
  31951. "additionalProperties": false
  31952. }
  31953. },
  31954. "required": ["id", "type", "data"],
  31955. "additionalProperties": false
  31956. },
  31957. "PluginAdded": {
  31958. "type": "object",
  31959. "properties": {
  31960. "id": {
  31961. "type": "string",
  31962. "pattern": "^evt_"
  31963. },
  31964. "metadata": {
  31965. "type": "object"
  31966. },
  31967. "type": {
  31968. "type": "string",
  31969. "enum": ["plugin.added"]
  31970. },
  31971. "durable": {
  31972. "type": "object",
  31973. "properties": {
  31974. "aggregateID": {
  31975. "type": "string"
  31976. },
  31977. "seq": {
  31978. "type": "integer"
  31979. },
  31980. "version": {
  31981. "type": "integer"
  31982. }
  31983. },
  31984. "required": ["aggregateID", "seq", "version"],
  31985. "additionalProperties": false
  31986. },
  31987. "location": {
  31988. "$ref": "#/components/schemas/LocationRef"
  31989. },
  31990. "data": {
  31991. "type": "object",
  31992. "properties": {
  31993. "id": {
  31994. "type": "string"
  31995. }
  31996. },
  31997. "required": ["id"],
  31998. "additionalProperties": false
  31999. }
  32000. },
  32001. "required": ["id", "type", "data"],
  32002. "additionalProperties": false
  32003. },
  32004. "ProjectDirectoriesUpdated": {
  32005. "type": "object",
  32006. "properties": {
  32007. "id": {
  32008. "type": "string",
  32009. "pattern": "^evt_"
  32010. },
  32011. "metadata": {
  32012. "type": "object"
  32013. },
  32014. "type": {
  32015. "type": "string",
  32016. "enum": ["project.directories.updated"]
  32017. },
  32018. "durable": {
  32019. "type": "object",
  32020. "properties": {
  32021. "aggregateID": {
  32022. "type": "string"
  32023. },
  32024. "seq": {
  32025. "type": "integer"
  32026. },
  32027. "version": {
  32028. "type": "integer"
  32029. }
  32030. },
  32031. "required": ["aggregateID", "seq", "version"],
  32032. "additionalProperties": false
  32033. },
  32034. "location": {
  32035. "$ref": "#/components/schemas/LocationRef"
  32036. },
  32037. "data": {
  32038. "type": "object",
  32039. "properties": {
  32040. "projectID": {
  32041. "type": "string"
  32042. }
  32043. },
  32044. "required": ["projectID"],
  32045. "additionalProperties": false
  32046. }
  32047. },
  32048. "required": ["id", "type", "data"],
  32049. "additionalProperties": false
  32050. },
  32051. "FileWatcherUpdated": {
  32052. "type": "object",
  32053. "properties": {
  32054. "id": {
  32055. "type": "string",
  32056. "pattern": "^evt_"
  32057. },
  32058. "metadata": {
  32059. "type": "object"
  32060. },
  32061. "type": {
  32062. "type": "string",
  32063. "enum": ["file.watcher.updated"]
  32064. },
  32065. "durable": {
  32066. "type": "object",
  32067. "properties": {
  32068. "aggregateID": {
  32069. "type": "string"
  32070. },
  32071. "seq": {
  32072. "type": "integer"
  32073. },
  32074. "version": {
  32075. "type": "integer"
  32076. }
  32077. },
  32078. "required": ["aggregateID", "seq", "version"],
  32079. "additionalProperties": false
  32080. },
  32081. "location": {
  32082. "$ref": "#/components/schemas/LocationRef"
  32083. },
  32084. "data": {
  32085. "type": "object",
  32086. "properties": {
  32087. "file": {
  32088. "type": "string"
  32089. },
  32090. "event": {
  32091. "type": "string",
  32092. "enum": ["add", "change", "unlink"]
  32093. }
  32094. },
  32095. "required": ["file", "event"],
  32096. "additionalProperties": false
  32097. }
  32098. },
  32099. "required": ["id", "type", "data"],
  32100. "additionalProperties": false
  32101. },
  32102. "PtyCreated": {
  32103. "type": "object",
  32104. "properties": {
  32105. "id": {
  32106. "type": "string",
  32107. "pattern": "^evt_"
  32108. },
  32109. "metadata": {
  32110. "type": "object"
  32111. },
  32112. "type": {
  32113. "type": "string",
  32114. "enum": ["pty.created"]
  32115. },
  32116. "durable": {
  32117. "type": "object",
  32118. "properties": {
  32119. "aggregateID": {
  32120. "type": "string"
  32121. },
  32122. "seq": {
  32123. "type": "integer"
  32124. },
  32125. "version": {
  32126. "type": "integer"
  32127. }
  32128. },
  32129. "required": ["aggregateID", "seq", "version"],
  32130. "additionalProperties": false
  32131. },
  32132. "location": {
  32133. "$ref": "#/components/schemas/LocationRef"
  32134. },
  32135. "data": {
  32136. "type": "object",
  32137. "properties": {
  32138. "info": {
  32139. "$ref": "#/components/schemas/Pty"
  32140. }
  32141. },
  32142. "required": ["info"],
  32143. "additionalProperties": false
  32144. }
  32145. },
  32146. "required": ["id", "type", "data"],
  32147. "additionalProperties": false
  32148. },
  32149. "PtyUpdated": {
  32150. "type": "object",
  32151. "properties": {
  32152. "id": {
  32153. "type": "string",
  32154. "pattern": "^evt_"
  32155. },
  32156. "metadata": {
  32157. "type": "object"
  32158. },
  32159. "type": {
  32160. "type": "string",
  32161. "enum": ["pty.updated"]
  32162. },
  32163. "durable": {
  32164. "type": "object",
  32165. "properties": {
  32166. "aggregateID": {
  32167. "type": "string"
  32168. },
  32169. "seq": {
  32170. "type": "integer"
  32171. },
  32172. "version": {
  32173. "type": "integer"
  32174. }
  32175. },
  32176. "required": ["aggregateID", "seq", "version"],
  32177. "additionalProperties": false
  32178. },
  32179. "location": {
  32180. "$ref": "#/components/schemas/LocationRef"
  32181. },
  32182. "data": {
  32183. "type": "object",
  32184. "properties": {
  32185. "info": {
  32186. "$ref": "#/components/schemas/Pty"
  32187. }
  32188. },
  32189. "required": ["info"],
  32190. "additionalProperties": false
  32191. }
  32192. },
  32193. "required": ["id", "type", "data"],
  32194. "additionalProperties": false
  32195. },
  32196. "PtyExited": {
  32197. "type": "object",
  32198. "properties": {
  32199. "id": {
  32200. "type": "string",
  32201. "pattern": "^evt_"
  32202. },
  32203. "metadata": {
  32204. "type": "object"
  32205. },
  32206. "type": {
  32207. "type": "string",
  32208. "enum": ["pty.exited"]
  32209. },
  32210. "durable": {
  32211. "type": "object",
  32212. "properties": {
  32213. "aggregateID": {
  32214. "type": "string"
  32215. },
  32216. "seq": {
  32217. "type": "integer"
  32218. },
  32219. "version": {
  32220. "type": "integer"
  32221. }
  32222. },
  32223. "required": ["aggregateID", "seq", "version"],
  32224. "additionalProperties": false
  32225. },
  32226. "location": {
  32227. "$ref": "#/components/schemas/LocationRef"
  32228. },
  32229. "data": {
  32230. "type": "object",
  32231. "properties": {
  32232. "id": {
  32233. "type": "string",
  32234. "pattern": "^pty"
  32235. },
  32236. "exitCode": {
  32237. "type": "integer",
  32238. "minimum": 0
  32239. }
  32240. },
  32241. "required": ["id", "exitCode"],
  32242. "additionalProperties": false
  32243. }
  32244. },
  32245. "required": ["id", "type", "data"],
  32246. "additionalProperties": false
  32247. },
  32248. "PtyDeleted": {
  32249. "type": "object",
  32250. "properties": {
  32251. "id": {
  32252. "type": "string",
  32253. "pattern": "^evt_"
  32254. },
  32255. "metadata": {
  32256. "type": "object"
  32257. },
  32258. "type": {
  32259. "type": "string",
  32260. "enum": ["pty.deleted"]
  32261. },
  32262. "durable": {
  32263. "type": "object",
  32264. "properties": {
  32265. "aggregateID": {
  32266. "type": "string"
  32267. },
  32268. "seq": {
  32269. "type": "integer"
  32270. },
  32271. "version": {
  32272. "type": "integer"
  32273. }
  32274. },
  32275. "required": ["aggregateID", "seq", "version"],
  32276. "additionalProperties": false
  32277. },
  32278. "location": {
  32279. "$ref": "#/components/schemas/LocationRef"
  32280. },
  32281. "data": {
  32282. "type": "object",
  32283. "properties": {
  32284. "id": {
  32285. "type": "string",
  32286. "pattern": "^pty"
  32287. }
  32288. },
  32289. "required": ["id"],
  32290. "additionalProperties": false
  32291. }
  32292. },
  32293. "required": ["id", "type", "data"],
  32294. "additionalProperties": false
  32295. },
  32296. "QuestionV2Asked": {
  32297. "type": "object",
  32298. "properties": {
  32299. "id": {
  32300. "type": "string",
  32301. "pattern": "^evt_"
  32302. },
  32303. "metadata": {
  32304. "type": "object"
  32305. },
  32306. "type": {
  32307. "type": "string",
  32308. "enum": ["question.v2.asked"]
  32309. },
  32310. "durable": {
  32311. "type": "object",
  32312. "properties": {
  32313. "aggregateID": {
  32314. "type": "string"
  32315. },
  32316. "seq": {
  32317. "type": "integer"
  32318. },
  32319. "version": {
  32320. "type": "integer"
  32321. }
  32322. },
  32323. "required": ["aggregateID", "seq", "version"],
  32324. "additionalProperties": false
  32325. },
  32326. "location": {
  32327. "$ref": "#/components/schemas/LocationRef"
  32328. },
  32329. "data": {
  32330. "type": "object",
  32331. "properties": {
  32332. "id": {
  32333. "type": "string",
  32334. "pattern": "^que"
  32335. },
  32336. "sessionID": {
  32337. "type": "string",
  32338. "pattern": "^ses"
  32339. },
  32340. "questions": {
  32341. "type": "array",
  32342. "items": {
  32343. "$ref": "#/components/schemas/QuestionV2Info"
  32344. },
  32345. "description": "Questions to ask"
  32346. },
  32347. "tool": {
  32348. "$ref": "#/components/schemas/QuestionV2Tool"
  32349. }
  32350. },
  32351. "required": ["id", "sessionID", "questions"],
  32352. "additionalProperties": false
  32353. }
  32354. },
  32355. "required": ["id", "type", "data"],
  32356. "additionalProperties": false
  32357. },
  32358. "QuestionV2Replied": {
  32359. "type": "object",
  32360. "properties": {
  32361. "id": {
  32362. "type": "string",
  32363. "pattern": "^evt_"
  32364. },
  32365. "metadata": {
  32366. "type": "object"
  32367. },
  32368. "type": {
  32369. "type": "string",
  32370. "enum": ["question.v2.replied"]
  32371. },
  32372. "durable": {
  32373. "type": "object",
  32374. "properties": {
  32375. "aggregateID": {
  32376. "type": "string"
  32377. },
  32378. "seq": {
  32379. "type": "integer"
  32380. },
  32381. "version": {
  32382. "type": "integer"
  32383. }
  32384. },
  32385. "required": ["aggregateID", "seq", "version"],
  32386. "additionalProperties": false
  32387. },
  32388. "location": {
  32389. "$ref": "#/components/schemas/LocationRef"
  32390. },
  32391. "data": {
  32392. "type": "object",
  32393. "properties": {
  32394. "sessionID": {
  32395. "type": "string",
  32396. "pattern": "^ses"
  32397. },
  32398. "requestID": {
  32399. "type": "string",
  32400. "pattern": "^que"
  32401. },
  32402. "answers": {
  32403. "type": "array",
  32404. "items": {
  32405. "$ref": "#/components/schemas/QuestionV2Answer"
  32406. }
  32407. }
  32408. },
  32409. "required": ["sessionID", "requestID", "answers"],
  32410. "additionalProperties": false
  32411. }
  32412. },
  32413. "required": ["id", "type", "data"],
  32414. "additionalProperties": false
  32415. },
  32416. "QuestionV2Rejected": {
  32417. "type": "object",
  32418. "properties": {
  32419. "id": {
  32420. "type": "string",
  32421. "pattern": "^evt_"
  32422. },
  32423. "metadata": {
  32424. "type": "object"
  32425. },
  32426. "type": {
  32427. "type": "string",
  32428. "enum": ["question.v2.rejected"]
  32429. },
  32430. "durable": {
  32431. "type": "object",
  32432. "properties": {
  32433. "aggregateID": {
  32434. "type": "string"
  32435. },
  32436. "seq": {
  32437. "type": "integer"
  32438. },
  32439. "version": {
  32440. "type": "integer"
  32441. }
  32442. },
  32443. "required": ["aggregateID", "seq", "version"],
  32444. "additionalProperties": false
  32445. },
  32446. "location": {
  32447. "$ref": "#/components/schemas/LocationRef"
  32448. },
  32449. "data": {
  32450. "type": "object",
  32451. "properties": {
  32452. "sessionID": {
  32453. "type": "string",
  32454. "pattern": "^ses"
  32455. },
  32456. "requestID": {
  32457. "type": "string",
  32458. "pattern": "^que"
  32459. }
  32460. },
  32461. "required": ["sessionID", "requestID"],
  32462. "additionalProperties": false
  32463. }
  32464. },
  32465. "required": ["id", "type", "data"],
  32466. "additionalProperties": false
  32467. },
  32468. "TodoUpdated": {
  32469. "type": "object",
  32470. "properties": {
  32471. "id": {
  32472. "type": "string",
  32473. "pattern": "^evt_"
  32474. },
  32475. "metadata": {
  32476. "type": "object"
  32477. },
  32478. "type": {
  32479. "type": "string",
  32480. "enum": ["todo.updated"]
  32481. },
  32482. "durable": {
  32483. "type": "object",
  32484. "properties": {
  32485. "aggregateID": {
  32486. "type": "string"
  32487. },
  32488. "seq": {
  32489. "type": "integer"
  32490. },
  32491. "version": {
  32492. "type": "integer"
  32493. }
  32494. },
  32495. "required": ["aggregateID", "seq", "version"],
  32496. "additionalProperties": false
  32497. },
  32498. "location": {
  32499. "$ref": "#/components/schemas/LocationRef"
  32500. },
  32501. "data": {
  32502. "type": "object",
  32503. "properties": {
  32504. "sessionID": {
  32505. "type": "string",
  32506. "pattern": "^ses"
  32507. },
  32508. "todos": {
  32509. "type": "array",
  32510. "items": {
  32511. "$ref": "#/components/schemas/Todo"
  32512. }
  32513. }
  32514. },
  32515. "required": ["sessionID", "todos"],
  32516. "additionalProperties": false
  32517. }
  32518. },
  32519. "required": ["id", "type", "data"],
  32520. "additionalProperties": false
  32521. },
  32522. "LspUpdated": {
  32523. "type": "object",
  32524. "properties": {
  32525. "id": {
  32526. "type": "string",
  32527. "pattern": "^evt_"
  32528. },
  32529. "metadata": {
  32530. "type": "object"
  32531. },
  32532. "type": {
  32533. "type": "string",
  32534. "enum": ["lsp.updated"]
  32535. },
  32536. "durable": {
  32537. "type": "object",
  32538. "properties": {
  32539. "aggregateID": {
  32540. "type": "string"
  32541. },
  32542. "seq": {
  32543. "type": "integer"
  32544. },
  32545. "version": {
  32546. "type": "integer"
  32547. }
  32548. },
  32549. "required": ["aggregateID", "seq", "version"],
  32550. "additionalProperties": false
  32551. },
  32552. "location": {
  32553. "$ref": "#/components/schemas/LocationRef"
  32554. },
  32555. "data": {
  32556. "type": "object",
  32557. "properties": {}
  32558. }
  32559. },
  32560. "required": ["id", "type", "data"],
  32561. "additionalProperties": false
  32562. },
  32563. "PermissionAsked": {
  32564. "type": "object",
  32565. "properties": {
  32566. "id": {
  32567. "type": "string",
  32568. "pattern": "^evt_"
  32569. },
  32570. "metadata": {
  32571. "type": "object"
  32572. },
  32573. "type": {
  32574. "type": "string",
  32575. "enum": ["permission.asked"]
  32576. },
  32577. "durable": {
  32578. "type": "object",
  32579. "properties": {
  32580. "aggregateID": {
  32581. "type": "string"
  32582. },
  32583. "seq": {
  32584. "type": "integer"
  32585. },
  32586. "version": {
  32587. "type": "integer"
  32588. }
  32589. },
  32590. "required": ["aggregateID", "seq", "version"],
  32591. "additionalProperties": false
  32592. },
  32593. "location": {
  32594. "$ref": "#/components/schemas/LocationRef"
  32595. },
  32596. "data": {
  32597. "type": "object",
  32598. "properties": {
  32599. "id": {
  32600. "type": "string",
  32601. "pattern": "^per"
  32602. },
  32603. "sessionID": {
  32604. "type": "string",
  32605. "pattern": "^ses"
  32606. },
  32607. "permission": {
  32608. "type": "string"
  32609. },
  32610. "patterns": {
  32611. "type": "array",
  32612. "items": {
  32613. "type": "string"
  32614. }
  32615. },
  32616. "metadata": {
  32617. "type": "object"
  32618. },
  32619. "always": {
  32620. "type": "array",
  32621. "items": {
  32622. "type": "string"
  32623. }
  32624. },
  32625. "tool": {
  32626. "type": "object",
  32627. "properties": {
  32628. "messageID": {
  32629. "type": "string"
  32630. },
  32631. "callID": {
  32632. "type": "string"
  32633. }
  32634. },
  32635. "required": ["messageID", "callID"],
  32636. "additionalProperties": false
  32637. }
  32638. },
  32639. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  32640. "additionalProperties": false
  32641. }
  32642. },
  32643. "required": ["id", "type", "data"],
  32644. "additionalProperties": false
  32645. },
  32646. "PermissionReplied": {
  32647. "type": "object",
  32648. "properties": {
  32649. "id": {
  32650. "type": "string",
  32651. "pattern": "^evt_"
  32652. },
  32653. "metadata": {
  32654. "type": "object"
  32655. },
  32656. "type": {
  32657. "type": "string",
  32658. "enum": ["permission.replied"]
  32659. },
  32660. "durable": {
  32661. "type": "object",
  32662. "properties": {
  32663. "aggregateID": {
  32664. "type": "string"
  32665. },
  32666. "seq": {
  32667. "type": "integer"
  32668. },
  32669. "version": {
  32670. "type": "integer"
  32671. }
  32672. },
  32673. "required": ["aggregateID", "seq", "version"],
  32674. "additionalProperties": false
  32675. },
  32676. "location": {
  32677. "$ref": "#/components/schemas/LocationRef"
  32678. },
  32679. "data": {
  32680. "type": "object",
  32681. "properties": {
  32682. "sessionID": {
  32683. "type": "string",
  32684. "pattern": "^ses"
  32685. },
  32686. "requestID": {
  32687. "type": "string",
  32688. "pattern": "^per"
  32689. },
  32690. "reply": {
  32691. "type": "string",
  32692. "enum": ["once", "always", "reject"]
  32693. }
  32694. },
  32695. "required": ["sessionID", "requestID", "reply"],
  32696. "additionalProperties": false
  32697. }
  32698. },
  32699. "required": ["id", "type", "data"],
  32700. "additionalProperties": false
  32701. },
  32702. "TuiPromptAppend": {
  32703. "type": "object",
  32704. "properties": {
  32705. "id": {
  32706. "type": "string",
  32707. "pattern": "^evt_"
  32708. },
  32709. "metadata": {
  32710. "type": "object"
  32711. },
  32712. "type": {
  32713. "type": "string",
  32714. "enum": ["tui.prompt.append"]
  32715. },
  32716. "durable": {
  32717. "type": "object",
  32718. "properties": {
  32719. "aggregateID": {
  32720. "type": "string"
  32721. },
  32722. "seq": {
  32723. "type": "integer"
  32724. },
  32725. "version": {
  32726. "type": "integer"
  32727. }
  32728. },
  32729. "required": ["aggregateID", "seq", "version"],
  32730. "additionalProperties": false
  32731. },
  32732. "location": {
  32733. "$ref": "#/components/schemas/LocationRef"
  32734. },
  32735. "data": {
  32736. "type": "object",
  32737. "properties": {
  32738. "text": {
  32739. "type": "string"
  32740. }
  32741. },
  32742. "required": ["text"],
  32743. "additionalProperties": false
  32744. }
  32745. },
  32746. "required": ["id", "type", "data"],
  32747. "additionalProperties": false
  32748. },
  32749. "TuiCommandExecute": {
  32750. "type": "object",
  32751. "properties": {
  32752. "id": {
  32753. "type": "string",
  32754. "pattern": "^evt_"
  32755. },
  32756. "metadata": {
  32757. "type": "object"
  32758. },
  32759. "type": {
  32760. "type": "string",
  32761. "enum": ["tui.command.execute"]
  32762. },
  32763. "durable": {
  32764. "type": "object",
  32765. "properties": {
  32766. "aggregateID": {
  32767. "type": "string"
  32768. },
  32769. "seq": {
  32770. "type": "integer"
  32771. },
  32772. "version": {
  32773. "type": "integer"
  32774. }
  32775. },
  32776. "required": ["aggregateID", "seq", "version"],
  32777. "additionalProperties": false
  32778. },
  32779. "location": {
  32780. "$ref": "#/components/schemas/LocationRef"
  32781. },
  32782. "data": {
  32783. "type": "object",
  32784. "properties": {
  32785. "command": {
  32786. "anyOf": [
  32787. {
  32788. "type": "string",
  32789. "enum": [
  32790. "session.list",
  32791. "session.new",
  32792. "session.share",
  32793. "session.interrupt",
  32794. "session.compact",
  32795. "session.page.up",
  32796. "session.page.down",
  32797. "session.line.up",
  32798. "session.line.down",
  32799. "session.half.page.up",
  32800. "session.half.page.down",
  32801. "session.first",
  32802. "session.last",
  32803. "prompt.clear",
  32804. "prompt.submit",
  32805. "agent.cycle"
  32806. ]
  32807. },
  32808. {
  32809. "type": "string"
  32810. }
  32811. ]
  32812. }
  32813. },
  32814. "required": ["command"],
  32815. "additionalProperties": false
  32816. }
  32817. },
  32818. "required": ["id", "type", "data"],
  32819. "additionalProperties": false
  32820. },
  32821. "TuiToastShow": {
  32822. "type": "object",
  32823. "properties": {
  32824. "id": {
  32825. "type": "string",
  32826. "pattern": "^evt_"
  32827. },
  32828. "metadata": {
  32829. "type": "object"
  32830. },
  32831. "type": {
  32832. "type": "string",
  32833. "enum": ["tui.toast.show"]
  32834. },
  32835. "durable": {
  32836. "type": "object",
  32837. "properties": {
  32838. "aggregateID": {
  32839. "type": "string"
  32840. },
  32841. "seq": {
  32842. "type": "integer"
  32843. },
  32844. "version": {
  32845. "type": "integer"
  32846. }
  32847. },
  32848. "required": ["aggregateID", "seq", "version"],
  32849. "additionalProperties": false
  32850. },
  32851. "location": {
  32852. "$ref": "#/components/schemas/LocationRef"
  32853. },
  32854. "data": {
  32855. "type": "object",
  32856. "properties": {
  32857. "title": {
  32858. "type": "string"
  32859. },
  32860. "message": {
  32861. "type": "string"
  32862. },
  32863. "variant": {
  32864. "type": "string",
  32865. "enum": ["info", "success", "warning", "error"]
  32866. },
  32867. "duration": {
  32868. "type": "integer",
  32869. "exclusiveMinimum": 0
  32870. }
  32871. },
  32872. "required": ["message", "variant"],
  32873. "additionalProperties": false
  32874. }
  32875. },
  32876. "required": ["id", "type", "data"],
  32877. "additionalProperties": false
  32878. },
  32879. "TuiSessionSelect": {
  32880. "type": "object",
  32881. "properties": {
  32882. "id": {
  32883. "type": "string",
  32884. "pattern": "^evt_"
  32885. },
  32886. "metadata": {
  32887. "type": "object"
  32888. },
  32889. "type": {
  32890. "type": "string",
  32891. "enum": ["tui.session.select"]
  32892. },
  32893. "durable": {
  32894. "type": "object",
  32895. "properties": {
  32896. "aggregateID": {
  32897. "type": "string"
  32898. },
  32899. "seq": {
  32900. "type": "integer"
  32901. },
  32902. "version": {
  32903. "type": "integer"
  32904. }
  32905. },
  32906. "required": ["aggregateID", "seq", "version"],
  32907. "additionalProperties": false
  32908. },
  32909. "location": {
  32910. "$ref": "#/components/schemas/LocationRef"
  32911. },
  32912. "data": {
  32913. "type": "object",
  32914. "properties": {
  32915. "sessionID": {
  32916. "type": "string",
  32917. "pattern": "^ses",
  32918. "description": "Session ID to navigate to"
  32919. }
  32920. },
  32921. "required": ["sessionID"],
  32922. "additionalProperties": false
  32923. }
  32924. },
  32925. "required": ["id", "type", "data"],
  32926. "additionalProperties": false
  32927. },
  32928. "McpToolsChanged": {
  32929. "type": "object",
  32930. "properties": {
  32931. "id": {
  32932. "type": "string",
  32933. "pattern": "^evt_"
  32934. },
  32935. "metadata": {
  32936. "type": "object"
  32937. },
  32938. "type": {
  32939. "type": "string",
  32940. "enum": ["mcp.tools.changed"]
  32941. },
  32942. "durable": {
  32943. "type": "object",
  32944. "properties": {
  32945. "aggregateID": {
  32946. "type": "string"
  32947. },
  32948. "seq": {
  32949. "type": "integer"
  32950. },
  32951. "version": {
  32952. "type": "integer"
  32953. }
  32954. },
  32955. "required": ["aggregateID", "seq", "version"],
  32956. "additionalProperties": false
  32957. },
  32958. "location": {
  32959. "$ref": "#/components/schemas/LocationRef"
  32960. },
  32961. "data": {
  32962. "type": "object",
  32963. "properties": {
  32964. "server": {
  32965. "type": "string"
  32966. }
  32967. },
  32968. "required": ["server"],
  32969. "additionalProperties": false
  32970. }
  32971. },
  32972. "required": ["id", "type", "data"],
  32973. "additionalProperties": false
  32974. },
  32975. "McpBrowserOpenFailed": {
  32976. "type": "object",
  32977. "properties": {
  32978. "id": {
  32979. "type": "string",
  32980. "pattern": "^evt_"
  32981. },
  32982. "metadata": {
  32983. "type": "object"
  32984. },
  32985. "type": {
  32986. "type": "string",
  32987. "enum": ["mcp.browser.open.failed"]
  32988. },
  32989. "durable": {
  32990. "type": "object",
  32991. "properties": {
  32992. "aggregateID": {
  32993. "type": "string"
  32994. },
  32995. "seq": {
  32996. "type": "integer"
  32997. },
  32998. "version": {
  32999. "type": "integer"
  33000. }
  33001. },
  33002. "required": ["aggregateID", "seq", "version"],
  33003. "additionalProperties": false
  33004. },
  33005. "location": {
  33006. "$ref": "#/components/schemas/LocationRef"
  33007. },
  33008. "data": {
  33009. "type": "object",
  33010. "properties": {
  33011. "mcpName": {
  33012. "type": "string"
  33013. },
  33014. "url": {
  33015. "type": "string"
  33016. }
  33017. },
  33018. "required": ["mcpName", "url"],
  33019. "additionalProperties": false
  33020. }
  33021. },
  33022. "required": ["id", "type", "data"],
  33023. "additionalProperties": false
  33024. },
  33025. "CommandExecuted": {
  33026. "type": "object",
  33027. "properties": {
  33028. "id": {
  33029. "type": "string",
  33030. "pattern": "^evt_"
  33031. },
  33032. "metadata": {
  33033. "type": "object"
  33034. },
  33035. "type": {
  33036. "type": "string",
  33037. "enum": ["command.executed"]
  33038. },
  33039. "durable": {
  33040. "type": "object",
  33041. "properties": {
  33042. "aggregateID": {
  33043. "type": "string"
  33044. },
  33045. "seq": {
  33046. "type": "integer"
  33047. },
  33048. "version": {
  33049. "type": "integer"
  33050. }
  33051. },
  33052. "required": ["aggregateID", "seq", "version"],
  33053. "additionalProperties": false
  33054. },
  33055. "location": {
  33056. "$ref": "#/components/schemas/LocationRef"
  33057. },
  33058. "data": {
  33059. "type": "object",
  33060. "properties": {
  33061. "name": {
  33062. "type": "string"
  33063. },
  33064. "sessionID": {
  33065. "type": "string",
  33066. "pattern": "^ses"
  33067. },
  33068. "arguments": {
  33069. "type": "string"
  33070. },
  33071. "messageID": {
  33072. "type": "string",
  33073. "pattern": "^msg"
  33074. }
  33075. },
  33076. "required": ["name", "sessionID", "arguments", "messageID"],
  33077. "additionalProperties": false
  33078. }
  33079. },
  33080. "required": ["id", "type", "data"],
  33081. "additionalProperties": false
  33082. },
  33083. "ProjectUpdated": {
  33084. "type": "object",
  33085. "properties": {
  33086. "id": {
  33087. "type": "string",
  33088. "pattern": "^evt_"
  33089. },
  33090. "metadata": {
  33091. "type": "object"
  33092. },
  33093. "type": {
  33094. "type": "string",
  33095. "enum": ["project.updated"]
  33096. },
  33097. "durable": {
  33098. "type": "object",
  33099. "properties": {
  33100. "aggregateID": {
  33101. "type": "string"
  33102. },
  33103. "seq": {
  33104. "type": "integer"
  33105. },
  33106. "version": {
  33107. "type": "integer"
  33108. }
  33109. },
  33110. "required": ["aggregateID", "seq", "version"],
  33111. "additionalProperties": false
  33112. },
  33113. "location": {
  33114. "$ref": "#/components/schemas/LocationRef"
  33115. },
  33116. "data": {
  33117. "type": "object",
  33118. "properties": {
  33119. "id": {
  33120. "type": "string"
  33121. },
  33122. "worktree": {
  33123. "type": "string"
  33124. },
  33125. "vcs": {
  33126. "$ref": "#/components/schemas/ProjectVcs"
  33127. },
  33128. "name": {
  33129. "type": "string"
  33130. },
  33131. "icon": {
  33132. "$ref": "#/components/schemas/ProjectIcon"
  33133. },
  33134. "commands": {
  33135. "$ref": "#/components/schemas/ProjectCommands"
  33136. },
  33137. "time": {
  33138. "$ref": "#/components/schemas/ProjectTime"
  33139. },
  33140. "sandboxes": {
  33141. "type": "array",
  33142. "items": {
  33143. "type": "string"
  33144. }
  33145. }
  33146. },
  33147. "required": ["id", "worktree", "time", "sandboxes"],
  33148. "additionalProperties": false
  33149. }
  33150. },
  33151. "required": ["id", "type", "data"],
  33152. "additionalProperties": false
  33153. },
  33154. "SessionIdle": {
  33155. "type": "object",
  33156. "properties": {
  33157. "id": {
  33158. "type": "string",
  33159. "pattern": "^evt_"
  33160. },
  33161. "metadata": {
  33162. "type": "object"
  33163. },
  33164. "type": {
  33165. "type": "string",
  33166. "enum": ["session.idle"]
  33167. },
  33168. "durable": {
  33169. "type": "object",
  33170. "properties": {
  33171. "aggregateID": {
  33172. "type": "string"
  33173. },
  33174. "seq": {
  33175. "type": "integer"
  33176. },
  33177. "version": {
  33178. "type": "integer"
  33179. }
  33180. },
  33181. "required": ["aggregateID", "seq", "version"],
  33182. "additionalProperties": false
  33183. },
  33184. "location": {
  33185. "$ref": "#/components/schemas/LocationRef"
  33186. },
  33187. "data": {
  33188. "type": "object",
  33189. "properties": {
  33190. "sessionID": {
  33191. "type": "string",
  33192. "pattern": "^ses"
  33193. }
  33194. },
  33195. "required": ["sessionID"],
  33196. "additionalProperties": false
  33197. }
  33198. },
  33199. "required": ["id", "type", "data"],
  33200. "additionalProperties": false
  33201. },
  33202. "QuestionAsked": {
  33203. "type": "object",
  33204. "properties": {
  33205. "id": {
  33206. "type": "string",
  33207. "pattern": "^evt_"
  33208. },
  33209. "metadata": {
  33210. "type": "object"
  33211. },
  33212. "type": {
  33213. "type": "string",
  33214. "enum": ["question.asked"]
  33215. },
  33216. "durable": {
  33217. "type": "object",
  33218. "properties": {
  33219. "aggregateID": {
  33220. "type": "string"
  33221. },
  33222. "seq": {
  33223. "type": "integer"
  33224. },
  33225. "version": {
  33226. "type": "integer"
  33227. }
  33228. },
  33229. "required": ["aggregateID", "seq", "version"],
  33230. "additionalProperties": false
  33231. },
  33232. "location": {
  33233. "$ref": "#/components/schemas/LocationRef"
  33234. },
  33235. "data": {
  33236. "type": "object",
  33237. "properties": {
  33238. "id": {
  33239. "type": "string",
  33240. "pattern": "^que"
  33241. },
  33242. "sessionID": {
  33243. "type": "string",
  33244. "pattern": "^ses"
  33245. },
  33246. "questions": {
  33247. "type": "array",
  33248. "items": {
  33249. "$ref": "#/components/schemas/QuestionInfo"
  33250. },
  33251. "description": "Questions to ask"
  33252. },
  33253. "tool": {
  33254. "$ref": "#/components/schemas/QuestionTool"
  33255. }
  33256. },
  33257. "required": ["id", "sessionID", "questions"],
  33258. "additionalProperties": false
  33259. }
  33260. },
  33261. "required": ["id", "type", "data"],
  33262. "additionalProperties": false
  33263. },
  33264. "SessionCompacted": {
  33265. "type": "object",
  33266. "properties": {
  33267. "id": {
  33268. "type": "string",
  33269. "pattern": "^evt_"
  33270. },
  33271. "metadata": {
  33272. "type": "object"
  33273. },
  33274. "type": {
  33275. "type": "string",
  33276. "enum": ["session.compacted"]
  33277. },
  33278. "durable": {
  33279. "type": "object",
  33280. "properties": {
  33281. "aggregateID": {
  33282. "type": "string"
  33283. },
  33284. "seq": {
  33285. "type": "integer"
  33286. },
  33287. "version": {
  33288. "type": "integer"
  33289. }
  33290. },
  33291. "required": ["aggregateID", "seq", "version"],
  33292. "additionalProperties": false
  33293. },
  33294. "location": {
  33295. "$ref": "#/components/schemas/LocationRef"
  33296. },
  33297. "data": {
  33298. "type": "object",
  33299. "properties": {
  33300. "sessionID": {
  33301. "type": "string",
  33302. "pattern": "^ses"
  33303. }
  33304. },
  33305. "required": ["sessionID"],
  33306. "additionalProperties": false
  33307. }
  33308. },
  33309. "required": ["id", "type", "data"],
  33310. "additionalProperties": false
  33311. },
  33312. "VcsBranchUpdated": {
  33313. "type": "object",
  33314. "properties": {
  33315. "id": {
  33316. "type": "string",
  33317. "pattern": "^evt_"
  33318. },
  33319. "metadata": {
  33320. "type": "object"
  33321. },
  33322. "type": {
  33323. "type": "string",
  33324. "enum": ["vcs.branch.updated"]
  33325. },
  33326. "durable": {
  33327. "type": "object",
  33328. "properties": {
  33329. "aggregateID": {
  33330. "type": "string"
  33331. },
  33332. "seq": {
  33333. "type": "integer"
  33334. },
  33335. "version": {
  33336. "type": "integer"
  33337. }
  33338. },
  33339. "required": ["aggregateID", "seq", "version"],
  33340. "additionalProperties": false
  33341. },
  33342. "location": {
  33343. "$ref": "#/components/schemas/LocationRef"
  33344. },
  33345. "data": {
  33346. "type": "object",
  33347. "properties": {
  33348. "branch": {
  33349. "type": "string"
  33350. }
  33351. },
  33352. "additionalProperties": false
  33353. }
  33354. },
  33355. "required": ["id", "type", "data"],
  33356. "additionalProperties": false
  33357. },
  33358. "WorkspaceReady": {
  33359. "type": "object",
  33360. "properties": {
  33361. "id": {
  33362. "type": "string",
  33363. "pattern": "^evt_"
  33364. },
  33365. "metadata": {
  33366. "type": "object"
  33367. },
  33368. "type": {
  33369. "type": "string",
  33370. "enum": ["workspace.ready"]
  33371. },
  33372. "durable": {
  33373. "type": "object",
  33374. "properties": {
  33375. "aggregateID": {
  33376. "type": "string"
  33377. },
  33378. "seq": {
  33379. "type": "integer"
  33380. },
  33381. "version": {
  33382. "type": "integer"
  33383. }
  33384. },
  33385. "required": ["aggregateID", "seq", "version"],
  33386. "additionalProperties": false
  33387. },
  33388. "location": {
  33389. "$ref": "#/components/schemas/LocationRef"
  33390. },
  33391. "data": {
  33392. "type": "object",
  33393. "properties": {
  33394. "name": {
  33395. "type": "string"
  33396. }
  33397. },
  33398. "required": ["name"],
  33399. "additionalProperties": false
  33400. }
  33401. },
  33402. "required": ["id", "type", "data"],
  33403. "additionalProperties": false
  33404. },
  33405. "WorkspaceFailed": {
  33406. "type": "object",
  33407. "properties": {
  33408. "id": {
  33409. "type": "string",
  33410. "pattern": "^evt_"
  33411. },
  33412. "metadata": {
  33413. "type": "object"
  33414. },
  33415. "type": {
  33416. "type": "string",
  33417. "enum": ["workspace.failed"]
  33418. },
  33419. "durable": {
  33420. "type": "object",
  33421. "properties": {
  33422. "aggregateID": {
  33423. "type": "string"
  33424. },
  33425. "seq": {
  33426. "type": "integer"
  33427. },
  33428. "version": {
  33429. "type": "integer"
  33430. }
  33431. },
  33432. "required": ["aggregateID", "seq", "version"],
  33433. "additionalProperties": false
  33434. },
  33435. "location": {
  33436. "$ref": "#/components/schemas/LocationRef"
  33437. },
  33438. "data": {
  33439. "type": "object",
  33440. "properties": {
  33441. "message": {
  33442. "type": "string"
  33443. }
  33444. },
  33445. "required": ["message"],
  33446. "additionalProperties": false
  33447. }
  33448. },
  33449. "required": ["id", "type", "data"],
  33450. "additionalProperties": false
  33451. },
  33452. "WorkspaceStatus": {
  33453. "type": "object",
  33454. "properties": {
  33455. "id": {
  33456. "type": "string",
  33457. "pattern": "^evt_"
  33458. },
  33459. "metadata": {
  33460. "type": "object"
  33461. },
  33462. "type": {
  33463. "type": "string",
  33464. "enum": ["workspace.status"]
  33465. },
  33466. "durable": {
  33467. "type": "object",
  33468. "properties": {
  33469. "aggregateID": {
  33470. "type": "string"
  33471. },
  33472. "seq": {
  33473. "type": "integer"
  33474. },
  33475. "version": {
  33476. "type": "integer"
  33477. }
  33478. },
  33479. "required": ["aggregateID", "seq", "version"],
  33480. "additionalProperties": false
  33481. },
  33482. "location": {
  33483. "$ref": "#/components/schemas/LocationRef"
  33484. },
  33485. "data": {
  33486. "type": "object",
  33487. "properties": {
  33488. "workspaceID": {
  33489. "type": "string",
  33490. "pattern": "^wrk"
  33491. },
  33492. "status": {
  33493. "type": "string",
  33494. "enum": ["connected", "connecting", "disconnected", "error"]
  33495. }
  33496. },
  33497. "required": ["workspaceID", "status"],
  33498. "additionalProperties": false
  33499. }
  33500. },
  33501. "required": ["id", "type", "data"],
  33502. "additionalProperties": false
  33503. },
  33504. "WorktreeReady": {
  33505. "type": "object",
  33506. "properties": {
  33507. "id": {
  33508. "type": "string",
  33509. "pattern": "^evt_"
  33510. },
  33511. "metadata": {
  33512. "type": "object"
  33513. },
  33514. "type": {
  33515. "type": "string",
  33516. "enum": ["worktree.ready"]
  33517. },
  33518. "durable": {
  33519. "type": "object",
  33520. "properties": {
  33521. "aggregateID": {
  33522. "type": "string"
  33523. },
  33524. "seq": {
  33525. "type": "integer"
  33526. },
  33527. "version": {
  33528. "type": "integer"
  33529. }
  33530. },
  33531. "required": ["aggregateID", "seq", "version"],
  33532. "additionalProperties": false
  33533. },
  33534. "location": {
  33535. "$ref": "#/components/schemas/LocationRef"
  33536. },
  33537. "data": {
  33538. "type": "object",
  33539. "properties": {
  33540. "name": {
  33541. "type": "string"
  33542. },
  33543. "branch": {
  33544. "type": "string"
  33545. }
  33546. },
  33547. "required": ["name"],
  33548. "additionalProperties": false
  33549. }
  33550. },
  33551. "required": ["id", "type", "data"],
  33552. "additionalProperties": false
  33553. },
  33554. "WorktreeFailed": {
  33555. "type": "object",
  33556. "properties": {
  33557. "id": {
  33558. "type": "string",
  33559. "pattern": "^evt_"
  33560. },
  33561. "metadata": {
  33562. "type": "object"
  33563. },
  33564. "type": {
  33565. "type": "string",
  33566. "enum": ["worktree.failed"]
  33567. },
  33568. "durable": {
  33569. "type": "object",
  33570. "properties": {
  33571. "aggregateID": {
  33572. "type": "string"
  33573. },
  33574. "seq": {
  33575. "type": "integer"
  33576. },
  33577. "version": {
  33578. "type": "integer"
  33579. }
  33580. },
  33581. "required": ["aggregateID", "seq", "version"],
  33582. "additionalProperties": false
  33583. },
  33584. "location": {
  33585. "$ref": "#/components/schemas/LocationRef"
  33586. },
  33587. "data": {
  33588. "type": "object",
  33589. "properties": {
  33590. "message": {
  33591. "type": "string"
  33592. }
  33593. },
  33594. "required": ["message"],
  33595. "additionalProperties": false
  33596. }
  33597. },
  33598. "required": ["id", "type", "data"],
  33599. "additionalProperties": false
  33600. },
  33601. "ServerConnected": {
  33602. "type": "object",
  33603. "properties": {
  33604. "id": {
  33605. "type": "string",
  33606. "pattern": "^evt_"
  33607. },
  33608. "metadata": {
  33609. "type": "object"
  33610. },
  33611. "type": {
  33612. "type": "string",
  33613. "enum": ["server.connected"]
  33614. },
  33615. "durable": {
  33616. "type": "object",
  33617. "properties": {
  33618. "aggregateID": {
  33619. "type": "string"
  33620. },
  33621. "seq": {
  33622. "type": "integer"
  33623. },
  33624. "version": {
  33625. "type": "integer"
  33626. }
  33627. },
  33628. "required": ["aggregateID", "seq", "version"],
  33629. "additionalProperties": false
  33630. },
  33631. "location": {
  33632. "$ref": "#/components/schemas/LocationRef"
  33633. },
  33634. "data": {
  33635. "type": "object",
  33636. "properties": {}
  33637. }
  33638. },
  33639. "required": ["id", "type", "data"],
  33640. "additionalProperties": false
  33641. },
  33642. "GlobalDisposed": {
  33643. "type": "object",
  33644. "properties": {
  33645. "id": {
  33646. "type": "string",
  33647. "pattern": "^evt_"
  33648. },
  33649. "metadata": {
  33650. "type": "object"
  33651. },
  33652. "type": {
  33653. "type": "string",
  33654. "enum": ["global.disposed"]
  33655. },
  33656. "durable": {
  33657. "type": "object",
  33658. "properties": {
  33659. "aggregateID": {
  33660. "type": "string"
  33661. },
  33662. "seq": {
  33663. "type": "integer"
  33664. },
  33665. "version": {
  33666. "type": "integer"
  33667. }
  33668. },
  33669. "required": ["aggregateID", "seq", "version"],
  33670. "additionalProperties": false
  33671. },
  33672. "location": {
  33673. "$ref": "#/components/schemas/LocationRef"
  33674. },
  33675. "data": {
  33676. "type": "object",
  33677. "properties": {}
  33678. }
  33679. },
  33680. "required": ["id", "type", "data"],
  33681. "additionalProperties": false
  33682. },
  33683. "QuestionV2Request": {
  33684. "type": "object",
  33685. "properties": {
  33686. "id": {
  33687. "type": "string",
  33688. "pattern": "^que"
  33689. },
  33690. "sessionID": {
  33691. "type": "string",
  33692. "pattern": "^ses"
  33693. },
  33694. "questions": {
  33695. "type": "array",
  33696. "items": {
  33697. "$ref": "#/components/schemas/QuestionV2Info"
  33698. },
  33699. "description": "Questions to ask"
  33700. },
  33701. "tool": {
  33702. "$ref": "#/components/schemas/QuestionV2Tool"
  33703. }
  33704. },
  33705. "required": ["id", "sessionID", "questions"],
  33706. "additionalProperties": false
  33707. },
  33708. "QuestionV2Reply": {
  33709. "type": "object",
  33710. "properties": {
  33711. "answers": {
  33712. "type": "array",
  33713. "items": {
  33714. "$ref": "#/components/schemas/QuestionV2Answer"
  33715. },
  33716. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33717. }
  33718. },
  33719. "required": ["answers"],
  33720. "additionalProperties": false
  33721. },
  33722. "ReferenceLocalSource": {
  33723. "type": "object",
  33724. "properties": {
  33725. "type": {
  33726. "type": "string",
  33727. "enum": ["local"]
  33728. },
  33729. "path": {
  33730. "type": "string"
  33731. },
  33732. "description": {
  33733. "type": "string"
  33734. },
  33735. "hidden": {
  33736. "type": "boolean"
  33737. }
  33738. },
  33739. "required": ["type", "path"],
  33740. "additionalProperties": false
  33741. },
  33742. "ReferenceGitSource": {
  33743. "type": "object",
  33744. "properties": {
  33745. "type": {
  33746. "type": "string",
  33747. "enum": ["git"]
  33748. },
  33749. "repository": {
  33750. "type": "string"
  33751. },
  33752. "branch": {
  33753. "type": "string"
  33754. },
  33755. "description": {
  33756. "type": "string"
  33757. },
  33758. "hidden": {
  33759. "type": "boolean"
  33760. }
  33761. },
  33762. "required": ["type", "repository"],
  33763. "additionalProperties": false
  33764. },
  33765. "ReferenceSource": {
  33766. "anyOf": [
  33767. {
  33768. "$ref": "#/components/schemas/ReferenceLocalSource"
  33769. },
  33770. {
  33771. "$ref": "#/components/schemas/ReferenceGitSource"
  33772. }
  33773. ]
  33774. },
  33775. "ReferenceInfo": {
  33776. "type": "object",
  33777. "properties": {
  33778. "name": {
  33779. "type": "string"
  33780. },
  33781. "path": {
  33782. "type": "string"
  33783. },
  33784. "description": {
  33785. "type": "string"
  33786. },
  33787. "hidden": {
  33788. "type": "boolean"
  33789. },
  33790. "source": {
  33791. "$ref": "#/components/schemas/ReferenceSource"
  33792. }
  33793. },
  33794. "required": ["name", "path", "source"],
  33795. "additionalProperties": false
  33796. },
  33797. "ProjectCopyCopy": {
  33798. "type": "object",
  33799. "properties": {
  33800. "directory": {
  33801. "type": "string"
  33802. }
  33803. },
  33804. "required": ["directory"],
  33805. "additionalProperties": false
  33806. },
  33807. "EventModels-devRefreshed": {
  33808. "type": "object",
  33809. "properties": {
  33810. "id": {
  33811. "type": "string",
  33812. "pattern": "^evt_"
  33813. },
  33814. "type": {
  33815. "type": "string",
  33816. "enum": ["models-dev.refreshed"]
  33817. },
  33818. "properties": {
  33819. "type": "object",
  33820. "properties": {}
  33821. }
  33822. },
  33823. "required": ["id", "type", "properties"],
  33824. "additionalProperties": false
  33825. },
  33826. "EventIntegrationUpdated": {
  33827. "type": "object",
  33828. "properties": {
  33829. "id": {
  33830. "type": "string",
  33831. "pattern": "^evt_"
  33832. },
  33833. "type": {
  33834. "type": "string",
  33835. "enum": ["integration.updated"]
  33836. },
  33837. "properties": {
  33838. "type": "object",
  33839. "properties": {}
  33840. }
  33841. },
  33842. "required": ["id", "type", "properties"],
  33843. "additionalProperties": false
  33844. },
  33845. "EventIntegrationConnectionUpdated": {
  33846. "type": "object",
  33847. "properties": {
  33848. "id": {
  33849. "type": "string",
  33850. "pattern": "^evt_"
  33851. },
  33852. "type": {
  33853. "type": "string",
  33854. "enum": ["integration.connection.updated"]
  33855. },
  33856. "properties": {
  33857. "type": "object",
  33858. "properties": {
  33859. "integrationID": {
  33860. "type": "string"
  33861. }
  33862. },
  33863. "required": ["integrationID"],
  33864. "additionalProperties": false
  33865. }
  33866. },
  33867. "required": ["id", "type", "properties"],
  33868. "additionalProperties": false
  33869. },
  33870. "EventCatalogUpdated": {
  33871. "type": "object",
  33872. "properties": {
  33873. "id": {
  33874. "type": "string",
  33875. "pattern": "^evt_"
  33876. },
  33877. "type": {
  33878. "type": "string",
  33879. "enum": ["catalog.updated"]
  33880. },
  33881. "properties": {
  33882. "type": "object",
  33883. "properties": {}
  33884. }
  33885. },
  33886. "required": ["id", "type", "properties"],
  33887. "additionalProperties": false
  33888. },
  33889. "EventSessionCreated": {
  33890. "type": "object",
  33891. "properties": {
  33892. "id": {
  33893. "type": "string",
  33894. "pattern": "^evt_"
  33895. },
  33896. "type": {
  33897. "type": "string",
  33898. "enum": ["session.created"]
  33899. },
  33900. "properties": {
  33901. "type": "object",
  33902. "properties": {
  33903. "sessionID": {
  33904. "type": "string",
  33905. "pattern": "^ses"
  33906. },
  33907. "info": {
  33908. "$ref": "#/components/schemas/Session"
  33909. }
  33910. },
  33911. "required": ["sessionID", "info"],
  33912. "additionalProperties": false
  33913. }
  33914. },
  33915. "required": ["id", "type", "properties"],
  33916. "additionalProperties": false
  33917. },
  33918. "EventSessionUpdated": {
  33919. "type": "object",
  33920. "properties": {
  33921. "id": {
  33922. "type": "string",
  33923. "pattern": "^evt_"
  33924. },
  33925. "type": {
  33926. "type": "string",
  33927. "enum": ["session.updated"]
  33928. },
  33929. "properties": {
  33930. "type": "object",
  33931. "properties": {
  33932. "sessionID": {
  33933. "type": "string",
  33934. "pattern": "^ses"
  33935. },
  33936. "info": {
  33937. "$ref": "#/components/schemas/Session"
  33938. }
  33939. },
  33940. "required": ["sessionID", "info"],
  33941. "additionalProperties": false
  33942. }
  33943. },
  33944. "required": ["id", "type", "properties"],
  33945. "additionalProperties": false
  33946. },
  33947. "EventSessionDeleted": {
  33948. "type": "object",
  33949. "properties": {
  33950. "id": {
  33951. "type": "string",
  33952. "pattern": "^evt_"
  33953. },
  33954. "type": {
  33955. "type": "string",
  33956. "enum": ["session.deleted"]
  33957. },
  33958. "properties": {
  33959. "type": "object",
  33960. "properties": {
  33961. "sessionID": {
  33962. "type": "string",
  33963. "pattern": "^ses"
  33964. },
  33965. "info": {
  33966. "$ref": "#/components/schemas/Session"
  33967. }
  33968. },
  33969. "required": ["sessionID", "info"],
  33970. "additionalProperties": false
  33971. }
  33972. },
  33973. "required": ["id", "type", "properties"],
  33974. "additionalProperties": false
  33975. },
  33976. "EventMessageUpdated": {
  33977. "type": "object",
  33978. "properties": {
  33979. "id": {
  33980. "type": "string",
  33981. "pattern": "^evt_"
  33982. },
  33983. "type": {
  33984. "type": "string",
  33985. "enum": ["message.updated"]
  33986. },
  33987. "properties": {
  33988. "type": "object",
  33989. "properties": {
  33990. "sessionID": {
  33991. "type": "string",
  33992. "pattern": "^ses"
  33993. },
  33994. "info": {
  33995. "$ref": "#/components/schemas/Message"
  33996. }
  33997. },
  33998. "required": ["sessionID", "info"],
  33999. "additionalProperties": false
  34000. }
  34001. },
  34002. "required": ["id", "type", "properties"],
  34003. "additionalProperties": false
  34004. },
  34005. "EventMessageRemoved": {
  34006. "type": "object",
  34007. "properties": {
  34008. "id": {
  34009. "type": "string",
  34010. "pattern": "^evt_"
  34011. },
  34012. "type": {
  34013. "type": "string",
  34014. "enum": ["message.removed"]
  34015. },
  34016. "properties": {
  34017. "type": "object",
  34018. "properties": {
  34019. "sessionID": {
  34020. "type": "string",
  34021. "pattern": "^ses"
  34022. },
  34023. "messageID": {
  34024. "type": "string",
  34025. "pattern": "^msg"
  34026. }
  34027. },
  34028. "required": ["sessionID", "messageID"],
  34029. "additionalProperties": false
  34030. }
  34031. },
  34032. "required": ["id", "type", "properties"],
  34033. "additionalProperties": false
  34034. },
  34035. "EventMessagePartUpdated": {
  34036. "type": "object",
  34037. "properties": {
  34038. "id": {
  34039. "type": "string",
  34040. "pattern": "^evt_"
  34041. },
  34042. "type": {
  34043. "type": "string",
  34044. "enum": ["message.part.updated"]
  34045. },
  34046. "properties": {
  34047. "type": "object",
  34048. "properties": {
  34049. "sessionID": {
  34050. "type": "string",
  34051. "pattern": "^ses"
  34052. },
  34053. "part": {
  34054. "$ref": "#/components/schemas/Part"
  34055. },
  34056. "time": {
  34057. "type": "number"
  34058. }
  34059. },
  34060. "required": ["sessionID", "part", "time"],
  34061. "additionalProperties": false
  34062. }
  34063. },
  34064. "required": ["id", "type", "properties"],
  34065. "additionalProperties": false
  34066. },
  34067. "EventMessagePartRemoved": {
  34068. "type": "object",
  34069. "properties": {
  34070. "id": {
  34071. "type": "string",
  34072. "pattern": "^evt_"
  34073. },
  34074. "type": {
  34075. "type": "string",
  34076. "enum": ["message.part.removed"]
  34077. },
  34078. "properties": {
  34079. "type": "object",
  34080. "properties": {
  34081. "sessionID": {
  34082. "type": "string",
  34083. "pattern": "^ses"
  34084. },
  34085. "messageID": {
  34086. "type": "string",
  34087. "pattern": "^msg"
  34088. },
  34089. "partID": {
  34090. "type": "string",
  34091. "pattern": "^prt"
  34092. }
  34093. },
  34094. "required": ["sessionID", "messageID", "partID"],
  34095. "additionalProperties": false
  34096. }
  34097. },
  34098. "required": ["id", "type", "properties"],
  34099. "additionalProperties": false
  34100. },
  34101. "EventSessionNextAgentSwitched": {
  34102. "type": "object",
  34103. "properties": {
  34104. "id": {
  34105. "type": "string",
  34106. "pattern": "^evt_"
  34107. },
  34108. "type": {
  34109. "type": "string",
  34110. "enum": ["session.next.agent.switched"]
  34111. },
  34112. "properties": {
  34113. "type": "object",
  34114. "properties": {
  34115. "timestamp": {
  34116. "type": "number"
  34117. },
  34118. "sessionID": {
  34119. "type": "string",
  34120. "pattern": "^ses"
  34121. },
  34122. "messageID": {
  34123. "type": "string",
  34124. "pattern": "^msg_"
  34125. },
  34126. "agent": {
  34127. "type": "string"
  34128. }
  34129. },
  34130. "required": ["timestamp", "sessionID", "messageID", "agent"],
  34131. "additionalProperties": false
  34132. }
  34133. },
  34134. "required": ["id", "type", "properties"],
  34135. "additionalProperties": false
  34136. },
  34137. "EventSessionNextModelSwitched": {
  34138. "type": "object",
  34139. "properties": {
  34140. "id": {
  34141. "type": "string",
  34142. "pattern": "^evt_"
  34143. },
  34144. "type": {
  34145. "type": "string",
  34146. "enum": ["session.next.model.switched"]
  34147. },
  34148. "properties": {
  34149. "type": "object",
  34150. "properties": {
  34151. "timestamp": {
  34152. "type": "number"
  34153. },
  34154. "sessionID": {
  34155. "type": "string",
  34156. "pattern": "^ses"
  34157. },
  34158. "messageID": {
  34159. "type": "string",
  34160. "pattern": "^msg_"
  34161. },
  34162. "model": {
  34163. "$ref": "#/components/schemas/ModelRef"
  34164. }
  34165. },
  34166. "required": ["timestamp", "sessionID", "messageID", "model"],
  34167. "additionalProperties": false
  34168. }
  34169. },
  34170. "required": ["id", "type", "properties"],
  34171. "additionalProperties": false
  34172. },
  34173. "EventSessionNextMoved": {
  34174. "type": "object",
  34175. "properties": {
  34176. "id": {
  34177. "type": "string",
  34178. "pattern": "^evt_"
  34179. },
  34180. "type": {
  34181. "type": "string",
  34182. "enum": ["session.next.moved"]
  34183. },
  34184. "properties": {
  34185. "type": "object",
  34186. "properties": {
  34187. "timestamp": {
  34188. "type": "number"
  34189. },
  34190. "sessionID": {
  34191. "type": "string",
  34192. "pattern": "^ses"
  34193. },
  34194. "location": {
  34195. "$ref": "#/components/schemas/LocationRef"
  34196. },
  34197. "subdirectory": {
  34198. "type": "string"
  34199. }
  34200. },
  34201. "required": ["timestamp", "sessionID", "location"],
  34202. "additionalProperties": false
  34203. }
  34204. },
  34205. "required": ["id", "type", "properties"],
  34206. "additionalProperties": false
  34207. },
  34208. "EventSessionNextPrompted": {
  34209. "type": "object",
  34210. "properties": {
  34211. "id": {
  34212. "type": "string",
  34213. "pattern": "^evt_"
  34214. },
  34215. "type": {
  34216. "type": "string",
  34217. "enum": ["session.next.prompted"]
  34218. },
  34219. "properties": {
  34220. "type": "object",
  34221. "properties": {
  34222. "timestamp": {
  34223. "type": "number"
  34224. },
  34225. "sessionID": {
  34226. "type": "string",
  34227. "pattern": "^ses"
  34228. },
  34229. "messageID": {
  34230. "type": "string",
  34231. "pattern": "^msg_"
  34232. },
  34233. "prompt": {
  34234. "$ref": "#/components/schemas/Prompt"
  34235. },
  34236. "delivery": {
  34237. "type": "string",
  34238. "enum": ["steer", "queue"]
  34239. }
  34240. },
  34241. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34242. "additionalProperties": false
  34243. }
  34244. },
  34245. "required": ["id", "type", "properties"],
  34246. "additionalProperties": false
  34247. },
  34248. "EventSessionNextPromptAdmitted": {
  34249. "type": "object",
  34250. "properties": {
  34251. "id": {
  34252. "type": "string",
  34253. "pattern": "^evt_"
  34254. },
  34255. "type": {
  34256. "type": "string",
  34257. "enum": ["session.next.prompt.admitted"]
  34258. },
  34259. "properties": {
  34260. "type": "object",
  34261. "properties": {
  34262. "timestamp": {
  34263. "type": "number"
  34264. },
  34265. "sessionID": {
  34266. "type": "string",
  34267. "pattern": "^ses"
  34268. },
  34269. "messageID": {
  34270. "type": "string",
  34271. "pattern": "^msg_"
  34272. },
  34273. "prompt": {
  34274. "$ref": "#/components/schemas/Prompt"
  34275. },
  34276. "delivery": {
  34277. "type": "string",
  34278. "enum": ["steer", "queue"]
  34279. }
  34280. },
  34281. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34282. "additionalProperties": false
  34283. }
  34284. },
  34285. "required": ["id", "type", "properties"],
  34286. "additionalProperties": false
  34287. },
  34288. "EventSessionNextContextUpdated": {
  34289. "type": "object",
  34290. "properties": {
  34291. "id": {
  34292. "type": "string",
  34293. "pattern": "^evt_"
  34294. },
  34295. "type": {
  34296. "type": "string",
  34297. "enum": ["session.next.context.updated"]
  34298. },
  34299. "properties": {
  34300. "type": "object",
  34301. "properties": {
  34302. "timestamp": {
  34303. "type": "number"
  34304. },
  34305. "sessionID": {
  34306. "type": "string",
  34307. "pattern": "^ses"
  34308. },
  34309. "messageID": {
  34310. "type": "string",
  34311. "pattern": "^msg_"
  34312. },
  34313. "text": {
  34314. "type": "string"
  34315. }
  34316. },
  34317. "required": ["timestamp", "sessionID", "messageID", "text"],
  34318. "additionalProperties": false
  34319. }
  34320. },
  34321. "required": ["id", "type", "properties"],
  34322. "additionalProperties": false
  34323. },
  34324. "EventSessionNextSynthetic": {
  34325. "type": "object",
  34326. "properties": {
  34327. "id": {
  34328. "type": "string",
  34329. "pattern": "^evt_"
  34330. },
  34331. "type": {
  34332. "type": "string",
  34333. "enum": ["session.next.synthetic"]
  34334. },
  34335. "properties": {
  34336. "type": "object",
  34337. "properties": {
  34338. "timestamp": {
  34339. "type": "number"
  34340. },
  34341. "sessionID": {
  34342. "type": "string",
  34343. "pattern": "^ses"
  34344. },
  34345. "messageID": {
  34346. "type": "string",
  34347. "pattern": "^msg_"
  34348. },
  34349. "text": {
  34350. "type": "string"
  34351. }
  34352. },
  34353. "required": ["timestamp", "sessionID", "messageID", "text"],
  34354. "additionalProperties": false
  34355. }
  34356. },
  34357. "required": ["id", "type", "properties"],
  34358. "additionalProperties": false
  34359. },
  34360. "EventSessionNextShellStarted": {
  34361. "type": "object",
  34362. "properties": {
  34363. "id": {
  34364. "type": "string",
  34365. "pattern": "^evt_"
  34366. },
  34367. "type": {
  34368. "type": "string",
  34369. "enum": ["session.next.shell.started"]
  34370. },
  34371. "properties": {
  34372. "type": "object",
  34373. "properties": {
  34374. "timestamp": {
  34375. "type": "number"
  34376. },
  34377. "sessionID": {
  34378. "type": "string",
  34379. "pattern": "^ses"
  34380. },
  34381. "messageID": {
  34382. "type": "string",
  34383. "pattern": "^msg_"
  34384. },
  34385. "callID": {
  34386. "type": "string"
  34387. },
  34388. "command": {
  34389. "type": "string"
  34390. }
  34391. },
  34392. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  34393. "additionalProperties": false
  34394. }
  34395. },
  34396. "required": ["id", "type", "properties"],
  34397. "additionalProperties": false
  34398. },
  34399. "EventSessionNextShellEnded": {
  34400. "type": "object",
  34401. "properties": {
  34402. "id": {
  34403. "type": "string",
  34404. "pattern": "^evt_"
  34405. },
  34406. "type": {
  34407. "type": "string",
  34408. "enum": ["session.next.shell.ended"]
  34409. },
  34410. "properties": {
  34411. "type": "object",
  34412. "properties": {
  34413. "timestamp": {
  34414. "type": "number"
  34415. },
  34416. "sessionID": {
  34417. "type": "string",
  34418. "pattern": "^ses"
  34419. },
  34420. "callID": {
  34421. "type": "string"
  34422. },
  34423. "output": {
  34424. "type": "string"
  34425. }
  34426. },
  34427. "required": ["timestamp", "sessionID", "callID", "output"],
  34428. "additionalProperties": false
  34429. }
  34430. },
  34431. "required": ["id", "type", "properties"],
  34432. "additionalProperties": false
  34433. },
  34434. "EventSessionNextStepStarted": {
  34435. "type": "object",
  34436. "properties": {
  34437. "id": {
  34438. "type": "string",
  34439. "pattern": "^evt_"
  34440. },
  34441. "type": {
  34442. "type": "string",
  34443. "enum": ["session.next.step.started"]
  34444. },
  34445. "properties": {
  34446. "type": "object",
  34447. "properties": {
  34448. "timestamp": {
  34449. "type": "number"
  34450. },
  34451. "sessionID": {
  34452. "type": "string",
  34453. "pattern": "^ses"
  34454. },
  34455. "assistantMessageID": {
  34456. "type": "string",
  34457. "pattern": "^msg_"
  34458. },
  34459. "agent": {
  34460. "type": "string"
  34461. },
  34462. "model": {
  34463. "$ref": "#/components/schemas/ModelRef"
  34464. },
  34465. "snapshot": {
  34466. "type": "string"
  34467. }
  34468. },
  34469. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  34470. "additionalProperties": false
  34471. }
  34472. },
  34473. "required": ["id", "type", "properties"],
  34474. "additionalProperties": false
  34475. },
  34476. "EventSessionNextStepEnded": {
  34477. "type": "object",
  34478. "properties": {
  34479. "id": {
  34480. "type": "string",
  34481. "pattern": "^evt_"
  34482. },
  34483. "type": {
  34484. "type": "string",
  34485. "enum": ["session.next.step.ended"]
  34486. },
  34487. "properties": {
  34488. "type": "object",
  34489. "properties": {
  34490. "timestamp": {
  34491. "type": "number"
  34492. },
  34493. "sessionID": {
  34494. "type": "string",
  34495. "pattern": "^ses"
  34496. },
  34497. "assistantMessageID": {
  34498. "type": "string",
  34499. "pattern": "^msg_"
  34500. },
  34501. "finish": {
  34502. "type": "string"
  34503. },
  34504. "cost": {
  34505. "type": "number"
  34506. },
  34507. "tokens": {
  34508. "type": "object",
  34509. "properties": {
  34510. "input": {
  34511. "type": "number"
  34512. },
  34513. "output": {
  34514. "type": "number"
  34515. },
  34516. "reasoning": {
  34517. "type": "number"
  34518. },
  34519. "cache": {
  34520. "type": "object",
  34521. "properties": {
  34522. "read": {
  34523. "type": "number"
  34524. },
  34525. "write": {
  34526. "type": "number"
  34527. }
  34528. },
  34529. "required": ["read", "write"],
  34530. "additionalProperties": false
  34531. }
  34532. },
  34533. "required": ["input", "output", "reasoning", "cache"],
  34534. "additionalProperties": false
  34535. },
  34536. "snapshot": {
  34537. "type": "string"
  34538. },
  34539. "files": {
  34540. "type": "array",
  34541. "items": {
  34542. "type": "string"
  34543. }
  34544. }
  34545. },
  34546. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34547. "additionalProperties": false
  34548. }
  34549. },
  34550. "required": ["id", "type", "properties"],
  34551. "additionalProperties": false
  34552. },
  34553. "EventSessionNextStepFailed": {
  34554. "type": "object",
  34555. "properties": {
  34556. "id": {
  34557. "type": "string",
  34558. "pattern": "^evt_"
  34559. },
  34560. "type": {
  34561. "type": "string",
  34562. "enum": ["session.next.step.failed"]
  34563. },
  34564. "properties": {
  34565. "type": "object",
  34566. "properties": {
  34567. "timestamp": {
  34568. "type": "number"
  34569. },
  34570. "sessionID": {
  34571. "type": "string",
  34572. "pattern": "^ses"
  34573. },
  34574. "assistantMessageID": {
  34575. "type": "string",
  34576. "pattern": "^msg_"
  34577. },
  34578. "error": {
  34579. "$ref": "#/components/schemas/SessionErrorUnknown"
  34580. }
  34581. },
  34582. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34583. "additionalProperties": false
  34584. }
  34585. },
  34586. "required": ["id", "type", "properties"],
  34587. "additionalProperties": false
  34588. },
  34589. "EventSessionNextTextStarted": {
  34590. "type": "object",
  34591. "properties": {
  34592. "id": {
  34593. "type": "string",
  34594. "pattern": "^evt_"
  34595. },
  34596. "type": {
  34597. "type": "string",
  34598. "enum": ["session.next.text.started"]
  34599. },
  34600. "properties": {
  34601. "type": "object",
  34602. "properties": {
  34603. "timestamp": {
  34604. "type": "number"
  34605. },
  34606. "sessionID": {
  34607. "type": "string",
  34608. "pattern": "^ses"
  34609. },
  34610. "assistantMessageID": {
  34611. "type": "string",
  34612. "pattern": "^msg_"
  34613. },
  34614. "textID": {
  34615. "type": "string"
  34616. }
  34617. },
  34618. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34619. "additionalProperties": false
  34620. }
  34621. },
  34622. "required": ["id", "type", "properties"],
  34623. "additionalProperties": false
  34624. },
  34625. "EventSessionNextTextDelta": {
  34626. "type": "object",
  34627. "properties": {
  34628. "id": {
  34629. "type": "string",
  34630. "pattern": "^evt_"
  34631. },
  34632. "type": {
  34633. "type": "string",
  34634. "enum": ["session.next.text.delta"]
  34635. },
  34636. "properties": {
  34637. "type": "object",
  34638. "properties": {
  34639. "timestamp": {
  34640. "type": "number"
  34641. },
  34642. "sessionID": {
  34643. "type": "string",
  34644. "pattern": "^ses"
  34645. },
  34646. "assistantMessageID": {
  34647. "type": "string",
  34648. "pattern": "^msg_"
  34649. },
  34650. "textID": {
  34651. "type": "string"
  34652. },
  34653. "delta": {
  34654. "type": "string"
  34655. }
  34656. },
  34657. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34658. "additionalProperties": false
  34659. }
  34660. },
  34661. "required": ["id", "type", "properties"],
  34662. "additionalProperties": false
  34663. },
  34664. "EventSessionNextTextEnded": {
  34665. "type": "object",
  34666. "properties": {
  34667. "id": {
  34668. "type": "string",
  34669. "pattern": "^evt_"
  34670. },
  34671. "type": {
  34672. "type": "string",
  34673. "enum": ["session.next.text.ended"]
  34674. },
  34675. "properties": {
  34676. "type": "object",
  34677. "properties": {
  34678. "timestamp": {
  34679. "type": "number"
  34680. },
  34681. "sessionID": {
  34682. "type": "string",
  34683. "pattern": "^ses"
  34684. },
  34685. "assistantMessageID": {
  34686. "type": "string",
  34687. "pattern": "^msg_"
  34688. },
  34689. "textID": {
  34690. "type": "string"
  34691. },
  34692. "text": {
  34693. "type": "string"
  34694. }
  34695. },
  34696. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34697. "additionalProperties": false
  34698. }
  34699. },
  34700. "required": ["id", "type", "properties"],
  34701. "additionalProperties": false
  34702. },
  34703. "EventSessionNextReasoningStarted": {
  34704. "type": "object",
  34705. "properties": {
  34706. "id": {
  34707. "type": "string",
  34708. "pattern": "^evt_"
  34709. },
  34710. "type": {
  34711. "type": "string",
  34712. "enum": ["session.next.reasoning.started"]
  34713. },
  34714. "properties": {
  34715. "type": "object",
  34716. "properties": {
  34717. "timestamp": {
  34718. "type": "number"
  34719. },
  34720. "sessionID": {
  34721. "type": "string",
  34722. "pattern": "^ses"
  34723. },
  34724. "assistantMessageID": {
  34725. "type": "string",
  34726. "pattern": "^msg_"
  34727. },
  34728. "reasoningID": {
  34729. "type": "string"
  34730. },
  34731. "providerMetadata": {
  34732. "$ref": "#/components/schemas/LLMProviderMetadata"
  34733. }
  34734. },
  34735. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34736. "additionalProperties": false
  34737. }
  34738. },
  34739. "required": ["id", "type", "properties"],
  34740. "additionalProperties": false
  34741. },
  34742. "EventSessionNextReasoningDelta": {
  34743. "type": "object",
  34744. "properties": {
  34745. "id": {
  34746. "type": "string",
  34747. "pattern": "^evt_"
  34748. },
  34749. "type": {
  34750. "type": "string",
  34751. "enum": ["session.next.reasoning.delta"]
  34752. },
  34753. "properties": {
  34754. "type": "object",
  34755. "properties": {
  34756. "timestamp": {
  34757. "type": "number"
  34758. },
  34759. "sessionID": {
  34760. "type": "string",
  34761. "pattern": "^ses"
  34762. },
  34763. "assistantMessageID": {
  34764. "type": "string",
  34765. "pattern": "^msg_"
  34766. },
  34767. "reasoningID": {
  34768. "type": "string"
  34769. },
  34770. "delta": {
  34771. "type": "string"
  34772. }
  34773. },
  34774. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34775. "additionalProperties": false
  34776. }
  34777. },
  34778. "required": ["id", "type", "properties"],
  34779. "additionalProperties": false
  34780. },
  34781. "EventSessionNextReasoningEnded": {
  34782. "type": "object",
  34783. "properties": {
  34784. "id": {
  34785. "type": "string",
  34786. "pattern": "^evt_"
  34787. },
  34788. "type": {
  34789. "type": "string",
  34790. "enum": ["session.next.reasoning.ended"]
  34791. },
  34792. "properties": {
  34793. "type": "object",
  34794. "properties": {
  34795. "timestamp": {
  34796. "type": "number"
  34797. },
  34798. "sessionID": {
  34799. "type": "string",
  34800. "pattern": "^ses"
  34801. },
  34802. "assistantMessageID": {
  34803. "type": "string",
  34804. "pattern": "^msg_"
  34805. },
  34806. "reasoningID": {
  34807. "type": "string"
  34808. },
  34809. "text": {
  34810. "type": "string"
  34811. },
  34812. "providerMetadata": {
  34813. "$ref": "#/components/schemas/LLMProviderMetadata"
  34814. }
  34815. },
  34816. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34817. "additionalProperties": false
  34818. }
  34819. },
  34820. "required": ["id", "type", "properties"],
  34821. "additionalProperties": false
  34822. },
  34823. "EventSessionNextToolInputStarted": {
  34824. "type": "object",
  34825. "properties": {
  34826. "id": {
  34827. "type": "string",
  34828. "pattern": "^evt_"
  34829. },
  34830. "type": {
  34831. "type": "string",
  34832. "enum": ["session.next.tool.input.started"]
  34833. },
  34834. "properties": {
  34835. "type": "object",
  34836. "properties": {
  34837. "timestamp": {
  34838. "type": "number"
  34839. },
  34840. "sessionID": {
  34841. "type": "string",
  34842. "pattern": "^ses"
  34843. },
  34844. "assistantMessageID": {
  34845. "type": "string",
  34846. "pattern": "^msg_"
  34847. },
  34848. "callID": {
  34849. "type": "string"
  34850. },
  34851. "name": {
  34852. "type": "string"
  34853. }
  34854. },
  34855. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34856. "additionalProperties": false
  34857. }
  34858. },
  34859. "required": ["id", "type", "properties"],
  34860. "additionalProperties": false
  34861. },
  34862. "EventSessionNextToolInputDelta": {
  34863. "type": "object",
  34864. "properties": {
  34865. "id": {
  34866. "type": "string",
  34867. "pattern": "^evt_"
  34868. },
  34869. "type": {
  34870. "type": "string",
  34871. "enum": ["session.next.tool.input.delta"]
  34872. },
  34873. "properties": {
  34874. "type": "object",
  34875. "properties": {
  34876. "timestamp": {
  34877. "type": "number"
  34878. },
  34879. "sessionID": {
  34880. "type": "string",
  34881. "pattern": "^ses"
  34882. },
  34883. "assistantMessageID": {
  34884. "type": "string",
  34885. "pattern": "^msg_"
  34886. },
  34887. "callID": {
  34888. "type": "string"
  34889. },
  34890. "delta": {
  34891. "type": "string"
  34892. }
  34893. },
  34894. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34895. "additionalProperties": false
  34896. }
  34897. },
  34898. "required": ["id", "type", "properties"],
  34899. "additionalProperties": false
  34900. },
  34901. "EventSessionNextToolInputEnded": {
  34902. "type": "object",
  34903. "properties": {
  34904. "id": {
  34905. "type": "string",
  34906. "pattern": "^evt_"
  34907. },
  34908. "type": {
  34909. "type": "string",
  34910. "enum": ["session.next.tool.input.ended"]
  34911. },
  34912. "properties": {
  34913. "type": "object",
  34914. "properties": {
  34915. "timestamp": {
  34916. "type": "number"
  34917. },
  34918. "sessionID": {
  34919. "type": "string",
  34920. "pattern": "^ses"
  34921. },
  34922. "assistantMessageID": {
  34923. "type": "string",
  34924. "pattern": "^msg_"
  34925. },
  34926. "callID": {
  34927. "type": "string"
  34928. },
  34929. "text": {
  34930. "type": "string"
  34931. }
  34932. },
  34933. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34934. "additionalProperties": false
  34935. }
  34936. },
  34937. "required": ["id", "type", "properties"],
  34938. "additionalProperties": false
  34939. },
  34940. "EventSessionNextToolCalled": {
  34941. "type": "object",
  34942. "properties": {
  34943. "id": {
  34944. "type": "string",
  34945. "pattern": "^evt_"
  34946. },
  34947. "type": {
  34948. "type": "string",
  34949. "enum": ["session.next.tool.called"]
  34950. },
  34951. "properties": {
  34952. "type": "object",
  34953. "properties": {
  34954. "timestamp": {
  34955. "type": "number"
  34956. },
  34957. "sessionID": {
  34958. "type": "string",
  34959. "pattern": "^ses"
  34960. },
  34961. "assistantMessageID": {
  34962. "type": "string",
  34963. "pattern": "^msg_"
  34964. },
  34965. "callID": {
  34966. "type": "string"
  34967. },
  34968. "tool": {
  34969. "type": "string"
  34970. },
  34971. "input": {
  34972. "type": "object"
  34973. },
  34974. "provider": {
  34975. "type": "object",
  34976. "properties": {
  34977. "executed": {
  34978. "type": "boolean"
  34979. },
  34980. "metadata": {
  34981. "$ref": "#/components/schemas/LLMProviderMetadata"
  34982. }
  34983. },
  34984. "required": ["executed"],
  34985. "additionalProperties": false
  34986. }
  34987. },
  34988. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  34989. "additionalProperties": false
  34990. }
  34991. },
  34992. "required": ["id", "type", "properties"],
  34993. "additionalProperties": false
  34994. },
  34995. "EventSessionNextToolProgress": {
  34996. "type": "object",
  34997. "properties": {
  34998. "id": {
  34999. "type": "string",
  35000. "pattern": "^evt_"
  35001. },
  35002. "type": {
  35003. "type": "string",
  35004. "enum": ["session.next.tool.progress"]
  35005. },
  35006. "properties": {
  35007. "type": "object",
  35008. "properties": {
  35009. "timestamp": {
  35010. "type": "number"
  35011. },
  35012. "sessionID": {
  35013. "type": "string",
  35014. "pattern": "^ses"
  35015. },
  35016. "assistantMessageID": {
  35017. "type": "string",
  35018. "pattern": "^msg_"
  35019. },
  35020. "callID": {
  35021. "type": "string"
  35022. },
  35023. "structured": {
  35024. "type": "object"
  35025. },
  35026. "content": {
  35027. "type": "array",
  35028. "items": {
  35029. "$ref": "#/components/schemas/LLMToolContent"
  35030. }
  35031. }
  35032. },
  35033. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  35034. "additionalProperties": false
  35035. }
  35036. },
  35037. "required": ["id", "type", "properties"],
  35038. "additionalProperties": false
  35039. },
  35040. "EventSessionNextToolSuccess": {
  35041. "type": "object",
  35042. "properties": {
  35043. "id": {
  35044. "type": "string",
  35045. "pattern": "^evt_"
  35046. },
  35047. "type": {
  35048. "type": "string",
  35049. "enum": ["session.next.tool.success"]
  35050. },
  35051. "properties": {
  35052. "type": "object",
  35053. "properties": {
  35054. "timestamp": {
  35055. "type": "number"
  35056. },
  35057. "sessionID": {
  35058. "type": "string",
  35059. "pattern": "^ses"
  35060. },
  35061. "assistantMessageID": {
  35062. "type": "string",
  35063. "pattern": "^msg_"
  35064. },
  35065. "callID": {
  35066. "type": "string"
  35067. },
  35068. "structured": {
  35069. "type": "object"
  35070. },
  35071. "content": {
  35072. "type": "array",
  35073. "items": {
  35074. "$ref": "#/components/schemas/LLMToolContent"
  35075. }
  35076. },
  35077. "outputPaths": {
  35078. "type": "array",
  35079. "items": {
  35080. "type": "string"
  35081. }
  35082. },
  35083. "result": {},
  35084. "provider": {
  35085. "type": "object",
  35086. "properties": {
  35087. "executed": {
  35088. "type": "boolean"
  35089. },
  35090. "metadata": {
  35091. "$ref": "#/components/schemas/LLMProviderMetadata"
  35092. }
  35093. },
  35094. "required": ["executed"],
  35095. "additionalProperties": false
  35096. }
  35097. },
  35098. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  35099. "additionalProperties": false
  35100. }
  35101. },
  35102. "required": ["id", "type", "properties"],
  35103. "additionalProperties": false
  35104. },
  35105. "EventSessionNextToolFailed": {
  35106. "type": "object",
  35107. "properties": {
  35108. "id": {
  35109. "type": "string",
  35110. "pattern": "^evt_"
  35111. },
  35112. "type": {
  35113. "type": "string",
  35114. "enum": ["session.next.tool.failed"]
  35115. },
  35116. "properties": {
  35117. "type": "object",
  35118. "properties": {
  35119. "timestamp": {
  35120. "type": "number"
  35121. },
  35122. "sessionID": {
  35123. "type": "string",
  35124. "pattern": "^ses"
  35125. },
  35126. "assistantMessageID": {
  35127. "type": "string",
  35128. "pattern": "^msg_"
  35129. },
  35130. "callID": {
  35131. "type": "string"
  35132. },
  35133. "error": {
  35134. "$ref": "#/components/schemas/SessionErrorUnknown"
  35135. },
  35136. "result": {},
  35137. "provider": {
  35138. "type": "object",
  35139. "properties": {
  35140. "executed": {
  35141. "type": "boolean"
  35142. },
  35143. "metadata": {
  35144. "$ref": "#/components/schemas/LLMProviderMetadata"
  35145. }
  35146. },
  35147. "required": ["executed"],
  35148. "additionalProperties": false
  35149. }
  35150. },
  35151. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  35152. "additionalProperties": false
  35153. }
  35154. },
  35155. "required": ["id", "type", "properties"],
  35156. "additionalProperties": false
  35157. },
  35158. "EventSessionNextRetried": {
  35159. "type": "object",
  35160. "properties": {
  35161. "id": {
  35162. "type": "string",
  35163. "pattern": "^evt_"
  35164. },
  35165. "type": {
  35166. "type": "string",
  35167. "enum": ["session.next.retried"]
  35168. },
  35169. "properties": {
  35170. "type": "object",
  35171. "properties": {
  35172. "timestamp": {
  35173. "type": "number"
  35174. },
  35175. "sessionID": {
  35176. "type": "string",
  35177. "pattern": "^ses"
  35178. },
  35179. "attempt": {
  35180. "type": "number"
  35181. },
  35182. "error": {
  35183. "$ref": "#/components/schemas/SessionNextRetry_error"
  35184. }
  35185. },
  35186. "required": ["timestamp", "sessionID", "attempt", "error"],
  35187. "additionalProperties": false
  35188. }
  35189. },
  35190. "required": ["id", "type", "properties"],
  35191. "additionalProperties": false
  35192. },
  35193. "EventSessionNextCompactionStarted": {
  35194. "type": "object",
  35195. "properties": {
  35196. "id": {
  35197. "type": "string",
  35198. "pattern": "^evt_"
  35199. },
  35200. "type": {
  35201. "type": "string",
  35202. "enum": ["session.next.compaction.started"]
  35203. },
  35204. "properties": {
  35205. "type": "object",
  35206. "properties": {
  35207. "timestamp": {
  35208. "type": "number"
  35209. },
  35210. "sessionID": {
  35211. "type": "string",
  35212. "pattern": "^ses"
  35213. },
  35214. "messageID": {
  35215. "type": "string",
  35216. "pattern": "^msg_"
  35217. },
  35218. "reason": {
  35219. "type": "string",
  35220. "enum": ["auto", "manual"]
  35221. }
  35222. },
  35223. "required": ["timestamp", "sessionID", "messageID", "reason"],
  35224. "additionalProperties": false
  35225. }
  35226. },
  35227. "required": ["id", "type", "properties"],
  35228. "additionalProperties": false
  35229. },
  35230. "EventSessionNextCompactionDelta": {
  35231. "type": "object",
  35232. "properties": {
  35233. "id": {
  35234. "type": "string",
  35235. "pattern": "^evt_"
  35236. },
  35237. "type": {
  35238. "type": "string",
  35239. "enum": ["session.next.compaction.delta"]
  35240. },
  35241. "properties": {
  35242. "type": "object",
  35243. "properties": {
  35244. "timestamp": {
  35245. "type": "number"
  35246. },
  35247. "sessionID": {
  35248. "type": "string",
  35249. "pattern": "^ses"
  35250. },
  35251. "messageID": {
  35252. "type": "string",
  35253. "pattern": "^msg_"
  35254. },
  35255. "text": {
  35256. "type": "string"
  35257. }
  35258. },
  35259. "required": ["timestamp", "sessionID", "messageID", "text"],
  35260. "additionalProperties": false
  35261. }
  35262. },
  35263. "required": ["id", "type", "properties"],
  35264. "additionalProperties": false
  35265. },
  35266. "EventSessionNextCompactionEnded": {
  35267. "type": "object",
  35268. "properties": {
  35269. "id": {
  35270. "type": "string",
  35271. "pattern": "^evt_"
  35272. },
  35273. "type": {
  35274. "type": "string",
  35275. "enum": ["session.next.compaction.ended"]
  35276. },
  35277. "properties": {
  35278. "type": "object",
  35279. "properties": {
  35280. "timestamp": {
  35281. "type": "number"
  35282. },
  35283. "sessionID": {
  35284. "type": "string",
  35285. "pattern": "^ses"
  35286. },
  35287. "messageID": {
  35288. "type": "string",
  35289. "pattern": "^msg_"
  35290. },
  35291. "reason": {
  35292. "type": "string",
  35293. "enum": ["auto", "manual"]
  35294. },
  35295. "text": {
  35296. "type": "string"
  35297. },
  35298. "recent": {
  35299. "type": "string"
  35300. }
  35301. },
  35302. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  35303. "additionalProperties": false
  35304. }
  35305. },
  35306. "required": ["id", "type", "properties"],
  35307. "additionalProperties": false
  35308. },
  35309. "EventSessionNextRevertStaged": {
  35310. "type": "object",
  35311. "properties": {
  35312. "id": {
  35313. "type": "string",
  35314. "pattern": "^evt_"
  35315. },
  35316. "type": {
  35317. "type": "string",
  35318. "enum": ["session.next.revert.staged"]
  35319. },
  35320. "properties": {
  35321. "type": "object",
  35322. "properties": {
  35323. "timestamp": {
  35324. "type": "number"
  35325. },
  35326. "sessionID": {
  35327. "type": "string",
  35328. "pattern": "^ses"
  35329. },
  35330. "revert": {
  35331. "$ref": "#/components/schemas/RevertState"
  35332. }
  35333. },
  35334. "required": ["timestamp", "sessionID", "revert"],
  35335. "additionalProperties": false
  35336. }
  35337. },
  35338. "required": ["id", "type", "properties"],
  35339. "additionalProperties": false
  35340. },
  35341. "EventSessionNextRevertCleared": {
  35342. "type": "object",
  35343. "properties": {
  35344. "id": {
  35345. "type": "string",
  35346. "pattern": "^evt_"
  35347. },
  35348. "type": {
  35349. "type": "string",
  35350. "enum": ["session.next.revert.cleared"]
  35351. },
  35352. "properties": {
  35353. "type": "object",
  35354. "properties": {
  35355. "timestamp": {
  35356. "type": "number"
  35357. },
  35358. "sessionID": {
  35359. "type": "string",
  35360. "pattern": "^ses"
  35361. }
  35362. },
  35363. "required": ["timestamp", "sessionID"],
  35364. "additionalProperties": false
  35365. }
  35366. },
  35367. "required": ["id", "type", "properties"],
  35368. "additionalProperties": false
  35369. },
  35370. "EventSessionNextRevertCommitted": {
  35371. "type": "object",
  35372. "properties": {
  35373. "id": {
  35374. "type": "string",
  35375. "pattern": "^evt_"
  35376. },
  35377. "type": {
  35378. "type": "string",
  35379. "enum": ["session.next.revert.committed"]
  35380. },
  35381. "properties": {
  35382. "type": "object",
  35383. "properties": {
  35384. "timestamp": {
  35385. "type": "number"
  35386. },
  35387. "sessionID": {
  35388. "type": "string",
  35389. "pattern": "^ses"
  35390. },
  35391. "messageID": {
  35392. "type": "string",
  35393. "pattern": "^msg_"
  35394. }
  35395. },
  35396. "required": ["timestamp", "sessionID", "messageID"],
  35397. "additionalProperties": false
  35398. }
  35399. },
  35400. "required": ["id", "type", "properties"],
  35401. "additionalProperties": false
  35402. },
  35403. "EventMessagePartDelta": {
  35404. "type": "object",
  35405. "properties": {
  35406. "id": {
  35407. "type": "string",
  35408. "pattern": "^evt_"
  35409. },
  35410. "type": {
  35411. "type": "string",
  35412. "enum": ["message.part.delta"]
  35413. },
  35414. "properties": {
  35415. "type": "object",
  35416. "properties": {
  35417. "sessionID": {
  35418. "type": "string",
  35419. "pattern": "^ses"
  35420. },
  35421. "messageID": {
  35422. "type": "string",
  35423. "pattern": "^msg"
  35424. },
  35425. "partID": {
  35426. "type": "string",
  35427. "pattern": "^prt"
  35428. },
  35429. "field": {
  35430. "type": "string"
  35431. },
  35432. "delta": {
  35433. "type": "string"
  35434. }
  35435. },
  35436. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35437. "additionalProperties": false
  35438. }
  35439. },
  35440. "required": ["id", "type", "properties"],
  35441. "additionalProperties": false
  35442. },
  35443. "EventSessionDiff": {
  35444. "type": "object",
  35445. "properties": {
  35446. "id": {
  35447. "type": "string",
  35448. "pattern": "^evt_"
  35449. },
  35450. "type": {
  35451. "type": "string",
  35452. "enum": ["session.diff"]
  35453. },
  35454. "properties": {
  35455. "type": "object",
  35456. "properties": {
  35457. "sessionID": {
  35458. "type": "string",
  35459. "pattern": "^ses"
  35460. },
  35461. "diff": {
  35462. "type": "array",
  35463. "items": {
  35464. "$ref": "#/components/schemas/SnapshotFileDiff"
  35465. }
  35466. }
  35467. },
  35468. "required": ["sessionID", "diff"],
  35469. "additionalProperties": false
  35470. }
  35471. },
  35472. "required": ["id", "type", "properties"],
  35473. "additionalProperties": false
  35474. },
  35475. "EventSessionError": {
  35476. "type": "object",
  35477. "properties": {
  35478. "id": {
  35479. "type": "string",
  35480. "pattern": "^evt_"
  35481. },
  35482. "type": {
  35483. "type": "string",
  35484. "enum": ["session.error"]
  35485. },
  35486. "properties": {
  35487. "type": "object",
  35488. "properties": {
  35489. "sessionID": {
  35490. "type": "string",
  35491. "pattern": "^ses"
  35492. },
  35493. "error": {
  35494. "anyOf": [
  35495. {
  35496. "$ref": "#/components/schemas/ProviderAuthError"
  35497. },
  35498. {
  35499. "$ref": "#/components/schemas/UnknownError"
  35500. },
  35501. {
  35502. "$ref": "#/components/schemas/MessageOutputLengthError"
  35503. },
  35504. {
  35505. "$ref": "#/components/schemas/MessageAbortedError"
  35506. },
  35507. {
  35508. "$ref": "#/components/schemas/StructuredOutputError"
  35509. },
  35510. {
  35511. "$ref": "#/components/schemas/ContextOverflowError"
  35512. },
  35513. {
  35514. "$ref": "#/components/schemas/ContentFilterError"
  35515. },
  35516. {
  35517. "$ref": "#/components/schemas/APIError"
  35518. }
  35519. ]
  35520. }
  35521. },
  35522. "additionalProperties": false
  35523. }
  35524. },
  35525. "required": ["id", "type", "properties"],
  35526. "additionalProperties": false
  35527. },
  35528. "EventInstallationUpdated": {
  35529. "type": "object",
  35530. "properties": {
  35531. "id": {
  35532. "type": "string",
  35533. "pattern": "^evt_"
  35534. },
  35535. "type": {
  35536. "type": "string",
  35537. "enum": ["installation.updated"]
  35538. },
  35539. "properties": {
  35540. "type": "object",
  35541. "properties": {
  35542. "version": {
  35543. "type": "string"
  35544. }
  35545. },
  35546. "required": ["version"],
  35547. "additionalProperties": false
  35548. }
  35549. },
  35550. "required": ["id", "type", "properties"],
  35551. "additionalProperties": false
  35552. },
  35553. "EventInstallationUpdate-available": {
  35554. "type": "object",
  35555. "properties": {
  35556. "id": {
  35557. "type": "string",
  35558. "pattern": "^evt_"
  35559. },
  35560. "type": {
  35561. "type": "string",
  35562. "enum": ["installation.update-available"]
  35563. },
  35564. "properties": {
  35565. "type": "object",
  35566. "properties": {
  35567. "version": {
  35568. "type": "string"
  35569. }
  35570. },
  35571. "required": ["version"],
  35572. "additionalProperties": false
  35573. }
  35574. },
  35575. "required": ["id", "type", "properties"],
  35576. "additionalProperties": false
  35577. },
  35578. "EventFileEdited": {
  35579. "type": "object",
  35580. "properties": {
  35581. "id": {
  35582. "type": "string",
  35583. "pattern": "^evt_"
  35584. },
  35585. "type": {
  35586. "type": "string",
  35587. "enum": ["file.edited"]
  35588. },
  35589. "properties": {
  35590. "type": "object",
  35591. "properties": {
  35592. "file": {
  35593. "type": "string"
  35594. }
  35595. },
  35596. "required": ["file"],
  35597. "additionalProperties": false
  35598. }
  35599. },
  35600. "required": ["id", "type", "properties"],
  35601. "additionalProperties": false
  35602. },
  35603. "EventReferenceUpdated": {
  35604. "type": "object",
  35605. "properties": {
  35606. "id": {
  35607. "type": "string",
  35608. "pattern": "^evt_"
  35609. },
  35610. "type": {
  35611. "type": "string",
  35612. "enum": ["reference.updated"]
  35613. },
  35614. "properties": {
  35615. "type": "object",
  35616. "properties": {}
  35617. }
  35618. },
  35619. "required": ["id", "type", "properties"],
  35620. "additionalProperties": false
  35621. },
  35622. "EventPermissionV2Asked": {
  35623. "type": "object",
  35624. "properties": {
  35625. "id": {
  35626. "type": "string",
  35627. "pattern": "^evt_"
  35628. },
  35629. "type": {
  35630. "type": "string",
  35631. "enum": ["permission.v2.asked"]
  35632. },
  35633. "properties": {
  35634. "type": "object",
  35635. "properties": {
  35636. "id": {
  35637. "type": "string",
  35638. "pattern": "^per"
  35639. },
  35640. "sessionID": {
  35641. "type": "string",
  35642. "pattern": "^ses"
  35643. },
  35644. "action": {
  35645. "type": "string"
  35646. },
  35647. "resources": {
  35648. "type": "array",
  35649. "items": {
  35650. "type": "string"
  35651. }
  35652. },
  35653. "save": {
  35654. "type": "array",
  35655. "items": {
  35656. "type": "string"
  35657. }
  35658. },
  35659. "metadata": {
  35660. "type": "object"
  35661. },
  35662. "source": {
  35663. "$ref": "#/components/schemas/PermissionV2Source"
  35664. }
  35665. },
  35666. "required": ["id", "sessionID", "action", "resources"],
  35667. "additionalProperties": false
  35668. }
  35669. },
  35670. "required": ["id", "type", "properties"],
  35671. "additionalProperties": false
  35672. },
  35673. "EventPermissionV2Replied": {
  35674. "type": "object",
  35675. "properties": {
  35676. "id": {
  35677. "type": "string",
  35678. "pattern": "^evt_"
  35679. },
  35680. "type": {
  35681. "type": "string",
  35682. "enum": ["permission.v2.replied"]
  35683. },
  35684. "properties": {
  35685. "type": "object",
  35686. "properties": {
  35687. "sessionID": {
  35688. "type": "string",
  35689. "pattern": "^ses"
  35690. },
  35691. "requestID": {
  35692. "type": "string",
  35693. "pattern": "^per"
  35694. },
  35695. "reply": {
  35696. "$ref": "#/components/schemas/PermissionV2Reply"
  35697. }
  35698. },
  35699. "required": ["sessionID", "requestID", "reply"],
  35700. "additionalProperties": false
  35701. }
  35702. },
  35703. "required": ["id", "type", "properties"],
  35704. "additionalProperties": false
  35705. },
  35706. "EventPluginAdded": {
  35707. "type": "object",
  35708. "properties": {
  35709. "id": {
  35710. "type": "string",
  35711. "pattern": "^evt_"
  35712. },
  35713. "type": {
  35714. "type": "string",
  35715. "enum": ["plugin.added"]
  35716. },
  35717. "properties": {
  35718. "type": "object",
  35719. "properties": {
  35720. "id": {
  35721. "type": "string"
  35722. }
  35723. },
  35724. "required": ["id"],
  35725. "additionalProperties": false
  35726. }
  35727. },
  35728. "required": ["id", "type", "properties"],
  35729. "additionalProperties": false
  35730. },
  35731. "EventProjectDirectoriesUpdated": {
  35732. "type": "object",
  35733. "properties": {
  35734. "id": {
  35735. "type": "string",
  35736. "pattern": "^evt_"
  35737. },
  35738. "type": {
  35739. "type": "string",
  35740. "enum": ["project.directories.updated"]
  35741. },
  35742. "properties": {
  35743. "type": "object",
  35744. "properties": {
  35745. "projectID": {
  35746. "type": "string"
  35747. }
  35748. },
  35749. "required": ["projectID"],
  35750. "additionalProperties": false
  35751. }
  35752. },
  35753. "required": ["id", "type", "properties"],
  35754. "additionalProperties": false
  35755. },
  35756. "EventFileWatcherUpdated": {
  35757. "type": "object",
  35758. "properties": {
  35759. "id": {
  35760. "type": "string",
  35761. "pattern": "^evt_"
  35762. },
  35763. "type": {
  35764. "type": "string",
  35765. "enum": ["file.watcher.updated"]
  35766. },
  35767. "properties": {
  35768. "type": "object",
  35769. "properties": {
  35770. "file": {
  35771. "type": "string"
  35772. },
  35773. "event": {
  35774. "type": "string",
  35775. "enum": ["add", "change", "unlink"]
  35776. }
  35777. },
  35778. "required": ["file", "event"],
  35779. "additionalProperties": false
  35780. }
  35781. },
  35782. "required": ["id", "type", "properties"],
  35783. "additionalProperties": false
  35784. },
  35785. "EventPtyCreated": {
  35786. "type": "object",
  35787. "properties": {
  35788. "id": {
  35789. "type": "string",
  35790. "pattern": "^evt_"
  35791. },
  35792. "type": {
  35793. "type": "string",
  35794. "enum": ["pty.created"]
  35795. },
  35796. "properties": {
  35797. "type": "object",
  35798. "properties": {
  35799. "info": {
  35800. "$ref": "#/components/schemas/Pty"
  35801. }
  35802. },
  35803. "required": ["info"],
  35804. "additionalProperties": false
  35805. }
  35806. },
  35807. "required": ["id", "type", "properties"],
  35808. "additionalProperties": false
  35809. },
  35810. "EventPtyUpdated": {
  35811. "type": "object",
  35812. "properties": {
  35813. "id": {
  35814. "type": "string",
  35815. "pattern": "^evt_"
  35816. },
  35817. "type": {
  35818. "type": "string",
  35819. "enum": ["pty.updated"]
  35820. },
  35821. "properties": {
  35822. "type": "object",
  35823. "properties": {
  35824. "info": {
  35825. "$ref": "#/components/schemas/Pty"
  35826. }
  35827. },
  35828. "required": ["info"],
  35829. "additionalProperties": false
  35830. }
  35831. },
  35832. "required": ["id", "type", "properties"],
  35833. "additionalProperties": false
  35834. },
  35835. "EventPtyExited": {
  35836. "type": "object",
  35837. "properties": {
  35838. "id": {
  35839. "type": "string",
  35840. "pattern": "^evt_"
  35841. },
  35842. "type": {
  35843. "type": "string",
  35844. "enum": ["pty.exited"]
  35845. },
  35846. "properties": {
  35847. "type": "object",
  35848. "properties": {
  35849. "id": {
  35850. "type": "string",
  35851. "pattern": "^pty"
  35852. },
  35853. "exitCode": {
  35854. "type": "integer",
  35855. "minimum": 0
  35856. }
  35857. },
  35858. "required": ["id", "exitCode"],
  35859. "additionalProperties": false
  35860. }
  35861. },
  35862. "required": ["id", "type", "properties"],
  35863. "additionalProperties": false
  35864. },
  35865. "EventPtyDeleted": {
  35866. "type": "object",
  35867. "properties": {
  35868. "id": {
  35869. "type": "string",
  35870. "pattern": "^evt_"
  35871. },
  35872. "type": {
  35873. "type": "string",
  35874. "enum": ["pty.deleted"]
  35875. },
  35876. "properties": {
  35877. "type": "object",
  35878. "properties": {
  35879. "id": {
  35880. "type": "string",
  35881. "pattern": "^pty"
  35882. }
  35883. },
  35884. "required": ["id"],
  35885. "additionalProperties": false
  35886. }
  35887. },
  35888. "required": ["id", "type", "properties"],
  35889. "additionalProperties": false
  35890. },
  35891. "EventQuestionV2Asked": {
  35892. "type": "object",
  35893. "properties": {
  35894. "id": {
  35895. "type": "string",
  35896. "pattern": "^evt_"
  35897. },
  35898. "type": {
  35899. "type": "string",
  35900. "enum": ["question.v2.asked"]
  35901. },
  35902. "properties": {
  35903. "type": "object",
  35904. "properties": {
  35905. "id": {
  35906. "type": "string",
  35907. "pattern": "^que"
  35908. },
  35909. "sessionID": {
  35910. "type": "string",
  35911. "pattern": "^ses"
  35912. },
  35913. "questions": {
  35914. "type": "array",
  35915. "items": {
  35916. "$ref": "#/components/schemas/QuestionV2Info"
  35917. },
  35918. "description": "Questions to ask"
  35919. },
  35920. "tool": {
  35921. "$ref": "#/components/schemas/QuestionV2Tool"
  35922. }
  35923. },
  35924. "required": ["id", "sessionID", "questions"],
  35925. "additionalProperties": false
  35926. }
  35927. },
  35928. "required": ["id", "type", "properties"],
  35929. "additionalProperties": false
  35930. },
  35931. "EventQuestionV2Replied": {
  35932. "type": "object",
  35933. "properties": {
  35934. "id": {
  35935. "type": "string",
  35936. "pattern": "^evt_"
  35937. },
  35938. "type": {
  35939. "type": "string",
  35940. "enum": ["question.v2.replied"]
  35941. },
  35942. "properties": {
  35943. "type": "object",
  35944. "properties": {
  35945. "sessionID": {
  35946. "type": "string",
  35947. "pattern": "^ses"
  35948. },
  35949. "requestID": {
  35950. "type": "string",
  35951. "pattern": "^que"
  35952. },
  35953. "answers": {
  35954. "type": "array",
  35955. "items": {
  35956. "$ref": "#/components/schemas/QuestionV2Answer"
  35957. }
  35958. }
  35959. },
  35960. "required": ["sessionID", "requestID", "answers"],
  35961. "additionalProperties": false
  35962. }
  35963. },
  35964. "required": ["id", "type", "properties"],
  35965. "additionalProperties": false
  35966. },
  35967. "EventQuestionV2Rejected": {
  35968. "type": "object",
  35969. "properties": {
  35970. "id": {
  35971. "type": "string",
  35972. "pattern": "^evt_"
  35973. },
  35974. "type": {
  35975. "type": "string",
  35976. "enum": ["question.v2.rejected"]
  35977. },
  35978. "properties": {
  35979. "type": "object",
  35980. "properties": {
  35981. "sessionID": {
  35982. "type": "string",
  35983. "pattern": "^ses"
  35984. },
  35985. "requestID": {
  35986. "type": "string",
  35987. "pattern": "^que"
  35988. }
  35989. },
  35990. "required": ["sessionID", "requestID"],
  35991. "additionalProperties": false
  35992. }
  35993. },
  35994. "required": ["id", "type", "properties"],
  35995. "additionalProperties": false
  35996. },
  35997. "EventTodoUpdated": {
  35998. "type": "object",
  35999. "properties": {
  36000. "id": {
  36001. "type": "string",
  36002. "pattern": "^evt_"
  36003. },
  36004. "type": {
  36005. "type": "string",
  36006. "enum": ["todo.updated"]
  36007. },
  36008. "properties": {
  36009. "type": "object",
  36010. "properties": {
  36011. "sessionID": {
  36012. "type": "string",
  36013. "pattern": "^ses"
  36014. },
  36015. "todos": {
  36016. "type": "array",
  36017. "items": {
  36018. "$ref": "#/components/schemas/Todo"
  36019. }
  36020. }
  36021. },
  36022. "required": ["sessionID", "todos"],
  36023. "additionalProperties": false
  36024. }
  36025. },
  36026. "required": ["id", "type", "properties"],
  36027. "additionalProperties": false
  36028. },
  36029. "EventLspUpdated": {
  36030. "type": "object",
  36031. "properties": {
  36032. "id": {
  36033. "type": "string",
  36034. "pattern": "^evt_"
  36035. },
  36036. "type": {
  36037. "type": "string",
  36038. "enum": ["lsp.updated"]
  36039. },
  36040. "properties": {
  36041. "type": "object",
  36042. "properties": {}
  36043. }
  36044. },
  36045. "required": ["id", "type", "properties"],
  36046. "additionalProperties": false
  36047. },
  36048. "EventPermissionAsked": {
  36049. "type": "object",
  36050. "properties": {
  36051. "id": {
  36052. "type": "string",
  36053. "pattern": "^evt_"
  36054. },
  36055. "type": {
  36056. "type": "string",
  36057. "enum": ["permission.asked"]
  36058. },
  36059. "properties": {
  36060. "type": "object",
  36061. "properties": {
  36062. "id": {
  36063. "type": "string",
  36064. "pattern": "^per"
  36065. },
  36066. "sessionID": {
  36067. "type": "string",
  36068. "pattern": "^ses"
  36069. },
  36070. "permission": {
  36071. "type": "string"
  36072. },
  36073. "patterns": {
  36074. "type": "array",
  36075. "items": {
  36076. "type": "string"
  36077. }
  36078. },
  36079. "metadata": {
  36080. "type": "object"
  36081. },
  36082. "always": {
  36083. "type": "array",
  36084. "items": {
  36085. "type": "string"
  36086. }
  36087. },
  36088. "tool": {
  36089. "type": "object",
  36090. "properties": {
  36091. "messageID": {
  36092. "type": "string"
  36093. },
  36094. "callID": {
  36095. "type": "string"
  36096. }
  36097. },
  36098. "required": ["messageID", "callID"],
  36099. "additionalProperties": false
  36100. }
  36101. },
  36102. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  36103. "additionalProperties": false
  36104. }
  36105. },
  36106. "required": ["id", "type", "properties"],
  36107. "additionalProperties": false
  36108. },
  36109. "EventPermissionReplied": {
  36110. "type": "object",
  36111. "properties": {
  36112. "id": {
  36113. "type": "string",
  36114. "pattern": "^evt_"
  36115. },
  36116. "type": {
  36117. "type": "string",
  36118. "enum": ["permission.replied"]
  36119. },
  36120. "properties": {
  36121. "type": "object",
  36122. "properties": {
  36123. "sessionID": {
  36124. "type": "string",
  36125. "pattern": "^ses"
  36126. },
  36127. "requestID": {
  36128. "type": "string",
  36129. "pattern": "^per"
  36130. },
  36131. "reply": {
  36132. "type": "string",
  36133. "enum": ["once", "always", "reject"]
  36134. }
  36135. },
  36136. "required": ["sessionID", "requestID", "reply"],
  36137. "additionalProperties": false
  36138. }
  36139. },
  36140. "required": ["id", "type", "properties"],
  36141. "additionalProperties": false
  36142. },
  36143. "EventMcpToolsChanged": {
  36144. "type": "object",
  36145. "properties": {
  36146. "id": {
  36147. "type": "string",
  36148. "pattern": "^evt_"
  36149. },
  36150. "type": {
  36151. "type": "string",
  36152. "enum": ["mcp.tools.changed"]
  36153. },
  36154. "properties": {
  36155. "type": "object",
  36156. "properties": {
  36157. "server": {
  36158. "type": "string"
  36159. }
  36160. },
  36161. "required": ["server"],
  36162. "additionalProperties": false
  36163. }
  36164. },
  36165. "required": ["id", "type", "properties"],
  36166. "additionalProperties": false
  36167. },
  36168. "EventMcpBrowserOpenFailed": {
  36169. "type": "object",
  36170. "properties": {
  36171. "id": {
  36172. "type": "string",
  36173. "pattern": "^evt_"
  36174. },
  36175. "type": {
  36176. "type": "string",
  36177. "enum": ["mcp.browser.open.failed"]
  36178. },
  36179. "properties": {
  36180. "type": "object",
  36181. "properties": {
  36182. "mcpName": {
  36183. "type": "string"
  36184. },
  36185. "url": {
  36186. "type": "string"
  36187. }
  36188. },
  36189. "required": ["mcpName", "url"],
  36190. "additionalProperties": false
  36191. }
  36192. },
  36193. "required": ["id", "type", "properties"],
  36194. "additionalProperties": false
  36195. },
  36196. "EventCommandExecuted": {
  36197. "type": "object",
  36198. "properties": {
  36199. "id": {
  36200. "type": "string",
  36201. "pattern": "^evt_"
  36202. },
  36203. "type": {
  36204. "type": "string",
  36205. "enum": ["command.executed"]
  36206. },
  36207. "properties": {
  36208. "type": "object",
  36209. "properties": {
  36210. "name": {
  36211. "type": "string"
  36212. },
  36213. "sessionID": {
  36214. "type": "string",
  36215. "pattern": "^ses"
  36216. },
  36217. "arguments": {
  36218. "type": "string"
  36219. },
  36220. "messageID": {
  36221. "type": "string",
  36222. "pattern": "^msg"
  36223. }
  36224. },
  36225. "required": ["name", "sessionID", "arguments", "messageID"],
  36226. "additionalProperties": false
  36227. }
  36228. },
  36229. "required": ["id", "type", "properties"],
  36230. "additionalProperties": false
  36231. },
  36232. "EventProjectUpdated": {
  36233. "type": "object",
  36234. "properties": {
  36235. "id": {
  36236. "type": "string",
  36237. "pattern": "^evt_"
  36238. },
  36239. "type": {
  36240. "type": "string",
  36241. "enum": ["project.updated"]
  36242. },
  36243. "properties": {
  36244. "type": "object",
  36245. "properties": {
  36246. "id": {
  36247. "type": "string"
  36248. },
  36249. "worktree": {
  36250. "type": "string"
  36251. },
  36252. "vcs": {
  36253. "$ref": "#/components/schemas/ProjectVcs"
  36254. },
  36255. "name": {
  36256. "type": "string"
  36257. },
  36258. "icon": {
  36259. "$ref": "#/components/schemas/ProjectIcon"
  36260. },
  36261. "commands": {
  36262. "$ref": "#/components/schemas/ProjectCommands"
  36263. },
  36264. "time": {
  36265. "$ref": "#/components/schemas/ProjectTime"
  36266. },
  36267. "sandboxes": {
  36268. "type": "array",
  36269. "items": {
  36270. "type": "string"
  36271. }
  36272. }
  36273. },
  36274. "required": ["id", "worktree", "time", "sandboxes"],
  36275. "additionalProperties": false
  36276. }
  36277. },
  36278. "required": ["id", "type", "properties"],
  36279. "additionalProperties": false
  36280. },
  36281. "EventSessionStatus": {
  36282. "type": "object",
  36283. "properties": {
  36284. "id": {
  36285. "type": "string",
  36286. "pattern": "^evt_"
  36287. },
  36288. "type": {
  36289. "type": "string",
  36290. "enum": ["session.status"]
  36291. },
  36292. "properties": {
  36293. "type": "object",
  36294. "properties": {
  36295. "sessionID": {
  36296. "type": "string",
  36297. "pattern": "^ses"
  36298. },
  36299. "status": {
  36300. "$ref": "#/components/schemas/SessionStatus"
  36301. }
  36302. },
  36303. "required": ["sessionID", "status"],
  36304. "additionalProperties": false
  36305. }
  36306. },
  36307. "required": ["id", "type", "properties"],
  36308. "additionalProperties": false
  36309. },
  36310. "EventSessionIdle": {
  36311. "type": "object",
  36312. "properties": {
  36313. "id": {
  36314. "type": "string",
  36315. "pattern": "^evt_"
  36316. },
  36317. "type": {
  36318. "type": "string",
  36319. "enum": ["session.idle"]
  36320. },
  36321. "properties": {
  36322. "type": "object",
  36323. "properties": {
  36324. "sessionID": {
  36325. "type": "string",
  36326. "pattern": "^ses"
  36327. }
  36328. },
  36329. "required": ["sessionID"],
  36330. "additionalProperties": false
  36331. }
  36332. },
  36333. "required": ["id", "type", "properties"],
  36334. "additionalProperties": false
  36335. },
  36336. "EventQuestionAsked": {
  36337. "type": "object",
  36338. "properties": {
  36339. "id": {
  36340. "type": "string",
  36341. "pattern": "^evt_"
  36342. },
  36343. "type": {
  36344. "type": "string",
  36345. "enum": ["question.asked"]
  36346. },
  36347. "properties": {
  36348. "type": "object",
  36349. "properties": {
  36350. "id": {
  36351. "type": "string",
  36352. "pattern": "^que"
  36353. },
  36354. "sessionID": {
  36355. "type": "string",
  36356. "pattern": "^ses"
  36357. },
  36358. "questions": {
  36359. "type": "array",
  36360. "items": {
  36361. "$ref": "#/components/schemas/QuestionInfo"
  36362. },
  36363. "description": "Questions to ask"
  36364. },
  36365. "tool": {
  36366. "$ref": "#/components/schemas/QuestionTool"
  36367. }
  36368. },
  36369. "required": ["id", "sessionID", "questions"],
  36370. "additionalProperties": false
  36371. }
  36372. },
  36373. "required": ["id", "type", "properties"],
  36374. "additionalProperties": false
  36375. },
  36376. "EventQuestionReplied": {
  36377. "type": "object",
  36378. "properties": {
  36379. "id": {
  36380. "type": "string",
  36381. "pattern": "^evt_"
  36382. },
  36383. "type": {
  36384. "type": "string",
  36385. "enum": ["question.replied"]
  36386. },
  36387. "properties": {
  36388. "type": "object",
  36389. "properties": {
  36390. "sessionID": {
  36391. "type": "string",
  36392. "pattern": "^ses"
  36393. },
  36394. "requestID": {
  36395. "type": "string",
  36396. "pattern": "^que"
  36397. },
  36398. "answers": {
  36399. "type": "array",
  36400. "items": {
  36401. "$ref": "#/components/schemas/QuestionAnswer"
  36402. }
  36403. }
  36404. },
  36405. "required": ["sessionID", "requestID", "answers"],
  36406. "additionalProperties": false
  36407. }
  36408. },
  36409. "required": ["id", "type", "properties"],
  36410. "additionalProperties": false
  36411. },
  36412. "EventQuestionRejected": {
  36413. "type": "object",
  36414. "properties": {
  36415. "id": {
  36416. "type": "string",
  36417. "pattern": "^evt_"
  36418. },
  36419. "type": {
  36420. "type": "string",
  36421. "enum": ["question.rejected"]
  36422. },
  36423. "properties": {
  36424. "type": "object",
  36425. "properties": {
  36426. "sessionID": {
  36427. "type": "string",
  36428. "pattern": "^ses"
  36429. },
  36430. "requestID": {
  36431. "type": "string",
  36432. "pattern": "^que"
  36433. }
  36434. },
  36435. "required": ["sessionID", "requestID"],
  36436. "additionalProperties": false
  36437. }
  36438. },
  36439. "required": ["id", "type", "properties"],
  36440. "additionalProperties": false
  36441. },
  36442. "EventSessionCompacted": {
  36443. "type": "object",
  36444. "properties": {
  36445. "id": {
  36446. "type": "string",
  36447. "pattern": "^evt_"
  36448. },
  36449. "type": {
  36450. "type": "string",
  36451. "enum": ["session.compacted"]
  36452. },
  36453. "properties": {
  36454. "type": "object",
  36455. "properties": {
  36456. "sessionID": {
  36457. "type": "string",
  36458. "pattern": "^ses"
  36459. }
  36460. },
  36461. "required": ["sessionID"],
  36462. "additionalProperties": false
  36463. }
  36464. },
  36465. "required": ["id", "type", "properties"],
  36466. "additionalProperties": false
  36467. },
  36468. "EventVcsBranchUpdated": {
  36469. "type": "object",
  36470. "properties": {
  36471. "id": {
  36472. "type": "string",
  36473. "pattern": "^evt_"
  36474. },
  36475. "type": {
  36476. "type": "string",
  36477. "enum": ["vcs.branch.updated"]
  36478. },
  36479. "properties": {
  36480. "type": "object",
  36481. "properties": {
  36482. "branch": {
  36483. "type": "string"
  36484. }
  36485. },
  36486. "additionalProperties": false
  36487. }
  36488. },
  36489. "required": ["id", "type", "properties"],
  36490. "additionalProperties": false
  36491. },
  36492. "EventWorkspaceReady": {
  36493. "type": "object",
  36494. "properties": {
  36495. "id": {
  36496. "type": "string",
  36497. "pattern": "^evt_"
  36498. },
  36499. "type": {
  36500. "type": "string",
  36501. "enum": ["workspace.ready"]
  36502. },
  36503. "properties": {
  36504. "type": "object",
  36505. "properties": {
  36506. "name": {
  36507. "type": "string"
  36508. }
  36509. },
  36510. "required": ["name"],
  36511. "additionalProperties": false
  36512. }
  36513. },
  36514. "required": ["id", "type", "properties"],
  36515. "additionalProperties": false
  36516. },
  36517. "EventWorkspaceFailed": {
  36518. "type": "object",
  36519. "properties": {
  36520. "id": {
  36521. "type": "string",
  36522. "pattern": "^evt_"
  36523. },
  36524. "type": {
  36525. "type": "string",
  36526. "enum": ["workspace.failed"]
  36527. },
  36528. "properties": {
  36529. "type": "object",
  36530. "properties": {
  36531. "message": {
  36532. "type": "string"
  36533. }
  36534. },
  36535. "required": ["message"],
  36536. "additionalProperties": false
  36537. }
  36538. },
  36539. "required": ["id", "type", "properties"],
  36540. "additionalProperties": false
  36541. },
  36542. "EventWorkspaceStatus": {
  36543. "type": "object",
  36544. "properties": {
  36545. "id": {
  36546. "type": "string",
  36547. "pattern": "^evt_"
  36548. },
  36549. "type": {
  36550. "type": "string",
  36551. "enum": ["workspace.status"]
  36552. },
  36553. "properties": {
  36554. "type": "object",
  36555. "properties": {
  36556. "workspaceID": {
  36557. "type": "string",
  36558. "pattern": "^wrk"
  36559. },
  36560. "status": {
  36561. "type": "string",
  36562. "enum": ["connected", "connecting", "disconnected", "error"]
  36563. }
  36564. },
  36565. "required": ["workspaceID", "status"],
  36566. "additionalProperties": false
  36567. }
  36568. },
  36569. "required": ["id", "type", "properties"],
  36570. "additionalProperties": false
  36571. },
  36572. "EventWorktreeReady": {
  36573. "type": "object",
  36574. "properties": {
  36575. "id": {
  36576. "type": "string",
  36577. "pattern": "^evt_"
  36578. },
  36579. "type": {
  36580. "type": "string",
  36581. "enum": ["worktree.ready"]
  36582. },
  36583. "properties": {
  36584. "type": "object",
  36585. "properties": {
  36586. "name": {
  36587. "type": "string"
  36588. },
  36589. "branch": {
  36590. "type": "string"
  36591. }
  36592. },
  36593. "required": ["name"],
  36594. "additionalProperties": false
  36595. }
  36596. },
  36597. "required": ["id", "type", "properties"],
  36598. "additionalProperties": false
  36599. },
  36600. "EventWorktreeFailed": {
  36601. "type": "object",
  36602. "properties": {
  36603. "id": {
  36604. "type": "string",
  36605. "pattern": "^evt_"
  36606. },
  36607. "type": {
  36608. "type": "string",
  36609. "enum": ["worktree.failed"]
  36610. },
  36611. "properties": {
  36612. "type": "object",
  36613. "properties": {
  36614. "message": {
  36615. "type": "string"
  36616. }
  36617. },
  36618. "required": ["message"],
  36619. "additionalProperties": false
  36620. }
  36621. },
  36622. "required": ["id", "type", "properties"],
  36623. "additionalProperties": false
  36624. },
  36625. "EventServerConnected": {
  36626. "type": "object",
  36627. "properties": {
  36628. "id": {
  36629. "type": "string",
  36630. "pattern": "^evt_"
  36631. },
  36632. "type": {
  36633. "type": "string",
  36634. "enum": ["server.connected"]
  36635. },
  36636. "properties": {
  36637. "type": "object",
  36638. "properties": {}
  36639. }
  36640. },
  36641. "required": ["id", "type", "properties"],
  36642. "additionalProperties": false
  36643. },
  36644. "EventGlobalDisposed": {
  36645. "type": "object",
  36646. "properties": {
  36647. "id": {
  36648. "type": "string",
  36649. "pattern": "^evt_"
  36650. },
  36651. "type": {
  36652. "type": "string",
  36653. "enum": ["global.disposed"]
  36654. },
  36655. "properties": {
  36656. "type": "object",
  36657. "properties": {}
  36658. }
  36659. },
  36660. "required": ["id", "type", "properties"],
  36661. "additionalProperties": false
  36662. },
  36663. "CredentialOAuth": {
  36664. "type": "object",
  36665. "properties": {
  36666. "type": {
  36667. "type": "string",
  36668. "enum": ["oauth"]
  36669. },
  36670. "methodID": {
  36671. "type": "string"
  36672. },
  36673. "refresh": {
  36674. "type": "string"
  36675. },
  36676. "access": {
  36677. "type": "string"
  36678. },
  36679. "expires": {
  36680. "type": "integer",
  36681. "minimum": 0
  36682. },
  36683. "metadata": {
  36684. "type": "object"
  36685. }
  36686. },
  36687. "required": ["type", "methodID", "refresh", "access", "expires"],
  36688. "additionalProperties": false
  36689. },
  36690. "CredentialKey": {
  36691. "type": "object",
  36692. "properties": {
  36693. "type": {
  36694. "type": "string",
  36695. "enum": ["key"]
  36696. },
  36697. "key": {
  36698. "type": "string"
  36699. },
  36700. "metadata": {
  36701. "type": "object"
  36702. }
  36703. },
  36704. "required": ["type", "key"],
  36705. "additionalProperties": false
  36706. },
  36707. "SkillV2DirectorySource": {
  36708. "type": "object",
  36709. "properties": {
  36710. "type": {
  36711. "type": "string",
  36712. "enum": ["directory"]
  36713. },
  36714. "path": {
  36715. "type": "string"
  36716. }
  36717. },
  36718. "required": ["type", "path"],
  36719. "additionalProperties": false
  36720. },
  36721. "SkillV2UrlSource": {
  36722. "type": "object",
  36723. "properties": {
  36724. "type": {
  36725. "type": "string",
  36726. "enum": ["url"]
  36727. },
  36728. "url": {
  36729. "type": "string"
  36730. }
  36731. },
  36732. "required": ["type", "url"],
  36733. "additionalProperties": false
  36734. },
  36735. "SkillV2EmbeddedSource": {
  36736. "type": "object",
  36737. "properties": {
  36738. "type": {
  36739. "type": "string",
  36740. "enum": ["embedded"]
  36741. },
  36742. "skill": {
  36743. "$ref": "#/components/schemas/SkillV2Info"
  36744. }
  36745. },
  36746. "required": ["type", "skill"],
  36747. "additionalProperties": false
  36748. },
  36749. "BadRequestError": {
  36750. "type": "object",
  36751. "required": ["name", "data"],
  36752. "properties": {
  36753. "name": {
  36754. "type": "string",
  36755. "enum": ["BadRequest"]
  36756. },
  36757. "data": {
  36758. "type": "object",
  36759. "required": ["message"],
  36760. "properties": {
  36761. "message": {
  36762. "type": "string"
  36763. },
  36764. "kind": {
  36765. "type": "string",
  36766. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36767. }
  36768. }
  36769. }
  36770. }
  36771. }
  36772. }
  36773. },
  36774. "security": [],
  36775. "tags": [
  36776. {
  36777. "name": "control",
  36778. "description": "Control plane routes."
  36779. },
  36780. {
  36781. "name": "controlPlane",
  36782. "description": "Control-plane orchestration routes."
  36783. },
  36784. {
  36785. "name": "global",
  36786. "description": "Global server routes."
  36787. },
  36788. {
  36789. "name": "event",
  36790. "description": "Instance event stream route."
  36791. },
  36792. {
  36793. "name": "config",
  36794. "description": "Experimental HttpApi config routes."
  36795. },
  36796. {
  36797. "name": "experimental",
  36798. "description": "Experimental HttpApi read-only routes."
  36799. },
  36800. {
  36801. "name": "file",
  36802. "description": "Experimental HttpApi file routes."
  36803. },
  36804. {
  36805. "name": "instance",
  36806. "description": "Experimental HttpApi instance read routes."
  36807. },
  36808. {
  36809. "name": "mcp",
  36810. "description": "Experimental HttpApi MCP routes."
  36811. },
  36812. {
  36813. "name": "project",
  36814. "description": "Experimental HttpApi project routes."
  36815. },
  36816. {
  36817. "name": "projectCopy",
  36818. "description": "Project copy naming routes."
  36819. },
  36820. {
  36821. "name": "pty",
  36822. "description": "Experimental HttpApi PTY routes."
  36823. },
  36824. {
  36825. "name": "question",
  36826. "description": "Question routes."
  36827. },
  36828. {
  36829. "name": "permission",
  36830. "description": "Experimental HttpApi permission routes."
  36831. },
  36832. {
  36833. "name": "provider",
  36834. "description": "Experimental HttpApi provider routes."
  36835. },
  36836. {
  36837. "name": "session",
  36838. "description": "Experimental HttpApi session routes."
  36839. },
  36840. {
  36841. "name": "sync",
  36842. "description": "Experimental HttpApi sync routes."
  36843. },
  36844. {
  36845. "name": "tui",
  36846. "description": "Experimental HttpApi TUI routes."
  36847. },
  36848. {
  36849. "name": "workspace",
  36850. "description": "Experimental HttpApi workspace routes."
  36851. },
  36852. {
  36853. "name": "opencode HttpApi",
  36854. "description": "Experimental HttpApi surface for selected instance routes."
  36855. },
  36856. {
  36857. "name": "opencode HttpApi",
  36858. "description": "Experimental HttpApi surface for selected instance routes."
  36859. },
  36860. {
  36861. "name": "opencode HttpApi",
  36862. "description": "Experimental HttpApi surface for selected instance routes."
  36863. },
  36864. {
  36865. "name": "sessions",
  36866. "description": "Experimental session routes."
  36867. },
  36868. {
  36869. "name": "messages",
  36870. "description": "Experimental message routes."
  36871. },
  36872. {
  36873. "name": "models",
  36874. "description": "Experimental model routes."
  36875. },
  36876. {
  36877. "name": "providers",
  36878. "description": "Experimental provider routes."
  36879. },
  36880. {
  36881. "name": "integrations",
  36882. "description": "Integration discovery and authentication routes."
  36883. },
  36884. {
  36885. "name": "opencode HttpApi",
  36886. "description": "Experimental HttpApi surface for selected instance routes."
  36887. },
  36888. {
  36889. "name": "permissions",
  36890. "description": "Experimental permission routes."
  36891. },
  36892. {
  36893. "name": "filesystem",
  36894. "description": "Experimental location-scoped filesystem routes."
  36895. },
  36896. {
  36897. "name": "commands",
  36898. "description": "Experimental command routes."
  36899. },
  36900. {
  36901. "name": "skills",
  36902. "description": "Experimental skill routes."
  36903. },
  36904. {
  36905. "name": "events",
  36906. "description": "Experimental event stream route."
  36907. },
  36908. {
  36909. "name": "pty",
  36910. "description": "Experimental location-scoped PTY routes."
  36911. },
  36912. {
  36913. "name": "session questions",
  36914. "description": "Experimental session question routes."
  36915. },
  36916. {
  36917. "name": "reference",
  36918. "description": "Location-scoped project references."
  36919. },
  36920. {
  36921. "name": "projectCopy",
  36922. "description": "Project copy management routes."
  36923. },
  36924. {
  36925. "name": "pty",
  36926. "description": "PTY websocket route."
  36927. }
  36928. ]
  36929. }