openapi.json 1.0 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949
  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. },
  20825. {
  20826. "type": "string",
  20827. "enum": ["reasoning", "reasoning_content", "reasoning_text"]
  20828. },
  20829. {
  20830. "type": "string"
  20831. },
  20832. {
  20833. "type": "object",
  20834. "properties": {
  20835. "field": {
  20836. "anyOf": [
  20837. {
  20838. "type": "string",
  20839. "enum": ["reasoning", "reasoning_content", "reasoning_text"]
  20840. },
  20841. {
  20842. "type": "string"
  20843. }
  20844. ]
  20845. }
  20846. },
  20847. "required": ["field"],
  20848. "additionalProperties": false
  20849. }
  20850. ]
  20851. },
  20852. "cost": {
  20853. "type": "object",
  20854. "properties": {
  20855. "input": {
  20856. "type": "number"
  20857. },
  20858. "output": {
  20859. "type": "number"
  20860. },
  20861. "cache_read": {
  20862. "type": "number"
  20863. },
  20864. "cache_write": {
  20865. "type": "number"
  20866. },
  20867. "context_over_200k": {
  20868. "type": "object",
  20869. "properties": {
  20870. "input": {
  20871. "type": "number"
  20872. },
  20873. "output": {
  20874. "type": "number"
  20875. },
  20876. "cache_read": {
  20877. "type": "number"
  20878. },
  20879. "cache_write": {
  20880. "type": "number"
  20881. }
  20882. },
  20883. "required": ["input", "output"],
  20884. "additionalProperties": false
  20885. }
  20886. },
  20887. "required": ["input", "output"],
  20888. "additionalProperties": false
  20889. },
  20890. "limit": {
  20891. "type": "object",
  20892. "properties": {
  20893. "context": {
  20894. "type": "number"
  20895. },
  20896. "input": {
  20897. "type": "number"
  20898. },
  20899. "output": {
  20900. "type": "number"
  20901. }
  20902. },
  20903. "required": ["context", "output"],
  20904. "additionalProperties": false
  20905. },
  20906. "modalities": {
  20907. "type": "object",
  20908. "properties": {
  20909. "input": {
  20910. "type": "array",
  20911. "items": {
  20912. "type": "string",
  20913. "enum": ["text", "audio", "image", "video", "pdf"]
  20914. }
  20915. },
  20916. "output": {
  20917. "type": "array",
  20918. "items": {
  20919. "type": "string",
  20920. "enum": ["text", "audio", "image", "video", "pdf"]
  20921. }
  20922. }
  20923. },
  20924. "additionalProperties": false
  20925. },
  20926. "experimental": {
  20927. "type": "boolean"
  20928. },
  20929. "status": {
  20930. "type": "string",
  20931. "enum": ["alpha", "beta", "deprecated", "active"]
  20932. },
  20933. "provider": {
  20934. "type": "object",
  20935. "properties": {
  20936. "npm": {
  20937. "type": "string"
  20938. },
  20939. "api": {
  20940. "type": "string"
  20941. }
  20942. },
  20943. "additionalProperties": false
  20944. },
  20945. "options": {
  20946. "type": "object"
  20947. },
  20948. "headers": {
  20949. "type": "object",
  20950. "additionalProperties": {
  20951. "type": "string"
  20952. }
  20953. },
  20954. "variants": {
  20955. "type": "object",
  20956. "additionalProperties": {
  20957. "type": "object",
  20958. "properties": {
  20959. "disabled": {
  20960. "type": "boolean"
  20961. }
  20962. },
  20963. "additionalProperties": {}
  20964. },
  20965. "description": "Variant-specific configuration"
  20966. }
  20967. },
  20968. "additionalProperties": false
  20969. }
  20970. }
  20971. },
  20972. "additionalProperties": false
  20973. },
  20974. "McpLocalConfig": {
  20975. "type": "object",
  20976. "properties": {
  20977. "type": {
  20978. "type": "string",
  20979. "enum": ["local"],
  20980. "description": "Type of MCP server connection"
  20981. },
  20982. "command": {
  20983. "type": "array",
  20984. "items": {
  20985. "type": "string"
  20986. },
  20987. "description": "Command and arguments to run the MCP server"
  20988. },
  20989. "cwd": {
  20990. "type": "string"
  20991. },
  20992. "environment": {
  20993. "type": "object",
  20994. "additionalProperties": {
  20995. "type": "string"
  20996. }
  20997. },
  20998. "enabled": {
  20999. "type": "boolean"
  21000. },
  21001. "timeout": {
  21002. "type": "integer",
  21003. "exclusiveMinimum": 0
  21004. }
  21005. },
  21006. "required": ["type", "command"],
  21007. "additionalProperties": false
  21008. },
  21009. "McpOAuthConfig": {
  21010. "type": "object",
  21011. "properties": {
  21012. "clientId": {
  21013. "type": "string"
  21014. },
  21015. "clientSecret": {
  21016. "type": "string"
  21017. },
  21018. "scope": {
  21019. "type": "string"
  21020. },
  21021. "callbackPort": {
  21022. "type": "integer",
  21023. "minimum": 1,
  21024. "maximum": 65535
  21025. },
  21026. "redirectUri": {
  21027. "type": "string"
  21028. }
  21029. },
  21030. "additionalProperties": false
  21031. },
  21032. "McpRemoteConfig": {
  21033. "type": "object",
  21034. "properties": {
  21035. "type": {
  21036. "type": "string",
  21037. "enum": ["remote"],
  21038. "description": "Type of MCP server connection"
  21039. },
  21040. "url": {
  21041. "type": "string",
  21042. "description": "URL of the remote MCP server"
  21043. },
  21044. "enabled": {
  21045. "type": "boolean"
  21046. },
  21047. "headers": {
  21048. "type": "object",
  21049. "additionalProperties": {
  21050. "type": "string"
  21051. }
  21052. },
  21053. "oauth": {
  21054. "anyOf": [
  21055. {
  21056. "$ref": "#/components/schemas/McpOAuthConfig"
  21057. },
  21058. {
  21059. "type": "boolean",
  21060. "enum": [false]
  21061. }
  21062. ],
  21063. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  21064. },
  21065. "timeout": {
  21066. "type": "integer",
  21067. "exclusiveMinimum": 0
  21068. }
  21069. },
  21070. "required": ["type", "url"],
  21071. "additionalProperties": false
  21072. },
  21073. "LayoutConfig": {
  21074. "type": "string",
  21075. "enum": ["auto", "stretch"],
  21076. "description": "@deprecated Always uses stretch layout."
  21077. },
  21078. "ImageAttachmentConfig": {
  21079. "type": "object",
  21080. "properties": {
  21081. "auto_resize": {
  21082. "type": "boolean"
  21083. },
  21084. "max_width": {
  21085. "type": "integer",
  21086. "exclusiveMinimum": 0
  21087. },
  21088. "max_height": {
  21089. "type": "integer",
  21090. "exclusiveMinimum": 0
  21091. },
  21092. "max_base64_bytes": {
  21093. "type": "integer",
  21094. "exclusiveMinimum": 0
  21095. }
  21096. },
  21097. "additionalProperties": false
  21098. },
  21099. "AttachmentConfig": {
  21100. "type": "object",
  21101. "properties": {
  21102. "image": {
  21103. "$ref": "#/components/schemas/ImageAttachmentConfig"
  21104. }
  21105. },
  21106. "additionalProperties": false
  21107. },
  21108. "Config": {
  21109. "type": "object",
  21110. "properties": {
  21111. "$schema": {
  21112. "type": "string"
  21113. },
  21114. "shell": {
  21115. "type": "string"
  21116. },
  21117. "logLevel": {
  21118. "$ref": "#/components/schemas/LogLevel"
  21119. },
  21120. "server": {
  21121. "$ref": "#/components/schemas/ServerConfig"
  21122. },
  21123. "command": {
  21124. "type": "object",
  21125. "additionalProperties": {
  21126. "type": "object",
  21127. "properties": {
  21128. "template": {
  21129. "type": "string"
  21130. },
  21131. "description": {
  21132. "type": "string"
  21133. },
  21134. "agent": {
  21135. "type": "string"
  21136. },
  21137. "model": {
  21138. "type": "string"
  21139. },
  21140. "variant": {
  21141. "type": "string"
  21142. },
  21143. "subtask": {
  21144. "type": "boolean"
  21145. }
  21146. },
  21147. "required": ["template"],
  21148. "additionalProperties": false
  21149. }
  21150. },
  21151. "skills": {
  21152. "type": "object",
  21153. "properties": {
  21154. "paths": {
  21155. "type": "array",
  21156. "items": {
  21157. "type": "string"
  21158. }
  21159. },
  21160. "urls": {
  21161. "type": "array",
  21162. "items": {
  21163. "type": "string"
  21164. }
  21165. }
  21166. },
  21167. "additionalProperties": false
  21168. },
  21169. "references": {
  21170. "type": "object",
  21171. "additionalProperties": {
  21172. "anyOf": [
  21173. {
  21174. "type": "string"
  21175. },
  21176. {
  21177. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21178. },
  21179. {
  21180. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21181. }
  21182. ]
  21183. }
  21184. },
  21185. "reference": {
  21186. "type": "object",
  21187. "additionalProperties": {
  21188. "anyOf": [
  21189. {
  21190. "type": "string"
  21191. },
  21192. {
  21193. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  21194. },
  21195. {
  21196. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  21197. }
  21198. ]
  21199. }
  21200. },
  21201. "watcher": {
  21202. "type": "object",
  21203. "properties": {
  21204. "ignore": {
  21205. "type": "array",
  21206. "items": {
  21207. "type": "string"
  21208. }
  21209. }
  21210. },
  21211. "additionalProperties": false
  21212. },
  21213. "snapshot": {
  21214. "type": "boolean"
  21215. },
  21216. "plugin": {
  21217. "type": "array",
  21218. "items": {
  21219. "anyOf": [
  21220. {
  21221. "type": "string"
  21222. },
  21223. {
  21224. "type": "array",
  21225. "prefixItems": [
  21226. {
  21227. "type": "string"
  21228. },
  21229. {
  21230. "type": "object"
  21231. }
  21232. ],
  21233. "maxItems": 2,
  21234. "minItems": 2
  21235. }
  21236. ]
  21237. }
  21238. },
  21239. "share": {
  21240. "type": "string",
  21241. "enum": ["manual", "auto", "disabled"]
  21242. },
  21243. "autoshare": {
  21244. "type": "boolean"
  21245. },
  21246. "autoupdate": {
  21247. "anyOf": [
  21248. {
  21249. "type": "boolean"
  21250. },
  21251. {
  21252. "type": "string",
  21253. "enum": ["notify"]
  21254. }
  21255. ],
  21256. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  21257. },
  21258. "disabled_providers": {
  21259. "type": "array",
  21260. "items": {
  21261. "type": "string"
  21262. }
  21263. },
  21264. "enabled_providers": {
  21265. "type": "array",
  21266. "items": {
  21267. "type": "string"
  21268. }
  21269. },
  21270. "model": {
  21271. "type": "string"
  21272. },
  21273. "small_model": {
  21274. "type": "string"
  21275. },
  21276. "default_agent": {
  21277. "type": "string"
  21278. },
  21279. "subagent_depth": {
  21280. "type": "integer",
  21281. "minimum": 0
  21282. },
  21283. "username": {
  21284. "type": "string"
  21285. },
  21286. "mode": {
  21287. "type": "object",
  21288. "properties": {
  21289. "build": {
  21290. "$ref": "#/components/schemas/AgentConfig"
  21291. },
  21292. "plan": {
  21293. "$ref": "#/components/schemas/AgentConfig"
  21294. }
  21295. },
  21296. "additionalProperties": {
  21297. "$ref": "#/components/schemas/AgentConfig"
  21298. }
  21299. },
  21300. "agent": {
  21301. "type": "object",
  21302. "properties": {
  21303. "plan": {
  21304. "$ref": "#/components/schemas/AgentConfig"
  21305. },
  21306. "build": {
  21307. "$ref": "#/components/schemas/AgentConfig"
  21308. },
  21309. "general": {
  21310. "$ref": "#/components/schemas/AgentConfig"
  21311. },
  21312. "explore": {
  21313. "$ref": "#/components/schemas/AgentConfig"
  21314. },
  21315. "title": {
  21316. "$ref": "#/components/schemas/AgentConfig"
  21317. },
  21318. "summary": {
  21319. "$ref": "#/components/schemas/AgentConfig"
  21320. },
  21321. "compaction": {
  21322. "$ref": "#/components/schemas/AgentConfig"
  21323. }
  21324. },
  21325. "additionalProperties": {
  21326. "$ref": "#/components/schemas/AgentConfig"
  21327. }
  21328. },
  21329. "provider": {
  21330. "type": "object",
  21331. "additionalProperties": {
  21332. "$ref": "#/components/schemas/ProviderConfig"
  21333. }
  21334. },
  21335. "mcp": {
  21336. "type": "object",
  21337. "additionalProperties": {
  21338. "anyOf": [
  21339. {
  21340. "$ref": "#/components/schemas/McpLocalConfig"
  21341. },
  21342. {
  21343. "$ref": "#/components/schemas/McpRemoteConfig"
  21344. },
  21345. {
  21346. "type": "object",
  21347. "properties": {
  21348. "enabled": {
  21349. "type": "boolean"
  21350. }
  21351. },
  21352. "required": ["enabled"],
  21353. "additionalProperties": false
  21354. }
  21355. ]
  21356. }
  21357. },
  21358. "formatter": {
  21359. "anyOf": [
  21360. {
  21361. "type": "boolean"
  21362. },
  21363. {
  21364. "type": "object",
  21365. "additionalProperties": {
  21366. "type": "object",
  21367. "properties": {
  21368. "disabled": {
  21369. "type": "boolean"
  21370. },
  21371. "command": {
  21372. "type": "array",
  21373. "items": {
  21374. "type": "string"
  21375. }
  21376. },
  21377. "environment": {
  21378. "type": "object",
  21379. "additionalProperties": {
  21380. "type": "string"
  21381. }
  21382. },
  21383. "extensions": {
  21384. "type": "array",
  21385. "items": {
  21386. "type": "string"
  21387. }
  21388. }
  21389. },
  21390. "additionalProperties": false
  21391. }
  21392. }
  21393. ],
  21394. "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."
  21395. },
  21396. "lsp": {
  21397. "anyOf": [
  21398. {
  21399. "type": "boolean"
  21400. },
  21401. {
  21402. "type": "object",
  21403. "additionalProperties": {
  21404. "anyOf": [
  21405. {
  21406. "type": "object",
  21407. "properties": {
  21408. "disabled": {
  21409. "type": "boolean",
  21410. "enum": [true]
  21411. }
  21412. },
  21413. "required": ["disabled"],
  21414. "additionalProperties": false
  21415. },
  21416. {
  21417. "type": "object",
  21418. "properties": {
  21419. "command": {
  21420. "type": "array",
  21421. "items": {
  21422. "type": "string"
  21423. }
  21424. },
  21425. "extensions": {
  21426. "type": "array",
  21427. "items": {
  21428. "type": "string"
  21429. }
  21430. },
  21431. "disabled": {
  21432. "type": "boolean"
  21433. },
  21434. "env": {
  21435. "type": "object",
  21436. "additionalProperties": {
  21437. "type": "string"
  21438. }
  21439. },
  21440. "initialization": {
  21441. "type": "object"
  21442. }
  21443. },
  21444. "required": ["command"],
  21445. "additionalProperties": false
  21446. }
  21447. ]
  21448. }
  21449. }
  21450. ],
  21451. "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."
  21452. },
  21453. "instructions": {
  21454. "type": "array",
  21455. "items": {
  21456. "type": "string"
  21457. }
  21458. },
  21459. "layout": {
  21460. "$ref": "#/components/schemas/LayoutConfig"
  21461. },
  21462. "permission": {
  21463. "$ref": "#/components/schemas/PermissionConfig"
  21464. },
  21465. "tools": {
  21466. "type": "object",
  21467. "additionalProperties": {
  21468. "type": "boolean"
  21469. }
  21470. },
  21471. "attachment": {
  21472. "$ref": "#/components/schemas/AttachmentConfig"
  21473. },
  21474. "enterprise": {
  21475. "type": "object",
  21476. "properties": {
  21477. "url": {
  21478. "type": "string"
  21479. }
  21480. },
  21481. "additionalProperties": false
  21482. },
  21483. "tool_output": {
  21484. "type": "object",
  21485. "properties": {
  21486. "max_lines": {
  21487. "type": "integer",
  21488. "exclusiveMinimum": 0
  21489. },
  21490. "max_bytes": {
  21491. "type": "integer",
  21492. "exclusiveMinimum": 0
  21493. }
  21494. },
  21495. "additionalProperties": false
  21496. },
  21497. "compaction": {
  21498. "type": "object",
  21499. "properties": {
  21500. "auto": {
  21501. "type": "boolean"
  21502. },
  21503. "prune": {
  21504. "type": "boolean"
  21505. },
  21506. "tail_turns": {
  21507. "type": "integer",
  21508. "minimum": 0
  21509. },
  21510. "preserve_recent_tokens": {
  21511. "type": "integer",
  21512. "minimum": 0
  21513. },
  21514. "reserved": {
  21515. "type": "integer",
  21516. "minimum": 0
  21517. }
  21518. },
  21519. "additionalProperties": false
  21520. },
  21521. "experimental": {
  21522. "type": "object",
  21523. "properties": {
  21524. "disable_paste_summary": {
  21525. "type": "boolean"
  21526. },
  21527. "batch_tool": {
  21528. "type": "boolean"
  21529. },
  21530. "openTelemetry": {
  21531. "type": "boolean"
  21532. },
  21533. "primary_tools": {
  21534. "type": "array",
  21535. "items": {
  21536. "type": "string"
  21537. }
  21538. },
  21539. "continue_loop_on_deny": {
  21540. "type": "boolean"
  21541. },
  21542. "mcp_timeout": {
  21543. "type": "integer",
  21544. "exclusiveMinimum": 0
  21545. },
  21546. "policies": {
  21547. "type": "array",
  21548. "items": {
  21549. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  21550. }
  21551. }
  21552. },
  21553. "additionalProperties": false
  21554. }
  21555. },
  21556. "additionalProperties": false
  21557. },
  21558. "Model": {
  21559. "type": "object",
  21560. "properties": {
  21561. "id": {
  21562. "type": "string"
  21563. },
  21564. "providerID": {
  21565. "type": "string"
  21566. },
  21567. "api": {
  21568. "type": "object",
  21569. "properties": {
  21570. "id": {
  21571. "type": "string"
  21572. },
  21573. "url": {
  21574. "type": "string"
  21575. },
  21576. "npm": {
  21577. "type": "string"
  21578. }
  21579. },
  21580. "required": ["id", "url", "npm"],
  21581. "additionalProperties": false
  21582. },
  21583. "name": {
  21584. "type": "string"
  21585. },
  21586. "family": {
  21587. "type": "string"
  21588. },
  21589. "capabilities": {
  21590. "type": "object",
  21591. "properties": {
  21592. "temperature": {
  21593. "type": "boolean"
  21594. },
  21595. "reasoning": {
  21596. "type": "boolean"
  21597. },
  21598. "attachment": {
  21599. "type": "boolean"
  21600. },
  21601. "toolcall": {
  21602. "type": "boolean"
  21603. },
  21604. "input": {
  21605. "type": "object",
  21606. "properties": {
  21607. "text": {
  21608. "type": "boolean"
  21609. },
  21610. "audio": {
  21611. "type": "boolean"
  21612. },
  21613. "image": {
  21614. "type": "boolean"
  21615. },
  21616. "video": {
  21617. "type": "boolean"
  21618. },
  21619. "pdf": {
  21620. "type": "boolean"
  21621. }
  21622. },
  21623. "required": ["text", "audio", "image", "video", "pdf"],
  21624. "additionalProperties": false
  21625. },
  21626. "output": {
  21627. "type": "object",
  21628. "properties": {
  21629. "text": {
  21630. "type": "boolean"
  21631. },
  21632. "audio": {
  21633. "type": "boolean"
  21634. },
  21635. "image": {
  21636. "type": "boolean"
  21637. },
  21638. "video": {
  21639. "type": "boolean"
  21640. },
  21641. "pdf": {
  21642. "type": "boolean"
  21643. }
  21644. },
  21645. "required": ["text", "audio", "image", "video", "pdf"],
  21646. "additionalProperties": false
  21647. },
  21648. "interleaved": {
  21649. "anyOf": [
  21650. {
  21651. "type": "boolean"
  21652. },
  21653. {
  21654. "type": "object",
  21655. "properties": {
  21656. "field": {
  21657. "anyOf": [
  21658. {
  21659. "type": "string",
  21660. "enum": ["reasoning", "reasoning_content", "reasoning_text"]
  21661. },
  21662. {
  21663. "type": "string"
  21664. }
  21665. ]
  21666. }
  21667. },
  21668. "required": ["field"],
  21669. "additionalProperties": false
  21670. }
  21671. ]
  21672. }
  21673. },
  21674. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  21675. "additionalProperties": false
  21676. },
  21677. "cost": {
  21678. "type": "object",
  21679. "properties": {
  21680. "input": {
  21681. "type": "number"
  21682. },
  21683. "output": {
  21684. "type": "number"
  21685. },
  21686. "cache": {
  21687. "type": "object",
  21688. "properties": {
  21689. "read": {
  21690. "type": "number"
  21691. },
  21692. "write": {
  21693. "type": "number"
  21694. }
  21695. },
  21696. "required": ["read", "write"],
  21697. "additionalProperties": false
  21698. },
  21699. "tiers": {
  21700. "type": "array",
  21701. "items": {
  21702. "type": "object",
  21703. "properties": {
  21704. "input": {
  21705. "type": "number"
  21706. },
  21707. "output": {
  21708. "type": "number"
  21709. },
  21710. "cache": {
  21711. "type": "object",
  21712. "properties": {
  21713. "read": {
  21714. "type": "number"
  21715. },
  21716. "write": {
  21717. "type": "number"
  21718. }
  21719. },
  21720. "required": ["read", "write"],
  21721. "additionalProperties": false
  21722. },
  21723. "tier": {
  21724. "type": "object",
  21725. "properties": {
  21726. "type": {
  21727. "type": "string",
  21728. "enum": ["context"]
  21729. },
  21730. "size": {
  21731. "type": "number"
  21732. }
  21733. },
  21734. "required": ["type", "size"],
  21735. "additionalProperties": false
  21736. }
  21737. },
  21738. "required": ["input", "output", "cache", "tier"],
  21739. "additionalProperties": false
  21740. }
  21741. },
  21742. "experimentalOver200K": {
  21743. "type": "object",
  21744. "properties": {
  21745. "input": {
  21746. "type": "number"
  21747. },
  21748. "output": {
  21749. "type": "number"
  21750. },
  21751. "cache": {
  21752. "type": "object",
  21753. "properties": {
  21754. "read": {
  21755. "type": "number"
  21756. },
  21757. "write": {
  21758. "type": "number"
  21759. }
  21760. },
  21761. "required": ["read", "write"],
  21762. "additionalProperties": false
  21763. }
  21764. },
  21765. "required": ["input", "output", "cache"],
  21766. "additionalProperties": false
  21767. }
  21768. },
  21769. "required": ["input", "output", "cache"],
  21770. "additionalProperties": false
  21771. },
  21772. "limit": {
  21773. "type": "object",
  21774. "properties": {
  21775. "context": {
  21776. "type": "number"
  21777. },
  21778. "input": {
  21779. "type": "number"
  21780. },
  21781. "output": {
  21782. "type": "number"
  21783. }
  21784. },
  21785. "required": ["context", "output"],
  21786. "additionalProperties": false
  21787. },
  21788. "status": {
  21789. "type": "string",
  21790. "enum": ["alpha", "beta", "deprecated", "active"]
  21791. },
  21792. "options": {
  21793. "type": "object"
  21794. },
  21795. "headers": {
  21796. "type": "object",
  21797. "additionalProperties": {
  21798. "type": "string"
  21799. }
  21800. },
  21801. "release_date": {
  21802. "type": "string"
  21803. },
  21804. "variants": {
  21805. "type": "object",
  21806. "additionalProperties": {
  21807. "type": "object"
  21808. }
  21809. }
  21810. },
  21811. "required": [
  21812. "id",
  21813. "providerID",
  21814. "api",
  21815. "name",
  21816. "capabilities",
  21817. "cost",
  21818. "limit",
  21819. "status",
  21820. "options",
  21821. "headers",
  21822. "release_date"
  21823. ],
  21824. "additionalProperties": false
  21825. },
  21826. "Provider": {
  21827. "type": "object",
  21828. "properties": {
  21829. "id": {
  21830. "type": "string"
  21831. },
  21832. "name": {
  21833. "type": "string"
  21834. },
  21835. "source": {
  21836. "type": "string",
  21837. "enum": ["env", "config", "custom", "api"]
  21838. },
  21839. "env": {
  21840. "type": "array",
  21841. "items": {
  21842. "type": "string"
  21843. }
  21844. },
  21845. "key": {
  21846. "type": "string"
  21847. },
  21848. "options": {
  21849. "type": "object"
  21850. },
  21851. "models": {
  21852. "type": "object",
  21853. "additionalProperties": {
  21854. "$ref": "#/components/schemas/Model"
  21855. }
  21856. }
  21857. },
  21858. "required": ["id", "name", "source", "env", "options", "models"],
  21859. "additionalProperties": false
  21860. },
  21861. "ExperimentalCapabilities": {
  21862. "type": "object",
  21863. "properties": {
  21864. "backgroundSubagents": {
  21865. "type": "boolean"
  21866. }
  21867. },
  21868. "required": ["backgroundSubagents"],
  21869. "additionalProperties": false
  21870. },
  21871. "ConsoleState": {
  21872. "type": "object",
  21873. "properties": {
  21874. "consoleManagedProviders": {
  21875. "type": "array",
  21876. "items": {
  21877. "type": "string"
  21878. }
  21879. },
  21880. "activeOrgName": {
  21881. "type": "string"
  21882. },
  21883. "switchableOrgCount": {
  21884. "type": "integer",
  21885. "minimum": 0
  21886. }
  21887. },
  21888. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21889. "additionalProperties": false
  21890. },
  21891. "effect_HttpApiError_InternalServerError": {
  21892. "type": "object",
  21893. "properties": {
  21894. "_tag": {
  21895. "type": "string",
  21896. "enum": ["InternalServerError"]
  21897. }
  21898. },
  21899. "required": ["_tag"],
  21900. "additionalProperties": false
  21901. },
  21902. "ToolListItem": {
  21903. "type": "object",
  21904. "properties": {
  21905. "id": {
  21906. "type": "string"
  21907. },
  21908. "description": {
  21909. "type": "string"
  21910. },
  21911. "parameters": {}
  21912. },
  21913. "required": ["id", "description", "parameters"],
  21914. "additionalProperties": false
  21915. },
  21916. "ToolList": {
  21917. "type": "array",
  21918. "items": {
  21919. "$ref": "#/components/schemas/ToolListItem"
  21920. }
  21921. },
  21922. "ToolIDs": {
  21923. "type": "array",
  21924. "items": {
  21925. "type": "string"
  21926. }
  21927. },
  21928. "WorktreeError": {
  21929. "type": "object",
  21930. "properties": {
  21931. "name": {
  21932. "type": "string",
  21933. "enum": [
  21934. "WorktreeNotGitError",
  21935. "WorktreeNameGenerationFailedError",
  21936. "WorktreeCreateFailedError",
  21937. "WorktreeStartCommandFailedError",
  21938. "WorktreeRemoveFailedError",
  21939. "WorktreeResetFailedError",
  21940. "WorktreeListFailedError"
  21941. ]
  21942. },
  21943. "data": {
  21944. "type": "object",
  21945. "properties": {
  21946. "message": {
  21947. "type": "string"
  21948. }
  21949. },
  21950. "required": ["message"],
  21951. "additionalProperties": false
  21952. }
  21953. },
  21954. "required": ["name", "data"],
  21955. "additionalProperties": false
  21956. },
  21957. "WorktreeCreateInput": {
  21958. "type": "object",
  21959. "properties": {
  21960. "name": {
  21961. "type": "string"
  21962. },
  21963. "startCommand": {
  21964. "type": "string",
  21965. "description": "Additional startup script to run after the project's start command"
  21966. }
  21967. },
  21968. "additionalProperties": false
  21969. },
  21970. "Worktree": {
  21971. "type": "object",
  21972. "properties": {
  21973. "name": {
  21974. "type": "string"
  21975. },
  21976. "branch": {
  21977. "type": "string"
  21978. },
  21979. "directory": {
  21980. "type": "string"
  21981. }
  21982. },
  21983. "required": ["name", "directory"],
  21984. "additionalProperties": false
  21985. },
  21986. "WorktreeRemoveInput": {
  21987. "type": "object",
  21988. "properties": {
  21989. "directory": {
  21990. "type": "string"
  21991. }
  21992. },
  21993. "required": ["directory"],
  21994. "additionalProperties": false
  21995. },
  21996. "WorktreeResetInput": {
  21997. "type": "object",
  21998. "properties": {
  21999. "directory": {
  22000. "type": "string"
  22001. }
  22002. },
  22003. "required": ["directory"],
  22004. "additionalProperties": false
  22005. },
  22006. "ProjectSummary": {
  22007. "type": "object",
  22008. "properties": {
  22009. "id": {
  22010. "type": "string"
  22011. },
  22012. "name": {
  22013. "type": "string"
  22014. },
  22015. "worktree": {
  22016. "type": "string"
  22017. }
  22018. },
  22019. "required": ["id", "worktree"],
  22020. "additionalProperties": false
  22021. },
  22022. "GlobalSession": {
  22023. "type": "object",
  22024. "properties": {
  22025. "id": {
  22026. "type": "string",
  22027. "pattern": "^ses"
  22028. },
  22029. "slug": {
  22030. "type": "string"
  22031. },
  22032. "projectID": {
  22033. "type": "string"
  22034. },
  22035. "workspaceID": {
  22036. "type": "string",
  22037. "pattern": "^wrk"
  22038. },
  22039. "directory": {
  22040. "type": "string"
  22041. },
  22042. "path": {
  22043. "type": "string"
  22044. },
  22045. "parentID": {
  22046. "type": "string",
  22047. "pattern": "^ses"
  22048. },
  22049. "summary": {
  22050. "type": "object",
  22051. "properties": {
  22052. "additions": {
  22053. "type": "number"
  22054. },
  22055. "deletions": {
  22056. "type": "number"
  22057. },
  22058. "files": {
  22059. "type": "number"
  22060. },
  22061. "diffs": {
  22062. "type": "array",
  22063. "items": {
  22064. "$ref": "#/components/schemas/SnapshotFileDiff"
  22065. }
  22066. }
  22067. },
  22068. "required": ["additions", "deletions", "files"],
  22069. "additionalProperties": false
  22070. },
  22071. "cost": {
  22072. "type": "number"
  22073. },
  22074. "tokens": {
  22075. "type": "object",
  22076. "properties": {
  22077. "input": {
  22078. "type": "number"
  22079. },
  22080. "output": {
  22081. "type": "number"
  22082. },
  22083. "reasoning": {
  22084. "type": "number"
  22085. },
  22086. "cache": {
  22087. "type": "object",
  22088. "properties": {
  22089. "read": {
  22090. "type": "number"
  22091. },
  22092. "write": {
  22093. "type": "number"
  22094. }
  22095. },
  22096. "required": ["read", "write"],
  22097. "additionalProperties": false
  22098. }
  22099. },
  22100. "required": ["input", "output", "reasoning", "cache"],
  22101. "additionalProperties": false
  22102. },
  22103. "share": {
  22104. "type": "object",
  22105. "properties": {
  22106. "url": {
  22107. "type": "string"
  22108. }
  22109. },
  22110. "required": ["url"],
  22111. "additionalProperties": false
  22112. },
  22113. "title": {
  22114. "type": "string"
  22115. },
  22116. "agent": {
  22117. "type": "string"
  22118. },
  22119. "model": {
  22120. "type": "object",
  22121. "properties": {
  22122. "id": {
  22123. "type": "string"
  22124. },
  22125. "providerID": {
  22126. "type": "string"
  22127. },
  22128. "variant": {
  22129. "type": "string"
  22130. }
  22131. },
  22132. "required": ["id", "providerID"],
  22133. "additionalProperties": false
  22134. },
  22135. "version": {
  22136. "type": "string"
  22137. },
  22138. "metadata": {
  22139. "type": "object"
  22140. },
  22141. "time": {
  22142. "type": "object",
  22143. "properties": {
  22144. "created": {
  22145. "type": "integer",
  22146. "minimum": 0
  22147. },
  22148. "updated": {
  22149. "type": "integer",
  22150. "minimum": 0
  22151. },
  22152. "compacting": {
  22153. "type": "integer",
  22154. "minimum": 0
  22155. },
  22156. "archived": {
  22157. "type": "number"
  22158. }
  22159. },
  22160. "required": ["created", "updated"],
  22161. "additionalProperties": false
  22162. },
  22163. "permission": {
  22164. "$ref": "#/components/schemas/PermissionRuleset"
  22165. },
  22166. "revert": {
  22167. "type": "object",
  22168. "properties": {
  22169. "messageID": {
  22170. "type": "string",
  22171. "pattern": "^msg"
  22172. },
  22173. "partID": {
  22174. "type": "string",
  22175. "pattern": "^prt"
  22176. },
  22177. "snapshot": {
  22178. "type": "string"
  22179. },
  22180. "diff": {
  22181. "type": "string"
  22182. }
  22183. },
  22184. "required": ["messageID"],
  22185. "additionalProperties": false
  22186. },
  22187. "project": {
  22188. "anyOf": [
  22189. {
  22190. "$ref": "#/components/schemas/ProjectSummary"
  22191. },
  22192. {
  22193. "type": "null"
  22194. }
  22195. ]
  22196. }
  22197. },
  22198. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  22199. "additionalProperties": false
  22200. },
  22201. "McpResource": {
  22202. "type": "object",
  22203. "properties": {
  22204. "name": {
  22205. "type": "string"
  22206. },
  22207. "uri": {
  22208. "type": "string"
  22209. },
  22210. "description": {
  22211. "type": "string"
  22212. },
  22213. "mimeType": {
  22214. "type": "string"
  22215. },
  22216. "client": {
  22217. "type": "string"
  22218. }
  22219. },
  22220. "required": ["name", "uri", "client"],
  22221. "additionalProperties": false
  22222. },
  22223. "Symbol": {
  22224. "type": "object",
  22225. "properties": {
  22226. "name": {
  22227. "type": "string"
  22228. },
  22229. "kind": {
  22230. "type": "integer",
  22231. "minimum": 0
  22232. },
  22233. "location": {
  22234. "type": "object",
  22235. "properties": {
  22236. "uri": {
  22237. "type": "string"
  22238. },
  22239. "range": {
  22240. "$ref": "#/components/schemas/Range"
  22241. }
  22242. },
  22243. "required": ["uri", "range"],
  22244. "additionalProperties": false
  22245. }
  22246. },
  22247. "required": ["name", "kind", "location"],
  22248. "additionalProperties": false
  22249. },
  22250. "FileNode": {
  22251. "type": "object",
  22252. "properties": {
  22253. "name": {
  22254. "type": "string"
  22255. },
  22256. "path": {
  22257. "type": "string"
  22258. },
  22259. "absolute": {
  22260. "type": "string"
  22261. },
  22262. "type": {
  22263. "type": "string",
  22264. "enum": ["file", "directory"]
  22265. },
  22266. "ignored": {
  22267. "type": "boolean"
  22268. }
  22269. },
  22270. "required": ["name", "path", "absolute", "type", "ignored"],
  22271. "additionalProperties": false
  22272. },
  22273. "FileContent": {
  22274. "type": "object",
  22275. "properties": {
  22276. "type": {
  22277. "type": "string",
  22278. "enum": ["text", "binary"]
  22279. },
  22280. "content": {
  22281. "type": "string"
  22282. },
  22283. "diff": {
  22284. "type": "string"
  22285. },
  22286. "patch": {
  22287. "type": "object",
  22288. "properties": {
  22289. "oldFileName": {
  22290. "type": "string"
  22291. },
  22292. "newFileName": {
  22293. "type": "string"
  22294. },
  22295. "oldHeader": {
  22296. "type": "string"
  22297. },
  22298. "newHeader": {
  22299. "type": "string"
  22300. },
  22301. "hunks": {
  22302. "type": "array",
  22303. "items": {
  22304. "type": "object",
  22305. "properties": {
  22306. "oldStart": {
  22307. "type": "integer",
  22308. "minimum": 0
  22309. },
  22310. "oldLines": {
  22311. "type": "integer",
  22312. "minimum": 0
  22313. },
  22314. "newStart": {
  22315. "type": "integer",
  22316. "minimum": 0
  22317. },
  22318. "newLines": {
  22319. "type": "integer",
  22320. "minimum": 0
  22321. },
  22322. "lines": {
  22323. "type": "array",
  22324. "items": {
  22325. "type": "string"
  22326. }
  22327. }
  22328. },
  22329. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  22330. "additionalProperties": false
  22331. }
  22332. },
  22333. "index": {
  22334. "type": "string"
  22335. }
  22336. },
  22337. "required": ["oldFileName", "newFileName", "hunks"],
  22338. "additionalProperties": false
  22339. },
  22340. "encoding": {
  22341. "type": "string",
  22342. "enum": ["base64"]
  22343. },
  22344. "mimeType": {
  22345. "type": "string"
  22346. }
  22347. },
  22348. "required": ["type", "content"],
  22349. "additionalProperties": false
  22350. },
  22351. "File": {
  22352. "type": "object",
  22353. "properties": {
  22354. "path": {
  22355. "type": "string"
  22356. },
  22357. "added": {
  22358. "type": "integer",
  22359. "minimum": 0
  22360. },
  22361. "removed": {
  22362. "type": "integer",
  22363. "minimum": 0
  22364. },
  22365. "status": {
  22366. "type": "string",
  22367. "enum": ["added", "deleted", "modified"]
  22368. }
  22369. },
  22370. "required": ["path", "added", "removed", "status"],
  22371. "additionalProperties": false
  22372. },
  22373. "Path": {
  22374. "type": "object",
  22375. "properties": {
  22376. "home": {
  22377. "type": "string"
  22378. },
  22379. "state": {
  22380. "type": "string"
  22381. },
  22382. "config": {
  22383. "type": "string"
  22384. },
  22385. "worktree": {
  22386. "type": "string"
  22387. },
  22388. "directory": {
  22389. "type": "string"
  22390. }
  22391. },
  22392. "required": ["home", "state", "config", "worktree", "directory"],
  22393. "additionalProperties": false
  22394. },
  22395. "VcsInfo": {
  22396. "type": "object",
  22397. "properties": {
  22398. "branch": {
  22399. "type": "string"
  22400. },
  22401. "default_branch": {
  22402. "type": "string"
  22403. }
  22404. },
  22405. "additionalProperties": false
  22406. },
  22407. "VcsFileStatus": {
  22408. "type": "object",
  22409. "properties": {
  22410. "file": {
  22411. "type": "string"
  22412. },
  22413. "additions": {
  22414. "type": "number"
  22415. },
  22416. "deletions": {
  22417. "type": "number"
  22418. },
  22419. "status": {
  22420. "type": "string",
  22421. "enum": ["added", "deleted", "modified"]
  22422. }
  22423. },
  22424. "required": ["file", "additions", "deletions", "status"],
  22425. "additionalProperties": false
  22426. },
  22427. "VcsFileDiff": {
  22428. "type": "object",
  22429. "properties": {
  22430. "file": {
  22431. "type": "string"
  22432. },
  22433. "patch": {
  22434. "type": "string"
  22435. },
  22436. "additions": {
  22437. "type": "number"
  22438. },
  22439. "deletions": {
  22440. "type": "number"
  22441. },
  22442. "status": {
  22443. "type": "string",
  22444. "enum": ["added", "deleted", "modified"]
  22445. }
  22446. },
  22447. "required": ["file", "additions", "deletions"],
  22448. "additionalProperties": false
  22449. },
  22450. "VcsApplyError": {
  22451. "type": "object",
  22452. "properties": {
  22453. "name": {
  22454. "type": "string",
  22455. "enum": ["VcsApplyError"]
  22456. },
  22457. "data": {
  22458. "type": "object",
  22459. "properties": {
  22460. "message": {
  22461. "type": "string"
  22462. },
  22463. "reason": {
  22464. "type": "string",
  22465. "enum": ["non-git", "not-clean"]
  22466. }
  22467. },
  22468. "required": ["message", "reason"],
  22469. "additionalProperties": false
  22470. }
  22471. },
  22472. "required": ["name", "data"],
  22473. "additionalProperties": false
  22474. },
  22475. "Command": {
  22476. "type": "object",
  22477. "properties": {
  22478. "name": {
  22479. "type": "string"
  22480. },
  22481. "description": {
  22482. "type": "string"
  22483. },
  22484. "agent": {
  22485. "type": "string"
  22486. },
  22487. "model": {
  22488. "type": "string"
  22489. },
  22490. "source": {
  22491. "type": "string",
  22492. "enum": ["command", "mcp", "skill"]
  22493. },
  22494. "template": {
  22495. "type": "string"
  22496. },
  22497. "subtask": {
  22498. "type": "boolean"
  22499. },
  22500. "hints": {
  22501. "type": "array",
  22502. "items": {
  22503. "type": "string"
  22504. }
  22505. }
  22506. },
  22507. "required": ["name", "template", "hints"],
  22508. "additionalProperties": false
  22509. },
  22510. "Agent": {
  22511. "type": "object",
  22512. "properties": {
  22513. "name": {
  22514. "type": "string"
  22515. },
  22516. "description": {
  22517. "type": "string"
  22518. },
  22519. "mode": {
  22520. "type": "string",
  22521. "enum": ["subagent", "primary", "all"]
  22522. },
  22523. "native": {
  22524. "type": "boolean"
  22525. },
  22526. "hidden": {
  22527. "type": "boolean"
  22528. },
  22529. "topP": {
  22530. "type": "number"
  22531. },
  22532. "temperature": {
  22533. "type": "number"
  22534. },
  22535. "color": {
  22536. "type": "string"
  22537. },
  22538. "permission": {
  22539. "$ref": "#/components/schemas/PermissionRuleset"
  22540. },
  22541. "model": {
  22542. "type": "object",
  22543. "properties": {
  22544. "modelID": {
  22545. "type": "string"
  22546. },
  22547. "providerID": {
  22548. "type": "string"
  22549. }
  22550. },
  22551. "required": ["modelID", "providerID"],
  22552. "additionalProperties": false
  22553. },
  22554. "variant": {
  22555. "type": "string"
  22556. },
  22557. "prompt": {
  22558. "type": "string"
  22559. },
  22560. "options": {
  22561. "type": "object"
  22562. },
  22563. "steps": {
  22564. "type": "number"
  22565. }
  22566. },
  22567. "required": ["name", "mode", "permission", "options"],
  22568. "additionalProperties": false
  22569. },
  22570. "LSPStatus": {
  22571. "type": "object",
  22572. "properties": {
  22573. "id": {
  22574. "type": "string"
  22575. },
  22576. "name": {
  22577. "type": "string"
  22578. },
  22579. "root": {
  22580. "type": "string"
  22581. },
  22582. "status": {
  22583. "type": "string",
  22584. "enum": ["connected", "error"]
  22585. }
  22586. },
  22587. "required": ["id", "name", "root", "status"],
  22588. "additionalProperties": false
  22589. },
  22590. "FormatterStatus": {
  22591. "type": "object",
  22592. "properties": {
  22593. "name": {
  22594. "type": "string"
  22595. },
  22596. "extensions": {
  22597. "type": "array",
  22598. "items": {
  22599. "type": "string"
  22600. }
  22601. },
  22602. "enabled": {
  22603. "type": "boolean"
  22604. }
  22605. },
  22606. "required": ["name", "extensions", "enabled"],
  22607. "additionalProperties": false
  22608. },
  22609. "MCPStatusConnected": {
  22610. "type": "object",
  22611. "properties": {
  22612. "status": {
  22613. "type": "string",
  22614. "enum": ["connected"]
  22615. }
  22616. },
  22617. "required": ["status"],
  22618. "additionalProperties": false
  22619. },
  22620. "MCPStatusDisabled": {
  22621. "type": "object",
  22622. "properties": {
  22623. "status": {
  22624. "type": "string",
  22625. "enum": ["disabled"]
  22626. }
  22627. },
  22628. "required": ["status"],
  22629. "additionalProperties": false
  22630. },
  22631. "MCPStatusFailed": {
  22632. "type": "object",
  22633. "properties": {
  22634. "status": {
  22635. "type": "string",
  22636. "enum": ["failed"]
  22637. },
  22638. "error": {
  22639. "type": "string"
  22640. }
  22641. },
  22642. "required": ["status", "error"],
  22643. "additionalProperties": false
  22644. },
  22645. "MCPStatusNeedsAuth": {
  22646. "type": "object",
  22647. "properties": {
  22648. "status": {
  22649. "type": "string",
  22650. "enum": ["needs_auth"]
  22651. }
  22652. },
  22653. "required": ["status"],
  22654. "additionalProperties": false
  22655. },
  22656. "MCPStatusNeedsClientRegistration": {
  22657. "type": "object",
  22658. "properties": {
  22659. "status": {
  22660. "type": "string",
  22661. "enum": ["needs_client_registration"]
  22662. },
  22663. "error": {
  22664. "type": "string"
  22665. }
  22666. },
  22667. "required": ["status", "error"],
  22668. "additionalProperties": false
  22669. },
  22670. "MCPStatus": {
  22671. "anyOf": [
  22672. {
  22673. "$ref": "#/components/schemas/MCPStatusConnected"
  22674. },
  22675. {
  22676. "$ref": "#/components/schemas/MCPStatusDisabled"
  22677. },
  22678. {
  22679. "$ref": "#/components/schemas/MCPStatusFailed"
  22680. },
  22681. {
  22682. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  22683. },
  22684. {
  22685. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  22686. }
  22687. ]
  22688. },
  22689. "McpUnsupportedOAuthError": {
  22690. "type": "object",
  22691. "properties": {
  22692. "error": {
  22693. "type": "string"
  22694. }
  22695. },
  22696. "required": ["error"],
  22697. "additionalProperties": false
  22698. },
  22699. "McpServerNotFoundError": {
  22700. "type": "object",
  22701. "properties": {
  22702. "_tag": {
  22703. "type": "string",
  22704. "enum": ["McpServerNotFoundError"]
  22705. },
  22706. "name": {
  22707. "type": "string"
  22708. },
  22709. "message": {
  22710. "type": "string"
  22711. }
  22712. },
  22713. "required": ["_tag", "name", "message"],
  22714. "additionalProperties": false
  22715. },
  22716. "Project": {
  22717. "type": "object",
  22718. "properties": {
  22719. "id": {
  22720. "type": "string"
  22721. },
  22722. "worktree": {
  22723. "type": "string"
  22724. },
  22725. "vcs": {
  22726. "$ref": "#/components/schemas/ProjectVcs"
  22727. },
  22728. "name": {
  22729. "type": "string"
  22730. },
  22731. "icon": {
  22732. "$ref": "#/components/schemas/ProjectIcon"
  22733. },
  22734. "commands": {
  22735. "$ref": "#/components/schemas/ProjectCommands"
  22736. },
  22737. "time": {
  22738. "$ref": "#/components/schemas/ProjectTime"
  22739. },
  22740. "sandboxes": {
  22741. "type": "array",
  22742. "items": {
  22743. "type": "string"
  22744. }
  22745. }
  22746. },
  22747. "required": ["id", "worktree", "time", "sandboxes"],
  22748. "additionalProperties": false
  22749. },
  22750. "ProjectNotFoundError": {
  22751. "type": "object",
  22752. "properties": {
  22753. "_tag": {
  22754. "type": "string",
  22755. "enum": ["ProjectNotFoundError"]
  22756. },
  22757. "projectID": {
  22758. "type": "string"
  22759. },
  22760. "message": {
  22761. "type": "string"
  22762. }
  22763. },
  22764. "required": ["_tag", "projectID", "message"],
  22765. "additionalProperties": false
  22766. },
  22767. "PtyNotFoundError": {
  22768. "type": "object",
  22769. "properties": {
  22770. "_tag": {
  22771. "type": "string",
  22772. "enum": ["PtyNotFoundError"]
  22773. },
  22774. "ptyID": {
  22775. "type": "string"
  22776. },
  22777. "message": {
  22778. "type": "string"
  22779. }
  22780. },
  22781. "required": ["_tag", "ptyID", "message"],
  22782. "additionalProperties": false
  22783. },
  22784. "PtyForbiddenError": {
  22785. "type": "object",
  22786. "properties": {
  22787. "_tag": {
  22788. "type": "string",
  22789. "enum": ["PtyForbiddenError"]
  22790. },
  22791. "message": {
  22792. "type": "string"
  22793. }
  22794. },
  22795. "required": ["_tag", "message"],
  22796. "additionalProperties": false
  22797. },
  22798. "QuestionRequest": {
  22799. "type": "object",
  22800. "properties": {
  22801. "id": {
  22802. "type": "string",
  22803. "pattern": "^que"
  22804. },
  22805. "sessionID": {
  22806. "type": "string",
  22807. "pattern": "^ses"
  22808. },
  22809. "questions": {
  22810. "type": "array",
  22811. "items": {
  22812. "$ref": "#/components/schemas/QuestionInfo"
  22813. },
  22814. "description": "Questions to ask"
  22815. },
  22816. "tool": {
  22817. "$ref": "#/components/schemas/QuestionTool"
  22818. }
  22819. },
  22820. "required": ["id", "sessionID", "questions"],
  22821. "additionalProperties": false
  22822. },
  22823. "QuestionNotFoundError": {
  22824. "type": "object",
  22825. "properties": {
  22826. "_tag": {
  22827. "type": "string",
  22828. "enum": ["QuestionNotFoundError"]
  22829. },
  22830. "requestID": {
  22831. "type": "string"
  22832. },
  22833. "message": {
  22834. "type": "string"
  22835. }
  22836. },
  22837. "required": ["_tag", "requestID", "message"],
  22838. "additionalProperties": false
  22839. },
  22840. "PermissionRequest": {
  22841. "type": "object",
  22842. "properties": {
  22843. "id": {
  22844. "type": "string",
  22845. "pattern": "^per"
  22846. },
  22847. "sessionID": {
  22848. "type": "string",
  22849. "pattern": "^ses"
  22850. },
  22851. "permission": {
  22852. "type": "string"
  22853. },
  22854. "patterns": {
  22855. "type": "array",
  22856. "items": {
  22857. "type": "string"
  22858. }
  22859. },
  22860. "metadata": {
  22861. "type": "object"
  22862. },
  22863. "always": {
  22864. "type": "array",
  22865. "items": {
  22866. "type": "string"
  22867. }
  22868. },
  22869. "tool": {
  22870. "type": "object",
  22871. "properties": {
  22872. "messageID": {
  22873. "type": "string"
  22874. },
  22875. "callID": {
  22876. "type": "string"
  22877. }
  22878. },
  22879. "required": ["messageID", "callID"],
  22880. "additionalProperties": false
  22881. }
  22882. },
  22883. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22884. "additionalProperties": false
  22885. },
  22886. "PermissionNotFoundError": {
  22887. "type": "object",
  22888. "properties": {
  22889. "_tag": {
  22890. "type": "string",
  22891. "enum": ["PermissionNotFoundError"]
  22892. },
  22893. "requestID": {
  22894. "type": "string"
  22895. },
  22896. "message": {
  22897. "type": "string"
  22898. }
  22899. },
  22900. "required": ["_tag", "requestID", "message"],
  22901. "additionalProperties": false
  22902. },
  22903. "ProviderAuthMethod": {
  22904. "type": "object",
  22905. "properties": {
  22906. "type": {
  22907. "type": "string",
  22908. "enum": ["oauth", "api"]
  22909. },
  22910. "label": {
  22911. "type": "string"
  22912. },
  22913. "prompts": {
  22914. "type": "array",
  22915. "items": {
  22916. "anyOf": [
  22917. {
  22918. "type": "object",
  22919. "properties": {
  22920. "type": {
  22921. "type": "string",
  22922. "enum": ["text"]
  22923. },
  22924. "key": {
  22925. "type": "string"
  22926. },
  22927. "message": {
  22928. "type": "string"
  22929. },
  22930. "placeholder": {
  22931. "type": "string"
  22932. },
  22933. "when": {
  22934. "type": "object",
  22935. "properties": {
  22936. "key": {
  22937. "type": "string"
  22938. },
  22939. "op": {
  22940. "type": "string",
  22941. "enum": ["eq", "neq"]
  22942. },
  22943. "value": {
  22944. "type": "string"
  22945. }
  22946. },
  22947. "required": ["key", "op", "value"],
  22948. "additionalProperties": false
  22949. }
  22950. },
  22951. "required": ["type", "key", "message"],
  22952. "additionalProperties": false
  22953. },
  22954. {
  22955. "type": "object",
  22956. "properties": {
  22957. "type": {
  22958. "type": "string",
  22959. "enum": ["select"]
  22960. },
  22961. "key": {
  22962. "type": "string"
  22963. },
  22964. "message": {
  22965. "type": "string"
  22966. },
  22967. "options": {
  22968. "type": "array",
  22969. "items": {
  22970. "type": "object",
  22971. "properties": {
  22972. "label": {
  22973. "type": "string"
  22974. },
  22975. "value": {
  22976. "type": "string"
  22977. },
  22978. "hint": {
  22979. "type": "string"
  22980. }
  22981. },
  22982. "required": ["label", "value"],
  22983. "additionalProperties": false
  22984. }
  22985. },
  22986. "when": {
  22987. "type": "object",
  22988. "properties": {
  22989. "key": {
  22990. "type": "string"
  22991. },
  22992. "op": {
  22993. "type": "string",
  22994. "enum": ["eq", "neq"]
  22995. },
  22996. "value": {
  22997. "type": "string"
  22998. }
  22999. },
  23000. "required": ["key", "op", "value"],
  23001. "additionalProperties": false
  23002. }
  23003. },
  23004. "required": ["type", "key", "message", "options"],
  23005. "additionalProperties": false
  23006. }
  23007. ]
  23008. }
  23009. }
  23010. },
  23011. "required": ["type", "label"],
  23012. "additionalProperties": false
  23013. },
  23014. "ProviderAuthAuthorization": {
  23015. "type": "object",
  23016. "properties": {
  23017. "url": {
  23018. "type": "string"
  23019. },
  23020. "method": {
  23021. "type": "string",
  23022. "enum": ["auto", "code"]
  23023. },
  23024. "instructions": {
  23025. "type": "string"
  23026. }
  23027. },
  23028. "required": ["url", "method", "instructions"],
  23029. "additionalProperties": false
  23030. },
  23031. "ProviderAuthError1": {
  23032. "type": "object",
  23033. "properties": {
  23034. "name": {
  23035. "type": "string",
  23036. "enum": [
  23037. "BadRequest",
  23038. "ProviderAuthOauthMissing",
  23039. "ProviderAuthOauthCodeMissing",
  23040. "ProviderAuthOauthCallbackFailed",
  23041. "ProviderAuthValidationFailed"
  23042. ]
  23043. },
  23044. "data": {
  23045. "type": "object",
  23046. "properties": {
  23047. "providerID": {
  23048. "type": "string"
  23049. },
  23050. "field": {
  23051. "type": "string"
  23052. },
  23053. "message": {
  23054. "type": "string"
  23055. },
  23056. "kind": {
  23057. "type": "string"
  23058. }
  23059. },
  23060. "additionalProperties": false
  23061. }
  23062. },
  23063. "required": ["name", "data"],
  23064. "additionalProperties": false
  23065. },
  23066. "NotFoundError": {
  23067. "type": "object",
  23068. "required": ["name", "data"],
  23069. "properties": {
  23070. "name": {
  23071. "type": "string",
  23072. "enum": ["NotFoundError"]
  23073. },
  23074. "data": {
  23075. "type": "object",
  23076. "required": ["message"],
  23077. "properties": {
  23078. "message": {
  23079. "type": "string"
  23080. }
  23081. }
  23082. }
  23083. }
  23084. },
  23085. "TextPartInput": {
  23086. "type": "object",
  23087. "properties": {
  23088. "id": {
  23089. "type": "string",
  23090. "pattern": "^prt"
  23091. },
  23092. "type": {
  23093. "type": "string",
  23094. "enum": ["text"]
  23095. },
  23096. "text": {
  23097. "type": "string"
  23098. },
  23099. "synthetic": {
  23100. "type": "boolean"
  23101. },
  23102. "ignored": {
  23103. "type": "boolean"
  23104. },
  23105. "time": {
  23106. "type": "object",
  23107. "properties": {
  23108. "start": {
  23109. "type": "integer",
  23110. "minimum": 0
  23111. },
  23112. "end": {
  23113. "type": "integer",
  23114. "minimum": 0
  23115. }
  23116. },
  23117. "required": ["start"],
  23118. "additionalProperties": false
  23119. },
  23120. "metadata": {
  23121. "type": "object"
  23122. }
  23123. },
  23124. "required": ["type", "text"],
  23125. "additionalProperties": false
  23126. },
  23127. "FilePartInput": {
  23128. "type": "object",
  23129. "properties": {
  23130. "id": {
  23131. "type": "string",
  23132. "pattern": "^prt"
  23133. },
  23134. "type": {
  23135. "type": "string",
  23136. "enum": ["file"]
  23137. },
  23138. "mime": {
  23139. "type": "string"
  23140. },
  23141. "filename": {
  23142. "type": "string"
  23143. },
  23144. "url": {
  23145. "type": "string"
  23146. },
  23147. "source": {
  23148. "$ref": "#/components/schemas/FilePartSource"
  23149. }
  23150. },
  23151. "required": ["type", "mime", "url"],
  23152. "additionalProperties": false
  23153. },
  23154. "AgentPartInput": {
  23155. "type": "object",
  23156. "properties": {
  23157. "id": {
  23158. "type": "string",
  23159. "pattern": "^prt"
  23160. },
  23161. "type": {
  23162. "type": "string",
  23163. "enum": ["agent"]
  23164. },
  23165. "name": {
  23166. "type": "string"
  23167. },
  23168. "source": {
  23169. "type": "object",
  23170. "properties": {
  23171. "value": {
  23172. "type": "string"
  23173. },
  23174. "start": {
  23175. "type": "integer",
  23176. "minimum": 0
  23177. },
  23178. "end": {
  23179. "type": "integer",
  23180. "minimum": 0
  23181. }
  23182. },
  23183. "required": ["value", "start", "end"],
  23184. "additionalProperties": false
  23185. }
  23186. },
  23187. "required": ["type", "name"],
  23188. "additionalProperties": false
  23189. },
  23190. "SubtaskPartInput": {
  23191. "type": "object",
  23192. "properties": {
  23193. "id": {
  23194. "type": "string",
  23195. "pattern": "^prt"
  23196. },
  23197. "type": {
  23198. "type": "string",
  23199. "enum": ["subtask"]
  23200. },
  23201. "prompt": {
  23202. "type": "string"
  23203. },
  23204. "description": {
  23205. "type": "string"
  23206. },
  23207. "agent": {
  23208. "type": "string"
  23209. },
  23210. "model": {
  23211. "type": "object",
  23212. "properties": {
  23213. "providerID": {
  23214. "type": "string"
  23215. },
  23216. "modelID": {
  23217. "type": "string"
  23218. }
  23219. },
  23220. "required": ["providerID", "modelID"],
  23221. "additionalProperties": false
  23222. },
  23223. "command": {
  23224. "type": "string"
  23225. }
  23226. },
  23227. "required": ["type", "prompt", "description", "agent"],
  23228. "additionalProperties": false
  23229. },
  23230. "SessionBusyError": {
  23231. "type": "object",
  23232. "properties": {
  23233. "_tag": {
  23234. "type": "string",
  23235. "enum": ["SessionBusyError"]
  23236. },
  23237. "sessionID": {
  23238. "type": "string"
  23239. },
  23240. "message": {
  23241. "type": "string"
  23242. }
  23243. },
  23244. "required": ["_tag", "sessionID", "message"],
  23245. "additionalProperties": false
  23246. },
  23247. "EventTuiPromptAppend": {
  23248. "type": "object",
  23249. "properties": {
  23250. "type": {
  23251. "type": "string",
  23252. "enum": ["tui.prompt.append"]
  23253. },
  23254. "properties": {
  23255. "type": "object",
  23256. "properties": {
  23257. "text": {
  23258. "type": "string"
  23259. }
  23260. },
  23261. "required": ["text"],
  23262. "additionalProperties": false
  23263. }
  23264. },
  23265. "required": ["type", "properties"],
  23266. "additionalProperties": false
  23267. },
  23268. "EventTuiCommandExecute": {
  23269. "type": "object",
  23270. "properties": {
  23271. "type": {
  23272. "type": "string",
  23273. "enum": ["tui.command.execute"]
  23274. },
  23275. "properties": {
  23276. "type": "object",
  23277. "properties": {
  23278. "command": {
  23279. "anyOf": [
  23280. {
  23281. "type": "string",
  23282. "enum": [
  23283. "session.list",
  23284. "session.new",
  23285. "session.share",
  23286. "session.interrupt",
  23287. "session.compact",
  23288. "session.page.up",
  23289. "session.page.down",
  23290. "session.line.up",
  23291. "session.line.down",
  23292. "session.half.page.up",
  23293. "session.half.page.down",
  23294. "session.first",
  23295. "session.last",
  23296. "prompt.clear",
  23297. "prompt.submit",
  23298. "agent.cycle"
  23299. ]
  23300. },
  23301. {
  23302. "type": "string"
  23303. }
  23304. ]
  23305. }
  23306. },
  23307. "required": ["command"],
  23308. "additionalProperties": false
  23309. }
  23310. },
  23311. "required": ["type", "properties"],
  23312. "additionalProperties": false
  23313. },
  23314. "EventTuiToastShow": {
  23315. "type": "object",
  23316. "properties": {
  23317. "type": {
  23318. "type": "string",
  23319. "enum": ["tui.toast.show"]
  23320. },
  23321. "properties": {
  23322. "type": "object",
  23323. "properties": {
  23324. "title": {
  23325. "type": "string"
  23326. },
  23327. "message": {
  23328. "type": "string"
  23329. },
  23330. "variant": {
  23331. "type": "string",
  23332. "enum": ["info", "success", "warning", "error"]
  23333. },
  23334. "duration": {
  23335. "type": "integer",
  23336. "exclusiveMinimum": 0
  23337. }
  23338. },
  23339. "required": ["message", "variant"],
  23340. "additionalProperties": false
  23341. }
  23342. },
  23343. "required": ["type", "properties"],
  23344. "additionalProperties": false
  23345. },
  23346. "EventTuiSessionSelect": {
  23347. "type": "object",
  23348. "properties": {
  23349. "type": {
  23350. "type": "string",
  23351. "enum": ["tui.session.select"]
  23352. },
  23353. "properties": {
  23354. "type": "object",
  23355. "properties": {
  23356. "sessionID": {
  23357. "type": "string",
  23358. "pattern": "^ses",
  23359. "description": "Session ID to navigate to"
  23360. }
  23361. },
  23362. "required": ["sessionID"],
  23363. "additionalProperties": false
  23364. }
  23365. },
  23366. "required": ["type", "properties"],
  23367. "additionalProperties": false
  23368. },
  23369. "Workspace": {
  23370. "type": "object",
  23371. "properties": {
  23372. "id": {
  23373. "type": "string",
  23374. "pattern": "^wrk"
  23375. },
  23376. "type": {
  23377. "type": "string"
  23378. },
  23379. "name": {
  23380. "type": "string"
  23381. },
  23382. "branch": {
  23383. "anyOf": [
  23384. {
  23385. "type": "string"
  23386. },
  23387. {
  23388. "type": "null"
  23389. }
  23390. ]
  23391. },
  23392. "directory": {
  23393. "anyOf": [
  23394. {
  23395. "type": "string"
  23396. },
  23397. {
  23398. "type": "null"
  23399. }
  23400. ]
  23401. },
  23402. "extra": {
  23403. "anyOf": [
  23404. {},
  23405. {
  23406. "type": "null"
  23407. }
  23408. ]
  23409. },
  23410. "projectID": {
  23411. "type": "string"
  23412. },
  23413. "timeUsed": {
  23414. "anyOf": [
  23415. {
  23416. "type": "number"
  23417. },
  23418. {
  23419. "type": "string",
  23420. "enum": ["NaN"]
  23421. },
  23422. {
  23423. "type": "string",
  23424. "enum": ["Infinity"]
  23425. },
  23426. {
  23427. "type": "string",
  23428. "enum": ["-Infinity"]
  23429. },
  23430. {
  23431. "type": "string",
  23432. "enum": ["Infinity", "-Infinity", "NaN"]
  23433. }
  23434. ]
  23435. }
  23436. },
  23437. "required": ["id", "type", "name", "projectID", "timeUsed"],
  23438. "additionalProperties": false
  23439. },
  23440. "WorkspaceCreateError": {
  23441. "type": "object",
  23442. "properties": {
  23443. "name": {
  23444. "type": "string",
  23445. "enum": ["WorkspaceCreateError"]
  23446. },
  23447. "data": {
  23448. "type": "object",
  23449. "properties": {
  23450. "message": {
  23451. "type": "string"
  23452. }
  23453. },
  23454. "required": ["message"],
  23455. "additionalProperties": false
  23456. }
  23457. },
  23458. "required": ["name", "data"],
  23459. "additionalProperties": false
  23460. },
  23461. "WorkspaceWarpError": {
  23462. "type": "object",
  23463. "properties": {
  23464. "name": {
  23465. "type": "string",
  23466. "enum": ["WorkspaceWarpError"]
  23467. },
  23468. "data": {
  23469. "type": "object",
  23470. "properties": {
  23471. "message": {
  23472. "type": "string"
  23473. }
  23474. },
  23475. "required": ["message"],
  23476. "additionalProperties": false
  23477. }
  23478. },
  23479. "required": ["name", "data"],
  23480. "additionalProperties": false
  23481. },
  23482. "UnauthorizedError": {
  23483. "type": "object",
  23484. "properties": {
  23485. "_tag": {
  23486. "type": "string",
  23487. "enum": ["UnauthorizedError"]
  23488. },
  23489. "message": {
  23490. "type": "string"
  23491. }
  23492. },
  23493. "required": ["_tag", "message"],
  23494. "additionalProperties": false
  23495. },
  23496. "SessionsResponse": {
  23497. "type": "object",
  23498. "properties": {
  23499. "data": {
  23500. "type": "array",
  23501. "items": {
  23502. "$ref": "#/components/schemas/SessionV2Info"
  23503. }
  23504. },
  23505. "cursor": {
  23506. "type": "object",
  23507. "properties": {
  23508. "previous": {
  23509. "type": "string"
  23510. },
  23511. "next": {
  23512. "type": "string"
  23513. }
  23514. },
  23515. "additionalProperties": false
  23516. }
  23517. },
  23518. "required": ["data", "cursor"],
  23519. "additionalProperties": false
  23520. },
  23521. "InvalidCursorError": {
  23522. "type": "object",
  23523. "properties": {
  23524. "_tag": {
  23525. "type": "string",
  23526. "enum": ["InvalidCursorError"]
  23527. },
  23528. "message": {
  23529. "type": "string"
  23530. }
  23531. },
  23532. "required": ["_tag", "message"],
  23533. "additionalProperties": false
  23534. },
  23535. "SessionActive": {
  23536. "type": "object",
  23537. "properties": {
  23538. "type": {
  23539. "type": "string",
  23540. "enum": ["running"]
  23541. }
  23542. },
  23543. "required": ["type"],
  23544. "additionalProperties": false
  23545. },
  23546. "SessionNotFoundError": {
  23547. "type": "object",
  23548. "properties": {
  23549. "_tag": {
  23550. "type": "string",
  23551. "enum": ["SessionNotFoundError"]
  23552. },
  23553. "sessionID": {
  23554. "type": "string"
  23555. },
  23556. "message": {
  23557. "type": "string"
  23558. }
  23559. },
  23560. "required": ["_tag", "sessionID", "message"],
  23561. "additionalProperties": false
  23562. },
  23563. "PromptInput": {
  23564. "type": "object",
  23565. "properties": {
  23566. "text": {
  23567. "type": "string"
  23568. },
  23569. "files": {
  23570. "type": "array",
  23571. "items": {
  23572. "$ref": "#/components/schemas/PromptInputFileAttachment"
  23573. }
  23574. },
  23575. "agents": {
  23576. "type": "array",
  23577. "items": {
  23578. "$ref": "#/components/schemas/PromptAgentAttachment"
  23579. }
  23580. }
  23581. },
  23582. "required": ["text"],
  23583. "additionalProperties": false
  23584. },
  23585. "ConflictError": {
  23586. "type": "object",
  23587. "properties": {
  23588. "_tag": {
  23589. "type": "string",
  23590. "enum": ["ConflictError"]
  23591. },
  23592. "message": {
  23593. "type": "string"
  23594. },
  23595. "resource": {
  23596. "type": "string"
  23597. }
  23598. },
  23599. "required": ["_tag", "message"],
  23600. "additionalProperties": false
  23601. },
  23602. "ServiceUnavailableError": {
  23603. "type": "object",
  23604. "properties": {
  23605. "_tag": {
  23606. "type": "string",
  23607. "enum": ["ServiceUnavailableError"]
  23608. },
  23609. "message": {
  23610. "type": "string"
  23611. },
  23612. "service": {
  23613. "type": "string"
  23614. }
  23615. },
  23616. "required": ["_tag", "message"],
  23617. "additionalProperties": false
  23618. },
  23619. "MessageNotFoundError": {
  23620. "type": "object",
  23621. "properties": {
  23622. "_tag": {
  23623. "type": "string",
  23624. "enum": ["MessageNotFoundError"]
  23625. },
  23626. "sessionID": {
  23627. "type": "string"
  23628. },
  23629. "messageID": {
  23630. "type": "string"
  23631. },
  23632. "message": {
  23633. "type": "string"
  23634. }
  23635. },
  23636. "required": ["_tag", "sessionID", "messageID", "message"],
  23637. "additionalProperties": false
  23638. },
  23639. "UnknownError1": {
  23640. "type": "object",
  23641. "properties": {
  23642. "_tag": {
  23643. "type": "string",
  23644. "enum": ["UnknownError"]
  23645. },
  23646. "message": {
  23647. "type": "string"
  23648. },
  23649. "ref": {
  23650. "type": "string"
  23651. }
  23652. },
  23653. "required": ["_tag", "message"],
  23654. "additionalProperties": false
  23655. },
  23656. "SessionDurableEvent": {
  23657. "oneOf": [
  23658. {
  23659. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  23660. },
  23661. {
  23662. "$ref": "#/components/schemas/SessionNextModelSwitched"
  23663. },
  23664. {
  23665. "$ref": "#/components/schemas/SessionNextMoved"
  23666. },
  23667. {
  23668. "$ref": "#/components/schemas/SessionNextPrompted"
  23669. },
  23670. {
  23671. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  23672. },
  23673. {
  23674. "$ref": "#/components/schemas/SessionNextContextUpdated"
  23675. },
  23676. {
  23677. "$ref": "#/components/schemas/SessionNextSynthetic"
  23678. },
  23679. {
  23680. "$ref": "#/components/schemas/SessionNextShellStarted"
  23681. },
  23682. {
  23683. "$ref": "#/components/schemas/SessionNextShellEnded"
  23684. },
  23685. {
  23686. "$ref": "#/components/schemas/SessionNextStepStarted"
  23687. },
  23688. {
  23689. "$ref": "#/components/schemas/SessionNextStepEnded"
  23690. },
  23691. {
  23692. "$ref": "#/components/schemas/SessionNextStepFailed"
  23693. },
  23694. {
  23695. "$ref": "#/components/schemas/SessionNextTextStarted"
  23696. },
  23697. {
  23698. "$ref": "#/components/schemas/SessionNextTextEnded"
  23699. },
  23700. {
  23701. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  23702. },
  23703. {
  23704. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  23705. },
  23706. {
  23707. "$ref": "#/components/schemas/SessionNextToolCalled"
  23708. },
  23709. {
  23710. "$ref": "#/components/schemas/SessionNextToolProgress"
  23711. },
  23712. {
  23713. "$ref": "#/components/schemas/SessionNextToolSuccess"
  23714. },
  23715. {
  23716. "$ref": "#/components/schemas/SessionNextToolFailed"
  23717. },
  23718. {
  23719. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  23720. },
  23721. {
  23722. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  23723. },
  23724. {
  23725. "$ref": "#/components/schemas/SessionNextRetried"
  23726. },
  23727. {
  23728. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  23729. },
  23730. {
  23731. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  23732. },
  23733. {
  23734. "$ref": "#/components/schemas/SessionNextRevertStaged"
  23735. },
  23736. {
  23737. "$ref": "#/components/schemas/SessionNextRevertCleared"
  23738. },
  23739. {
  23740. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  23741. }
  23742. ]
  23743. },
  23744. "SessionHistory": {
  23745. "type": "object",
  23746. "properties": {
  23747. "data": {
  23748. "type": "array",
  23749. "items": {
  23750. "$ref": "#/components/schemas/SessionDurableEvent"
  23751. }
  23752. },
  23753. "hasMore": {
  23754. "type": "boolean"
  23755. }
  23756. },
  23757. "required": ["data", "hasMore"],
  23758. "additionalProperties": false
  23759. },
  23760. "SessionDurableEventStream": {
  23761. "type": "string",
  23762. "contentSchema": {
  23763. "$ref": "#/components/schemas/SessionDurableEvent"
  23764. },
  23765. "contentMediaType": "application/json"
  23766. },
  23767. "SessionMessagesResponse": {
  23768. "type": "object",
  23769. "properties": {
  23770. "data": {
  23771. "type": "array",
  23772. "items": {
  23773. "$ref": "#/components/schemas/SessionMessage"
  23774. }
  23775. },
  23776. "cursor": {
  23777. "type": "object",
  23778. "properties": {
  23779. "previous": {
  23780. "type": "string"
  23781. },
  23782. "next": {
  23783. "type": "string"
  23784. }
  23785. },
  23786. "additionalProperties": false
  23787. }
  23788. },
  23789. "required": ["data", "cursor"],
  23790. "additionalProperties": false
  23791. },
  23792. "ProviderNotFoundError": {
  23793. "type": "object",
  23794. "properties": {
  23795. "_tag": {
  23796. "type": "string",
  23797. "enum": ["ProviderNotFoundError"]
  23798. },
  23799. "providerID": {
  23800. "type": "string"
  23801. },
  23802. "message": {
  23803. "type": "string"
  23804. }
  23805. },
  23806. "required": ["_tag", "providerID", "message"],
  23807. "additionalProperties": false
  23808. },
  23809. "OutputFormat1": {
  23810. "anyOf": [
  23811. {
  23812. "type": "object",
  23813. "properties": {
  23814. "type": {
  23815. "type": "string",
  23816. "enum": ["text"]
  23817. }
  23818. },
  23819. "required": ["type"],
  23820. "additionalProperties": false
  23821. },
  23822. {
  23823. "type": "object",
  23824. "properties": {
  23825. "type": {
  23826. "type": "string",
  23827. "enum": ["json_schema"]
  23828. },
  23829. "schema": {
  23830. "$ref": "#/components/schemas/JSONSchema"
  23831. },
  23832. "retryCount": {
  23833. "type": "integer",
  23834. "minimum": 0
  23835. }
  23836. },
  23837. "required": ["type", "schema"],
  23838. "additionalProperties": false
  23839. }
  23840. ]
  23841. },
  23842. "session.status": {
  23843. "type": "object",
  23844. "properties": {
  23845. "id": {
  23846. "type": "string",
  23847. "pattern": "^evt_"
  23848. },
  23849. "metadata": {
  23850. "type": "object"
  23851. },
  23852. "type": {
  23853. "type": "string",
  23854. "enum": ["session.status"]
  23855. },
  23856. "durable": {
  23857. "type": "object",
  23858. "properties": {
  23859. "aggregateID": {
  23860. "type": "string"
  23861. },
  23862. "seq": {
  23863. "type": "integer"
  23864. },
  23865. "version": {
  23866. "type": "integer"
  23867. }
  23868. },
  23869. "required": ["aggregateID", "seq", "version"],
  23870. "additionalProperties": false
  23871. },
  23872. "location": {
  23873. "$ref": "#/components/schemas/LocationRef"
  23874. },
  23875. "data": {
  23876. "type": "object",
  23877. "properties": {
  23878. "sessionID": {
  23879. "type": "string",
  23880. "pattern": "^ses"
  23881. },
  23882. "status": {
  23883. "$ref": "#/components/schemas/SessionStatus"
  23884. }
  23885. },
  23886. "required": ["sessionID", "status"],
  23887. "additionalProperties": false
  23888. }
  23889. },
  23890. "required": ["id", "type", "data"],
  23891. "additionalProperties": false
  23892. },
  23893. "question.replied": {
  23894. "type": "object",
  23895. "properties": {
  23896. "id": {
  23897. "type": "string",
  23898. "pattern": "^evt_"
  23899. },
  23900. "metadata": {
  23901. "type": "object"
  23902. },
  23903. "type": {
  23904. "type": "string",
  23905. "enum": ["question.replied"]
  23906. },
  23907. "durable": {
  23908. "type": "object",
  23909. "properties": {
  23910. "aggregateID": {
  23911. "type": "string"
  23912. },
  23913. "seq": {
  23914. "type": "integer"
  23915. },
  23916. "version": {
  23917. "type": "integer"
  23918. }
  23919. },
  23920. "required": ["aggregateID", "seq", "version"],
  23921. "additionalProperties": false
  23922. },
  23923. "location": {
  23924. "$ref": "#/components/schemas/LocationRef"
  23925. },
  23926. "data": {
  23927. "type": "object",
  23928. "properties": {
  23929. "sessionID": {
  23930. "type": "string",
  23931. "pattern": "^ses"
  23932. },
  23933. "requestID": {
  23934. "type": "string",
  23935. "pattern": "^que"
  23936. },
  23937. "answers": {
  23938. "type": "array",
  23939. "items": {
  23940. "$ref": "#/components/schemas/QuestionAnswer"
  23941. }
  23942. }
  23943. },
  23944. "required": ["sessionID", "requestID", "answers"],
  23945. "additionalProperties": false
  23946. }
  23947. },
  23948. "required": ["id", "type", "data"],
  23949. "additionalProperties": false
  23950. },
  23951. "question.rejected": {
  23952. "type": "object",
  23953. "properties": {
  23954. "id": {
  23955. "type": "string",
  23956. "pattern": "^evt_"
  23957. },
  23958. "metadata": {
  23959. "type": "object"
  23960. },
  23961. "type": {
  23962. "type": "string",
  23963. "enum": ["question.rejected"]
  23964. },
  23965. "durable": {
  23966. "type": "object",
  23967. "properties": {
  23968. "aggregateID": {
  23969. "type": "string"
  23970. },
  23971. "seq": {
  23972. "type": "integer"
  23973. },
  23974. "version": {
  23975. "type": "integer"
  23976. }
  23977. },
  23978. "required": ["aggregateID", "seq", "version"],
  23979. "additionalProperties": false
  23980. },
  23981. "location": {
  23982. "$ref": "#/components/schemas/LocationRef"
  23983. },
  23984. "data": {
  23985. "type": "object",
  23986. "properties": {
  23987. "sessionID": {
  23988. "type": "string",
  23989. "pattern": "^ses"
  23990. },
  23991. "requestID": {
  23992. "type": "string",
  23993. "pattern": "^que"
  23994. }
  23995. },
  23996. "required": ["sessionID", "requestID"],
  23997. "additionalProperties": false
  23998. }
  23999. },
  24000. "required": ["id", "type", "data"],
  24001. "additionalProperties": false
  24002. },
  24003. "V2Event": {
  24004. "anyOf": [
  24005. {
  24006. "$ref": "#/components/schemas/Models-devRefreshed"
  24007. },
  24008. {
  24009. "$ref": "#/components/schemas/IntegrationUpdated"
  24010. },
  24011. {
  24012. "$ref": "#/components/schemas/IntegrationConnectionUpdated"
  24013. },
  24014. {
  24015. "$ref": "#/components/schemas/CatalogUpdated"
  24016. },
  24017. {
  24018. "$ref": "#/components/schemas/SessionCreated"
  24019. },
  24020. {
  24021. "$ref": "#/components/schemas/SessionUpdated"
  24022. },
  24023. {
  24024. "$ref": "#/components/schemas/SessionDeleted"
  24025. },
  24026. {
  24027. "$ref": "#/components/schemas/MessageUpdated"
  24028. },
  24029. {
  24030. "$ref": "#/components/schemas/MessageRemoved"
  24031. },
  24032. {
  24033. "$ref": "#/components/schemas/MessagePartUpdated"
  24034. },
  24035. {
  24036. "$ref": "#/components/schemas/MessagePartRemoved"
  24037. },
  24038. {
  24039. "$ref": "#/components/schemas/SessionNextAgentSwitched"
  24040. },
  24041. {
  24042. "$ref": "#/components/schemas/SessionNextModelSwitched"
  24043. },
  24044. {
  24045. "$ref": "#/components/schemas/SessionNextMoved"
  24046. },
  24047. {
  24048. "$ref": "#/components/schemas/SessionNextPrompted"
  24049. },
  24050. {
  24051. "$ref": "#/components/schemas/SessionNextPromptAdmitted"
  24052. },
  24053. {
  24054. "$ref": "#/components/schemas/SessionNextContextUpdated"
  24055. },
  24056. {
  24057. "$ref": "#/components/schemas/SessionNextSynthetic"
  24058. },
  24059. {
  24060. "$ref": "#/components/schemas/SessionNextShellStarted"
  24061. },
  24062. {
  24063. "$ref": "#/components/schemas/SessionNextShellEnded"
  24064. },
  24065. {
  24066. "$ref": "#/components/schemas/SessionNextStepStarted"
  24067. },
  24068. {
  24069. "$ref": "#/components/schemas/SessionNextStepEnded"
  24070. },
  24071. {
  24072. "$ref": "#/components/schemas/SessionNextStepFailed"
  24073. },
  24074. {
  24075. "$ref": "#/components/schemas/SessionNextTextStarted"
  24076. },
  24077. {
  24078. "$ref": "#/components/schemas/SessionNextTextDelta"
  24079. },
  24080. {
  24081. "$ref": "#/components/schemas/SessionNextTextEnded"
  24082. },
  24083. {
  24084. "$ref": "#/components/schemas/SessionNextReasoningStarted"
  24085. },
  24086. {
  24087. "$ref": "#/components/schemas/SessionNextReasoningDelta"
  24088. },
  24089. {
  24090. "$ref": "#/components/schemas/SessionNextReasoningEnded"
  24091. },
  24092. {
  24093. "$ref": "#/components/schemas/SessionNextToolInputStarted"
  24094. },
  24095. {
  24096. "$ref": "#/components/schemas/SessionNextToolInputDelta"
  24097. },
  24098. {
  24099. "$ref": "#/components/schemas/SessionNextToolInputEnded"
  24100. },
  24101. {
  24102. "$ref": "#/components/schemas/SessionNextToolCalled"
  24103. },
  24104. {
  24105. "$ref": "#/components/schemas/SessionNextToolProgress"
  24106. },
  24107. {
  24108. "$ref": "#/components/schemas/SessionNextToolSuccess"
  24109. },
  24110. {
  24111. "$ref": "#/components/schemas/SessionNextToolFailed"
  24112. },
  24113. {
  24114. "$ref": "#/components/schemas/SessionNextRetried"
  24115. },
  24116. {
  24117. "$ref": "#/components/schemas/SessionNextCompactionStarted"
  24118. },
  24119. {
  24120. "$ref": "#/components/schemas/SessionNextCompactionDelta"
  24121. },
  24122. {
  24123. "$ref": "#/components/schemas/SessionNextCompactionEnded"
  24124. },
  24125. {
  24126. "$ref": "#/components/schemas/SessionNextRevertStaged"
  24127. },
  24128. {
  24129. "$ref": "#/components/schemas/SessionNextRevertCleared"
  24130. },
  24131. {
  24132. "$ref": "#/components/schemas/SessionNextRevertCommitted"
  24133. },
  24134. {
  24135. "$ref": "#/components/schemas/MessagePartDelta"
  24136. },
  24137. {
  24138. "$ref": "#/components/schemas/SessionDiff"
  24139. },
  24140. {
  24141. "$ref": "#/components/schemas/SessionError"
  24142. },
  24143. {
  24144. "$ref": "#/components/schemas/InstallationUpdated"
  24145. },
  24146. {
  24147. "$ref": "#/components/schemas/InstallationUpdate-available"
  24148. },
  24149. {
  24150. "$ref": "#/components/schemas/FileEdited"
  24151. },
  24152. {
  24153. "$ref": "#/components/schemas/ReferenceUpdated"
  24154. },
  24155. {
  24156. "$ref": "#/components/schemas/PermissionV2Asked"
  24157. },
  24158. {
  24159. "$ref": "#/components/schemas/PermissionV2Replied"
  24160. },
  24161. {
  24162. "$ref": "#/components/schemas/PluginAdded"
  24163. },
  24164. {
  24165. "$ref": "#/components/schemas/ProjectDirectoriesUpdated"
  24166. },
  24167. {
  24168. "$ref": "#/components/schemas/FileWatcherUpdated"
  24169. },
  24170. {
  24171. "$ref": "#/components/schemas/PtyCreated"
  24172. },
  24173. {
  24174. "$ref": "#/components/schemas/PtyUpdated"
  24175. },
  24176. {
  24177. "$ref": "#/components/schemas/PtyExited"
  24178. },
  24179. {
  24180. "$ref": "#/components/schemas/PtyDeleted"
  24181. },
  24182. {
  24183. "$ref": "#/components/schemas/QuestionV2Asked"
  24184. },
  24185. {
  24186. "$ref": "#/components/schemas/QuestionV2Replied"
  24187. },
  24188. {
  24189. "$ref": "#/components/schemas/QuestionV2Rejected"
  24190. },
  24191. {
  24192. "$ref": "#/components/schemas/TodoUpdated"
  24193. },
  24194. {
  24195. "$ref": "#/components/schemas/LspUpdated"
  24196. },
  24197. {
  24198. "$ref": "#/components/schemas/PermissionAsked"
  24199. },
  24200. {
  24201. "$ref": "#/components/schemas/PermissionReplied"
  24202. },
  24203. {
  24204. "$ref": "#/components/schemas/TuiPromptAppend"
  24205. },
  24206. {
  24207. "$ref": "#/components/schemas/TuiCommandExecute"
  24208. },
  24209. {
  24210. "$ref": "#/components/schemas/TuiToastShow"
  24211. },
  24212. {
  24213. "$ref": "#/components/schemas/TuiSessionSelect"
  24214. },
  24215. {
  24216. "$ref": "#/components/schemas/McpToolsChanged"
  24217. },
  24218. {
  24219. "$ref": "#/components/schemas/McpBrowserOpenFailed"
  24220. },
  24221. {
  24222. "$ref": "#/components/schemas/CommandExecuted"
  24223. },
  24224. {
  24225. "$ref": "#/components/schemas/ProjectUpdated"
  24226. },
  24227. {
  24228. "$ref": "#/components/schemas/session.status"
  24229. },
  24230. {
  24231. "$ref": "#/components/schemas/SessionIdle"
  24232. },
  24233. {
  24234. "$ref": "#/components/schemas/QuestionAsked"
  24235. },
  24236. {
  24237. "$ref": "#/components/schemas/question.replied"
  24238. },
  24239. {
  24240. "$ref": "#/components/schemas/question.rejected"
  24241. },
  24242. {
  24243. "$ref": "#/components/schemas/SessionCompacted"
  24244. },
  24245. {
  24246. "$ref": "#/components/schemas/VcsBranchUpdated"
  24247. },
  24248. {
  24249. "$ref": "#/components/schemas/WorkspaceReady"
  24250. },
  24251. {
  24252. "$ref": "#/components/schemas/WorkspaceFailed"
  24253. },
  24254. {
  24255. "$ref": "#/components/schemas/WorkspaceStatus"
  24256. },
  24257. {
  24258. "$ref": "#/components/schemas/WorktreeReady"
  24259. },
  24260. {
  24261. "$ref": "#/components/schemas/WorktreeFailed"
  24262. },
  24263. {
  24264. "$ref": "#/components/schemas/ServerConnected"
  24265. },
  24266. {
  24267. "$ref": "#/components/schemas/GlobalDisposed"
  24268. }
  24269. ]
  24270. },
  24271. "V2EventStream": {
  24272. "type": "string",
  24273. "contentSchema": {
  24274. "$ref": "#/components/schemas/V2Event"
  24275. },
  24276. "contentMediaType": "application/json"
  24277. },
  24278. "ForbiddenError": {
  24279. "type": "object",
  24280. "properties": {
  24281. "_tag": {
  24282. "type": "string",
  24283. "enum": ["ForbiddenError"]
  24284. },
  24285. "message": {
  24286. "type": "string"
  24287. }
  24288. },
  24289. "required": ["_tag", "message"],
  24290. "additionalProperties": false
  24291. },
  24292. "ProjectCopyError": {
  24293. "type": "object",
  24294. "properties": {
  24295. "name": {
  24296. "type": "string",
  24297. "enum": ["ProjectCopyError"]
  24298. },
  24299. "data": {
  24300. "type": "object",
  24301. "properties": {
  24302. "message": {
  24303. "type": "string"
  24304. },
  24305. "forceRequired": {
  24306. "type": "boolean"
  24307. }
  24308. },
  24309. "required": ["message"],
  24310. "additionalProperties": false
  24311. }
  24312. },
  24313. "required": ["name", "data"],
  24314. "additionalProperties": false
  24315. },
  24316. "effect_HttpApiError_Forbidden": {
  24317. "type": "object",
  24318. "properties": {
  24319. "_tag": {
  24320. "type": "string",
  24321. "enum": ["Forbidden"]
  24322. }
  24323. },
  24324. "required": ["_tag"],
  24325. "additionalProperties": false
  24326. },
  24327. "Event.tui.prompt.append": {
  24328. "type": "object",
  24329. "properties": {
  24330. "id": {
  24331. "type": "string",
  24332. "pattern": "^evt_"
  24333. },
  24334. "type": {
  24335. "type": "string",
  24336. "enum": ["tui.prompt.append"]
  24337. },
  24338. "properties": {
  24339. "type": "object",
  24340. "properties": {
  24341. "text": {
  24342. "type": "string"
  24343. }
  24344. },
  24345. "required": ["text"],
  24346. "additionalProperties": false
  24347. }
  24348. },
  24349. "required": ["id", "type", "properties"],
  24350. "additionalProperties": false
  24351. },
  24352. "Event.tui.command.execute": {
  24353. "type": "object",
  24354. "properties": {
  24355. "id": {
  24356. "type": "string",
  24357. "pattern": "^evt_"
  24358. },
  24359. "type": {
  24360. "type": "string",
  24361. "enum": ["tui.command.execute"]
  24362. },
  24363. "properties": {
  24364. "type": "object",
  24365. "properties": {
  24366. "command": {
  24367. "anyOf": [
  24368. {
  24369. "type": "string",
  24370. "enum": [
  24371. "session.list",
  24372. "session.new",
  24373. "session.share",
  24374. "session.interrupt",
  24375. "session.compact",
  24376. "session.page.up",
  24377. "session.page.down",
  24378. "session.line.up",
  24379. "session.line.down",
  24380. "session.half.page.up",
  24381. "session.half.page.down",
  24382. "session.first",
  24383. "session.last",
  24384. "prompt.clear",
  24385. "prompt.submit",
  24386. "agent.cycle"
  24387. ]
  24388. },
  24389. {
  24390. "type": "string"
  24391. }
  24392. ]
  24393. }
  24394. },
  24395. "required": ["command"],
  24396. "additionalProperties": false
  24397. }
  24398. },
  24399. "required": ["id", "type", "properties"],
  24400. "additionalProperties": false
  24401. },
  24402. "Event.tui.toast.show": {
  24403. "type": "object",
  24404. "properties": {
  24405. "id": {
  24406. "type": "string",
  24407. "pattern": "^evt_"
  24408. },
  24409. "type": {
  24410. "type": "string",
  24411. "enum": ["tui.toast.show"]
  24412. },
  24413. "properties": {
  24414. "type": "object",
  24415. "properties": {
  24416. "title": {
  24417. "type": "string"
  24418. },
  24419. "message": {
  24420. "type": "string"
  24421. },
  24422. "variant": {
  24423. "type": "string",
  24424. "enum": ["info", "success", "warning", "error"]
  24425. },
  24426. "duration": {
  24427. "type": "integer",
  24428. "exclusiveMinimum": 0
  24429. }
  24430. },
  24431. "required": ["message", "variant"],
  24432. "additionalProperties": false
  24433. }
  24434. },
  24435. "required": ["id", "type", "properties"],
  24436. "additionalProperties": false
  24437. },
  24438. "Event.tui.session.select": {
  24439. "type": "object",
  24440. "properties": {
  24441. "id": {
  24442. "type": "string",
  24443. "pattern": "^evt_"
  24444. },
  24445. "type": {
  24446. "type": "string",
  24447. "enum": ["tui.session.select"]
  24448. },
  24449. "properties": {
  24450. "type": "object",
  24451. "properties": {
  24452. "sessionID": {
  24453. "type": "string",
  24454. "pattern": "^ses",
  24455. "description": "Session ID to navigate to"
  24456. }
  24457. },
  24458. "required": ["sessionID"],
  24459. "additionalProperties": false
  24460. }
  24461. },
  24462. "required": ["id", "type", "properties"],
  24463. "additionalProperties": false
  24464. },
  24465. "CredentialValue": {
  24466. "anyOf": [
  24467. {
  24468. "$ref": "#/components/schemas/CredentialOAuth"
  24469. },
  24470. {
  24471. "$ref": "#/components/schemas/CredentialKey"
  24472. }
  24473. ]
  24474. },
  24475. "IntegrationInputs": {
  24476. "type": "object",
  24477. "additionalProperties": {
  24478. "type": "string"
  24479. }
  24480. },
  24481. "IntegrationMethod": {
  24482. "anyOf": [
  24483. {
  24484. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  24485. },
  24486. {
  24487. "$ref": "#/components/schemas/IntegrationKeyMethod"
  24488. },
  24489. {
  24490. "$ref": "#/components/schemas/IntegrationEnvMethod"
  24491. }
  24492. ]
  24493. },
  24494. "IntegrationRef": {
  24495. "type": "object",
  24496. "properties": {
  24497. "id": {
  24498. "type": "string"
  24499. },
  24500. "name": {
  24501. "type": "string"
  24502. }
  24503. },
  24504. "required": ["id", "name"],
  24505. "additionalProperties": false
  24506. },
  24507. "SkillV2Source": {
  24508. "anyOf": [
  24509. {
  24510. "$ref": "#/components/schemas/SkillV2DirectorySource"
  24511. },
  24512. {
  24513. "$ref": "#/components/schemas/SkillV2UrlSource"
  24514. },
  24515. {
  24516. "$ref": "#/components/schemas/SkillV2EmbeddedSource"
  24517. }
  24518. ]
  24519. },
  24520. "MoveSessionDestination": {
  24521. "type": "object",
  24522. "properties": {
  24523. "directory": {
  24524. "type": "string"
  24525. }
  24526. },
  24527. "required": ["directory"],
  24528. "additionalProperties": false
  24529. },
  24530. "ModelRef": {
  24531. "type": "object",
  24532. "properties": {
  24533. "id": {
  24534. "type": "string"
  24535. },
  24536. "providerID": {
  24537. "type": "string"
  24538. },
  24539. "variant": {
  24540. "type": "string"
  24541. }
  24542. },
  24543. "required": ["id", "providerID"],
  24544. "additionalProperties": false
  24545. },
  24546. "LocationRef": {
  24547. "type": "object",
  24548. "properties": {
  24549. "directory": {
  24550. "type": "string"
  24551. },
  24552. "workspaceID": {
  24553. "type": "string",
  24554. "pattern": "^wrk"
  24555. }
  24556. },
  24557. "required": ["directory"],
  24558. "additionalProperties": false
  24559. },
  24560. "PromptSource": {
  24561. "type": "object",
  24562. "properties": {
  24563. "start": {
  24564. "type": "number"
  24565. },
  24566. "end": {
  24567. "type": "number"
  24568. },
  24569. "text": {
  24570. "type": "string"
  24571. }
  24572. },
  24573. "required": ["start", "end", "text"],
  24574. "additionalProperties": false
  24575. },
  24576. "PromptFileAttachment": {
  24577. "type": "object",
  24578. "properties": {
  24579. "uri": {
  24580. "type": "string"
  24581. },
  24582. "mime": {
  24583. "type": "string"
  24584. },
  24585. "name": {
  24586. "type": "string"
  24587. },
  24588. "description": {
  24589. "type": "string"
  24590. },
  24591. "source": {
  24592. "$ref": "#/components/schemas/PromptSource"
  24593. }
  24594. },
  24595. "required": ["uri", "mime"],
  24596. "additionalProperties": false
  24597. },
  24598. "PromptAgentAttachment": {
  24599. "type": "object",
  24600. "properties": {
  24601. "name": {
  24602. "type": "string"
  24603. },
  24604. "source": {
  24605. "$ref": "#/components/schemas/PromptSource"
  24606. }
  24607. },
  24608. "required": ["name"],
  24609. "additionalProperties": false
  24610. },
  24611. "SessionErrorUnknown": {
  24612. "type": "object",
  24613. "properties": {
  24614. "type": {
  24615. "type": "string",
  24616. "enum": ["unknown"]
  24617. },
  24618. "message": {
  24619. "type": "string"
  24620. }
  24621. },
  24622. "required": ["type", "message"],
  24623. "additionalProperties": false
  24624. },
  24625. "LLMProviderMetadata": {
  24626. "type": "object",
  24627. "additionalProperties": {
  24628. "type": "object"
  24629. }
  24630. },
  24631. "ToolTextContent": {
  24632. "type": "object",
  24633. "properties": {
  24634. "type": {
  24635. "type": "string",
  24636. "enum": ["text"]
  24637. },
  24638. "text": {
  24639. "type": "string"
  24640. }
  24641. },
  24642. "required": ["type", "text"],
  24643. "additionalProperties": false
  24644. },
  24645. "ToolFileContent": {
  24646. "type": "object",
  24647. "properties": {
  24648. "type": {
  24649. "type": "string",
  24650. "enum": ["file"]
  24651. },
  24652. "uri": {
  24653. "type": "string"
  24654. },
  24655. "mime": {
  24656. "type": "string"
  24657. },
  24658. "name": {
  24659. "type": "string"
  24660. }
  24661. },
  24662. "required": ["type", "uri", "mime"],
  24663. "additionalProperties": false
  24664. },
  24665. "LLMToolContent": {
  24666. "anyOf": [
  24667. {
  24668. "$ref": "#/components/schemas/ToolTextContent"
  24669. },
  24670. {
  24671. "$ref": "#/components/schemas/ToolFileContent"
  24672. }
  24673. ]
  24674. },
  24675. "SessionNextRetry_error": {
  24676. "type": "object",
  24677. "properties": {
  24678. "message": {
  24679. "type": "string"
  24680. },
  24681. "statusCode": {
  24682. "type": "number"
  24683. },
  24684. "isRetryable": {
  24685. "type": "boolean"
  24686. },
  24687. "responseHeaders": {
  24688. "type": "object",
  24689. "additionalProperties": {
  24690. "type": "string"
  24691. }
  24692. },
  24693. "responseBody": {
  24694. "type": "string"
  24695. },
  24696. "metadata": {
  24697. "type": "object",
  24698. "additionalProperties": {
  24699. "type": "string"
  24700. }
  24701. }
  24702. },
  24703. "required": ["message", "isRetryable"],
  24704. "additionalProperties": false
  24705. },
  24706. "FileDiff": {
  24707. "type": "object",
  24708. "properties": {
  24709. "path": {
  24710. "type": "string"
  24711. },
  24712. "status": {
  24713. "type": "string",
  24714. "enum": ["added", "modified", "deleted"]
  24715. },
  24716. "additions": {
  24717. "type": "integer",
  24718. "minimum": 0
  24719. },
  24720. "deletions": {
  24721. "type": "integer",
  24722. "minimum": 0
  24723. },
  24724. "patch": {
  24725. "type": "string"
  24726. }
  24727. },
  24728. "required": ["path", "status", "additions", "deletions", "patch"],
  24729. "additionalProperties": false
  24730. },
  24731. "RevertState": {
  24732. "type": "object",
  24733. "properties": {
  24734. "messageID": {
  24735. "type": "string",
  24736. "pattern": "^msg_"
  24737. },
  24738. "partID": {
  24739. "type": "string"
  24740. },
  24741. "snapshot": {
  24742. "type": "string"
  24743. },
  24744. "diff": {
  24745. "type": "string"
  24746. },
  24747. "files": {
  24748. "type": "array",
  24749. "items": {
  24750. "$ref": "#/components/schemas/FileDiff"
  24751. }
  24752. }
  24753. },
  24754. "required": ["messageID"],
  24755. "additionalProperties": false
  24756. },
  24757. "PermissionV2Source": {
  24758. "type": "object",
  24759. "properties": {
  24760. "type": {
  24761. "type": "string",
  24762. "enum": ["tool"]
  24763. },
  24764. "messageID": {
  24765. "type": "string"
  24766. },
  24767. "callID": {
  24768. "type": "string"
  24769. }
  24770. },
  24771. "required": ["type", "messageID", "callID"],
  24772. "additionalProperties": false
  24773. },
  24774. "PermissionV2Reply": {
  24775. "type": "string",
  24776. "enum": ["once", "always", "reject"]
  24777. },
  24778. "QuestionV2Option": {
  24779. "type": "object",
  24780. "properties": {
  24781. "label": {
  24782. "type": "string",
  24783. "description": "Display text (1-5 words, concise)"
  24784. },
  24785. "description": {
  24786. "type": "string",
  24787. "description": "Explanation of choice"
  24788. }
  24789. },
  24790. "required": ["label", "description"],
  24791. "additionalProperties": false
  24792. },
  24793. "QuestionV2Info": {
  24794. "type": "object",
  24795. "properties": {
  24796. "question": {
  24797. "type": "string",
  24798. "description": "Complete question"
  24799. },
  24800. "header": {
  24801. "type": "string",
  24802. "description": "Very short label (max 30 chars)"
  24803. },
  24804. "options": {
  24805. "type": "array",
  24806. "items": {
  24807. "$ref": "#/components/schemas/QuestionV2Option"
  24808. },
  24809. "description": "Available choices"
  24810. },
  24811. "multiple": {
  24812. "type": "boolean"
  24813. },
  24814. "custom": {
  24815. "type": "boolean"
  24816. }
  24817. },
  24818. "required": ["question", "header", "options"],
  24819. "additionalProperties": false
  24820. },
  24821. "QuestionV2Tool": {
  24822. "type": "object",
  24823. "properties": {
  24824. "messageID": {
  24825. "type": "string"
  24826. },
  24827. "callID": {
  24828. "type": "string"
  24829. }
  24830. },
  24831. "required": ["messageID", "callID"],
  24832. "additionalProperties": false
  24833. },
  24834. "QuestionV2Answer": {
  24835. "type": "array",
  24836. "items": {
  24837. "type": "string"
  24838. }
  24839. },
  24840. "ProjectVcs": {
  24841. "type": "string",
  24842. "enum": ["git"]
  24843. },
  24844. "ProjectIcon": {
  24845. "type": "object",
  24846. "properties": {
  24847. "url": {
  24848. "type": "string"
  24849. },
  24850. "override": {
  24851. "type": "string"
  24852. },
  24853. "color": {
  24854. "type": "string"
  24855. }
  24856. },
  24857. "additionalProperties": false
  24858. },
  24859. "ProjectCommands": {
  24860. "type": "object",
  24861. "properties": {
  24862. "start": {
  24863. "type": "string",
  24864. "description": "Startup script to run when creating a new workspace (worktree)"
  24865. }
  24866. },
  24867. "additionalProperties": false
  24868. },
  24869. "ProjectTime": {
  24870. "type": "object",
  24871. "properties": {
  24872. "created": {
  24873. "type": "integer",
  24874. "minimum": 0
  24875. },
  24876. "updated": {
  24877. "type": "integer",
  24878. "minimum": 0
  24879. },
  24880. "initialized": {
  24881. "type": "integer",
  24882. "minimum": 0
  24883. }
  24884. },
  24885. "required": ["created", "updated"],
  24886. "additionalProperties": false
  24887. },
  24888. "EventServerInstanceDisposed": {
  24889. "type": "object",
  24890. "properties": {
  24891. "id": {
  24892. "type": "string"
  24893. },
  24894. "type": {
  24895. "type": "string",
  24896. "enum": ["server.instance.disposed"]
  24897. },
  24898. "properties": {
  24899. "type": "object",
  24900. "properties": {
  24901. "directory": {
  24902. "type": "string"
  24903. }
  24904. },
  24905. "required": ["directory"],
  24906. "additionalProperties": false
  24907. }
  24908. },
  24909. "required": ["id", "type", "properties"],
  24910. "additionalProperties": false
  24911. },
  24912. "SyncEventSessionCreated": {
  24913. "type": "object",
  24914. "properties": {
  24915. "type": {
  24916. "type": "string",
  24917. "enum": ["sync"]
  24918. },
  24919. "id": {
  24920. "type": "string",
  24921. "pattern": "^evt_"
  24922. },
  24923. "syncEvent": {
  24924. "type": "object",
  24925. "properties": {
  24926. "type": {
  24927. "type": "string",
  24928. "enum": ["session.created.1"]
  24929. },
  24930. "id": {
  24931. "type": "string",
  24932. "pattern": "^evt_"
  24933. },
  24934. "seq": {
  24935. "type": "number"
  24936. },
  24937. "aggregateID": {
  24938. "type": "string"
  24939. },
  24940. "data": {
  24941. "type": "object",
  24942. "properties": {
  24943. "sessionID": {
  24944. "type": "string",
  24945. "pattern": "^ses"
  24946. },
  24947. "info": {
  24948. "$ref": "#/components/schemas/Session"
  24949. }
  24950. },
  24951. "required": ["sessionID", "info"],
  24952. "additionalProperties": false
  24953. }
  24954. },
  24955. "required": ["type", "id", "seq", "aggregateID", "data"],
  24956. "additionalProperties": false
  24957. }
  24958. },
  24959. "required": ["type", "id", "syncEvent"],
  24960. "additionalProperties": false
  24961. },
  24962. "SyncEventSessionUpdated": {
  24963. "type": "object",
  24964. "properties": {
  24965. "type": {
  24966. "type": "string",
  24967. "enum": ["sync"]
  24968. },
  24969. "id": {
  24970. "type": "string",
  24971. "pattern": "^evt_"
  24972. },
  24973. "syncEvent": {
  24974. "type": "object",
  24975. "properties": {
  24976. "type": {
  24977. "type": "string",
  24978. "enum": ["session.updated.1"]
  24979. },
  24980. "id": {
  24981. "type": "string",
  24982. "pattern": "^evt_"
  24983. },
  24984. "seq": {
  24985. "type": "number"
  24986. },
  24987. "aggregateID": {
  24988. "type": "string"
  24989. },
  24990. "data": {
  24991. "type": "object",
  24992. "properties": {
  24993. "sessionID": {
  24994. "type": "string",
  24995. "pattern": "^ses"
  24996. },
  24997. "info": {
  24998. "$ref": "#/components/schemas/Session"
  24999. }
  25000. },
  25001. "required": ["sessionID", "info"],
  25002. "additionalProperties": false
  25003. }
  25004. },
  25005. "required": ["type", "id", "seq", "aggregateID", "data"],
  25006. "additionalProperties": false
  25007. }
  25008. },
  25009. "required": ["type", "id", "syncEvent"],
  25010. "additionalProperties": false
  25011. },
  25012. "SyncEventSessionDeleted": {
  25013. "type": "object",
  25014. "properties": {
  25015. "type": {
  25016. "type": "string",
  25017. "enum": ["sync"]
  25018. },
  25019. "id": {
  25020. "type": "string",
  25021. "pattern": "^evt_"
  25022. },
  25023. "syncEvent": {
  25024. "type": "object",
  25025. "properties": {
  25026. "type": {
  25027. "type": "string",
  25028. "enum": ["session.deleted.1"]
  25029. },
  25030. "id": {
  25031. "type": "string",
  25032. "pattern": "^evt_"
  25033. },
  25034. "seq": {
  25035. "type": "number"
  25036. },
  25037. "aggregateID": {
  25038. "type": "string"
  25039. },
  25040. "data": {
  25041. "type": "object",
  25042. "properties": {
  25043. "sessionID": {
  25044. "type": "string",
  25045. "pattern": "^ses"
  25046. },
  25047. "info": {
  25048. "$ref": "#/components/schemas/Session"
  25049. }
  25050. },
  25051. "required": ["sessionID", "info"],
  25052. "additionalProperties": false
  25053. }
  25054. },
  25055. "required": ["type", "id", "seq", "aggregateID", "data"],
  25056. "additionalProperties": false
  25057. }
  25058. },
  25059. "required": ["type", "id", "syncEvent"],
  25060. "additionalProperties": false
  25061. },
  25062. "SyncEventMessageUpdated": {
  25063. "type": "object",
  25064. "properties": {
  25065. "type": {
  25066. "type": "string",
  25067. "enum": ["sync"]
  25068. },
  25069. "id": {
  25070. "type": "string",
  25071. "pattern": "^evt_"
  25072. },
  25073. "syncEvent": {
  25074. "type": "object",
  25075. "properties": {
  25076. "type": {
  25077. "type": "string",
  25078. "enum": ["message.updated.1"]
  25079. },
  25080. "id": {
  25081. "type": "string",
  25082. "pattern": "^evt_"
  25083. },
  25084. "seq": {
  25085. "type": "number"
  25086. },
  25087. "aggregateID": {
  25088. "type": "string"
  25089. },
  25090. "data": {
  25091. "type": "object",
  25092. "properties": {
  25093. "sessionID": {
  25094. "type": "string",
  25095. "pattern": "^ses"
  25096. },
  25097. "info": {
  25098. "$ref": "#/components/schemas/Message"
  25099. }
  25100. },
  25101. "required": ["sessionID", "info"],
  25102. "additionalProperties": false
  25103. }
  25104. },
  25105. "required": ["type", "id", "seq", "aggregateID", "data"],
  25106. "additionalProperties": false
  25107. }
  25108. },
  25109. "required": ["type", "id", "syncEvent"],
  25110. "additionalProperties": false
  25111. },
  25112. "SyncEventMessageRemoved": {
  25113. "type": "object",
  25114. "properties": {
  25115. "type": {
  25116. "type": "string",
  25117. "enum": ["sync"]
  25118. },
  25119. "id": {
  25120. "type": "string",
  25121. "pattern": "^evt_"
  25122. },
  25123. "syncEvent": {
  25124. "type": "object",
  25125. "properties": {
  25126. "type": {
  25127. "type": "string",
  25128. "enum": ["message.removed.1"]
  25129. },
  25130. "id": {
  25131. "type": "string",
  25132. "pattern": "^evt_"
  25133. },
  25134. "seq": {
  25135. "type": "number"
  25136. },
  25137. "aggregateID": {
  25138. "type": "string"
  25139. },
  25140. "data": {
  25141. "type": "object",
  25142. "properties": {
  25143. "sessionID": {
  25144. "type": "string",
  25145. "pattern": "^ses"
  25146. },
  25147. "messageID": {
  25148. "type": "string",
  25149. "pattern": "^msg"
  25150. }
  25151. },
  25152. "required": ["sessionID", "messageID"],
  25153. "additionalProperties": false
  25154. }
  25155. },
  25156. "required": ["type", "id", "seq", "aggregateID", "data"],
  25157. "additionalProperties": false
  25158. }
  25159. },
  25160. "required": ["type", "id", "syncEvent"],
  25161. "additionalProperties": false
  25162. },
  25163. "SyncEventMessagePartUpdated": {
  25164. "type": "object",
  25165. "properties": {
  25166. "type": {
  25167. "type": "string",
  25168. "enum": ["sync"]
  25169. },
  25170. "id": {
  25171. "type": "string",
  25172. "pattern": "^evt_"
  25173. },
  25174. "syncEvent": {
  25175. "type": "object",
  25176. "properties": {
  25177. "type": {
  25178. "type": "string",
  25179. "enum": ["message.part.updated.1"]
  25180. },
  25181. "id": {
  25182. "type": "string",
  25183. "pattern": "^evt_"
  25184. },
  25185. "seq": {
  25186. "type": "number"
  25187. },
  25188. "aggregateID": {
  25189. "type": "string"
  25190. },
  25191. "data": {
  25192. "type": "object",
  25193. "properties": {
  25194. "sessionID": {
  25195. "type": "string",
  25196. "pattern": "^ses"
  25197. },
  25198. "part": {
  25199. "$ref": "#/components/schemas/Part"
  25200. },
  25201. "time": {
  25202. "type": "number"
  25203. }
  25204. },
  25205. "required": ["sessionID", "part", "time"],
  25206. "additionalProperties": false
  25207. }
  25208. },
  25209. "required": ["type", "id", "seq", "aggregateID", "data"],
  25210. "additionalProperties": false
  25211. }
  25212. },
  25213. "required": ["type", "id", "syncEvent"],
  25214. "additionalProperties": false
  25215. },
  25216. "SyncEventMessagePartRemoved": {
  25217. "type": "object",
  25218. "properties": {
  25219. "type": {
  25220. "type": "string",
  25221. "enum": ["sync"]
  25222. },
  25223. "id": {
  25224. "type": "string",
  25225. "pattern": "^evt_"
  25226. },
  25227. "syncEvent": {
  25228. "type": "object",
  25229. "properties": {
  25230. "type": {
  25231. "type": "string",
  25232. "enum": ["message.part.removed.1"]
  25233. },
  25234. "id": {
  25235. "type": "string",
  25236. "pattern": "^evt_"
  25237. },
  25238. "seq": {
  25239. "type": "number"
  25240. },
  25241. "aggregateID": {
  25242. "type": "string"
  25243. },
  25244. "data": {
  25245. "type": "object",
  25246. "properties": {
  25247. "sessionID": {
  25248. "type": "string",
  25249. "pattern": "^ses"
  25250. },
  25251. "messageID": {
  25252. "type": "string",
  25253. "pattern": "^msg"
  25254. },
  25255. "partID": {
  25256. "type": "string",
  25257. "pattern": "^prt"
  25258. }
  25259. },
  25260. "required": ["sessionID", "messageID", "partID"],
  25261. "additionalProperties": false
  25262. }
  25263. },
  25264. "required": ["type", "id", "seq", "aggregateID", "data"],
  25265. "additionalProperties": false
  25266. }
  25267. },
  25268. "required": ["type", "id", "syncEvent"],
  25269. "additionalProperties": false
  25270. },
  25271. "SyncEventSessionNextAgentSwitched": {
  25272. "type": "object",
  25273. "properties": {
  25274. "type": {
  25275. "type": "string",
  25276. "enum": ["sync"]
  25277. },
  25278. "id": {
  25279. "type": "string",
  25280. "pattern": "^evt_"
  25281. },
  25282. "syncEvent": {
  25283. "type": "object",
  25284. "properties": {
  25285. "type": {
  25286. "type": "string",
  25287. "enum": ["session.next.agent.switched.1"]
  25288. },
  25289. "id": {
  25290. "type": "string",
  25291. "pattern": "^evt_"
  25292. },
  25293. "seq": {
  25294. "type": "number"
  25295. },
  25296. "aggregateID": {
  25297. "type": "string"
  25298. },
  25299. "data": {
  25300. "type": "object",
  25301. "properties": {
  25302. "timestamp": {
  25303. "type": "number"
  25304. },
  25305. "sessionID": {
  25306. "type": "string",
  25307. "pattern": "^ses"
  25308. },
  25309. "messageID": {
  25310. "type": "string",
  25311. "pattern": "^msg_"
  25312. },
  25313. "agent": {
  25314. "type": "string"
  25315. }
  25316. },
  25317. "required": ["timestamp", "sessionID", "messageID", "agent"],
  25318. "additionalProperties": false
  25319. }
  25320. },
  25321. "required": ["type", "id", "seq", "aggregateID", "data"],
  25322. "additionalProperties": false
  25323. }
  25324. },
  25325. "required": ["type", "id", "syncEvent"],
  25326. "additionalProperties": false
  25327. },
  25328. "SyncEventSessionNextModelSwitched": {
  25329. "type": "object",
  25330. "properties": {
  25331. "type": {
  25332. "type": "string",
  25333. "enum": ["sync"]
  25334. },
  25335. "id": {
  25336. "type": "string",
  25337. "pattern": "^evt_"
  25338. },
  25339. "syncEvent": {
  25340. "type": "object",
  25341. "properties": {
  25342. "type": {
  25343. "type": "string",
  25344. "enum": ["session.next.model.switched.1"]
  25345. },
  25346. "id": {
  25347. "type": "string",
  25348. "pattern": "^evt_"
  25349. },
  25350. "seq": {
  25351. "type": "number"
  25352. },
  25353. "aggregateID": {
  25354. "type": "string"
  25355. },
  25356. "data": {
  25357. "type": "object",
  25358. "properties": {
  25359. "timestamp": {
  25360. "type": "number"
  25361. },
  25362. "sessionID": {
  25363. "type": "string",
  25364. "pattern": "^ses"
  25365. },
  25366. "messageID": {
  25367. "type": "string",
  25368. "pattern": "^msg_"
  25369. },
  25370. "model": {
  25371. "$ref": "#/components/schemas/ModelRef"
  25372. }
  25373. },
  25374. "required": ["timestamp", "sessionID", "messageID", "model"],
  25375. "additionalProperties": false
  25376. }
  25377. },
  25378. "required": ["type", "id", "seq", "aggregateID", "data"],
  25379. "additionalProperties": false
  25380. }
  25381. },
  25382. "required": ["type", "id", "syncEvent"],
  25383. "additionalProperties": false
  25384. },
  25385. "SyncEventSessionNextMoved": {
  25386. "type": "object",
  25387. "properties": {
  25388. "type": {
  25389. "type": "string",
  25390. "enum": ["sync"]
  25391. },
  25392. "id": {
  25393. "type": "string",
  25394. "pattern": "^evt_"
  25395. },
  25396. "syncEvent": {
  25397. "type": "object",
  25398. "properties": {
  25399. "type": {
  25400. "type": "string",
  25401. "enum": ["session.next.moved.1"]
  25402. },
  25403. "id": {
  25404. "type": "string",
  25405. "pattern": "^evt_"
  25406. },
  25407. "seq": {
  25408. "type": "number"
  25409. },
  25410. "aggregateID": {
  25411. "type": "string"
  25412. },
  25413. "data": {
  25414. "type": "object",
  25415. "properties": {
  25416. "timestamp": {
  25417. "type": "number"
  25418. },
  25419. "sessionID": {
  25420. "type": "string",
  25421. "pattern": "^ses"
  25422. },
  25423. "location": {
  25424. "$ref": "#/components/schemas/LocationRef"
  25425. },
  25426. "subdirectory": {
  25427. "type": "string"
  25428. }
  25429. },
  25430. "required": ["timestamp", "sessionID", "location"],
  25431. "additionalProperties": false
  25432. }
  25433. },
  25434. "required": ["type", "id", "seq", "aggregateID", "data"],
  25435. "additionalProperties": false
  25436. }
  25437. },
  25438. "required": ["type", "id", "syncEvent"],
  25439. "additionalProperties": false
  25440. },
  25441. "SyncEventSessionNextPrompted": {
  25442. "type": "object",
  25443. "properties": {
  25444. "type": {
  25445. "type": "string",
  25446. "enum": ["sync"]
  25447. },
  25448. "id": {
  25449. "type": "string",
  25450. "pattern": "^evt_"
  25451. },
  25452. "syncEvent": {
  25453. "type": "object",
  25454. "properties": {
  25455. "type": {
  25456. "type": "string",
  25457. "enum": ["session.next.prompted.1"]
  25458. },
  25459. "id": {
  25460. "type": "string",
  25461. "pattern": "^evt_"
  25462. },
  25463. "seq": {
  25464. "type": "number"
  25465. },
  25466. "aggregateID": {
  25467. "type": "string"
  25468. },
  25469. "data": {
  25470. "type": "object",
  25471. "properties": {
  25472. "timestamp": {
  25473. "type": "number"
  25474. },
  25475. "sessionID": {
  25476. "type": "string",
  25477. "pattern": "^ses"
  25478. },
  25479. "messageID": {
  25480. "type": "string",
  25481. "pattern": "^msg_"
  25482. },
  25483. "prompt": {
  25484. "$ref": "#/components/schemas/Prompt"
  25485. },
  25486. "delivery": {
  25487. "type": "string",
  25488. "enum": ["steer", "queue"]
  25489. }
  25490. },
  25491. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25492. "additionalProperties": false
  25493. }
  25494. },
  25495. "required": ["type", "id", "seq", "aggregateID", "data"],
  25496. "additionalProperties": false
  25497. }
  25498. },
  25499. "required": ["type", "id", "syncEvent"],
  25500. "additionalProperties": false
  25501. },
  25502. "SyncEventSessionNextPromptAdmitted": {
  25503. "type": "object",
  25504. "properties": {
  25505. "type": {
  25506. "type": "string",
  25507. "enum": ["sync"]
  25508. },
  25509. "id": {
  25510. "type": "string",
  25511. "pattern": "^evt_"
  25512. },
  25513. "syncEvent": {
  25514. "type": "object",
  25515. "properties": {
  25516. "type": {
  25517. "type": "string",
  25518. "enum": ["session.next.prompt.admitted.1"]
  25519. },
  25520. "id": {
  25521. "type": "string",
  25522. "pattern": "^evt_"
  25523. },
  25524. "seq": {
  25525. "type": "number"
  25526. },
  25527. "aggregateID": {
  25528. "type": "string"
  25529. },
  25530. "data": {
  25531. "type": "object",
  25532. "properties": {
  25533. "timestamp": {
  25534. "type": "number"
  25535. },
  25536. "sessionID": {
  25537. "type": "string",
  25538. "pattern": "^ses"
  25539. },
  25540. "messageID": {
  25541. "type": "string",
  25542. "pattern": "^msg_"
  25543. },
  25544. "prompt": {
  25545. "$ref": "#/components/schemas/Prompt"
  25546. },
  25547. "delivery": {
  25548. "type": "string",
  25549. "enum": ["steer", "queue"]
  25550. }
  25551. },
  25552. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  25553. "additionalProperties": false
  25554. }
  25555. },
  25556. "required": ["type", "id", "seq", "aggregateID", "data"],
  25557. "additionalProperties": false
  25558. }
  25559. },
  25560. "required": ["type", "id", "syncEvent"],
  25561. "additionalProperties": false
  25562. },
  25563. "SyncEventSessionNextContextUpdated": {
  25564. "type": "object",
  25565. "properties": {
  25566. "type": {
  25567. "type": "string",
  25568. "enum": ["sync"]
  25569. },
  25570. "id": {
  25571. "type": "string",
  25572. "pattern": "^evt_"
  25573. },
  25574. "syncEvent": {
  25575. "type": "object",
  25576. "properties": {
  25577. "type": {
  25578. "type": "string",
  25579. "enum": ["session.next.context.updated.1"]
  25580. },
  25581. "id": {
  25582. "type": "string",
  25583. "pattern": "^evt_"
  25584. },
  25585. "seq": {
  25586. "type": "number"
  25587. },
  25588. "aggregateID": {
  25589. "type": "string"
  25590. },
  25591. "data": {
  25592. "type": "object",
  25593. "properties": {
  25594. "timestamp": {
  25595. "type": "number"
  25596. },
  25597. "sessionID": {
  25598. "type": "string",
  25599. "pattern": "^ses"
  25600. },
  25601. "messageID": {
  25602. "type": "string",
  25603. "pattern": "^msg_"
  25604. },
  25605. "text": {
  25606. "type": "string"
  25607. }
  25608. },
  25609. "required": ["timestamp", "sessionID", "messageID", "text"],
  25610. "additionalProperties": false
  25611. }
  25612. },
  25613. "required": ["type", "id", "seq", "aggregateID", "data"],
  25614. "additionalProperties": false
  25615. }
  25616. },
  25617. "required": ["type", "id", "syncEvent"],
  25618. "additionalProperties": false
  25619. },
  25620. "SyncEventSessionNextSynthetic": {
  25621. "type": "object",
  25622. "properties": {
  25623. "type": {
  25624. "type": "string",
  25625. "enum": ["sync"]
  25626. },
  25627. "id": {
  25628. "type": "string",
  25629. "pattern": "^evt_"
  25630. },
  25631. "syncEvent": {
  25632. "type": "object",
  25633. "properties": {
  25634. "type": {
  25635. "type": "string",
  25636. "enum": ["session.next.synthetic.1"]
  25637. },
  25638. "id": {
  25639. "type": "string",
  25640. "pattern": "^evt_"
  25641. },
  25642. "seq": {
  25643. "type": "number"
  25644. },
  25645. "aggregateID": {
  25646. "type": "string"
  25647. },
  25648. "data": {
  25649. "type": "object",
  25650. "properties": {
  25651. "timestamp": {
  25652. "type": "number"
  25653. },
  25654. "sessionID": {
  25655. "type": "string",
  25656. "pattern": "^ses"
  25657. },
  25658. "messageID": {
  25659. "type": "string",
  25660. "pattern": "^msg_"
  25661. },
  25662. "text": {
  25663. "type": "string"
  25664. }
  25665. },
  25666. "required": ["timestamp", "sessionID", "messageID", "text"],
  25667. "additionalProperties": false
  25668. }
  25669. },
  25670. "required": ["type", "id", "seq", "aggregateID", "data"],
  25671. "additionalProperties": false
  25672. }
  25673. },
  25674. "required": ["type", "id", "syncEvent"],
  25675. "additionalProperties": false
  25676. },
  25677. "SyncEventSessionNextShellStarted": {
  25678. "type": "object",
  25679. "properties": {
  25680. "type": {
  25681. "type": "string",
  25682. "enum": ["sync"]
  25683. },
  25684. "id": {
  25685. "type": "string",
  25686. "pattern": "^evt_"
  25687. },
  25688. "syncEvent": {
  25689. "type": "object",
  25690. "properties": {
  25691. "type": {
  25692. "type": "string",
  25693. "enum": ["session.next.shell.started.1"]
  25694. },
  25695. "id": {
  25696. "type": "string",
  25697. "pattern": "^evt_"
  25698. },
  25699. "seq": {
  25700. "type": "number"
  25701. },
  25702. "aggregateID": {
  25703. "type": "string"
  25704. },
  25705. "data": {
  25706. "type": "object",
  25707. "properties": {
  25708. "timestamp": {
  25709. "type": "number"
  25710. },
  25711. "sessionID": {
  25712. "type": "string",
  25713. "pattern": "^ses"
  25714. },
  25715. "messageID": {
  25716. "type": "string",
  25717. "pattern": "^msg_"
  25718. },
  25719. "callID": {
  25720. "type": "string"
  25721. },
  25722. "command": {
  25723. "type": "string"
  25724. }
  25725. },
  25726. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25727. "additionalProperties": false
  25728. }
  25729. },
  25730. "required": ["type", "id", "seq", "aggregateID", "data"],
  25731. "additionalProperties": false
  25732. }
  25733. },
  25734. "required": ["type", "id", "syncEvent"],
  25735. "additionalProperties": false
  25736. },
  25737. "SyncEventSessionNextShellEnded": {
  25738. "type": "object",
  25739. "properties": {
  25740. "type": {
  25741. "type": "string",
  25742. "enum": ["sync"]
  25743. },
  25744. "id": {
  25745. "type": "string",
  25746. "pattern": "^evt_"
  25747. },
  25748. "syncEvent": {
  25749. "type": "object",
  25750. "properties": {
  25751. "type": {
  25752. "type": "string",
  25753. "enum": ["session.next.shell.ended.1"]
  25754. },
  25755. "id": {
  25756. "type": "string",
  25757. "pattern": "^evt_"
  25758. },
  25759. "seq": {
  25760. "type": "number"
  25761. },
  25762. "aggregateID": {
  25763. "type": "string"
  25764. },
  25765. "data": {
  25766. "type": "object",
  25767. "properties": {
  25768. "timestamp": {
  25769. "type": "number"
  25770. },
  25771. "sessionID": {
  25772. "type": "string",
  25773. "pattern": "^ses"
  25774. },
  25775. "callID": {
  25776. "type": "string"
  25777. },
  25778. "output": {
  25779. "type": "string"
  25780. }
  25781. },
  25782. "required": ["timestamp", "sessionID", "callID", "output"],
  25783. "additionalProperties": false
  25784. }
  25785. },
  25786. "required": ["type", "id", "seq", "aggregateID", "data"],
  25787. "additionalProperties": false
  25788. }
  25789. },
  25790. "required": ["type", "id", "syncEvent"],
  25791. "additionalProperties": false
  25792. },
  25793. "SyncEventSessionNextStepStarted": {
  25794. "type": "object",
  25795. "properties": {
  25796. "type": {
  25797. "type": "string",
  25798. "enum": ["sync"]
  25799. },
  25800. "id": {
  25801. "type": "string",
  25802. "pattern": "^evt_"
  25803. },
  25804. "syncEvent": {
  25805. "type": "object",
  25806. "properties": {
  25807. "type": {
  25808. "type": "string",
  25809. "enum": ["session.next.step.started.1"]
  25810. },
  25811. "id": {
  25812. "type": "string",
  25813. "pattern": "^evt_"
  25814. },
  25815. "seq": {
  25816. "type": "number"
  25817. },
  25818. "aggregateID": {
  25819. "type": "string"
  25820. },
  25821. "data": {
  25822. "type": "object",
  25823. "properties": {
  25824. "timestamp": {
  25825. "type": "number"
  25826. },
  25827. "sessionID": {
  25828. "type": "string",
  25829. "pattern": "^ses"
  25830. },
  25831. "assistantMessageID": {
  25832. "type": "string",
  25833. "pattern": "^msg_"
  25834. },
  25835. "agent": {
  25836. "type": "string"
  25837. },
  25838. "model": {
  25839. "$ref": "#/components/schemas/ModelRef"
  25840. },
  25841. "snapshot": {
  25842. "type": "string"
  25843. }
  25844. },
  25845. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25846. "additionalProperties": false
  25847. }
  25848. },
  25849. "required": ["type", "id", "seq", "aggregateID", "data"],
  25850. "additionalProperties": false
  25851. }
  25852. },
  25853. "required": ["type", "id", "syncEvent"],
  25854. "additionalProperties": false
  25855. },
  25856. "SyncEventSessionNextStepEnded": {
  25857. "type": "object",
  25858. "properties": {
  25859. "type": {
  25860. "type": "string",
  25861. "enum": ["sync"]
  25862. },
  25863. "id": {
  25864. "type": "string",
  25865. "pattern": "^evt_"
  25866. },
  25867. "syncEvent": {
  25868. "type": "object",
  25869. "properties": {
  25870. "type": {
  25871. "type": "string",
  25872. "enum": ["session.next.step.ended.2"]
  25873. },
  25874. "id": {
  25875. "type": "string",
  25876. "pattern": "^evt_"
  25877. },
  25878. "seq": {
  25879. "type": "number"
  25880. },
  25881. "aggregateID": {
  25882. "type": "string"
  25883. },
  25884. "data": {
  25885. "type": "object",
  25886. "properties": {
  25887. "timestamp": {
  25888. "type": "number"
  25889. },
  25890. "sessionID": {
  25891. "type": "string",
  25892. "pattern": "^ses"
  25893. },
  25894. "assistantMessageID": {
  25895. "type": "string",
  25896. "pattern": "^msg_"
  25897. },
  25898. "finish": {
  25899. "type": "string"
  25900. },
  25901. "cost": {
  25902. "type": "number"
  25903. },
  25904. "tokens": {
  25905. "type": "object",
  25906. "properties": {
  25907. "input": {
  25908. "type": "number"
  25909. },
  25910. "output": {
  25911. "type": "number"
  25912. },
  25913. "reasoning": {
  25914. "type": "number"
  25915. },
  25916. "cache": {
  25917. "type": "object",
  25918. "properties": {
  25919. "read": {
  25920. "type": "number"
  25921. },
  25922. "write": {
  25923. "type": "number"
  25924. }
  25925. },
  25926. "required": ["read", "write"],
  25927. "additionalProperties": false
  25928. }
  25929. },
  25930. "required": ["input", "output", "reasoning", "cache"],
  25931. "additionalProperties": false
  25932. },
  25933. "snapshot": {
  25934. "type": "string"
  25935. },
  25936. "files": {
  25937. "type": "array",
  25938. "items": {
  25939. "type": "string"
  25940. }
  25941. }
  25942. },
  25943. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25944. "additionalProperties": false
  25945. }
  25946. },
  25947. "required": ["type", "id", "seq", "aggregateID", "data"],
  25948. "additionalProperties": false
  25949. }
  25950. },
  25951. "required": ["type", "id", "syncEvent"],
  25952. "additionalProperties": false
  25953. },
  25954. "SyncEventSessionNextStepFailed": {
  25955. "type": "object",
  25956. "properties": {
  25957. "type": {
  25958. "type": "string",
  25959. "enum": ["sync"]
  25960. },
  25961. "id": {
  25962. "type": "string",
  25963. "pattern": "^evt_"
  25964. },
  25965. "syncEvent": {
  25966. "type": "object",
  25967. "properties": {
  25968. "type": {
  25969. "type": "string",
  25970. "enum": ["session.next.step.failed.2"]
  25971. },
  25972. "id": {
  25973. "type": "string",
  25974. "pattern": "^evt_"
  25975. },
  25976. "seq": {
  25977. "type": "number"
  25978. },
  25979. "aggregateID": {
  25980. "type": "string"
  25981. },
  25982. "data": {
  25983. "type": "object",
  25984. "properties": {
  25985. "timestamp": {
  25986. "type": "number"
  25987. },
  25988. "sessionID": {
  25989. "type": "string",
  25990. "pattern": "^ses"
  25991. },
  25992. "assistantMessageID": {
  25993. "type": "string",
  25994. "pattern": "^msg_"
  25995. },
  25996. "error": {
  25997. "$ref": "#/components/schemas/SessionErrorUnknown"
  25998. }
  25999. },
  26000. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  26001. "additionalProperties": false
  26002. }
  26003. },
  26004. "required": ["type", "id", "seq", "aggregateID", "data"],
  26005. "additionalProperties": false
  26006. }
  26007. },
  26008. "required": ["type", "id", "syncEvent"],
  26009. "additionalProperties": false
  26010. },
  26011. "SyncEventSessionNextTextStarted": {
  26012. "type": "object",
  26013. "properties": {
  26014. "type": {
  26015. "type": "string",
  26016. "enum": ["sync"]
  26017. },
  26018. "id": {
  26019. "type": "string",
  26020. "pattern": "^evt_"
  26021. },
  26022. "syncEvent": {
  26023. "type": "object",
  26024. "properties": {
  26025. "type": {
  26026. "type": "string",
  26027. "enum": ["session.next.text.started.1"]
  26028. },
  26029. "id": {
  26030. "type": "string",
  26031. "pattern": "^evt_"
  26032. },
  26033. "seq": {
  26034. "type": "number"
  26035. },
  26036. "aggregateID": {
  26037. "type": "string"
  26038. },
  26039. "data": {
  26040. "type": "object",
  26041. "properties": {
  26042. "timestamp": {
  26043. "type": "number"
  26044. },
  26045. "sessionID": {
  26046. "type": "string",
  26047. "pattern": "^ses"
  26048. },
  26049. "assistantMessageID": {
  26050. "type": "string",
  26051. "pattern": "^msg_"
  26052. },
  26053. "textID": {
  26054. "type": "string"
  26055. }
  26056. },
  26057. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  26058. "additionalProperties": false
  26059. }
  26060. },
  26061. "required": ["type", "id", "seq", "aggregateID", "data"],
  26062. "additionalProperties": false
  26063. }
  26064. },
  26065. "required": ["type", "id", "syncEvent"],
  26066. "additionalProperties": false
  26067. },
  26068. "SyncEventSessionNextTextEnded": {
  26069. "type": "object",
  26070. "properties": {
  26071. "type": {
  26072. "type": "string",
  26073. "enum": ["sync"]
  26074. },
  26075. "id": {
  26076. "type": "string",
  26077. "pattern": "^evt_"
  26078. },
  26079. "syncEvent": {
  26080. "type": "object",
  26081. "properties": {
  26082. "type": {
  26083. "type": "string",
  26084. "enum": ["session.next.text.ended.1"]
  26085. },
  26086. "id": {
  26087. "type": "string",
  26088. "pattern": "^evt_"
  26089. },
  26090. "seq": {
  26091. "type": "number"
  26092. },
  26093. "aggregateID": {
  26094. "type": "string"
  26095. },
  26096. "data": {
  26097. "type": "object",
  26098. "properties": {
  26099. "timestamp": {
  26100. "type": "number"
  26101. },
  26102. "sessionID": {
  26103. "type": "string",
  26104. "pattern": "^ses"
  26105. },
  26106. "assistantMessageID": {
  26107. "type": "string",
  26108. "pattern": "^msg_"
  26109. },
  26110. "textID": {
  26111. "type": "string"
  26112. },
  26113. "text": {
  26114. "type": "string"
  26115. }
  26116. },
  26117. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  26118. "additionalProperties": false
  26119. }
  26120. },
  26121. "required": ["type", "id", "seq", "aggregateID", "data"],
  26122. "additionalProperties": false
  26123. }
  26124. },
  26125. "required": ["type", "id", "syncEvent"],
  26126. "additionalProperties": false
  26127. },
  26128. "SyncEventSessionNextReasoningStarted": {
  26129. "type": "object",
  26130. "properties": {
  26131. "type": {
  26132. "type": "string",
  26133. "enum": ["sync"]
  26134. },
  26135. "id": {
  26136. "type": "string",
  26137. "pattern": "^evt_"
  26138. },
  26139. "syncEvent": {
  26140. "type": "object",
  26141. "properties": {
  26142. "type": {
  26143. "type": "string",
  26144. "enum": ["session.next.reasoning.started.1"]
  26145. },
  26146. "id": {
  26147. "type": "string",
  26148. "pattern": "^evt_"
  26149. },
  26150. "seq": {
  26151. "type": "number"
  26152. },
  26153. "aggregateID": {
  26154. "type": "string"
  26155. },
  26156. "data": {
  26157. "type": "object",
  26158. "properties": {
  26159. "timestamp": {
  26160. "type": "number"
  26161. },
  26162. "sessionID": {
  26163. "type": "string",
  26164. "pattern": "^ses"
  26165. },
  26166. "assistantMessageID": {
  26167. "type": "string",
  26168. "pattern": "^msg_"
  26169. },
  26170. "reasoningID": {
  26171. "type": "string"
  26172. },
  26173. "providerMetadata": {
  26174. "$ref": "#/components/schemas/LLMProviderMetadata"
  26175. }
  26176. },
  26177. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  26178. "additionalProperties": false
  26179. }
  26180. },
  26181. "required": ["type", "id", "seq", "aggregateID", "data"],
  26182. "additionalProperties": false
  26183. }
  26184. },
  26185. "required": ["type", "id", "syncEvent"],
  26186. "additionalProperties": false
  26187. },
  26188. "SyncEventSessionNextReasoningEnded": {
  26189. "type": "object",
  26190. "properties": {
  26191. "type": {
  26192. "type": "string",
  26193. "enum": ["sync"]
  26194. },
  26195. "id": {
  26196. "type": "string",
  26197. "pattern": "^evt_"
  26198. },
  26199. "syncEvent": {
  26200. "type": "object",
  26201. "properties": {
  26202. "type": {
  26203. "type": "string",
  26204. "enum": ["session.next.reasoning.ended.1"]
  26205. },
  26206. "id": {
  26207. "type": "string",
  26208. "pattern": "^evt_"
  26209. },
  26210. "seq": {
  26211. "type": "number"
  26212. },
  26213. "aggregateID": {
  26214. "type": "string"
  26215. },
  26216. "data": {
  26217. "type": "object",
  26218. "properties": {
  26219. "timestamp": {
  26220. "type": "number"
  26221. },
  26222. "sessionID": {
  26223. "type": "string",
  26224. "pattern": "^ses"
  26225. },
  26226. "assistantMessageID": {
  26227. "type": "string",
  26228. "pattern": "^msg_"
  26229. },
  26230. "reasoningID": {
  26231. "type": "string"
  26232. },
  26233. "text": {
  26234. "type": "string"
  26235. },
  26236. "providerMetadata": {
  26237. "$ref": "#/components/schemas/LLMProviderMetadata"
  26238. }
  26239. },
  26240. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  26241. "additionalProperties": false
  26242. }
  26243. },
  26244. "required": ["type", "id", "seq", "aggregateID", "data"],
  26245. "additionalProperties": false
  26246. }
  26247. },
  26248. "required": ["type", "id", "syncEvent"],
  26249. "additionalProperties": false
  26250. },
  26251. "SyncEventSessionNextToolInputStarted": {
  26252. "type": "object",
  26253. "properties": {
  26254. "type": {
  26255. "type": "string",
  26256. "enum": ["sync"]
  26257. },
  26258. "id": {
  26259. "type": "string",
  26260. "pattern": "^evt_"
  26261. },
  26262. "syncEvent": {
  26263. "type": "object",
  26264. "properties": {
  26265. "type": {
  26266. "type": "string",
  26267. "enum": ["session.next.tool.input.started.1"]
  26268. },
  26269. "id": {
  26270. "type": "string",
  26271. "pattern": "^evt_"
  26272. },
  26273. "seq": {
  26274. "type": "number"
  26275. },
  26276. "aggregateID": {
  26277. "type": "string"
  26278. },
  26279. "data": {
  26280. "type": "object",
  26281. "properties": {
  26282. "timestamp": {
  26283. "type": "number"
  26284. },
  26285. "sessionID": {
  26286. "type": "string",
  26287. "pattern": "^ses"
  26288. },
  26289. "assistantMessageID": {
  26290. "type": "string",
  26291. "pattern": "^msg_"
  26292. },
  26293. "callID": {
  26294. "type": "string"
  26295. },
  26296. "name": {
  26297. "type": "string"
  26298. }
  26299. },
  26300. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  26301. "additionalProperties": false
  26302. }
  26303. },
  26304. "required": ["type", "id", "seq", "aggregateID", "data"],
  26305. "additionalProperties": false
  26306. }
  26307. },
  26308. "required": ["type", "id", "syncEvent"],
  26309. "additionalProperties": false
  26310. },
  26311. "SyncEventSessionNextToolInputEnded": {
  26312. "type": "object",
  26313. "properties": {
  26314. "type": {
  26315. "type": "string",
  26316. "enum": ["sync"]
  26317. },
  26318. "id": {
  26319. "type": "string",
  26320. "pattern": "^evt_"
  26321. },
  26322. "syncEvent": {
  26323. "type": "object",
  26324. "properties": {
  26325. "type": {
  26326. "type": "string",
  26327. "enum": ["session.next.tool.input.ended.1"]
  26328. },
  26329. "id": {
  26330. "type": "string",
  26331. "pattern": "^evt_"
  26332. },
  26333. "seq": {
  26334. "type": "number"
  26335. },
  26336. "aggregateID": {
  26337. "type": "string"
  26338. },
  26339. "data": {
  26340. "type": "object",
  26341. "properties": {
  26342. "timestamp": {
  26343. "type": "number"
  26344. },
  26345. "sessionID": {
  26346. "type": "string",
  26347. "pattern": "^ses"
  26348. },
  26349. "assistantMessageID": {
  26350. "type": "string",
  26351. "pattern": "^msg_"
  26352. },
  26353. "callID": {
  26354. "type": "string"
  26355. },
  26356. "text": {
  26357. "type": "string"
  26358. }
  26359. },
  26360. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  26361. "additionalProperties": false
  26362. }
  26363. },
  26364. "required": ["type", "id", "seq", "aggregateID", "data"],
  26365. "additionalProperties": false
  26366. }
  26367. },
  26368. "required": ["type", "id", "syncEvent"],
  26369. "additionalProperties": false
  26370. },
  26371. "SyncEventSessionNextToolCalled": {
  26372. "type": "object",
  26373. "properties": {
  26374. "type": {
  26375. "type": "string",
  26376. "enum": ["sync"]
  26377. },
  26378. "id": {
  26379. "type": "string",
  26380. "pattern": "^evt_"
  26381. },
  26382. "syncEvent": {
  26383. "type": "object",
  26384. "properties": {
  26385. "type": {
  26386. "type": "string",
  26387. "enum": ["session.next.tool.called.1"]
  26388. },
  26389. "id": {
  26390. "type": "string",
  26391. "pattern": "^evt_"
  26392. },
  26393. "seq": {
  26394. "type": "number"
  26395. },
  26396. "aggregateID": {
  26397. "type": "string"
  26398. },
  26399. "data": {
  26400. "type": "object",
  26401. "properties": {
  26402. "timestamp": {
  26403. "type": "number"
  26404. },
  26405. "sessionID": {
  26406. "type": "string",
  26407. "pattern": "^ses"
  26408. },
  26409. "assistantMessageID": {
  26410. "type": "string",
  26411. "pattern": "^msg_"
  26412. },
  26413. "callID": {
  26414. "type": "string"
  26415. },
  26416. "tool": {
  26417. "type": "string"
  26418. },
  26419. "input": {
  26420. "type": "object"
  26421. },
  26422. "provider": {
  26423. "type": "object",
  26424. "properties": {
  26425. "executed": {
  26426. "type": "boolean"
  26427. },
  26428. "metadata": {
  26429. "$ref": "#/components/schemas/LLMProviderMetadata"
  26430. }
  26431. },
  26432. "required": ["executed"],
  26433. "additionalProperties": false
  26434. }
  26435. },
  26436. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  26437. "additionalProperties": false
  26438. }
  26439. },
  26440. "required": ["type", "id", "seq", "aggregateID", "data"],
  26441. "additionalProperties": false
  26442. }
  26443. },
  26444. "required": ["type", "id", "syncEvent"],
  26445. "additionalProperties": false
  26446. },
  26447. "SyncEventSessionNextToolProgress": {
  26448. "type": "object",
  26449. "properties": {
  26450. "type": {
  26451. "type": "string",
  26452. "enum": ["sync"]
  26453. },
  26454. "id": {
  26455. "type": "string",
  26456. "pattern": "^evt_"
  26457. },
  26458. "syncEvent": {
  26459. "type": "object",
  26460. "properties": {
  26461. "type": {
  26462. "type": "string",
  26463. "enum": ["session.next.tool.progress.1"]
  26464. },
  26465. "id": {
  26466. "type": "string",
  26467. "pattern": "^evt_"
  26468. },
  26469. "seq": {
  26470. "type": "number"
  26471. },
  26472. "aggregateID": {
  26473. "type": "string"
  26474. },
  26475. "data": {
  26476. "type": "object",
  26477. "properties": {
  26478. "timestamp": {
  26479. "type": "number"
  26480. },
  26481. "sessionID": {
  26482. "type": "string",
  26483. "pattern": "^ses"
  26484. },
  26485. "assistantMessageID": {
  26486. "type": "string",
  26487. "pattern": "^msg_"
  26488. },
  26489. "callID": {
  26490. "type": "string"
  26491. },
  26492. "structured": {
  26493. "type": "object"
  26494. },
  26495. "content": {
  26496. "type": "array",
  26497. "items": {
  26498. "$ref": "#/components/schemas/LLMToolContent"
  26499. }
  26500. }
  26501. },
  26502. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  26503. "additionalProperties": false
  26504. }
  26505. },
  26506. "required": ["type", "id", "seq", "aggregateID", "data"],
  26507. "additionalProperties": false
  26508. }
  26509. },
  26510. "required": ["type", "id", "syncEvent"],
  26511. "additionalProperties": false
  26512. },
  26513. "SyncEventSessionNextToolSuccess": {
  26514. "type": "object",
  26515. "properties": {
  26516. "type": {
  26517. "type": "string",
  26518. "enum": ["sync"]
  26519. },
  26520. "id": {
  26521. "type": "string",
  26522. "pattern": "^evt_"
  26523. },
  26524. "syncEvent": {
  26525. "type": "object",
  26526. "properties": {
  26527. "type": {
  26528. "type": "string",
  26529. "enum": ["session.next.tool.success.1"]
  26530. },
  26531. "id": {
  26532. "type": "string",
  26533. "pattern": "^evt_"
  26534. },
  26535. "seq": {
  26536. "type": "number"
  26537. },
  26538. "aggregateID": {
  26539. "type": "string"
  26540. },
  26541. "data": {
  26542. "type": "object",
  26543. "properties": {
  26544. "timestamp": {
  26545. "type": "number"
  26546. },
  26547. "sessionID": {
  26548. "type": "string",
  26549. "pattern": "^ses"
  26550. },
  26551. "assistantMessageID": {
  26552. "type": "string",
  26553. "pattern": "^msg_"
  26554. },
  26555. "callID": {
  26556. "type": "string"
  26557. },
  26558. "structured": {
  26559. "type": "object"
  26560. },
  26561. "content": {
  26562. "type": "array",
  26563. "items": {
  26564. "$ref": "#/components/schemas/LLMToolContent"
  26565. }
  26566. },
  26567. "outputPaths": {
  26568. "type": "array",
  26569. "items": {
  26570. "type": "string"
  26571. }
  26572. },
  26573. "result": {},
  26574. "provider": {
  26575. "type": "object",
  26576. "properties": {
  26577. "executed": {
  26578. "type": "boolean"
  26579. },
  26580. "metadata": {
  26581. "$ref": "#/components/schemas/LLMProviderMetadata"
  26582. }
  26583. },
  26584. "required": ["executed"],
  26585. "additionalProperties": false
  26586. }
  26587. },
  26588. "required": [
  26589. "timestamp",
  26590. "sessionID",
  26591. "assistantMessageID",
  26592. "callID",
  26593. "structured",
  26594. "content",
  26595. "provider"
  26596. ],
  26597. "additionalProperties": false
  26598. }
  26599. },
  26600. "required": ["type", "id", "seq", "aggregateID", "data"],
  26601. "additionalProperties": false
  26602. }
  26603. },
  26604. "required": ["type", "id", "syncEvent"],
  26605. "additionalProperties": false
  26606. },
  26607. "SyncEventSessionNextToolFailed": {
  26608. "type": "object",
  26609. "properties": {
  26610. "type": {
  26611. "type": "string",
  26612. "enum": ["sync"]
  26613. },
  26614. "id": {
  26615. "type": "string",
  26616. "pattern": "^evt_"
  26617. },
  26618. "syncEvent": {
  26619. "type": "object",
  26620. "properties": {
  26621. "type": {
  26622. "type": "string",
  26623. "enum": ["session.next.tool.failed.1"]
  26624. },
  26625. "id": {
  26626. "type": "string",
  26627. "pattern": "^evt_"
  26628. },
  26629. "seq": {
  26630. "type": "number"
  26631. },
  26632. "aggregateID": {
  26633. "type": "string"
  26634. },
  26635. "data": {
  26636. "type": "object",
  26637. "properties": {
  26638. "timestamp": {
  26639. "type": "number"
  26640. },
  26641. "sessionID": {
  26642. "type": "string",
  26643. "pattern": "^ses"
  26644. },
  26645. "assistantMessageID": {
  26646. "type": "string",
  26647. "pattern": "^msg_"
  26648. },
  26649. "callID": {
  26650. "type": "string"
  26651. },
  26652. "error": {
  26653. "$ref": "#/components/schemas/SessionErrorUnknown"
  26654. },
  26655. "result": {},
  26656. "provider": {
  26657. "type": "object",
  26658. "properties": {
  26659. "executed": {
  26660. "type": "boolean"
  26661. },
  26662. "metadata": {
  26663. "$ref": "#/components/schemas/LLMProviderMetadata"
  26664. }
  26665. },
  26666. "required": ["executed"],
  26667. "additionalProperties": false
  26668. }
  26669. },
  26670. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  26671. "additionalProperties": false
  26672. }
  26673. },
  26674. "required": ["type", "id", "seq", "aggregateID", "data"],
  26675. "additionalProperties": false
  26676. }
  26677. },
  26678. "required": ["type", "id", "syncEvent"],
  26679. "additionalProperties": false
  26680. },
  26681. "SyncEventSessionNextRetried": {
  26682. "type": "object",
  26683. "properties": {
  26684. "type": {
  26685. "type": "string",
  26686. "enum": ["sync"]
  26687. },
  26688. "id": {
  26689. "type": "string",
  26690. "pattern": "^evt_"
  26691. },
  26692. "syncEvent": {
  26693. "type": "object",
  26694. "properties": {
  26695. "type": {
  26696. "type": "string",
  26697. "enum": ["session.next.retried.1"]
  26698. },
  26699. "id": {
  26700. "type": "string",
  26701. "pattern": "^evt_"
  26702. },
  26703. "seq": {
  26704. "type": "number"
  26705. },
  26706. "aggregateID": {
  26707. "type": "string"
  26708. },
  26709. "data": {
  26710. "type": "object",
  26711. "properties": {
  26712. "timestamp": {
  26713. "type": "number"
  26714. },
  26715. "sessionID": {
  26716. "type": "string",
  26717. "pattern": "^ses"
  26718. },
  26719. "attempt": {
  26720. "type": "number"
  26721. },
  26722. "error": {
  26723. "$ref": "#/components/schemas/SessionNextRetry_error"
  26724. }
  26725. },
  26726. "required": ["timestamp", "sessionID", "attempt", "error"],
  26727. "additionalProperties": false
  26728. }
  26729. },
  26730. "required": ["type", "id", "seq", "aggregateID", "data"],
  26731. "additionalProperties": false
  26732. }
  26733. },
  26734. "required": ["type", "id", "syncEvent"],
  26735. "additionalProperties": false
  26736. },
  26737. "SyncEventSessionNextCompactionStarted": {
  26738. "type": "object",
  26739. "properties": {
  26740. "type": {
  26741. "type": "string",
  26742. "enum": ["sync"]
  26743. },
  26744. "id": {
  26745. "type": "string",
  26746. "pattern": "^evt_"
  26747. },
  26748. "syncEvent": {
  26749. "type": "object",
  26750. "properties": {
  26751. "type": {
  26752. "type": "string",
  26753. "enum": ["session.next.compaction.started.1"]
  26754. },
  26755. "id": {
  26756. "type": "string",
  26757. "pattern": "^evt_"
  26758. },
  26759. "seq": {
  26760. "type": "number"
  26761. },
  26762. "aggregateID": {
  26763. "type": "string"
  26764. },
  26765. "data": {
  26766. "type": "object",
  26767. "properties": {
  26768. "timestamp": {
  26769. "type": "number"
  26770. },
  26771. "sessionID": {
  26772. "type": "string",
  26773. "pattern": "^ses"
  26774. },
  26775. "messageID": {
  26776. "type": "string",
  26777. "pattern": "^msg_"
  26778. },
  26779. "reason": {
  26780. "type": "string",
  26781. "enum": ["auto", "manual"]
  26782. }
  26783. },
  26784. "required": ["timestamp", "sessionID", "messageID", "reason"],
  26785. "additionalProperties": false
  26786. }
  26787. },
  26788. "required": ["type", "id", "seq", "aggregateID", "data"],
  26789. "additionalProperties": false
  26790. }
  26791. },
  26792. "required": ["type", "id", "syncEvent"],
  26793. "additionalProperties": false
  26794. },
  26795. "SyncEventSessionNextCompactionEnded": {
  26796. "type": "object",
  26797. "properties": {
  26798. "type": {
  26799. "type": "string",
  26800. "enum": ["sync"]
  26801. },
  26802. "id": {
  26803. "type": "string",
  26804. "pattern": "^evt_"
  26805. },
  26806. "syncEvent": {
  26807. "type": "object",
  26808. "properties": {
  26809. "type": {
  26810. "type": "string",
  26811. "enum": ["session.next.compaction.ended.1"]
  26812. },
  26813. "id": {
  26814. "type": "string",
  26815. "pattern": "^evt_"
  26816. },
  26817. "seq": {
  26818. "type": "number"
  26819. },
  26820. "aggregateID": {
  26821. "type": "string"
  26822. },
  26823. "data": {
  26824. "type": "object",
  26825. "properties": {
  26826. "timestamp": {
  26827. "type": "number"
  26828. },
  26829. "sessionID": {
  26830. "type": "string",
  26831. "pattern": "^ses"
  26832. },
  26833. "messageID": {
  26834. "type": "string",
  26835. "pattern": "^msg_"
  26836. },
  26837. "reason": {
  26838. "type": "string",
  26839. "enum": ["auto", "manual"]
  26840. },
  26841. "text": {
  26842. "type": "string"
  26843. },
  26844. "recent": {
  26845. "type": "string"
  26846. }
  26847. },
  26848. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  26849. "additionalProperties": false
  26850. }
  26851. },
  26852. "required": ["type", "id", "seq", "aggregateID", "data"],
  26853. "additionalProperties": false
  26854. }
  26855. },
  26856. "required": ["type", "id", "syncEvent"],
  26857. "additionalProperties": false
  26858. },
  26859. "SyncEventSessionNextRevertStaged": {
  26860. "type": "object",
  26861. "properties": {
  26862. "type": {
  26863. "type": "string",
  26864. "enum": ["sync"]
  26865. },
  26866. "id": {
  26867. "type": "string",
  26868. "pattern": "^evt_"
  26869. },
  26870. "syncEvent": {
  26871. "type": "object",
  26872. "properties": {
  26873. "type": {
  26874. "type": "string",
  26875. "enum": ["session.next.revert.staged.1"]
  26876. },
  26877. "id": {
  26878. "type": "string",
  26879. "pattern": "^evt_"
  26880. },
  26881. "seq": {
  26882. "type": "number"
  26883. },
  26884. "aggregateID": {
  26885. "type": "string"
  26886. },
  26887. "data": {
  26888. "type": "object",
  26889. "properties": {
  26890. "timestamp": {
  26891. "type": "number"
  26892. },
  26893. "sessionID": {
  26894. "type": "string",
  26895. "pattern": "^ses"
  26896. },
  26897. "revert": {
  26898. "$ref": "#/components/schemas/RevertState"
  26899. }
  26900. },
  26901. "required": ["timestamp", "sessionID", "revert"],
  26902. "additionalProperties": false
  26903. }
  26904. },
  26905. "required": ["type", "id", "seq", "aggregateID", "data"],
  26906. "additionalProperties": false
  26907. }
  26908. },
  26909. "required": ["type", "id", "syncEvent"],
  26910. "additionalProperties": false
  26911. },
  26912. "SyncEventSessionNextRevertCleared": {
  26913. "type": "object",
  26914. "properties": {
  26915. "type": {
  26916. "type": "string",
  26917. "enum": ["sync"]
  26918. },
  26919. "id": {
  26920. "type": "string",
  26921. "pattern": "^evt_"
  26922. },
  26923. "syncEvent": {
  26924. "type": "object",
  26925. "properties": {
  26926. "type": {
  26927. "type": "string",
  26928. "enum": ["session.next.revert.cleared.1"]
  26929. },
  26930. "id": {
  26931. "type": "string",
  26932. "pattern": "^evt_"
  26933. },
  26934. "seq": {
  26935. "type": "number"
  26936. },
  26937. "aggregateID": {
  26938. "type": "string"
  26939. },
  26940. "data": {
  26941. "type": "object",
  26942. "properties": {
  26943. "timestamp": {
  26944. "type": "number"
  26945. },
  26946. "sessionID": {
  26947. "type": "string",
  26948. "pattern": "^ses"
  26949. }
  26950. },
  26951. "required": ["timestamp", "sessionID"],
  26952. "additionalProperties": false
  26953. }
  26954. },
  26955. "required": ["type", "id", "seq", "aggregateID", "data"],
  26956. "additionalProperties": false
  26957. }
  26958. },
  26959. "required": ["type", "id", "syncEvent"],
  26960. "additionalProperties": false
  26961. },
  26962. "SyncEventSessionNextRevertCommitted": {
  26963. "type": "object",
  26964. "properties": {
  26965. "type": {
  26966. "type": "string",
  26967. "enum": ["sync"]
  26968. },
  26969. "id": {
  26970. "type": "string",
  26971. "pattern": "^evt_"
  26972. },
  26973. "syncEvent": {
  26974. "type": "object",
  26975. "properties": {
  26976. "type": {
  26977. "type": "string",
  26978. "enum": ["session.next.revert.committed.1"]
  26979. },
  26980. "id": {
  26981. "type": "string",
  26982. "pattern": "^evt_"
  26983. },
  26984. "seq": {
  26985. "type": "number"
  26986. },
  26987. "aggregateID": {
  26988. "type": "string"
  26989. },
  26990. "data": {
  26991. "type": "object",
  26992. "properties": {
  26993. "timestamp": {
  26994. "type": "number"
  26995. },
  26996. "sessionID": {
  26997. "type": "string",
  26998. "pattern": "^ses"
  26999. },
  27000. "messageID": {
  27001. "type": "string",
  27002. "pattern": "^msg_"
  27003. }
  27004. },
  27005. "required": ["timestamp", "sessionID", "messageID"],
  27006. "additionalProperties": false
  27007. }
  27008. },
  27009. "required": ["type", "id", "seq", "aggregateID", "data"],
  27010. "additionalProperties": false
  27011. }
  27012. },
  27013. "required": ["type", "id", "syncEvent"],
  27014. "additionalProperties": false
  27015. },
  27016. "ConfigV2ReferenceGit": {
  27017. "type": "object",
  27018. "properties": {
  27019. "repository": {
  27020. "type": "string"
  27021. },
  27022. "branch": {
  27023. "type": "string"
  27024. },
  27025. "description": {
  27026. "type": "string"
  27027. },
  27028. "hidden": {
  27029. "type": "boolean"
  27030. }
  27031. },
  27032. "required": ["repository"],
  27033. "additionalProperties": false
  27034. },
  27035. "ConfigV2ReferenceLocal": {
  27036. "type": "object",
  27037. "properties": {
  27038. "path": {
  27039. "type": "string"
  27040. },
  27041. "description": {
  27042. "type": "string"
  27043. },
  27044. "hidden": {
  27045. "type": "boolean"
  27046. }
  27047. },
  27048. "required": ["path"],
  27049. "additionalProperties": false
  27050. },
  27051. "PolicyEffect": {
  27052. "type": "string",
  27053. "enum": ["allow", "deny"]
  27054. },
  27055. "ConfigV2ExperimentalPolicy": {
  27056. "type": "object",
  27057. "properties": {
  27058. "action": {
  27059. "type": "string",
  27060. "enum": ["provider.use"]
  27061. },
  27062. "effect": {
  27063. "$ref": "#/components/schemas/PolicyEffect"
  27064. },
  27065. "resource": {
  27066. "type": "string"
  27067. }
  27068. },
  27069. "required": ["action", "effect", "resource"],
  27070. "additionalProperties": false
  27071. },
  27072. "ProjectDirectories": {
  27073. "type": "array",
  27074. "items": {
  27075. "type": "object",
  27076. "properties": {
  27077. "directory": {
  27078. "type": "string"
  27079. },
  27080. "strategy": {
  27081. "type": "string"
  27082. }
  27083. },
  27084. "required": ["directory"],
  27085. "additionalProperties": false
  27086. }
  27087. },
  27088. "PtyTicketConnectToken": {
  27089. "type": "object",
  27090. "properties": {
  27091. "ticket": {
  27092. "type": "string"
  27093. },
  27094. "expires_in": {
  27095. "type": "integer",
  27096. "exclusiveMinimum": 0
  27097. }
  27098. },
  27099. "required": ["ticket", "expires_in"],
  27100. "additionalProperties": false
  27101. },
  27102. "WorkspaceEventConnectionStatus": {
  27103. "type": "object",
  27104. "properties": {
  27105. "workspaceID": {
  27106. "type": "string",
  27107. "pattern": "^wrk"
  27108. },
  27109. "status": {
  27110. "type": "string",
  27111. "enum": ["connected", "connecting", "disconnected", "error"]
  27112. }
  27113. },
  27114. "required": ["workspaceID", "status"],
  27115. "additionalProperties": false
  27116. },
  27117. "LocationInfo": {
  27118. "type": "object",
  27119. "properties": {
  27120. "directory": {
  27121. "type": "string"
  27122. },
  27123. "workspaceID": {
  27124. "type": "string",
  27125. "pattern": "^wrk"
  27126. },
  27127. "project": {
  27128. "type": "object",
  27129. "properties": {
  27130. "id": {
  27131. "type": "string"
  27132. },
  27133. "directory": {
  27134. "type": "string"
  27135. }
  27136. },
  27137. "required": ["id", "directory"],
  27138. "additionalProperties": false
  27139. }
  27140. },
  27141. "required": ["directory", "project"],
  27142. "additionalProperties": false
  27143. },
  27144. "ProviderRequest": {
  27145. "type": "object",
  27146. "properties": {
  27147. "headers": {
  27148. "type": "object",
  27149. "additionalProperties": {
  27150. "type": "string"
  27151. }
  27152. },
  27153. "body": {
  27154. "type": "object"
  27155. }
  27156. },
  27157. "required": ["headers", "body"],
  27158. "additionalProperties": false
  27159. },
  27160. "AgentColor": {
  27161. "anyOf": [
  27162. {
  27163. "type": "string",
  27164. "pattern": "^#[0-9a-fA-F]{6}$"
  27165. },
  27166. {
  27167. "type": "string",
  27168. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  27169. }
  27170. ]
  27171. },
  27172. "PermissionV2Effect": {
  27173. "type": "string",
  27174. "enum": ["allow", "deny", "ask"]
  27175. },
  27176. "PermissionV2Rule": {
  27177. "type": "object",
  27178. "properties": {
  27179. "action": {
  27180. "type": "string"
  27181. },
  27182. "resource": {
  27183. "type": "string"
  27184. },
  27185. "effect": {
  27186. "$ref": "#/components/schemas/PermissionV2Effect"
  27187. }
  27188. },
  27189. "required": ["action", "resource", "effect"],
  27190. "additionalProperties": false
  27191. },
  27192. "PermissionV2Ruleset": {
  27193. "type": "array",
  27194. "items": {
  27195. "$ref": "#/components/schemas/PermissionV2Rule"
  27196. }
  27197. },
  27198. "AgentV2Info": {
  27199. "type": "object",
  27200. "properties": {
  27201. "id": {
  27202. "type": "string"
  27203. },
  27204. "model": {
  27205. "$ref": "#/components/schemas/ModelRef"
  27206. },
  27207. "request": {
  27208. "$ref": "#/components/schemas/ProviderRequest"
  27209. },
  27210. "system": {
  27211. "type": "string"
  27212. },
  27213. "description": {
  27214. "type": "string"
  27215. },
  27216. "mode": {
  27217. "type": "string",
  27218. "enum": ["subagent", "primary", "all"]
  27219. },
  27220. "hidden": {
  27221. "type": "boolean"
  27222. },
  27223. "color": {
  27224. "$ref": "#/components/schemas/AgentColor"
  27225. },
  27226. "steps": {
  27227. "type": "integer",
  27228. "exclusiveMinimum": 0
  27229. },
  27230. "permissions": {
  27231. "$ref": "#/components/schemas/PermissionV2Ruleset"
  27232. }
  27233. },
  27234. "required": ["id", "request", "mode", "hidden", "permissions"],
  27235. "additionalProperties": false
  27236. },
  27237. "SessionV2Info": {
  27238. "type": "object",
  27239. "properties": {
  27240. "id": {
  27241. "type": "string",
  27242. "pattern": "^ses"
  27243. },
  27244. "parentID": {
  27245. "type": "string",
  27246. "pattern": "^ses"
  27247. },
  27248. "projectID": {
  27249. "type": "string"
  27250. },
  27251. "agent": {
  27252. "type": "string"
  27253. },
  27254. "model": {
  27255. "$ref": "#/components/schemas/ModelRef"
  27256. },
  27257. "cost": {
  27258. "type": "number"
  27259. },
  27260. "tokens": {
  27261. "type": "object",
  27262. "properties": {
  27263. "input": {
  27264. "type": "number"
  27265. },
  27266. "output": {
  27267. "type": "number"
  27268. },
  27269. "reasoning": {
  27270. "type": "number"
  27271. },
  27272. "cache": {
  27273. "type": "object",
  27274. "properties": {
  27275. "read": {
  27276. "type": "number"
  27277. },
  27278. "write": {
  27279. "type": "number"
  27280. }
  27281. },
  27282. "required": ["read", "write"],
  27283. "additionalProperties": false
  27284. }
  27285. },
  27286. "required": ["input", "output", "reasoning", "cache"],
  27287. "additionalProperties": false
  27288. },
  27289. "time": {
  27290. "type": "object",
  27291. "properties": {
  27292. "created": {
  27293. "type": "number"
  27294. },
  27295. "updated": {
  27296. "type": "number"
  27297. },
  27298. "archived": {
  27299. "type": "number"
  27300. }
  27301. },
  27302. "required": ["created", "updated"],
  27303. "additionalProperties": false
  27304. },
  27305. "title": {
  27306. "type": "string"
  27307. },
  27308. "location": {
  27309. "$ref": "#/components/schemas/LocationRef"
  27310. },
  27311. "subpath": {
  27312. "type": "string"
  27313. },
  27314. "revert": {
  27315. "$ref": "#/components/schemas/RevertState"
  27316. }
  27317. },
  27318. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  27319. "additionalProperties": false
  27320. },
  27321. "PromptInputFileAttachment": {
  27322. "type": "object",
  27323. "properties": {
  27324. "uri": {
  27325. "type": "string"
  27326. },
  27327. "name": {
  27328. "type": "string"
  27329. },
  27330. "description": {
  27331. "type": "string"
  27332. },
  27333. "source": {
  27334. "$ref": "#/components/schemas/PromptSource"
  27335. }
  27336. },
  27337. "required": ["uri"],
  27338. "additionalProperties": false
  27339. },
  27340. "SessionInputAdmitted": {
  27341. "type": "object",
  27342. "properties": {
  27343. "admittedSeq": {
  27344. "type": "integer",
  27345. "minimum": 0
  27346. },
  27347. "id": {
  27348. "type": "string",
  27349. "pattern": "^msg_"
  27350. },
  27351. "sessionID": {
  27352. "type": "string",
  27353. "pattern": "^ses"
  27354. },
  27355. "prompt": {
  27356. "$ref": "#/components/schemas/Prompt"
  27357. },
  27358. "delivery": {
  27359. "type": "string",
  27360. "enum": ["steer", "queue"]
  27361. },
  27362. "timeCreated": {
  27363. "type": "number"
  27364. },
  27365. "promotedSeq": {
  27366. "type": "integer",
  27367. "minimum": 0
  27368. }
  27369. },
  27370. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  27371. "additionalProperties": false
  27372. },
  27373. "SessionMessageAgentSwitched": {
  27374. "type": "object",
  27375. "properties": {
  27376. "id": {
  27377. "type": "string",
  27378. "pattern": "^msg_"
  27379. },
  27380. "metadata": {
  27381. "type": "object"
  27382. },
  27383. "time": {
  27384. "type": "object",
  27385. "properties": {
  27386. "created": {
  27387. "type": "number"
  27388. }
  27389. },
  27390. "required": ["created"],
  27391. "additionalProperties": false
  27392. },
  27393. "type": {
  27394. "type": "string",
  27395. "enum": ["agent-switched"]
  27396. },
  27397. "agent": {
  27398. "type": "string"
  27399. }
  27400. },
  27401. "required": ["id", "time", "type", "agent"],
  27402. "additionalProperties": false
  27403. },
  27404. "SessionMessageModelSwitched": {
  27405. "type": "object",
  27406. "properties": {
  27407. "id": {
  27408. "type": "string",
  27409. "pattern": "^msg_"
  27410. },
  27411. "metadata": {
  27412. "type": "object"
  27413. },
  27414. "time": {
  27415. "type": "object",
  27416. "properties": {
  27417. "created": {
  27418. "type": "number"
  27419. }
  27420. },
  27421. "required": ["created"],
  27422. "additionalProperties": false
  27423. },
  27424. "type": {
  27425. "type": "string",
  27426. "enum": ["model-switched"]
  27427. },
  27428. "model": {
  27429. "$ref": "#/components/schemas/ModelRef"
  27430. }
  27431. },
  27432. "required": ["id", "time", "type", "model"],
  27433. "additionalProperties": false
  27434. },
  27435. "SessionMessageUser": {
  27436. "type": "object",
  27437. "properties": {
  27438. "id": {
  27439. "type": "string",
  27440. "pattern": "^msg_"
  27441. },
  27442. "metadata": {
  27443. "type": "object"
  27444. },
  27445. "time": {
  27446. "type": "object",
  27447. "properties": {
  27448. "created": {
  27449. "type": "number"
  27450. }
  27451. },
  27452. "required": ["created"],
  27453. "additionalProperties": false
  27454. },
  27455. "text": {
  27456. "type": "string"
  27457. },
  27458. "files": {
  27459. "type": "array",
  27460. "items": {
  27461. "$ref": "#/components/schemas/PromptFileAttachment"
  27462. }
  27463. },
  27464. "agents": {
  27465. "type": "array",
  27466. "items": {
  27467. "$ref": "#/components/schemas/PromptAgentAttachment"
  27468. }
  27469. },
  27470. "type": {
  27471. "type": "string",
  27472. "enum": ["user"]
  27473. }
  27474. },
  27475. "required": ["id", "time", "text", "type"],
  27476. "additionalProperties": false
  27477. },
  27478. "SessionMessageSynthetic": {
  27479. "type": "object",
  27480. "properties": {
  27481. "id": {
  27482. "type": "string",
  27483. "pattern": "^msg_"
  27484. },
  27485. "metadata": {
  27486. "type": "object"
  27487. },
  27488. "time": {
  27489. "type": "object",
  27490. "properties": {
  27491. "created": {
  27492. "type": "number"
  27493. }
  27494. },
  27495. "required": ["created"],
  27496. "additionalProperties": false
  27497. },
  27498. "sessionID": {
  27499. "type": "string",
  27500. "pattern": "^ses"
  27501. },
  27502. "text": {
  27503. "type": "string"
  27504. },
  27505. "type": {
  27506. "type": "string",
  27507. "enum": ["synthetic"]
  27508. }
  27509. },
  27510. "required": ["id", "time", "sessionID", "text", "type"],
  27511. "additionalProperties": false
  27512. },
  27513. "SessionMessageSystem": {
  27514. "type": "object",
  27515. "properties": {
  27516. "id": {
  27517. "type": "string",
  27518. "pattern": "^msg_"
  27519. },
  27520. "metadata": {
  27521. "type": "object"
  27522. },
  27523. "time": {
  27524. "type": "object",
  27525. "properties": {
  27526. "created": {
  27527. "type": "number"
  27528. }
  27529. },
  27530. "required": ["created"],
  27531. "additionalProperties": false
  27532. },
  27533. "type": {
  27534. "type": "string",
  27535. "enum": ["system"]
  27536. },
  27537. "text": {
  27538. "type": "string"
  27539. }
  27540. },
  27541. "required": ["id", "time", "type", "text"],
  27542. "additionalProperties": false
  27543. },
  27544. "SessionMessageShell": {
  27545. "type": "object",
  27546. "properties": {
  27547. "id": {
  27548. "type": "string",
  27549. "pattern": "^msg_"
  27550. },
  27551. "metadata": {
  27552. "type": "object"
  27553. },
  27554. "time": {
  27555. "type": "object",
  27556. "properties": {
  27557. "created": {
  27558. "type": "number"
  27559. },
  27560. "completed": {
  27561. "type": "number"
  27562. }
  27563. },
  27564. "required": ["created"],
  27565. "additionalProperties": false
  27566. },
  27567. "type": {
  27568. "type": "string",
  27569. "enum": ["shell"]
  27570. },
  27571. "callID": {
  27572. "type": "string"
  27573. },
  27574. "command": {
  27575. "type": "string"
  27576. },
  27577. "output": {
  27578. "type": "string"
  27579. }
  27580. },
  27581. "required": ["id", "time", "type", "callID", "command", "output"],
  27582. "additionalProperties": false
  27583. },
  27584. "SessionMessageAssistantText": {
  27585. "type": "object",
  27586. "properties": {
  27587. "type": {
  27588. "type": "string",
  27589. "enum": ["text"]
  27590. },
  27591. "id": {
  27592. "type": "string"
  27593. },
  27594. "text": {
  27595. "type": "string"
  27596. }
  27597. },
  27598. "required": ["type", "id", "text"],
  27599. "additionalProperties": false
  27600. },
  27601. "SessionMessageAssistantReasoning": {
  27602. "type": "object",
  27603. "properties": {
  27604. "type": {
  27605. "type": "string",
  27606. "enum": ["reasoning"]
  27607. },
  27608. "id": {
  27609. "type": "string"
  27610. },
  27611. "text": {
  27612. "type": "string"
  27613. },
  27614. "providerMetadata": {
  27615. "$ref": "#/components/schemas/LLMProviderMetadata"
  27616. },
  27617. "time": {
  27618. "type": "object",
  27619. "properties": {
  27620. "created": {
  27621. "type": "number"
  27622. },
  27623. "completed": {
  27624. "type": "number"
  27625. }
  27626. },
  27627. "required": ["created"],
  27628. "additionalProperties": false
  27629. }
  27630. },
  27631. "required": ["type", "id", "text"],
  27632. "additionalProperties": false
  27633. },
  27634. "SessionMessageToolStatePending": {
  27635. "type": "object",
  27636. "properties": {
  27637. "status": {
  27638. "type": "string",
  27639. "enum": ["pending"]
  27640. },
  27641. "input": {
  27642. "type": "string"
  27643. }
  27644. },
  27645. "required": ["status", "input"],
  27646. "additionalProperties": false
  27647. },
  27648. "SessionMessageToolStateRunning": {
  27649. "type": "object",
  27650. "properties": {
  27651. "status": {
  27652. "type": "string",
  27653. "enum": ["running"]
  27654. },
  27655. "input": {
  27656. "type": "object"
  27657. },
  27658. "structured": {
  27659. "type": "object"
  27660. },
  27661. "content": {
  27662. "type": "array",
  27663. "items": {
  27664. "$ref": "#/components/schemas/LLMToolContent"
  27665. }
  27666. }
  27667. },
  27668. "required": ["status", "input", "structured", "content"],
  27669. "additionalProperties": false
  27670. },
  27671. "SessionMessageToolStateCompleted": {
  27672. "type": "object",
  27673. "properties": {
  27674. "status": {
  27675. "type": "string",
  27676. "enum": ["completed"]
  27677. },
  27678. "input": {
  27679. "type": "object"
  27680. },
  27681. "attachments": {
  27682. "type": "array",
  27683. "items": {
  27684. "$ref": "#/components/schemas/PromptFileAttachment"
  27685. }
  27686. },
  27687. "content": {
  27688. "type": "array",
  27689. "items": {
  27690. "$ref": "#/components/schemas/LLMToolContent"
  27691. }
  27692. },
  27693. "outputPaths": {
  27694. "type": "array",
  27695. "items": {
  27696. "type": "string"
  27697. }
  27698. },
  27699. "structured": {
  27700. "type": "object"
  27701. },
  27702. "result": {}
  27703. },
  27704. "required": ["status", "input", "content", "structured"],
  27705. "additionalProperties": false
  27706. },
  27707. "SessionMessageToolStateError": {
  27708. "type": "object",
  27709. "properties": {
  27710. "status": {
  27711. "type": "string",
  27712. "enum": ["error"]
  27713. },
  27714. "input": {
  27715. "type": "object"
  27716. },
  27717. "content": {
  27718. "type": "array",
  27719. "items": {
  27720. "$ref": "#/components/schemas/LLMToolContent"
  27721. }
  27722. },
  27723. "structured": {
  27724. "type": "object"
  27725. },
  27726. "error": {
  27727. "$ref": "#/components/schemas/SessionErrorUnknown"
  27728. },
  27729. "result": {}
  27730. },
  27731. "required": ["status", "input", "content", "structured", "error"],
  27732. "additionalProperties": false
  27733. },
  27734. "SessionMessageAssistantTool": {
  27735. "type": "object",
  27736. "properties": {
  27737. "type": {
  27738. "type": "string",
  27739. "enum": ["tool"]
  27740. },
  27741. "id": {
  27742. "type": "string"
  27743. },
  27744. "name": {
  27745. "type": "string"
  27746. },
  27747. "provider": {
  27748. "type": "object",
  27749. "properties": {
  27750. "executed": {
  27751. "type": "boolean"
  27752. },
  27753. "metadata": {
  27754. "$ref": "#/components/schemas/LLMProviderMetadata"
  27755. },
  27756. "resultMetadata": {
  27757. "$ref": "#/components/schemas/LLMProviderMetadata"
  27758. }
  27759. },
  27760. "required": ["executed"],
  27761. "additionalProperties": false
  27762. },
  27763. "state": {
  27764. "anyOf": [
  27765. {
  27766. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  27767. },
  27768. {
  27769. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  27770. },
  27771. {
  27772. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  27773. },
  27774. {
  27775. "$ref": "#/components/schemas/SessionMessageToolStateError"
  27776. }
  27777. ]
  27778. },
  27779. "time": {
  27780. "type": "object",
  27781. "properties": {
  27782. "created": {
  27783. "type": "number"
  27784. },
  27785. "ran": {
  27786. "type": "number"
  27787. },
  27788. "completed": {
  27789. "type": "number"
  27790. },
  27791. "pruned": {
  27792. "type": "number"
  27793. }
  27794. },
  27795. "required": ["created"],
  27796. "additionalProperties": false
  27797. }
  27798. },
  27799. "required": ["type", "id", "name", "state", "time"],
  27800. "additionalProperties": false
  27801. },
  27802. "SessionMessageAssistant": {
  27803. "type": "object",
  27804. "properties": {
  27805. "id": {
  27806. "type": "string",
  27807. "pattern": "^msg_"
  27808. },
  27809. "metadata": {
  27810. "type": "object"
  27811. },
  27812. "time": {
  27813. "type": "object",
  27814. "properties": {
  27815. "created": {
  27816. "type": "number"
  27817. },
  27818. "completed": {
  27819. "type": "number"
  27820. }
  27821. },
  27822. "required": ["created"],
  27823. "additionalProperties": false
  27824. },
  27825. "type": {
  27826. "type": "string",
  27827. "enum": ["assistant"]
  27828. },
  27829. "agent": {
  27830. "type": "string"
  27831. },
  27832. "model": {
  27833. "$ref": "#/components/schemas/ModelRef"
  27834. },
  27835. "content": {
  27836. "type": "array",
  27837. "items": {
  27838. "anyOf": [
  27839. {
  27840. "$ref": "#/components/schemas/SessionMessageAssistantText"
  27841. },
  27842. {
  27843. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  27844. },
  27845. {
  27846. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  27847. }
  27848. ]
  27849. }
  27850. },
  27851. "snapshot": {
  27852. "type": "object",
  27853. "properties": {
  27854. "start": {
  27855. "type": "string"
  27856. },
  27857. "end": {
  27858. "type": "string"
  27859. },
  27860. "files": {
  27861. "type": "array",
  27862. "items": {
  27863. "type": "string"
  27864. }
  27865. }
  27866. },
  27867. "additionalProperties": false
  27868. },
  27869. "finish": {
  27870. "type": "string"
  27871. },
  27872. "cost": {
  27873. "type": "number"
  27874. },
  27875. "tokens": {
  27876. "type": "object",
  27877. "properties": {
  27878. "input": {
  27879. "type": "number"
  27880. },
  27881. "output": {
  27882. "type": "number"
  27883. },
  27884. "reasoning": {
  27885. "type": "number"
  27886. },
  27887. "cache": {
  27888. "type": "object",
  27889. "properties": {
  27890. "read": {
  27891. "type": "number"
  27892. },
  27893. "write": {
  27894. "type": "number"
  27895. }
  27896. },
  27897. "required": ["read", "write"],
  27898. "additionalProperties": false
  27899. }
  27900. },
  27901. "required": ["input", "output", "reasoning", "cache"],
  27902. "additionalProperties": false
  27903. },
  27904. "error": {
  27905. "$ref": "#/components/schemas/SessionErrorUnknown"
  27906. }
  27907. },
  27908. "required": ["id", "time", "type", "agent", "model", "content"],
  27909. "additionalProperties": false
  27910. },
  27911. "SessionMessageCompaction": {
  27912. "type": "object",
  27913. "properties": {
  27914. "type": {
  27915. "type": "string",
  27916. "enum": ["compaction"]
  27917. },
  27918. "reason": {
  27919. "type": "string",
  27920. "enum": ["auto", "manual"]
  27921. },
  27922. "summary": {
  27923. "type": "string"
  27924. },
  27925. "recent": {
  27926. "type": "string"
  27927. },
  27928. "id": {
  27929. "type": "string",
  27930. "pattern": "^msg_"
  27931. },
  27932. "metadata": {
  27933. "type": "object"
  27934. },
  27935. "time": {
  27936. "type": "object",
  27937. "properties": {
  27938. "created": {
  27939. "type": "number"
  27940. }
  27941. },
  27942. "required": ["created"],
  27943. "additionalProperties": false
  27944. }
  27945. },
  27946. "required": ["type", "reason", "summary", "recent", "id", "time"],
  27947. "additionalProperties": false
  27948. },
  27949. "SessionMessage": {
  27950. "anyOf": [
  27951. {
  27952. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  27953. },
  27954. {
  27955. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  27956. },
  27957. {
  27958. "$ref": "#/components/schemas/SessionMessageUser"
  27959. },
  27960. {
  27961. "$ref": "#/components/schemas/SessionMessageSynthetic"
  27962. },
  27963. {
  27964. "$ref": "#/components/schemas/SessionMessageSystem"
  27965. },
  27966. {
  27967. "$ref": "#/components/schemas/SessionMessageShell"
  27968. },
  27969. {
  27970. "$ref": "#/components/schemas/SessionMessageAssistant"
  27971. },
  27972. {
  27973. "$ref": "#/components/schemas/SessionMessageCompaction"
  27974. }
  27975. ]
  27976. },
  27977. "SessionNextAgentSwitched": {
  27978. "type": "object",
  27979. "properties": {
  27980. "id": {
  27981. "type": "string",
  27982. "pattern": "^evt_"
  27983. },
  27984. "metadata": {
  27985. "type": "object"
  27986. },
  27987. "type": {
  27988. "type": "string",
  27989. "enum": ["session.next.agent.switched"]
  27990. },
  27991. "durable": {
  27992. "type": "object",
  27993. "properties": {
  27994. "aggregateID": {
  27995. "type": "string"
  27996. },
  27997. "seq": {
  27998. "type": "integer"
  27999. },
  28000. "version": {
  28001. "type": "integer"
  28002. }
  28003. },
  28004. "required": ["aggregateID", "seq", "version"],
  28005. "additionalProperties": false
  28006. },
  28007. "location": {
  28008. "$ref": "#/components/schemas/LocationRef"
  28009. },
  28010. "data": {
  28011. "type": "object",
  28012. "properties": {
  28013. "timestamp": {
  28014. "type": "number"
  28015. },
  28016. "sessionID": {
  28017. "type": "string",
  28018. "pattern": "^ses"
  28019. },
  28020. "messageID": {
  28021. "type": "string",
  28022. "pattern": "^msg_"
  28023. },
  28024. "agent": {
  28025. "type": "string"
  28026. }
  28027. },
  28028. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28029. "additionalProperties": false
  28030. }
  28031. },
  28032. "required": ["id", "type", "data"],
  28033. "additionalProperties": false
  28034. },
  28035. "SessionNextModelSwitched": {
  28036. "type": "object",
  28037. "properties": {
  28038. "id": {
  28039. "type": "string",
  28040. "pattern": "^evt_"
  28041. },
  28042. "metadata": {
  28043. "type": "object"
  28044. },
  28045. "type": {
  28046. "type": "string",
  28047. "enum": ["session.next.model.switched"]
  28048. },
  28049. "durable": {
  28050. "type": "object",
  28051. "properties": {
  28052. "aggregateID": {
  28053. "type": "string"
  28054. },
  28055. "seq": {
  28056. "type": "integer"
  28057. },
  28058. "version": {
  28059. "type": "integer"
  28060. }
  28061. },
  28062. "required": ["aggregateID", "seq", "version"],
  28063. "additionalProperties": false
  28064. },
  28065. "location": {
  28066. "$ref": "#/components/schemas/LocationRef"
  28067. },
  28068. "data": {
  28069. "type": "object",
  28070. "properties": {
  28071. "timestamp": {
  28072. "type": "number"
  28073. },
  28074. "sessionID": {
  28075. "type": "string",
  28076. "pattern": "^ses"
  28077. },
  28078. "messageID": {
  28079. "type": "string",
  28080. "pattern": "^msg_"
  28081. },
  28082. "model": {
  28083. "$ref": "#/components/schemas/ModelRef"
  28084. }
  28085. },
  28086. "required": ["timestamp", "sessionID", "messageID", "model"],
  28087. "additionalProperties": false
  28088. }
  28089. },
  28090. "required": ["id", "type", "data"],
  28091. "additionalProperties": false
  28092. },
  28093. "SessionNextMoved": {
  28094. "type": "object",
  28095. "properties": {
  28096. "id": {
  28097. "type": "string",
  28098. "pattern": "^evt_"
  28099. },
  28100. "metadata": {
  28101. "type": "object"
  28102. },
  28103. "type": {
  28104. "type": "string",
  28105. "enum": ["session.next.moved"]
  28106. },
  28107. "durable": {
  28108. "type": "object",
  28109. "properties": {
  28110. "aggregateID": {
  28111. "type": "string"
  28112. },
  28113. "seq": {
  28114. "type": "integer"
  28115. },
  28116. "version": {
  28117. "type": "integer"
  28118. }
  28119. },
  28120. "required": ["aggregateID", "seq", "version"],
  28121. "additionalProperties": false
  28122. },
  28123. "location": {
  28124. "$ref": "#/components/schemas/LocationRef"
  28125. },
  28126. "data": {
  28127. "type": "object",
  28128. "properties": {
  28129. "timestamp": {
  28130. "type": "number"
  28131. },
  28132. "sessionID": {
  28133. "type": "string",
  28134. "pattern": "^ses"
  28135. },
  28136. "location": {
  28137. "$ref": "#/components/schemas/LocationRef"
  28138. },
  28139. "subdirectory": {
  28140. "type": "string"
  28141. }
  28142. },
  28143. "required": ["timestamp", "sessionID", "location"],
  28144. "additionalProperties": false
  28145. }
  28146. },
  28147. "required": ["id", "type", "data"],
  28148. "additionalProperties": false
  28149. },
  28150. "SessionNextPrompted": {
  28151. "type": "object",
  28152. "properties": {
  28153. "id": {
  28154. "type": "string",
  28155. "pattern": "^evt_"
  28156. },
  28157. "metadata": {
  28158. "type": "object"
  28159. },
  28160. "type": {
  28161. "type": "string",
  28162. "enum": ["session.next.prompted"]
  28163. },
  28164. "durable": {
  28165. "type": "object",
  28166. "properties": {
  28167. "aggregateID": {
  28168. "type": "string"
  28169. },
  28170. "seq": {
  28171. "type": "integer"
  28172. },
  28173. "version": {
  28174. "type": "integer"
  28175. }
  28176. },
  28177. "required": ["aggregateID", "seq", "version"],
  28178. "additionalProperties": false
  28179. },
  28180. "location": {
  28181. "$ref": "#/components/schemas/LocationRef"
  28182. },
  28183. "data": {
  28184. "type": "object",
  28185. "properties": {
  28186. "timestamp": {
  28187. "type": "number"
  28188. },
  28189. "sessionID": {
  28190. "type": "string",
  28191. "pattern": "^ses"
  28192. },
  28193. "messageID": {
  28194. "type": "string",
  28195. "pattern": "^msg_"
  28196. },
  28197. "prompt": {
  28198. "$ref": "#/components/schemas/Prompt"
  28199. },
  28200. "delivery": {
  28201. "type": "string",
  28202. "enum": ["steer", "queue"]
  28203. }
  28204. },
  28205. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28206. "additionalProperties": false
  28207. }
  28208. },
  28209. "required": ["id", "type", "data"],
  28210. "additionalProperties": false
  28211. },
  28212. "SessionNextPromptAdmitted": {
  28213. "type": "object",
  28214. "properties": {
  28215. "id": {
  28216. "type": "string",
  28217. "pattern": "^evt_"
  28218. },
  28219. "metadata": {
  28220. "type": "object"
  28221. },
  28222. "type": {
  28223. "type": "string",
  28224. "enum": ["session.next.prompt.admitted"]
  28225. },
  28226. "durable": {
  28227. "type": "object",
  28228. "properties": {
  28229. "aggregateID": {
  28230. "type": "string"
  28231. },
  28232. "seq": {
  28233. "type": "integer"
  28234. },
  28235. "version": {
  28236. "type": "integer"
  28237. }
  28238. },
  28239. "required": ["aggregateID", "seq", "version"],
  28240. "additionalProperties": false
  28241. },
  28242. "location": {
  28243. "$ref": "#/components/schemas/LocationRef"
  28244. },
  28245. "data": {
  28246. "type": "object",
  28247. "properties": {
  28248. "timestamp": {
  28249. "type": "number"
  28250. },
  28251. "sessionID": {
  28252. "type": "string",
  28253. "pattern": "^ses"
  28254. },
  28255. "messageID": {
  28256. "type": "string",
  28257. "pattern": "^msg_"
  28258. },
  28259. "prompt": {
  28260. "$ref": "#/components/schemas/Prompt"
  28261. },
  28262. "delivery": {
  28263. "type": "string",
  28264. "enum": ["steer", "queue"]
  28265. }
  28266. },
  28267. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28268. "additionalProperties": false
  28269. }
  28270. },
  28271. "required": ["id", "type", "data"],
  28272. "additionalProperties": false
  28273. },
  28274. "SessionNextContextUpdated": {
  28275. "type": "object",
  28276. "properties": {
  28277. "id": {
  28278. "type": "string",
  28279. "pattern": "^evt_"
  28280. },
  28281. "metadata": {
  28282. "type": "object"
  28283. },
  28284. "type": {
  28285. "type": "string",
  28286. "enum": ["session.next.context.updated"]
  28287. },
  28288. "durable": {
  28289. "type": "object",
  28290. "properties": {
  28291. "aggregateID": {
  28292. "type": "string"
  28293. },
  28294. "seq": {
  28295. "type": "integer"
  28296. },
  28297. "version": {
  28298. "type": "integer"
  28299. }
  28300. },
  28301. "required": ["aggregateID", "seq", "version"],
  28302. "additionalProperties": false
  28303. },
  28304. "location": {
  28305. "$ref": "#/components/schemas/LocationRef"
  28306. },
  28307. "data": {
  28308. "type": "object",
  28309. "properties": {
  28310. "timestamp": {
  28311. "type": "number"
  28312. },
  28313. "sessionID": {
  28314. "type": "string",
  28315. "pattern": "^ses"
  28316. },
  28317. "messageID": {
  28318. "type": "string",
  28319. "pattern": "^msg_"
  28320. },
  28321. "text": {
  28322. "type": "string"
  28323. }
  28324. },
  28325. "required": ["timestamp", "sessionID", "messageID", "text"],
  28326. "additionalProperties": false
  28327. }
  28328. },
  28329. "required": ["id", "type", "data"],
  28330. "additionalProperties": false
  28331. },
  28332. "SessionNextSynthetic": {
  28333. "type": "object",
  28334. "properties": {
  28335. "id": {
  28336. "type": "string",
  28337. "pattern": "^evt_"
  28338. },
  28339. "metadata": {
  28340. "type": "object"
  28341. },
  28342. "type": {
  28343. "type": "string",
  28344. "enum": ["session.next.synthetic"]
  28345. },
  28346. "durable": {
  28347. "type": "object",
  28348. "properties": {
  28349. "aggregateID": {
  28350. "type": "string"
  28351. },
  28352. "seq": {
  28353. "type": "integer"
  28354. },
  28355. "version": {
  28356. "type": "integer"
  28357. }
  28358. },
  28359. "required": ["aggregateID", "seq", "version"],
  28360. "additionalProperties": false
  28361. },
  28362. "location": {
  28363. "$ref": "#/components/schemas/LocationRef"
  28364. },
  28365. "data": {
  28366. "type": "object",
  28367. "properties": {
  28368. "timestamp": {
  28369. "type": "number"
  28370. },
  28371. "sessionID": {
  28372. "type": "string",
  28373. "pattern": "^ses"
  28374. },
  28375. "messageID": {
  28376. "type": "string",
  28377. "pattern": "^msg_"
  28378. },
  28379. "text": {
  28380. "type": "string"
  28381. }
  28382. },
  28383. "required": ["timestamp", "sessionID", "messageID", "text"],
  28384. "additionalProperties": false
  28385. }
  28386. },
  28387. "required": ["id", "type", "data"],
  28388. "additionalProperties": false
  28389. },
  28390. "SessionNextShellStarted": {
  28391. "type": "object",
  28392. "properties": {
  28393. "id": {
  28394. "type": "string",
  28395. "pattern": "^evt_"
  28396. },
  28397. "metadata": {
  28398. "type": "object"
  28399. },
  28400. "type": {
  28401. "type": "string",
  28402. "enum": ["session.next.shell.started"]
  28403. },
  28404. "durable": {
  28405. "type": "object",
  28406. "properties": {
  28407. "aggregateID": {
  28408. "type": "string"
  28409. },
  28410. "seq": {
  28411. "type": "integer"
  28412. },
  28413. "version": {
  28414. "type": "integer"
  28415. }
  28416. },
  28417. "required": ["aggregateID", "seq", "version"],
  28418. "additionalProperties": false
  28419. },
  28420. "location": {
  28421. "$ref": "#/components/schemas/LocationRef"
  28422. },
  28423. "data": {
  28424. "type": "object",
  28425. "properties": {
  28426. "timestamp": {
  28427. "type": "number"
  28428. },
  28429. "sessionID": {
  28430. "type": "string",
  28431. "pattern": "^ses"
  28432. },
  28433. "messageID": {
  28434. "type": "string",
  28435. "pattern": "^msg_"
  28436. },
  28437. "callID": {
  28438. "type": "string"
  28439. },
  28440. "command": {
  28441. "type": "string"
  28442. }
  28443. },
  28444. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28445. "additionalProperties": false
  28446. }
  28447. },
  28448. "required": ["id", "type", "data"],
  28449. "additionalProperties": false
  28450. },
  28451. "SessionNextShellEnded": {
  28452. "type": "object",
  28453. "properties": {
  28454. "id": {
  28455. "type": "string",
  28456. "pattern": "^evt_"
  28457. },
  28458. "metadata": {
  28459. "type": "object"
  28460. },
  28461. "type": {
  28462. "type": "string",
  28463. "enum": ["session.next.shell.ended"]
  28464. },
  28465. "durable": {
  28466. "type": "object",
  28467. "properties": {
  28468. "aggregateID": {
  28469. "type": "string"
  28470. },
  28471. "seq": {
  28472. "type": "integer"
  28473. },
  28474. "version": {
  28475. "type": "integer"
  28476. }
  28477. },
  28478. "required": ["aggregateID", "seq", "version"],
  28479. "additionalProperties": false
  28480. },
  28481. "location": {
  28482. "$ref": "#/components/schemas/LocationRef"
  28483. },
  28484. "data": {
  28485. "type": "object",
  28486. "properties": {
  28487. "timestamp": {
  28488. "type": "number"
  28489. },
  28490. "sessionID": {
  28491. "type": "string",
  28492. "pattern": "^ses"
  28493. },
  28494. "callID": {
  28495. "type": "string"
  28496. },
  28497. "output": {
  28498. "type": "string"
  28499. }
  28500. },
  28501. "required": ["timestamp", "sessionID", "callID", "output"],
  28502. "additionalProperties": false
  28503. }
  28504. },
  28505. "required": ["id", "type", "data"],
  28506. "additionalProperties": false
  28507. },
  28508. "SessionNextStepStarted": {
  28509. "type": "object",
  28510. "properties": {
  28511. "id": {
  28512. "type": "string",
  28513. "pattern": "^evt_"
  28514. },
  28515. "metadata": {
  28516. "type": "object"
  28517. },
  28518. "type": {
  28519. "type": "string",
  28520. "enum": ["session.next.step.started"]
  28521. },
  28522. "durable": {
  28523. "type": "object",
  28524. "properties": {
  28525. "aggregateID": {
  28526. "type": "string"
  28527. },
  28528. "seq": {
  28529. "type": "integer"
  28530. },
  28531. "version": {
  28532. "type": "integer"
  28533. }
  28534. },
  28535. "required": ["aggregateID", "seq", "version"],
  28536. "additionalProperties": false
  28537. },
  28538. "location": {
  28539. "$ref": "#/components/schemas/LocationRef"
  28540. },
  28541. "data": {
  28542. "type": "object",
  28543. "properties": {
  28544. "timestamp": {
  28545. "type": "number"
  28546. },
  28547. "sessionID": {
  28548. "type": "string",
  28549. "pattern": "^ses"
  28550. },
  28551. "assistantMessageID": {
  28552. "type": "string",
  28553. "pattern": "^msg_"
  28554. },
  28555. "agent": {
  28556. "type": "string"
  28557. },
  28558. "model": {
  28559. "$ref": "#/components/schemas/ModelRef"
  28560. },
  28561. "snapshot": {
  28562. "type": "string"
  28563. }
  28564. },
  28565. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28566. "additionalProperties": false
  28567. }
  28568. },
  28569. "required": ["id", "type", "data"],
  28570. "additionalProperties": false
  28571. },
  28572. "SessionNextStepEnded": {
  28573. "type": "object",
  28574. "properties": {
  28575. "id": {
  28576. "type": "string",
  28577. "pattern": "^evt_"
  28578. },
  28579. "metadata": {
  28580. "type": "object"
  28581. },
  28582. "type": {
  28583. "type": "string",
  28584. "enum": ["session.next.step.ended"]
  28585. },
  28586. "durable": {
  28587. "type": "object",
  28588. "properties": {
  28589. "aggregateID": {
  28590. "type": "string"
  28591. },
  28592. "seq": {
  28593. "type": "integer"
  28594. },
  28595. "version": {
  28596. "type": "integer"
  28597. }
  28598. },
  28599. "required": ["aggregateID", "seq", "version"],
  28600. "additionalProperties": false
  28601. },
  28602. "location": {
  28603. "$ref": "#/components/schemas/LocationRef"
  28604. },
  28605. "data": {
  28606. "type": "object",
  28607. "properties": {
  28608. "timestamp": {
  28609. "type": "number"
  28610. },
  28611. "sessionID": {
  28612. "type": "string",
  28613. "pattern": "^ses"
  28614. },
  28615. "assistantMessageID": {
  28616. "type": "string",
  28617. "pattern": "^msg_"
  28618. },
  28619. "finish": {
  28620. "type": "string"
  28621. },
  28622. "cost": {
  28623. "type": "number"
  28624. },
  28625. "tokens": {
  28626. "type": "object",
  28627. "properties": {
  28628. "input": {
  28629. "type": "number"
  28630. },
  28631. "output": {
  28632. "type": "number"
  28633. },
  28634. "reasoning": {
  28635. "type": "number"
  28636. },
  28637. "cache": {
  28638. "type": "object",
  28639. "properties": {
  28640. "read": {
  28641. "type": "number"
  28642. },
  28643. "write": {
  28644. "type": "number"
  28645. }
  28646. },
  28647. "required": ["read", "write"],
  28648. "additionalProperties": false
  28649. }
  28650. },
  28651. "required": ["input", "output", "reasoning", "cache"],
  28652. "additionalProperties": false
  28653. },
  28654. "snapshot": {
  28655. "type": "string"
  28656. },
  28657. "files": {
  28658. "type": "array",
  28659. "items": {
  28660. "type": "string"
  28661. }
  28662. }
  28663. },
  28664. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28665. "additionalProperties": false
  28666. }
  28667. },
  28668. "required": ["id", "type", "data"],
  28669. "additionalProperties": false
  28670. },
  28671. "SessionNextStepFailed": {
  28672. "type": "object",
  28673. "properties": {
  28674. "id": {
  28675. "type": "string",
  28676. "pattern": "^evt_"
  28677. },
  28678. "metadata": {
  28679. "type": "object"
  28680. },
  28681. "type": {
  28682. "type": "string",
  28683. "enum": ["session.next.step.failed"]
  28684. },
  28685. "durable": {
  28686. "type": "object",
  28687. "properties": {
  28688. "aggregateID": {
  28689. "type": "string"
  28690. },
  28691. "seq": {
  28692. "type": "integer"
  28693. },
  28694. "version": {
  28695. "type": "integer"
  28696. }
  28697. },
  28698. "required": ["aggregateID", "seq", "version"],
  28699. "additionalProperties": false
  28700. },
  28701. "location": {
  28702. "$ref": "#/components/schemas/LocationRef"
  28703. },
  28704. "data": {
  28705. "type": "object",
  28706. "properties": {
  28707. "timestamp": {
  28708. "type": "number"
  28709. },
  28710. "sessionID": {
  28711. "type": "string",
  28712. "pattern": "^ses"
  28713. },
  28714. "assistantMessageID": {
  28715. "type": "string",
  28716. "pattern": "^msg_"
  28717. },
  28718. "error": {
  28719. "$ref": "#/components/schemas/SessionErrorUnknown"
  28720. }
  28721. },
  28722. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28723. "additionalProperties": false
  28724. }
  28725. },
  28726. "required": ["id", "type", "data"],
  28727. "additionalProperties": false
  28728. },
  28729. "SessionNextTextStarted": {
  28730. "type": "object",
  28731. "properties": {
  28732. "id": {
  28733. "type": "string",
  28734. "pattern": "^evt_"
  28735. },
  28736. "metadata": {
  28737. "type": "object"
  28738. },
  28739. "type": {
  28740. "type": "string",
  28741. "enum": ["session.next.text.started"]
  28742. },
  28743. "durable": {
  28744. "type": "object",
  28745. "properties": {
  28746. "aggregateID": {
  28747. "type": "string"
  28748. },
  28749. "seq": {
  28750. "type": "integer"
  28751. },
  28752. "version": {
  28753. "type": "integer"
  28754. }
  28755. },
  28756. "required": ["aggregateID", "seq", "version"],
  28757. "additionalProperties": false
  28758. },
  28759. "location": {
  28760. "$ref": "#/components/schemas/LocationRef"
  28761. },
  28762. "data": {
  28763. "type": "object",
  28764. "properties": {
  28765. "timestamp": {
  28766. "type": "number"
  28767. },
  28768. "sessionID": {
  28769. "type": "string",
  28770. "pattern": "^ses"
  28771. },
  28772. "assistantMessageID": {
  28773. "type": "string",
  28774. "pattern": "^msg_"
  28775. },
  28776. "textID": {
  28777. "type": "string"
  28778. }
  28779. },
  28780. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28781. "additionalProperties": false
  28782. }
  28783. },
  28784. "required": ["id", "type", "data"],
  28785. "additionalProperties": false
  28786. },
  28787. "SessionNextTextEnded": {
  28788. "type": "object",
  28789. "properties": {
  28790. "id": {
  28791. "type": "string",
  28792. "pattern": "^evt_"
  28793. },
  28794. "metadata": {
  28795. "type": "object"
  28796. },
  28797. "type": {
  28798. "type": "string",
  28799. "enum": ["session.next.text.ended"]
  28800. },
  28801. "durable": {
  28802. "type": "object",
  28803. "properties": {
  28804. "aggregateID": {
  28805. "type": "string"
  28806. },
  28807. "seq": {
  28808. "type": "integer"
  28809. },
  28810. "version": {
  28811. "type": "integer"
  28812. }
  28813. },
  28814. "required": ["aggregateID", "seq", "version"],
  28815. "additionalProperties": false
  28816. },
  28817. "location": {
  28818. "$ref": "#/components/schemas/LocationRef"
  28819. },
  28820. "data": {
  28821. "type": "object",
  28822. "properties": {
  28823. "timestamp": {
  28824. "type": "number"
  28825. },
  28826. "sessionID": {
  28827. "type": "string",
  28828. "pattern": "^ses"
  28829. },
  28830. "assistantMessageID": {
  28831. "type": "string",
  28832. "pattern": "^msg_"
  28833. },
  28834. "textID": {
  28835. "type": "string"
  28836. },
  28837. "text": {
  28838. "type": "string"
  28839. }
  28840. },
  28841. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28842. "additionalProperties": false
  28843. }
  28844. },
  28845. "required": ["id", "type", "data"],
  28846. "additionalProperties": false
  28847. },
  28848. "SessionNextToolInputStarted": {
  28849. "type": "object",
  28850. "properties": {
  28851. "id": {
  28852. "type": "string",
  28853. "pattern": "^evt_"
  28854. },
  28855. "metadata": {
  28856. "type": "object"
  28857. },
  28858. "type": {
  28859. "type": "string",
  28860. "enum": ["session.next.tool.input.started"]
  28861. },
  28862. "durable": {
  28863. "type": "object",
  28864. "properties": {
  28865. "aggregateID": {
  28866. "type": "string"
  28867. },
  28868. "seq": {
  28869. "type": "integer"
  28870. },
  28871. "version": {
  28872. "type": "integer"
  28873. }
  28874. },
  28875. "required": ["aggregateID", "seq", "version"],
  28876. "additionalProperties": false
  28877. },
  28878. "location": {
  28879. "$ref": "#/components/schemas/LocationRef"
  28880. },
  28881. "data": {
  28882. "type": "object",
  28883. "properties": {
  28884. "timestamp": {
  28885. "type": "number"
  28886. },
  28887. "sessionID": {
  28888. "type": "string",
  28889. "pattern": "^ses"
  28890. },
  28891. "assistantMessageID": {
  28892. "type": "string",
  28893. "pattern": "^msg_"
  28894. },
  28895. "callID": {
  28896. "type": "string"
  28897. },
  28898. "name": {
  28899. "type": "string"
  28900. }
  28901. },
  28902. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28903. "additionalProperties": false
  28904. }
  28905. },
  28906. "required": ["id", "type", "data"],
  28907. "additionalProperties": false
  28908. },
  28909. "SessionNextToolInputEnded": {
  28910. "type": "object",
  28911. "properties": {
  28912. "id": {
  28913. "type": "string",
  28914. "pattern": "^evt_"
  28915. },
  28916. "metadata": {
  28917. "type": "object"
  28918. },
  28919. "type": {
  28920. "type": "string",
  28921. "enum": ["session.next.tool.input.ended"]
  28922. },
  28923. "durable": {
  28924. "type": "object",
  28925. "properties": {
  28926. "aggregateID": {
  28927. "type": "string"
  28928. },
  28929. "seq": {
  28930. "type": "integer"
  28931. },
  28932. "version": {
  28933. "type": "integer"
  28934. }
  28935. },
  28936. "required": ["aggregateID", "seq", "version"],
  28937. "additionalProperties": false
  28938. },
  28939. "location": {
  28940. "$ref": "#/components/schemas/LocationRef"
  28941. },
  28942. "data": {
  28943. "type": "object",
  28944. "properties": {
  28945. "timestamp": {
  28946. "type": "number"
  28947. },
  28948. "sessionID": {
  28949. "type": "string",
  28950. "pattern": "^ses"
  28951. },
  28952. "assistantMessageID": {
  28953. "type": "string",
  28954. "pattern": "^msg_"
  28955. },
  28956. "callID": {
  28957. "type": "string"
  28958. },
  28959. "text": {
  28960. "type": "string"
  28961. }
  28962. },
  28963. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28964. "additionalProperties": false
  28965. }
  28966. },
  28967. "required": ["id", "type", "data"],
  28968. "additionalProperties": false
  28969. },
  28970. "SessionNextToolCalled": {
  28971. "type": "object",
  28972. "properties": {
  28973. "id": {
  28974. "type": "string",
  28975. "pattern": "^evt_"
  28976. },
  28977. "metadata": {
  28978. "type": "object"
  28979. },
  28980. "type": {
  28981. "type": "string",
  28982. "enum": ["session.next.tool.called"]
  28983. },
  28984. "durable": {
  28985. "type": "object",
  28986. "properties": {
  28987. "aggregateID": {
  28988. "type": "string"
  28989. },
  28990. "seq": {
  28991. "type": "integer"
  28992. },
  28993. "version": {
  28994. "type": "integer"
  28995. }
  28996. },
  28997. "required": ["aggregateID", "seq", "version"],
  28998. "additionalProperties": false
  28999. },
  29000. "location": {
  29001. "$ref": "#/components/schemas/LocationRef"
  29002. },
  29003. "data": {
  29004. "type": "object",
  29005. "properties": {
  29006. "timestamp": {
  29007. "type": "number"
  29008. },
  29009. "sessionID": {
  29010. "type": "string",
  29011. "pattern": "^ses"
  29012. },
  29013. "assistantMessageID": {
  29014. "type": "string",
  29015. "pattern": "^msg_"
  29016. },
  29017. "callID": {
  29018. "type": "string"
  29019. },
  29020. "tool": {
  29021. "type": "string"
  29022. },
  29023. "input": {
  29024. "type": "object"
  29025. },
  29026. "provider": {
  29027. "type": "object",
  29028. "properties": {
  29029. "executed": {
  29030. "type": "boolean"
  29031. },
  29032. "metadata": {
  29033. "$ref": "#/components/schemas/LLMProviderMetadata"
  29034. }
  29035. },
  29036. "required": ["executed"],
  29037. "additionalProperties": false
  29038. }
  29039. },
  29040. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29041. "additionalProperties": false
  29042. }
  29043. },
  29044. "required": ["id", "type", "data"],
  29045. "additionalProperties": false
  29046. },
  29047. "SessionNextToolProgress": {
  29048. "type": "object",
  29049. "properties": {
  29050. "id": {
  29051. "type": "string",
  29052. "pattern": "^evt_"
  29053. },
  29054. "metadata": {
  29055. "type": "object"
  29056. },
  29057. "type": {
  29058. "type": "string",
  29059. "enum": ["session.next.tool.progress"]
  29060. },
  29061. "durable": {
  29062. "type": "object",
  29063. "properties": {
  29064. "aggregateID": {
  29065. "type": "string"
  29066. },
  29067. "seq": {
  29068. "type": "integer"
  29069. },
  29070. "version": {
  29071. "type": "integer"
  29072. }
  29073. },
  29074. "required": ["aggregateID", "seq", "version"],
  29075. "additionalProperties": false
  29076. },
  29077. "location": {
  29078. "$ref": "#/components/schemas/LocationRef"
  29079. },
  29080. "data": {
  29081. "type": "object",
  29082. "properties": {
  29083. "timestamp": {
  29084. "type": "number"
  29085. },
  29086. "sessionID": {
  29087. "type": "string",
  29088. "pattern": "^ses"
  29089. },
  29090. "assistantMessageID": {
  29091. "type": "string",
  29092. "pattern": "^msg_"
  29093. },
  29094. "callID": {
  29095. "type": "string"
  29096. },
  29097. "structured": {
  29098. "type": "object"
  29099. },
  29100. "content": {
  29101. "type": "array",
  29102. "items": {
  29103. "$ref": "#/components/schemas/LLMToolContent"
  29104. }
  29105. }
  29106. },
  29107. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29108. "additionalProperties": false
  29109. }
  29110. },
  29111. "required": ["id", "type", "data"],
  29112. "additionalProperties": false
  29113. },
  29114. "SessionNextToolSuccess": {
  29115. "type": "object",
  29116. "properties": {
  29117. "id": {
  29118. "type": "string",
  29119. "pattern": "^evt_"
  29120. },
  29121. "metadata": {
  29122. "type": "object"
  29123. },
  29124. "type": {
  29125. "type": "string",
  29126. "enum": ["session.next.tool.success"]
  29127. },
  29128. "durable": {
  29129. "type": "object",
  29130. "properties": {
  29131. "aggregateID": {
  29132. "type": "string"
  29133. },
  29134. "seq": {
  29135. "type": "integer"
  29136. },
  29137. "version": {
  29138. "type": "integer"
  29139. }
  29140. },
  29141. "required": ["aggregateID", "seq", "version"],
  29142. "additionalProperties": false
  29143. },
  29144. "location": {
  29145. "$ref": "#/components/schemas/LocationRef"
  29146. },
  29147. "data": {
  29148. "type": "object",
  29149. "properties": {
  29150. "timestamp": {
  29151. "type": "number"
  29152. },
  29153. "sessionID": {
  29154. "type": "string",
  29155. "pattern": "^ses"
  29156. },
  29157. "assistantMessageID": {
  29158. "type": "string",
  29159. "pattern": "^msg_"
  29160. },
  29161. "callID": {
  29162. "type": "string"
  29163. },
  29164. "structured": {
  29165. "type": "object"
  29166. },
  29167. "content": {
  29168. "type": "array",
  29169. "items": {
  29170. "$ref": "#/components/schemas/LLMToolContent"
  29171. }
  29172. },
  29173. "outputPaths": {
  29174. "type": "array",
  29175. "items": {
  29176. "type": "string"
  29177. }
  29178. },
  29179. "result": {},
  29180. "provider": {
  29181. "type": "object",
  29182. "properties": {
  29183. "executed": {
  29184. "type": "boolean"
  29185. },
  29186. "metadata": {
  29187. "$ref": "#/components/schemas/LLMProviderMetadata"
  29188. }
  29189. },
  29190. "required": ["executed"],
  29191. "additionalProperties": false
  29192. }
  29193. },
  29194. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29195. "additionalProperties": false
  29196. }
  29197. },
  29198. "required": ["id", "type", "data"],
  29199. "additionalProperties": false
  29200. },
  29201. "SessionNextToolFailed": {
  29202. "type": "object",
  29203. "properties": {
  29204. "id": {
  29205. "type": "string",
  29206. "pattern": "^evt_"
  29207. },
  29208. "metadata": {
  29209. "type": "object"
  29210. },
  29211. "type": {
  29212. "type": "string",
  29213. "enum": ["session.next.tool.failed"]
  29214. },
  29215. "durable": {
  29216. "type": "object",
  29217. "properties": {
  29218. "aggregateID": {
  29219. "type": "string"
  29220. },
  29221. "seq": {
  29222. "type": "integer"
  29223. },
  29224. "version": {
  29225. "type": "integer"
  29226. }
  29227. },
  29228. "required": ["aggregateID", "seq", "version"],
  29229. "additionalProperties": false
  29230. },
  29231. "location": {
  29232. "$ref": "#/components/schemas/LocationRef"
  29233. },
  29234. "data": {
  29235. "type": "object",
  29236. "properties": {
  29237. "timestamp": {
  29238. "type": "number"
  29239. },
  29240. "sessionID": {
  29241. "type": "string",
  29242. "pattern": "^ses"
  29243. },
  29244. "assistantMessageID": {
  29245. "type": "string",
  29246. "pattern": "^msg_"
  29247. },
  29248. "callID": {
  29249. "type": "string"
  29250. },
  29251. "error": {
  29252. "$ref": "#/components/schemas/SessionErrorUnknown"
  29253. },
  29254. "result": {},
  29255. "provider": {
  29256. "type": "object",
  29257. "properties": {
  29258. "executed": {
  29259. "type": "boolean"
  29260. },
  29261. "metadata": {
  29262. "$ref": "#/components/schemas/LLMProviderMetadata"
  29263. }
  29264. },
  29265. "required": ["executed"],
  29266. "additionalProperties": false
  29267. }
  29268. },
  29269. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29270. "additionalProperties": false
  29271. }
  29272. },
  29273. "required": ["id", "type", "data"],
  29274. "additionalProperties": false
  29275. },
  29276. "SessionNextReasoningStarted": {
  29277. "type": "object",
  29278. "properties": {
  29279. "id": {
  29280. "type": "string",
  29281. "pattern": "^evt_"
  29282. },
  29283. "metadata": {
  29284. "type": "object"
  29285. },
  29286. "type": {
  29287. "type": "string",
  29288. "enum": ["session.next.reasoning.started"]
  29289. },
  29290. "durable": {
  29291. "type": "object",
  29292. "properties": {
  29293. "aggregateID": {
  29294. "type": "string"
  29295. },
  29296. "seq": {
  29297. "type": "integer"
  29298. },
  29299. "version": {
  29300. "type": "integer"
  29301. }
  29302. },
  29303. "required": ["aggregateID", "seq", "version"],
  29304. "additionalProperties": false
  29305. },
  29306. "location": {
  29307. "$ref": "#/components/schemas/LocationRef"
  29308. },
  29309. "data": {
  29310. "type": "object",
  29311. "properties": {
  29312. "timestamp": {
  29313. "type": "number"
  29314. },
  29315. "sessionID": {
  29316. "type": "string",
  29317. "pattern": "^ses"
  29318. },
  29319. "assistantMessageID": {
  29320. "type": "string",
  29321. "pattern": "^msg_"
  29322. },
  29323. "reasoningID": {
  29324. "type": "string"
  29325. },
  29326. "providerMetadata": {
  29327. "$ref": "#/components/schemas/LLMProviderMetadata"
  29328. }
  29329. },
  29330. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29331. "additionalProperties": false
  29332. }
  29333. },
  29334. "required": ["id", "type", "data"],
  29335. "additionalProperties": false
  29336. },
  29337. "SessionNextReasoningEnded": {
  29338. "type": "object",
  29339. "properties": {
  29340. "id": {
  29341. "type": "string",
  29342. "pattern": "^evt_"
  29343. },
  29344. "metadata": {
  29345. "type": "object"
  29346. },
  29347. "type": {
  29348. "type": "string",
  29349. "enum": ["session.next.reasoning.ended"]
  29350. },
  29351. "durable": {
  29352. "type": "object",
  29353. "properties": {
  29354. "aggregateID": {
  29355. "type": "string"
  29356. },
  29357. "seq": {
  29358. "type": "integer"
  29359. },
  29360. "version": {
  29361. "type": "integer"
  29362. }
  29363. },
  29364. "required": ["aggregateID", "seq", "version"],
  29365. "additionalProperties": false
  29366. },
  29367. "location": {
  29368. "$ref": "#/components/schemas/LocationRef"
  29369. },
  29370. "data": {
  29371. "type": "object",
  29372. "properties": {
  29373. "timestamp": {
  29374. "type": "number"
  29375. },
  29376. "sessionID": {
  29377. "type": "string",
  29378. "pattern": "^ses"
  29379. },
  29380. "assistantMessageID": {
  29381. "type": "string",
  29382. "pattern": "^msg_"
  29383. },
  29384. "reasoningID": {
  29385. "type": "string"
  29386. },
  29387. "text": {
  29388. "type": "string"
  29389. },
  29390. "providerMetadata": {
  29391. "$ref": "#/components/schemas/LLMProviderMetadata"
  29392. }
  29393. },
  29394. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29395. "additionalProperties": false
  29396. }
  29397. },
  29398. "required": ["id", "type", "data"],
  29399. "additionalProperties": false
  29400. },
  29401. "SessionNextRetried": {
  29402. "type": "object",
  29403. "properties": {
  29404. "id": {
  29405. "type": "string",
  29406. "pattern": "^evt_"
  29407. },
  29408. "metadata": {
  29409. "type": "object"
  29410. },
  29411. "type": {
  29412. "type": "string",
  29413. "enum": ["session.next.retried"]
  29414. },
  29415. "durable": {
  29416. "type": "object",
  29417. "properties": {
  29418. "aggregateID": {
  29419. "type": "string"
  29420. },
  29421. "seq": {
  29422. "type": "integer"
  29423. },
  29424. "version": {
  29425. "type": "integer"
  29426. }
  29427. },
  29428. "required": ["aggregateID", "seq", "version"],
  29429. "additionalProperties": false
  29430. },
  29431. "location": {
  29432. "$ref": "#/components/schemas/LocationRef"
  29433. },
  29434. "data": {
  29435. "type": "object",
  29436. "properties": {
  29437. "timestamp": {
  29438. "type": "number"
  29439. },
  29440. "sessionID": {
  29441. "type": "string",
  29442. "pattern": "^ses"
  29443. },
  29444. "attempt": {
  29445. "type": "number"
  29446. },
  29447. "error": {
  29448. "$ref": "#/components/schemas/SessionNextRetry_error"
  29449. }
  29450. },
  29451. "required": ["timestamp", "sessionID", "attempt", "error"],
  29452. "additionalProperties": false
  29453. }
  29454. },
  29455. "required": ["id", "type", "data"],
  29456. "additionalProperties": false
  29457. },
  29458. "SessionNextCompactionStarted": {
  29459. "type": "object",
  29460. "properties": {
  29461. "id": {
  29462. "type": "string",
  29463. "pattern": "^evt_"
  29464. },
  29465. "metadata": {
  29466. "type": "object"
  29467. },
  29468. "type": {
  29469. "type": "string",
  29470. "enum": ["session.next.compaction.started"]
  29471. },
  29472. "durable": {
  29473. "type": "object",
  29474. "properties": {
  29475. "aggregateID": {
  29476. "type": "string"
  29477. },
  29478. "seq": {
  29479. "type": "integer"
  29480. },
  29481. "version": {
  29482. "type": "integer"
  29483. }
  29484. },
  29485. "required": ["aggregateID", "seq", "version"],
  29486. "additionalProperties": false
  29487. },
  29488. "location": {
  29489. "$ref": "#/components/schemas/LocationRef"
  29490. },
  29491. "data": {
  29492. "type": "object",
  29493. "properties": {
  29494. "timestamp": {
  29495. "type": "number"
  29496. },
  29497. "sessionID": {
  29498. "type": "string",
  29499. "pattern": "^ses"
  29500. },
  29501. "messageID": {
  29502. "type": "string",
  29503. "pattern": "^msg_"
  29504. },
  29505. "reason": {
  29506. "type": "string",
  29507. "enum": ["auto", "manual"]
  29508. }
  29509. },
  29510. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29511. "additionalProperties": false
  29512. }
  29513. },
  29514. "required": ["id", "type", "data"],
  29515. "additionalProperties": false
  29516. },
  29517. "SessionNextCompactionEnded": {
  29518. "type": "object",
  29519. "properties": {
  29520. "id": {
  29521. "type": "string",
  29522. "pattern": "^evt_"
  29523. },
  29524. "metadata": {
  29525. "type": "object"
  29526. },
  29527. "type": {
  29528. "type": "string",
  29529. "enum": ["session.next.compaction.ended"]
  29530. },
  29531. "durable": {
  29532. "type": "object",
  29533. "properties": {
  29534. "aggregateID": {
  29535. "type": "string"
  29536. },
  29537. "seq": {
  29538. "type": "integer"
  29539. },
  29540. "version": {
  29541. "type": "integer"
  29542. }
  29543. },
  29544. "required": ["aggregateID", "seq", "version"],
  29545. "additionalProperties": false
  29546. },
  29547. "location": {
  29548. "$ref": "#/components/schemas/LocationRef"
  29549. },
  29550. "data": {
  29551. "type": "object",
  29552. "properties": {
  29553. "timestamp": {
  29554. "type": "number"
  29555. },
  29556. "sessionID": {
  29557. "type": "string",
  29558. "pattern": "^ses"
  29559. },
  29560. "messageID": {
  29561. "type": "string",
  29562. "pattern": "^msg_"
  29563. },
  29564. "reason": {
  29565. "type": "string",
  29566. "enum": ["auto", "manual"]
  29567. },
  29568. "text": {
  29569. "type": "string"
  29570. },
  29571. "recent": {
  29572. "type": "string"
  29573. }
  29574. },
  29575. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29576. "additionalProperties": false
  29577. }
  29578. },
  29579. "required": ["id", "type", "data"],
  29580. "additionalProperties": false
  29581. },
  29582. "SessionNextRevertStaged": {
  29583. "type": "object",
  29584. "properties": {
  29585. "id": {
  29586. "type": "string",
  29587. "pattern": "^evt_"
  29588. },
  29589. "metadata": {
  29590. "type": "object"
  29591. },
  29592. "type": {
  29593. "type": "string",
  29594. "enum": ["session.next.revert.staged"]
  29595. },
  29596. "durable": {
  29597. "type": "object",
  29598. "properties": {
  29599. "aggregateID": {
  29600. "type": "string"
  29601. },
  29602. "seq": {
  29603. "type": "integer"
  29604. },
  29605. "version": {
  29606. "type": "integer"
  29607. }
  29608. },
  29609. "required": ["aggregateID", "seq", "version"],
  29610. "additionalProperties": false
  29611. },
  29612. "location": {
  29613. "$ref": "#/components/schemas/LocationRef"
  29614. },
  29615. "data": {
  29616. "type": "object",
  29617. "properties": {
  29618. "timestamp": {
  29619. "type": "number"
  29620. },
  29621. "sessionID": {
  29622. "type": "string",
  29623. "pattern": "^ses"
  29624. },
  29625. "revert": {
  29626. "$ref": "#/components/schemas/RevertState"
  29627. }
  29628. },
  29629. "required": ["timestamp", "sessionID", "revert"],
  29630. "additionalProperties": false
  29631. }
  29632. },
  29633. "required": ["id", "type", "data"],
  29634. "additionalProperties": false
  29635. },
  29636. "SessionNextRevertCleared": {
  29637. "type": "object",
  29638. "properties": {
  29639. "id": {
  29640. "type": "string",
  29641. "pattern": "^evt_"
  29642. },
  29643. "metadata": {
  29644. "type": "object"
  29645. },
  29646. "type": {
  29647. "type": "string",
  29648. "enum": ["session.next.revert.cleared"]
  29649. },
  29650. "durable": {
  29651. "type": "object",
  29652. "properties": {
  29653. "aggregateID": {
  29654. "type": "string"
  29655. },
  29656. "seq": {
  29657. "type": "integer"
  29658. },
  29659. "version": {
  29660. "type": "integer"
  29661. }
  29662. },
  29663. "required": ["aggregateID", "seq", "version"],
  29664. "additionalProperties": false
  29665. },
  29666. "location": {
  29667. "$ref": "#/components/schemas/LocationRef"
  29668. },
  29669. "data": {
  29670. "type": "object",
  29671. "properties": {
  29672. "timestamp": {
  29673. "type": "number"
  29674. },
  29675. "sessionID": {
  29676. "type": "string",
  29677. "pattern": "^ses"
  29678. }
  29679. },
  29680. "required": ["timestamp", "sessionID"],
  29681. "additionalProperties": false
  29682. }
  29683. },
  29684. "required": ["id", "type", "data"],
  29685. "additionalProperties": false
  29686. },
  29687. "SessionNextRevertCommitted": {
  29688. "type": "object",
  29689. "properties": {
  29690. "id": {
  29691. "type": "string",
  29692. "pattern": "^evt_"
  29693. },
  29694. "metadata": {
  29695. "type": "object"
  29696. },
  29697. "type": {
  29698. "type": "string",
  29699. "enum": ["session.next.revert.committed"]
  29700. },
  29701. "durable": {
  29702. "type": "object",
  29703. "properties": {
  29704. "aggregateID": {
  29705. "type": "string"
  29706. },
  29707. "seq": {
  29708. "type": "integer"
  29709. },
  29710. "version": {
  29711. "type": "integer"
  29712. }
  29713. },
  29714. "required": ["aggregateID", "seq", "version"],
  29715. "additionalProperties": false
  29716. },
  29717. "location": {
  29718. "$ref": "#/components/schemas/LocationRef"
  29719. },
  29720. "data": {
  29721. "type": "object",
  29722. "properties": {
  29723. "timestamp": {
  29724. "type": "number"
  29725. },
  29726. "sessionID": {
  29727. "type": "string",
  29728. "pattern": "^ses"
  29729. },
  29730. "messageID": {
  29731. "type": "string",
  29732. "pattern": "^msg_"
  29733. }
  29734. },
  29735. "required": ["timestamp", "sessionID", "messageID"],
  29736. "additionalProperties": false
  29737. }
  29738. },
  29739. "required": ["id", "type", "data"],
  29740. "additionalProperties": false
  29741. },
  29742. "ModelApi": {
  29743. "anyOf": [
  29744. {
  29745. "type": "object",
  29746. "properties": {
  29747. "id": {
  29748. "type": "string"
  29749. },
  29750. "type": {
  29751. "type": "string",
  29752. "enum": ["aisdk"]
  29753. },
  29754. "package": {
  29755. "type": "string"
  29756. },
  29757. "url": {
  29758. "type": "string"
  29759. },
  29760. "settings": {
  29761. "type": "object"
  29762. }
  29763. },
  29764. "required": ["id", "type", "package"],
  29765. "additionalProperties": false
  29766. },
  29767. {
  29768. "type": "object",
  29769. "properties": {
  29770. "id": {
  29771. "type": "string"
  29772. },
  29773. "type": {
  29774. "type": "string",
  29775. "enum": ["native"]
  29776. },
  29777. "url": {
  29778. "type": "string"
  29779. },
  29780. "settings": {
  29781. "type": "object"
  29782. }
  29783. },
  29784. "required": ["id", "type", "settings"],
  29785. "additionalProperties": false
  29786. }
  29787. ]
  29788. },
  29789. "ModelCapabilities": {
  29790. "type": "object",
  29791. "properties": {
  29792. "tools": {
  29793. "type": "boolean"
  29794. },
  29795. "input": {
  29796. "type": "array",
  29797. "items": {
  29798. "type": "string"
  29799. }
  29800. },
  29801. "output": {
  29802. "type": "array",
  29803. "items": {
  29804. "type": "string"
  29805. }
  29806. }
  29807. },
  29808. "required": ["tools", "input", "output"],
  29809. "additionalProperties": false
  29810. },
  29811. "ModelCost": {
  29812. "type": "object",
  29813. "properties": {
  29814. "tier": {
  29815. "type": "object",
  29816. "properties": {
  29817. "type": {
  29818. "type": "string",
  29819. "enum": ["context"]
  29820. },
  29821. "size": {
  29822. "type": "integer"
  29823. }
  29824. },
  29825. "required": ["type", "size"],
  29826. "additionalProperties": false
  29827. },
  29828. "input": {
  29829. "type": "number"
  29830. },
  29831. "output": {
  29832. "type": "number"
  29833. },
  29834. "cache": {
  29835. "type": "object",
  29836. "properties": {
  29837. "read": {
  29838. "type": "number"
  29839. },
  29840. "write": {
  29841. "type": "number"
  29842. }
  29843. },
  29844. "required": ["read", "write"],
  29845. "additionalProperties": false
  29846. }
  29847. },
  29848. "required": ["input", "output", "cache"],
  29849. "additionalProperties": false
  29850. },
  29851. "ModelV2Info": {
  29852. "type": "object",
  29853. "properties": {
  29854. "id": {
  29855. "type": "string"
  29856. },
  29857. "providerID": {
  29858. "type": "string"
  29859. },
  29860. "family": {
  29861. "type": "string"
  29862. },
  29863. "name": {
  29864. "type": "string"
  29865. },
  29866. "api": {
  29867. "$ref": "#/components/schemas/ModelApi"
  29868. },
  29869. "capabilities": {
  29870. "$ref": "#/components/schemas/ModelCapabilities"
  29871. },
  29872. "request": {
  29873. "type": "object",
  29874. "properties": {
  29875. "headers": {
  29876. "type": "object",
  29877. "additionalProperties": {
  29878. "type": "string"
  29879. }
  29880. },
  29881. "body": {
  29882. "type": "object"
  29883. },
  29884. "variant": {
  29885. "type": "string"
  29886. }
  29887. },
  29888. "required": ["headers", "body"],
  29889. "additionalProperties": false
  29890. },
  29891. "variants": {
  29892. "type": "array",
  29893. "items": {
  29894. "type": "object",
  29895. "properties": {
  29896. "id": {
  29897. "type": "string"
  29898. },
  29899. "headers": {
  29900. "type": "object",
  29901. "additionalProperties": {
  29902. "type": "string"
  29903. }
  29904. },
  29905. "body": {
  29906. "type": "object"
  29907. }
  29908. },
  29909. "required": ["id", "headers", "body"],
  29910. "additionalProperties": false
  29911. }
  29912. },
  29913. "time": {
  29914. "type": "object",
  29915. "properties": {
  29916. "released": {
  29917. "type": "number"
  29918. }
  29919. },
  29920. "required": ["released"],
  29921. "additionalProperties": false
  29922. },
  29923. "cost": {
  29924. "type": "array",
  29925. "items": {
  29926. "$ref": "#/components/schemas/ModelCost"
  29927. }
  29928. },
  29929. "status": {
  29930. "type": "string",
  29931. "enum": ["alpha", "beta", "deprecated", "active"]
  29932. },
  29933. "enabled": {
  29934. "type": "boolean"
  29935. },
  29936. "limit": {
  29937. "type": "object",
  29938. "properties": {
  29939. "context": {
  29940. "type": "integer"
  29941. },
  29942. "input": {
  29943. "type": "integer"
  29944. },
  29945. "output": {
  29946. "type": "integer"
  29947. }
  29948. },
  29949. "required": ["context", "output"],
  29950. "additionalProperties": false
  29951. }
  29952. },
  29953. "required": [
  29954. "id",
  29955. "providerID",
  29956. "name",
  29957. "api",
  29958. "capabilities",
  29959. "request",
  29960. "variants",
  29961. "time",
  29962. "cost",
  29963. "status",
  29964. "enabled",
  29965. "limit"
  29966. ],
  29967. "additionalProperties": false
  29968. },
  29969. "ProviderAISDK": {
  29970. "type": "object",
  29971. "properties": {
  29972. "type": {
  29973. "type": "string",
  29974. "enum": ["aisdk"]
  29975. },
  29976. "package": {
  29977. "type": "string"
  29978. },
  29979. "url": {
  29980. "type": "string"
  29981. },
  29982. "settings": {
  29983. "type": "object"
  29984. }
  29985. },
  29986. "required": ["type", "package"],
  29987. "additionalProperties": false
  29988. },
  29989. "ProviderNative": {
  29990. "type": "object",
  29991. "properties": {
  29992. "type": {
  29993. "type": "string",
  29994. "enum": ["native"]
  29995. },
  29996. "url": {
  29997. "type": "string"
  29998. },
  29999. "settings": {
  30000. "type": "object"
  30001. }
  30002. },
  30003. "required": ["type", "settings"],
  30004. "additionalProperties": false
  30005. },
  30006. "ProviderApi": {
  30007. "anyOf": [
  30008. {
  30009. "$ref": "#/components/schemas/ProviderAISDK"
  30010. },
  30011. {
  30012. "$ref": "#/components/schemas/ProviderNative"
  30013. }
  30014. ]
  30015. },
  30016. "ProviderV2Info": {
  30017. "type": "object",
  30018. "properties": {
  30019. "id": {
  30020. "type": "string"
  30021. },
  30022. "integrationID": {
  30023. "type": "string"
  30024. },
  30025. "name": {
  30026. "type": "string"
  30027. },
  30028. "disabled": {
  30029. "type": "boolean"
  30030. },
  30031. "api": {
  30032. "$ref": "#/components/schemas/ProviderApi"
  30033. },
  30034. "request": {
  30035. "$ref": "#/components/schemas/ProviderRequest"
  30036. }
  30037. },
  30038. "required": ["id", "name", "api", "request"],
  30039. "additionalProperties": false
  30040. },
  30041. "IntegrationWhen": {
  30042. "type": "object",
  30043. "properties": {
  30044. "key": {
  30045. "type": "string"
  30046. },
  30047. "op": {
  30048. "type": "string",
  30049. "enum": ["eq", "neq"]
  30050. },
  30051. "value": {
  30052. "type": "string"
  30053. }
  30054. },
  30055. "required": ["key", "op", "value"],
  30056. "additionalProperties": false
  30057. },
  30058. "IntegrationTextPrompt": {
  30059. "type": "object",
  30060. "properties": {
  30061. "type": {
  30062. "type": "string",
  30063. "enum": ["text"]
  30064. },
  30065. "key": {
  30066. "type": "string"
  30067. },
  30068. "message": {
  30069. "type": "string"
  30070. },
  30071. "placeholder": {
  30072. "type": "string"
  30073. },
  30074. "when": {
  30075. "$ref": "#/components/schemas/IntegrationWhen"
  30076. }
  30077. },
  30078. "required": ["type", "key", "message"],
  30079. "additionalProperties": false
  30080. },
  30081. "IntegrationSelectPrompt": {
  30082. "type": "object",
  30083. "properties": {
  30084. "type": {
  30085. "type": "string",
  30086. "enum": ["select"]
  30087. },
  30088. "key": {
  30089. "type": "string"
  30090. },
  30091. "message": {
  30092. "type": "string"
  30093. },
  30094. "options": {
  30095. "type": "array",
  30096. "items": {
  30097. "type": "object",
  30098. "properties": {
  30099. "label": {
  30100. "type": "string"
  30101. },
  30102. "value": {
  30103. "type": "string"
  30104. },
  30105. "hint": {
  30106. "type": "string"
  30107. }
  30108. },
  30109. "required": ["label", "value"],
  30110. "additionalProperties": false
  30111. }
  30112. },
  30113. "when": {
  30114. "$ref": "#/components/schemas/IntegrationWhen"
  30115. }
  30116. },
  30117. "required": ["type", "key", "message", "options"],
  30118. "additionalProperties": false
  30119. },
  30120. "IntegrationOAuthMethod": {
  30121. "type": "object",
  30122. "properties": {
  30123. "id": {
  30124. "type": "string"
  30125. },
  30126. "type": {
  30127. "type": "string",
  30128. "enum": ["oauth"]
  30129. },
  30130. "label": {
  30131. "type": "string"
  30132. },
  30133. "prompts": {
  30134. "type": "array",
  30135. "items": {
  30136. "anyOf": [
  30137. {
  30138. "$ref": "#/components/schemas/IntegrationTextPrompt"
  30139. },
  30140. {
  30141. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  30142. }
  30143. ]
  30144. }
  30145. }
  30146. },
  30147. "required": ["id", "type", "label"],
  30148. "additionalProperties": false
  30149. },
  30150. "IntegrationKeyMethod": {
  30151. "type": "object",
  30152. "properties": {
  30153. "type": {
  30154. "type": "string",
  30155. "enum": ["key"]
  30156. },
  30157. "label": {
  30158. "type": "string"
  30159. }
  30160. },
  30161. "required": ["type"],
  30162. "additionalProperties": false
  30163. },
  30164. "IntegrationEnvMethod": {
  30165. "type": "object",
  30166. "properties": {
  30167. "type": {
  30168. "type": "string",
  30169. "enum": ["env"]
  30170. },
  30171. "names": {
  30172. "type": "array",
  30173. "items": {
  30174. "type": "string"
  30175. }
  30176. }
  30177. },
  30178. "required": ["type", "names"],
  30179. "additionalProperties": false
  30180. },
  30181. "ConnectionCredentialInfo": {
  30182. "type": "object",
  30183. "properties": {
  30184. "type": {
  30185. "type": "string",
  30186. "enum": ["credential"]
  30187. },
  30188. "id": {
  30189. "type": "string"
  30190. },
  30191. "label": {
  30192. "type": "string"
  30193. }
  30194. },
  30195. "required": ["type", "id", "label"],
  30196. "additionalProperties": false
  30197. },
  30198. "ConnectionEnvInfo": {
  30199. "type": "object",
  30200. "properties": {
  30201. "type": {
  30202. "type": "string",
  30203. "enum": ["env"]
  30204. },
  30205. "name": {
  30206. "type": "string"
  30207. }
  30208. },
  30209. "required": ["type", "name"],
  30210. "additionalProperties": false
  30211. },
  30212. "ConnectionInfo": {
  30213. "anyOf": [
  30214. {
  30215. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  30216. },
  30217. {
  30218. "$ref": "#/components/schemas/ConnectionEnvInfo"
  30219. }
  30220. ]
  30221. },
  30222. "IntegrationInfo": {
  30223. "type": "object",
  30224. "properties": {
  30225. "id": {
  30226. "type": "string"
  30227. },
  30228. "name": {
  30229. "type": "string"
  30230. },
  30231. "methods": {
  30232. "type": "array",
  30233. "items": {
  30234. "$ref": "#/components/schemas/IntegrationMethod"
  30235. }
  30236. },
  30237. "connections": {
  30238. "type": "array",
  30239. "items": {
  30240. "$ref": "#/components/schemas/ConnectionInfo"
  30241. }
  30242. }
  30243. },
  30244. "required": ["id", "name", "methods", "connections"],
  30245. "additionalProperties": false
  30246. },
  30247. "IntegrationAttempt": {
  30248. "type": "object",
  30249. "properties": {
  30250. "attemptID": {
  30251. "type": "string"
  30252. },
  30253. "url": {
  30254. "type": "string"
  30255. },
  30256. "instructions": {
  30257. "type": "string"
  30258. },
  30259. "mode": {
  30260. "type": "string",
  30261. "enum": ["auto", "code"]
  30262. },
  30263. "time": {
  30264. "type": "object",
  30265. "properties": {
  30266. "created": {
  30267. "anyOf": [
  30268. {
  30269. "type": "number"
  30270. },
  30271. {
  30272. "type": "string",
  30273. "enum": ["NaN"]
  30274. },
  30275. {
  30276. "type": "string",
  30277. "enum": ["Infinity"]
  30278. },
  30279. {
  30280. "type": "string",
  30281. "enum": ["-Infinity"]
  30282. },
  30283. {
  30284. "type": "string",
  30285. "enum": ["Infinity", "-Infinity", "NaN"]
  30286. }
  30287. ]
  30288. },
  30289. "expires": {
  30290. "anyOf": [
  30291. {
  30292. "type": "number"
  30293. },
  30294. {
  30295. "type": "string",
  30296. "enum": ["NaN"]
  30297. },
  30298. {
  30299. "type": "string",
  30300. "enum": ["Infinity"]
  30301. },
  30302. {
  30303. "type": "string",
  30304. "enum": ["-Infinity"]
  30305. },
  30306. {
  30307. "type": "string",
  30308. "enum": ["Infinity", "-Infinity", "NaN"]
  30309. }
  30310. ]
  30311. }
  30312. },
  30313. "required": ["created", "expires"],
  30314. "additionalProperties": false
  30315. }
  30316. },
  30317. "required": ["attemptID", "url", "instructions", "mode", "time"],
  30318. "additionalProperties": false
  30319. },
  30320. "IntegrationAttemptStatus": {
  30321. "anyOf": [
  30322. {
  30323. "type": "object",
  30324. "properties": {
  30325. "status": {
  30326. "type": "string",
  30327. "enum": ["pending"]
  30328. },
  30329. "time": {
  30330. "type": "object",
  30331. "properties": {
  30332. "created": {
  30333. "anyOf": [
  30334. {
  30335. "type": "number"
  30336. },
  30337. {
  30338. "type": "string",
  30339. "enum": ["NaN"]
  30340. },
  30341. {
  30342. "type": "string",
  30343. "enum": ["Infinity"]
  30344. },
  30345. {
  30346. "type": "string",
  30347. "enum": ["-Infinity"]
  30348. },
  30349. {
  30350. "type": "string",
  30351. "enum": ["Infinity", "-Infinity", "NaN"]
  30352. }
  30353. ]
  30354. },
  30355. "expires": {
  30356. "anyOf": [
  30357. {
  30358. "type": "number"
  30359. },
  30360. {
  30361. "type": "string",
  30362. "enum": ["NaN"]
  30363. },
  30364. {
  30365. "type": "string",
  30366. "enum": ["Infinity"]
  30367. },
  30368. {
  30369. "type": "string",
  30370. "enum": ["-Infinity"]
  30371. },
  30372. {
  30373. "type": "string",
  30374. "enum": ["Infinity", "-Infinity", "NaN"]
  30375. }
  30376. ]
  30377. }
  30378. },
  30379. "required": ["created", "expires"],
  30380. "additionalProperties": false
  30381. }
  30382. },
  30383. "required": ["status", "time"],
  30384. "additionalProperties": false
  30385. },
  30386. {
  30387. "type": "object",
  30388. "properties": {
  30389. "status": {
  30390. "type": "string",
  30391. "enum": ["complete"]
  30392. },
  30393. "time": {
  30394. "type": "object",
  30395. "properties": {
  30396. "created": {
  30397. "anyOf": [
  30398. {
  30399. "type": "number"
  30400. },
  30401. {
  30402. "type": "string",
  30403. "enum": ["NaN"]
  30404. },
  30405. {
  30406. "type": "string",
  30407. "enum": ["Infinity"]
  30408. },
  30409. {
  30410. "type": "string",
  30411. "enum": ["-Infinity"]
  30412. },
  30413. {
  30414. "type": "string",
  30415. "enum": ["Infinity", "-Infinity", "NaN"]
  30416. }
  30417. ]
  30418. },
  30419. "expires": {
  30420. "anyOf": [
  30421. {
  30422. "type": "number"
  30423. },
  30424. {
  30425. "type": "string",
  30426. "enum": ["NaN"]
  30427. },
  30428. {
  30429. "type": "string",
  30430. "enum": ["Infinity"]
  30431. },
  30432. {
  30433. "type": "string",
  30434. "enum": ["-Infinity"]
  30435. },
  30436. {
  30437. "type": "string",
  30438. "enum": ["Infinity", "-Infinity", "NaN"]
  30439. }
  30440. ]
  30441. }
  30442. },
  30443. "required": ["created", "expires"],
  30444. "additionalProperties": false
  30445. }
  30446. },
  30447. "required": ["status", "time"],
  30448. "additionalProperties": false
  30449. },
  30450. {
  30451. "type": "object",
  30452. "properties": {
  30453. "status": {
  30454. "type": "string",
  30455. "enum": ["failed"]
  30456. },
  30457. "message": {
  30458. "type": "string"
  30459. },
  30460. "time": {
  30461. "type": "object",
  30462. "properties": {
  30463. "created": {
  30464. "anyOf": [
  30465. {
  30466. "type": "number"
  30467. },
  30468. {
  30469. "type": "string",
  30470. "enum": ["NaN"]
  30471. },
  30472. {
  30473. "type": "string",
  30474. "enum": ["Infinity"]
  30475. },
  30476. {
  30477. "type": "string",
  30478. "enum": ["-Infinity"]
  30479. },
  30480. {
  30481. "type": "string",
  30482. "enum": ["Infinity", "-Infinity", "NaN"]
  30483. }
  30484. ]
  30485. },
  30486. "expires": {
  30487. "anyOf": [
  30488. {
  30489. "type": "number"
  30490. },
  30491. {
  30492. "type": "string",
  30493. "enum": ["NaN"]
  30494. },
  30495. {
  30496. "type": "string",
  30497. "enum": ["Infinity"]
  30498. },
  30499. {
  30500. "type": "string",
  30501. "enum": ["-Infinity"]
  30502. },
  30503. {
  30504. "type": "string",
  30505. "enum": ["Infinity", "-Infinity", "NaN"]
  30506. }
  30507. ]
  30508. }
  30509. },
  30510. "required": ["created", "expires"],
  30511. "additionalProperties": false
  30512. }
  30513. },
  30514. "required": ["status", "message", "time"],
  30515. "additionalProperties": false
  30516. },
  30517. {
  30518. "type": "object",
  30519. "properties": {
  30520. "status": {
  30521. "type": "string",
  30522. "enum": ["expired"]
  30523. },
  30524. "time": {
  30525. "type": "object",
  30526. "properties": {
  30527. "created": {
  30528. "anyOf": [
  30529. {
  30530. "type": "number"
  30531. },
  30532. {
  30533. "type": "string",
  30534. "enum": ["NaN"]
  30535. },
  30536. {
  30537. "type": "string",
  30538. "enum": ["Infinity"]
  30539. },
  30540. {
  30541. "type": "string",
  30542. "enum": ["-Infinity"]
  30543. },
  30544. {
  30545. "type": "string",
  30546. "enum": ["Infinity", "-Infinity", "NaN"]
  30547. }
  30548. ]
  30549. },
  30550. "expires": {
  30551. "anyOf": [
  30552. {
  30553. "type": "number"
  30554. },
  30555. {
  30556. "type": "string",
  30557. "enum": ["NaN"]
  30558. },
  30559. {
  30560. "type": "string",
  30561. "enum": ["Infinity"]
  30562. },
  30563. {
  30564. "type": "string",
  30565. "enum": ["-Infinity"]
  30566. },
  30567. {
  30568. "type": "string",
  30569. "enum": ["Infinity", "-Infinity", "NaN"]
  30570. }
  30571. ]
  30572. }
  30573. },
  30574. "required": ["created", "expires"],
  30575. "additionalProperties": false
  30576. }
  30577. },
  30578. "required": ["status", "time"],
  30579. "additionalProperties": false
  30580. }
  30581. ]
  30582. },
  30583. "PermissionV2Request": {
  30584. "type": "object",
  30585. "properties": {
  30586. "id": {
  30587. "type": "string",
  30588. "pattern": "^per"
  30589. },
  30590. "sessionID": {
  30591. "type": "string",
  30592. "pattern": "^ses"
  30593. },
  30594. "action": {
  30595. "type": "string"
  30596. },
  30597. "resources": {
  30598. "type": "array",
  30599. "items": {
  30600. "type": "string"
  30601. }
  30602. },
  30603. "save": {
  30604. "type": "array",
  30605. "items": {
  30606. "type": "string"
  30607. }
  30608. },
  30609. "metadata": {
  30610. "type": "object"
  30611. },
  30612. "source": {
  30613. "$ref": "#/components/schemas/PermissionV2Source"
  30614. }
  30615. },
  30616. "required": ["id", "sessionID", "action", "resources"],
  30617. "additionalProperties": false
  30618. },
  30619. "PermissionSavedInfo": {
  30620. "type": "object",
  30621. "properties": {
  30622. "id": {
  30623. "type": "string"
  30624. },
  30625. "projectID": {
  30626. "type": "string"
  30627. },
  30628. "action": {
  30629. "type": "string"
  30630. },
  30631. "resource": {
  30632. "type": "string"
  30633. }
  30634. },
  30635. "required": ["id", "projectID", "action", "resource"],
  30636. "additionalProperties": false
  30637. },
  30638. "FileSystemEntry": {
  30639. "type": "object",
  30640. "properties": {
  30641. "path": {
  30642. "type": "string"
  30643. },
  30644. "type": {
  30645. "type": "string",
  30646. "enum": ["file", "directory"]
  30647. }
  30648. },
  30649. "required": ["path", "type"],
  30650. "additionalProperties": false
  30651. },
  30652. "CommandV2Info": {
  30653. "type": "object",
  30654. "properties": {
  30655. "name": {
  30656. "type": "string"
  30657. },
  30658. "template": {
  30659. "type": "string"
  30660. },
  30661. "description": {
  30662. "type": "string"
  30663. },
  30664. "agent": {
  30665. "type": "string"
  30666. },
  30667. "model": {
  30668. "$ref": "#/components/schemas/ModelRef"
  30669. },
  30670. "subtask": {
  30671. "type": "boolean"
  30672. }
  30673. },
  30674. "required": ["name", "template"],
  30675. "additionalProperties": false
  30676. },
  30677. "SkillV2Info": {
  30678. "type": "object",
  30679. "properties": {
  30680. "name": {
  30681. "type": "string"
  30682. },
  30683. "description": {
  30684. "type": "string"
  30685. },
  30686. "slash": {
  30687. "type": "boolean"
  30688. },
  30689. "location": {
  30690. "type": "string"
  30691. },
  30692. "content": {
  30693. "type": "string"
  30694. }
  30695. },
  30696. "required": ["name", "location", "content"],
  30697. "additionalProperties": false
  30698. },
  30699. "Models-devRefreshed": {
  30700. "type": "object",
  30701. "properties": {
  30702. "id": {
  30703. "type": "string",
  30704. "pattern": "^evt_"
  30705. },
  30706. "metadata": {
  30707. "type": "object"
  30708. },
  30709. "type": {
  30710. "type": "string",
  30711. "enum": ["models-dev.refreshed"]
  30712. },
  30713. "durable": {
  30714. "type": "object",
  30715. "properties": {
  30716. "aggregateID": {
  30717. "type": "string"
  30718. },
  30719. "seq": {
  30720. "type": "integer"
  30721. },
  30722. "version": {
  30723. "type": "integer"
  30724. }
  30725. },
  30726. "required": ["aggregateID", "seq", "version"],
  30727. "additionalProperties": false
  30728. },
  30729. "location": {
  30730. "$ref": "#/components/schemas/LocationRef"
  30731. },
  30732. "data": {
  30733. "type": "object",
  30734. "properties": {}
  30735. }
  30736. },
  30737. "required": ["id", "type", "data"],
  30738. "additionalProperties": false
  30739. },
  30740. "IntegrationUpdated": {
  30741. "type": "object",
  30742. "properties": {
  30743. "id": {
  30744. "type": "string",
  30745. "pattern": "^evt_"
  30746. },
  30747. "metadata": {
  30748. "type": "object"
  30749. },
  30750. "type": {
  30751. "type": "string",
  30752. "enum": ["integration.updated"]
  30753. },
  30754. "durable": {
  30755. "type": "object",
  30756. "properties": {
  30757. "aggregateID": {
  30758. "type": "string"
  30759. },
  30760. "seq": {
  30761. "type": "integer"
  30762. },
  30763. "version": {
  30764. "type": "integer"
  30765. }
  30766. },
  30767. "required": ["aggregateID", "seq", "version"],
  30768. "additionalProperties": false
  30769. },
  30770. "location": {
  30771. "$ref": "#/components/schemas/LocationRef"
  30772. },
  30773. "data": {
  30774. "type": "object",
  30775. "properties": {}
  30776. }
  30777. },
  30778. "required": ["id", "type", "data"],
  30779. "additionalProperties": false
  30780. },
  30781. "IntegrationConnectionUpdated": {
  30782. "type": "object",
  30783. "properties": {
  30784. "id": {
  30785. "type": "string",
  30786. "pattern": "^evt_"
  30787. },
  30788. "metadata": {
  30789. "type": "object"
  30790. },
  30791. "type": {
  30792. "type": "string",
  30793. "enum": ["integration.connection.updated"]
  30794. },
  30795. "durable": {
  30796. "type": "object",
  30797. "properties": {
  30798. "aggregateID": {
  30799. "type": "string"
  30800. },
  30801. "seq": {
  30802. "type": "integer"
  30803. },
  30804. "version": {
  30805. "type": "integer"
  30806. }
  30807. },
  30808. "required": ["aggregateID", "seq", "version"],
  30809. "additionalProperties": false
  30810. },
  30811. "location": {
  30812. "$ref": "#/components/schemas/LocationRef"
  30813. },
  30814. "data": {
  30815. "type": "object",
  30816. "properties": {
  30817. "integrationID": {
  30818. "type": "string"
  30819. }
  30820. },
  30821. "required": ["integrationID"],
  30822. "additionalProperties": false
  30823. }
  30824. },
  30825. "required": ["id", "type", "data"],
  30826. "additionalProperties": false
  30827. },
  30828. "CatalogUpdated": {
  30829. "type": "object",
  30830. "properties": {
  30831. "id": {
  30832. "type": "string",
  30833. "pattern": "^evt_"
  30834. },
  30835. "metadata": {
  30836. "type": "object"
  30837. },
  30838. "type": {
  30839. "type": "string",
  30840. "enum": ["catalog.updated"]
  30841. },
  30842. "durable": {
  30843. "type": "object",
  30844. "properties": {
  30845. "aggregateID": {
  30846. "type": "string"
  30847. },
  30848. "seq": {
  30849. "type": "integer"
  30850. },
  30851. "version": {
  30852. "type": "integer"
  30853. }
  30854. },
  30855. "required": ["aggregateID", "seq", "version"],
  30856. "additionalProperties": false
  30857. },
  30858. "location": {
  30859. "$ref": "#/components/schemas/LocationRef"
  30860. },
  30861. "data": {
  30862. "type": "object",
  30863. "properties": {}
  30864. }
  30865. },
  30866. "required": ["id", "type", "data"],
  30867. "additionalProperties": false
  30868. },
  30869. "SessionCreated": {
  30870. "type": "object",
  30871. "properties": {
  30872. "id": {
  30873. "type": "string",
  30874. "pattern": "^evt_"
  30875. },
  30876. "metadata": {
  30877. "type": "object"
  30878. },
  30879. "type": {
  30880. "type": "string",
  30881. "enum": ["session.created"]
  30882. },
  30883. "durable": {
  30884. "type": "object",
  30885. "properties": {
  30886. "aggregateID": {
  30887. "type": "string"
  30888. },
  30889. "seq": {
  30890. "type": "integer"
  30891. },
  30892. "version": {
  30893. "type": "integer"
  30894. }
  30895. },
  30896. "required": ["aggregateID", "seq", "version"],
  30897. "additionalProperties": false
  30898. },
  30899. "location": {
  30900. "$ref": "#/components/schemas/LocationRef"
  30901. },
  30902. "data": {
  30903. "type": "object",
  30904. "properties": {
  30905. "sessionID": {
  30906. "type": "string",
  30907. "pattern": "^ses"
  30908. },
  30909. "info": {
  30910. "$ref": "#/components/schemas/Session"
  30911. }
  30912. },
  30913. "required": ["sessionID", "info"],
  30914. "additionalProperties": false
  30915. }
  30916. },
  30917. "required": ["id", "type", "data"],
  30918. "additionalProperties": false
  30919. },
  30920. "SessionUpdated": {
  30921. "type": "object",
  30922. "properties": {
  30923. "id": {
  30924. "type": "string",
  30925. "pattern": "^evt_"
  30926. },
  30927. "metadata": {
  30928. "type": "object"
  30929. },
  30930. "type": {
  30931. "type": "string",
  30932. "enum": ["session.updated"]
  30933. },
  30934. "durable": {
  30935. "type": "object",
  30936. "properties": {
  30937. "aggregateID": {
  30938. "type": "string"
  30939. },
  30940. "seq": {
  30941. "type": "integer"
  30942. },
  30943. "version": {
  30944. "type": "integer"
  30945. }
  30946. },
  30947. "required": ["aggregateID", "seq", "version"],
  30948. "additionalProperties": false
  30949. },
  30950. "location": {
  30951. "$ref": "#/components/schemas/LocationRef"
  30952. },
  30953. "data": {
  30954. "type": "object",
  30955. "properties": {
  30956. "sessionID": {
  30957. "type": "string",
  30958. "pattern": "^ses"
  30959. },
  30960. "info": {
  30961. "$ref": "#/components/schemas/Session"
  30962. }
  30963. },
  30964. "required": ["sessionID", "info"],
  30965. "additionalProperties": false
  30966. }
  30967. },
  30968. "required": ["id", "type", "data"],
  30969. "additionalProperties": false
  30970. },
  30971. "SessionDeleted": {
  30972. "type": "object",
  30973. "properties": {
  30974. "id": {
  30975. "type": "string",
  30976. "pattern": "^evt_"
  30977. },
  30978. "metadata": {
  30979. "type": "object"
  30980. },
  30981. "type": {
  30982. "type": "string",
  30983. "enum": ["session.deleted"]
  30984. },
  30985. "durable": {
  30986. "type": "object",
  30987. "properties": {
  30988. "aggregateID": {
  30989. "type": "string"
  30990. },
  30991. "seq": {
  30992. "type": "integer"
  30993. },
  30994. "version": {
  30995. "type": "integer"
  30996. }
  30997. },
  30998. "required": ["aggregateID", "seq", "version"],
  30999. "additionalProperties": false
  31000. },
  31001. "location": {
  31002. "$ref": "#/components/schemas/LocationRef"
  31003. },
  31004. "data": {
  31005. "type": "object",
  31006. "properties": {
  31007. "sessionID": {
  31008. "type": "string",
  31009. "pattern": "^ses"
  31010. },
  31011. "info": {
  31012. "$ref": "#/components/schemas/Session"
  31013. }
  31014. },
  31015. "required": ["sessionID", "info"],
  31016. "additionalProperties": false
  31017. }
  31018. },
  31019. "required": ["id", "type", "data"],
  31020. "additionalProperties": false
  31021. },
  31022. "MessageUpdated": {
  31023. "type": "object",
  31024. "properties": {
  31025. "id": {
  31026. "type": "string",
  31027. "pattern": "^evt_"
  31028. },
  31029. "metadata": {
  31030. "type": "object"
  31031. },
  31032. "type": {
  31033. "type": "string",
  31034. "enum": ["message.updated"]
  31035. },
  31036. "durable": {
  31037. "type": "object",
  31038. "properties": {
  31039. "aggregateID": {
  31040. "type": "string"
  31041. },
  31042. "seq": {
  31043. "type": "integer"
  31044. },
  31045. "version": {
  31046. "type": "integer"
  31047. }
  31048. },
  31049. "required": ["aggregateID", "seq", "version"],
  31050. "additionalProperties": false
  31051. },
  31052. "location": {
  31053. "$ref": "#/components/schemas/LocationRef"
  31054. },
  31055. "data": {
  31056. "type": "object",
  31057. "properties": {
  31058. "sessionID": {
  31059. "type": "string",
  31060. "pattern": "^ses"
  31061. },
  31062. "info": {
  31063. "$ref": "#/components/schemas/Message"
  31064. }
  31065. },
  31066. "required": ["sessionID", "info"],
  31067. "additionalProperties": false
  31068. }
  31069. },
  31070. "required": ["id", "type", "data"],
  31071. "additionalProperties": false
  31072. },
  31073. "MessageRemoved": {
  31074. "type": "object",
  31075. "properties": {
  31076. "id": {
  31077. "type": "string",
  31078. "pattern": "^evt_"
  31079. },
  31080. "metadata": {
  31081. "type": "object"
  31082. },
  31083. "type": {
  31084. "type": "string",
  31085. "enum": ["message.removed"]
  31086. },
  31087. "durable": {
  31088. "type": "object",
  31089. "properties": {
  31090. "aggregateID": {
  31091. "type": "string"
  31092. },
  31093. "seq": {
  31094. "type": "integer"
  31095. },
  31096. "version": {
  31097. "type": "integer"
  31098. }
  31099. },
  31100. "required": ["aggregateID", "seq", "version"],
  31101. "additionalProperties": false
  31102. },
  31103. "location": {
  31104. "$ref": "#/components/schemas/LocationRef"
  31105. },
  31106. "data": {
  31107. "type": "object",
  31108. "properties": {
  31109. "sessionID": {
  31110. "type": "string",
  31111. "pattern": "^ses"
  31112. },
  31113. "messageID": {
  31114. "type": "string",
  31115. "pattern": "^msg"
  31116. }
  31117. },
  31118. "required": ["sessionID", "messageID"],
  31119. "additionalProperties": false
  31120. }
  31121. },
  31122. "required": ["id", "type", "data"],
  31123. "additionalProperties": false
  31124. },
  31125. "MessagePartUpdated": {
  31126. "type": "object",
  31127. "properties": {
  31128. "id": {
  31129. "type": "string",
  31130. "pattern": "^evt_"
  31131. },
  31132. "metadata": {
  31133. "type": "object"
  31134. },
  31135. "type": {
  31136. "type": "string",
  31137. "enum": ["message.part.updated"]
  31138. },
  31139. "durable": {
  31140. "type": "object",
  31141. "properties": {
  31142. "aggregateID": {
  31143. "type": "string"
  31144. },
  31145. "seq": {
  31146. "type": "integer"
  31147. },
  31148. "version": {
  31149. "type": "integer"
  31150. }
  31151. },
  31152. "required": ["aggregateID", "seq", "version"],
  31153. "additionalProperties": false
  31154. },
  31155. "location": {
  31156. "$ref": "#/components/schemas/LocationRef"
  31157. },
  31158. "data": {
  31159. "type": "object",
  31160. "properties": {
  31161. "sessionID": {
  31162. "type": "string",
  31163. "pattern": "^ses"
  31164. },
  31165. "part": {
  31166. "$ref": "#/components/schemas/Part"
  31167. },
  31168. "time": {
  31169. "type": "number"
  31170. }
  31171. },
  31172. "required": ["sessionID", "part", "time"],
  31173. "additionalProperties": false
  31174. }
  31175. },
  31176. "required": ["id", "type", "data"],
  31177. "additionalProperties": false
  31178. },
  31179. "MessagePartRemoved": {
  31180. "type": "object",
  31181. "properties": {
  31182. "id": {
  31183. "type": "string",
  31184. "pattern": "^evt_"
  31185. },
  31186. "metadata": {
  31187. "type": "object"
  31188. },
  31189. "type": {
  31190. "type": "string",
  31191. "enum": ["message.part.removed"]
  31192. },
  31193. "durable": {
  31194. "type": "object",
  31195. "properties": {
  31196. "aggregateID": {
  31197. "type": "string"
  31198. },
  31199. "seq": {
  31200. "type": "integer"
  31201. },
  31202. "version": {
  31203. "type": "integer"
  31204. }
  31205. },
  31206. "required": ["aggregateID", "seq", "version"],
  31207. "additionalProperties": false
  31208. },
  31209. "location": {
  31210. "$ref": "#/components/schemas/LocationRef"
  31211. },
  31212. "data": {
  31213. "type": "object",
  31214. "properties": {
  31215. "sessionID": {
  31216. "type": "string",
  31217. "pattern": "^ses"
  31218. },
  31219. "messageID": {
  31220. "type": "string",
  31221. "pattern": "^msg"
  31222. },
  31223. "partID": {
  31224. "type": "string",
  31225. "pattern": "^prt"
  31226. }
  31227. },
  31228. "required": ["sessionID", "messageID", "partID"],
  31229. "additionalProperties": false
  31230. }
  31231. },
  31232. "required": ["id", "type", "data"],
  31233. "additionalProperties": false
  31234. },
  31235. "SessionNextTextDelta": {
  31236. "type": "object",
  31237. "properties": {
  31238. "id": {
  31239. "type": "string",
  31240. "pattern": "^evt_"
  31241. },
  31242. "metadata": {
  31243. "type": "object"
  31244. },
  31245. "type": {
  31246. "type": "string",
  31247. "enum": ["session.next.text.delta"]
  31248. },
  31249. "durable": {
  31250. "type": "object",
  31251. "properties": {
  31252. "aggregateID": {
  31253. "type": "string"
  31254. },
  31255. "seq": {
  31256. "type": "integer"
  31257. },
  31258. "version": {
  31259. "type": "integer"
  31260. }
  31261. },
  31262. "required": ["aggregateID", "seq", "version"],
  31263. "additionalProperties": false
  31264. },
  31265. "location": {
  31266. "$ref": "#/components/schemas/LocationRef"
  31267. },
  31268. "data": {
  31269. "type": "object",
  31270. "properties": {
  31271. "timestamp": {
  31272. "type": "number"
  31273. },
  31274. "sessionID": {
  31275. "type": "string",
  31276. "pattern": "^ses"
  31277. },
  31278. "assistantMessageID": {
  31279. "type": "string",
  31280. "pattern": "^msg_"
  31281. },
  31282. "textID": {
  31283. "type": "string"
  31284. },
  31285. "delta": {
  31286. "type": "string"
  31287. }
  31288. },
  31289. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  31290. "additionalProperties": false
  31291. }
  31292. },
  31293. "required": ["id", "type", "data"],
  31294. "additionalProperties": false
  31295. },
  31296. "SessionNextReasoningDelta": {
  31297. "type": "object",
  31298. "properties": {
  31299. "id": {
  31300. "type": "string",
  31301. "pattern": "^evt_"
  31302. },
  31303. "metadata": {
  31304. "type": "object"
  31305. },
  31306. "type": {
  31307. "type": "string",
  31308. "enum": ["session.next.reasoning.delta"]
  31309. },
  31310. "durable": {
  31311. "type": "object",
  31312. "properties": {
  31313. "aggregateID": {
  31314. "type": "string"
  31315. },
  31316. "seq": {
  31317. "type": "integer"
  31318. },
  31319. "version": {
  31320. "type": "integer"
  31321. }
  31322. },
  31323. "required": ["aggregateID", "seq", "version"],
  31324. "additionalProperties": false
  31325. },
  31326. "location": {
  31327. "$ref": "#/components/schemas/LocationRef"
  31328. },
  31329. "data": {
  31330. "type": "object",
  31331. "properties": {
  31332. "timestamp": {
  31333. "type": "number"
  31334. },
  31335. "sessionID": {
  31336. "type": "string",
  31337. "pattern": "^ses"
  31338. },
  31339. "assistantMessageID": {
  31340. "type": "string",
  31341. "pattern": "^msg_"
  31342. },
  31343. "reasoningID": {
  31344. "type": "string"
  31345. },
  31346. "delta": {
  31347. "type": "string"
  31348. }
  31349. },
  31350. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  31351. "additionalProperties": false
  31352. }
  31353. },
  31354. "required": ["id", "type", "data"],
  31355. "additionalProperties": false
  31356. },
  31357. "SessionNextToolInputDelta": {
  31358. "type": "object",
  31359. "properties": {
  31360. "id": {
  31361. "type": "string",
  31362. "pattern": "^evt_"
  31363. },
  31364. "metadata": {
  31365. "type": "object"
  31366. },
  31367. "type": {
  31368. "type": "string",
  31369. "enum": ["session.next.tool.input.delta"]
  31370. },
  31371. "durable": {
  31372. "type": "object",
  31373. "properties": {
  31374. "aggregateID": {
  31375. "type": "string"
  31376. },
  31377. "seq": {
  31378. "type": "integer"
  31379. },
  31380. "version": {
  31381. "type": "integer"
  31382. }
  31383. },
  31384. "required": ["aggregateID", "seq", "version"],
  31385. "additionalProperties": false
  31386. },
  31387. "location": {
  31388. "$ref": "#/components/schemas/LocationRef"
  31389. },
  31390. "data": {
  31391. "type": "object",
  31392. "properties": {
  31393. "timestamp": {
  31394. "type": "number"
  31395. },
  31396. "sessionID": {
  31397. "type": "string",
  31398. "pattern": "^ses"
  31399. },
  31400. "assistantMessageID": {
  31401. "type": "string",
  31402. "pattern": "^msg_"
  31403. },
  31404. "callID": {
  31405. "type": "string"
  31406. },
  31407. "delta": {
  31408. "type": "string"
  31409. }
  31410. },
  31411. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  31412. "additionalProperties": false
  31413. }
  31414. },
  31415. "required": ["id", "type", "data"],
  31416. "additionalProperties": false
  31417. },
  31418. "SessionNextCompactionDelta": {
  31419. "type": "object",
  31420. "properties": {
  31421. "id": {
  31422. "type": "string",
  31423. "pattern": "^evt_"
  31424. },
  31425. "metadata": {
  31426. "type": "object"
  31427. },
  31428. "type": {
  31429. "type": "string",
  31430. "enum": ["session.next.compaction.delta"]
  31431. },
  31432. "durable": {
  31433. "type": "object",
  31434. "properties": {
  31435. "aggregateID": {
  31436. "type": "string"
  31437. },
  31438. "seq": {
  31439. "type": "integer"
  31440. },
  31441. "version": {
  31442. "type": "integer"
  31443. }
  31444. },
  31445. "required": ["aggregateID", "seq", "version"],
  31446. "additionalProperties": false
  31447. },
  31448. "location": {
  31449. "$ref": "#/components/schemas/LocationRef"
  31450. },
  31451. "data": {
  31452. "type": "object",
  31453. "properties": {
  31454. "timestamp": {
  31455. "type": "number"
  31456. },
  31457. "sessionID": {
  31458. "type": "string",
  31459. "pattern": "^ses"
  31460. },
  31461. "messageID": {
  31462. "type": "string",
  31463. "pattern": "^msg_"
  31464. },
  31465. "text": {
  31466. "type": "string"
  31467. }
  31468. },
  31469. "required": ["timestamp", "sessionID", "messageID", "text"],
  31470. "additionalProperties": false
  31471. }
  31472. },
  31473. "required": ["id", "type", "data"],
  31474. "additionalProperties": false
  31475. },
  31476. "MessagePartDelta": {
  31477. "type": "object",
  31478. "properties": {
  31479. "id": {
  31480. "type": "string",
  31481. "pattern": "^evt_"
  31482. },
  31483. "metadata": {
  31484. "type": "object"
  31485. },
  31486. "type": {
  31487. "type": "string",
  31488. "enum": ["message.part.delta"]
  31489. },
  31490. "durable": {
  31491. "type": "object",
  31492. "properties": {
  31493. "aggregateID": {
  31494. "type": "string"
  31495. },
  31496. "seq": {
  31497. "type": "integer"
  31498. },
  31499. "version": {
  31500. "type": "integer"
  31501. }
  31502. },
  31503. "required": ["aggregateID", "seq", "version"],
  31504. "additionalProperties": false
  31505. },
  31506. "location": {
  31507. "$ref": "#/components/schemas/LocationRef"
  31508. },
  31509. "data": {
  31510. "type": "object",
  31511. "properties": {
  31512. "sessionID": {
  31513. "type": "string",
  31514. "pattern": "^ses"
  31515. },
  31516. "messageID": {
  31517. "type": "string",
  31518. "pattern": "^msg"
  31519. },
  31520. "partID": {
  31521. "type": "string",
  31522. "pattern": "^prt"
  31523. },
  31524. "field": {
  31525. "type": "string"
  31526. },
  31527. "delta": {
  31528. "type": "string"
  31529. }
  31530. },
  31531. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  31532. "additionalProperties": false
  31533. }
  31534. },
  31535. "required": ["id", "type", "data"],
  31536. "additionalProperties": false
  31537. },
  31538. "SessionDiff": {
  31539. "type": "object",
  31540. "properties": {
  31541. "id": {
  31542. "type": "string",
  31543. "pattern": "^evt_"
  31544. },
  31545. "metadata": {
  31546. "type": "object"
  31547. },
  31548. "type": {
  31549. "type": "string",
  31550. "enum": ["session.diff"]
  31551. },
  31552. "durable": {
  31553. "type": "object",
  31554. "properties": {
  31555. "aggregateID": {
  31556. "type": "string"
  31557. },
  31558. "seq": {
  31559. "type": "integer"
  31560. },
  31561. "version": {
  31562. "type": "integer"
  31563. }
  31564. },
  31565. "required": ["aggregateID", "seq", "version"],
  31566. "additionalProperties": false
  31567. },
  31568. "location": {
  31569. "$ref": "#/components/schemas/LocationRef"
  31570. },
  31571. "data": {
  31572. "type": "object",
  31573. "properties": {
  31574. "sessionID": {
  31575. "type": "string",
  31576. "pattern": "^ses"
  31577. },
  31578. "diff": {
  31579. "type": "array",
  31580. "items": {
  31581. "$ref": "#/components/schemas/SnapshotFileDiff"
  31582. }
  31583. }
  31584. },
  31585. "required": ["sessionID", "diff"],
  31586. "additionalProperties": false
  31587. }
  31588. },
  31589. "required": ["id", "type", "data"],
  31590. "additionalProperties": false
  31591. },
  31592. "SessionError": {
  31593. "type": "object",
  31594. "properties": {
  31595. "id": {
  31596. "type": "string",
  31597. "pattern": "^evt_"
  31598. },
  31599. "metadata": {
  31600. "type": "object"
  31601. },
  31602. "type": {
  31603. "type": "string",
  31604. "enum": ["session.error"]
  31605. },
  31606. "durable": {
  31607. "type": "object",
  31608. "properties": {
  31609. "aggregateID": {
  31610. "type": "string"
  31611. },
  31612. "seq": {
  31613. "type": "integer"
  31614. },
  31615. "version": {
  31616. "type": "integer"
  31617. }
  31618. },
  31619. "required": ["aggregateID", "seq", "version"],
  31620. "additionalProperties": false
  31621. },
  31622. "location": {
  31623. "$ref": "#/components/schemas/LocationRef"
  31624. },
  31625. "data": {
  31626. "type": "object",
  31627. "properties": {
  31628. "sessionID": {
  31629. "type": "string",
  31630. "pattern": "^ses"
  31631. },
  31632. "error": {
  31633. "anyOf": [
  31634. {
  31635. "$ref": "#/components/schemas/ProviderAuthError"
  31636. },
  31637. {
  31638. "$ref": "#/components/schemas/UnknownError"
  31639. },
  31640. {
  31641. "$ref": "#/components/schemas/MessageOutputLengthError"
  31642. },
  31643. {
  31644. "$ref": "#/components/schemas/MessageAbortedError"
  31645. },
  31646. {
  31647. "$ref": "#/components/schemas/StructuredOutputError"
  31648. },
  31649. {
  31650. "$ref": "#/components/schemas/ContextOverflowError"
  31651. },
  31652. {
  31653. "$ref": "#/components/schemas/ContentFilterError"
  31654. },
  31655. {
  31656. "$ref": "#/components/schemas/APIError"
  31657. }
  31658. ]
  31659. }
  31660. },
  31661. "additionalProperties": false
  31662. }
  31663. },
  31664. "required": ["id", "type", "data"],
  31665. "additionalProperties": false
  31666. },
  31667. "InstallationUpdated": {
  31668. "type": "object",
  31669. "properties": {
  31670. "id": {
  31671. "type": "string",
  31672. "pattern": "^evt_"
  31673. },
  31674. "metadata": {
  31675. "type": "object"
  31676. },
  31677. "type": {
  31678. "type": "string",
  31679. "enum": ["installation.updated"]
  31680. },
  31681. "durable": {
  31682. "type": "object",
  31683. "properties": {
  31684. "aggregateID": {
  31685. "type": "string"
  31686. },
  31687. "seq": {
  31688. "type": "integer"
  31689. },
  31690. "version": {
  31691. "type": "integer"
  31692. }
  31693. },
  31694. "required": ["aggregateID", "seq", "version"],
  31695. "additionalProperties": false
  31696. },
  31697. "location": {
  31698. "$ref": "#/components/schemas/LocationRef"
  31699. },
  31700. "data": {
  31701. "type": "object",
  31702. "properties": {
  31703. "version": {
  31704. "type": "string"
  31705. }
  31706. },
  31707. "required": ["version"],
  31708. "additionalProperties": false
  31709. }
  31710. },
  31711. "required": ["id", "type", "data"],
  31712. "additionalProperties": false
  31713. },
  31714. "InstallationUpdate-available": {
  31715. "type": "object",
  31716. "properties": {
  31717. "id": {
  31718. "type": "string",
  31719. "pattern": "^evt_"
  31720. },
  31721. "metadata": {
  31722. "type": "object"
  31723. },
  31724. "type": {
  31725. "type": "string",
  31726. "enum": ["installation.update-available"]
  31727. },
  31728. "durable": {
  31729. "type": "object",
  31730. "properties": {
  31731. "aggregateID": {
  31732. "type": "string"
  31733. },
  31734. "seq": {
  31735. "type": "integer"
  31736. },
  31737. "version": {
  31738. "type": "integer"
  31739. }
  31740. },
  31741. "required": ["aggregateID", "seq", "version"],
  31742. "additionalProperties": false
  31743. },
  31744. "location": {
  31745. "$ref": "#/components/schemas/LocationRef"
  31746. },
  31747. "data": {
  31748. "type": "object",
  31749. "properties": {
  31750. "version": {
  31751. "type": "string"
  31752. }
  31753. },
  31754. "required": ["version"],
  31755. "additionalProperties": false
  31756. }
  31757. },
  31758. "required": ["id", "type", "data"],
  31759. "additionalProperties": false
  31760. },
  31761. "FileEdited": {
  31762. "type": "object",
  31763. "properties": {
  31764. "id": {
  31765. "type": "string",
  31766. "pattern": "^evt_"
  31767. },
  31768. "metadata": {
  31769. "type": "object"
  31770. },
  31771. "type": {
  31772. "type": "string",
  31773. "enum": ["file.edited"]
  31774. },
  31775. "durable": {
  31776. "type": "object",
  31777. "properties": {
  31778. "aggregateID": {
  31779. "type": "string"
  31780. },
  31781. "seq": {
  31782. "type": "integer"
  31783. },
  31784. "version": {
  31785. "type": "integer"
  31786. }
  31787. },
  31788. "required": ["aggregateID", "seq", "version"],
  31789. "additionalProperties": false
  31790. },
  31791. "location": {
  31792. "$ref": "#/components/schemas/LocationRef"
  31793. },
  31794. "data": {
  31795. "type": "object",
  31796. "properties": {
  31797. "file": {
  31798. "type": "string"
  31799. }
  31800. },
  31801. "required": ["file"],
  31802. "additionalProperties": false
  31803. }
  31804. },
  31805. "required": ["id", "type", "data"],
  31806. "additionalProperties": false
  31807. },
  31808. "ReferenceUpdated": {
  31809. "type": "object",
  31810. "properties": {
  31811. "id": {
  31812. "type": "string",
  31813. "pattern": "^evt_"
  31814. },
  31815. "metadata": {
  31816. "type": "object"
  31817. },
  31818. "type": {
  31819. "type": "string",
  31820. "enum": ["reference.updated"]
  31821. },
  31822. "durable": {
  31823. "type": "object",
  31824. "properties": {
  31825. "aggregateID": {
  31826. "type": "string"
  31827. },
  31828. "seq": {
  31829. "type": "integer"
  31830. },
  31831. "version": {
  31832. "type": "integer"
  31833. }
  31834. },
  31835. "required": ["aggregateID", "seq", "version"],
  31836. "additionalProperties": false
  31837. },
  31838. "location": {
  31839. "$ref": "#/components/schemas/LocationRef"
  31840. },
  31841. "data": {
  31842. "type": "object",
  31843. "properties": {}
  31844. }
  31845. },
  31846. "required": ["id", "type", "data"],
  31847. "additionalProperties": false
  31848. },
  31849. "PermissionV2Asked": {
  31850. "type": "object",
  31851. "properties": {
  31852. "id": {
  31853. "type": "string",
  31854. "pattern": "^evt_"
  31855. },
  31856. "metadata": {
  31857. "type": "object"
  31858. },
  31859. "type": {
  31860. "type": "string",
  31861. "enum": ["permission.v2.asked"]
  31862. },
  31863. "durable": {
  31864. "type": "object",
  31865. "properties": {
  31866. "aggregateID": {
  31867. "type": "string"
  31868. },
  31869. "seq": {
  31870. "type": "integer"
  31871. },
  31872. "version": {
  31873. "type": "integer"
  31874. }
  31875. },
  31876. "required": ["aggregateID", "seq", "version"],
  31877. "additionalProperties": false
  31878. },
  31879. "location": {
  31880. "$ref": "#/components/schemas/LocationRef"
  31881. },
  31882. "data": {
  31883. "type": "object",
  31884. "properties": {
  31885. "id": {
  31886. "type": "string",
  31887. "pattern": "^per"
  31888. },
  31889. "sessionID": {
  31890. "type": "string",
  31891. "pattern": "^ses"
  31892. },
  31893. "action": {
  31894. "type": "string"
  31895. },
  31896. "resources": {
  31897. "type": "array",
  31898. "items": {
  31899. "type": "string"
  31900. }
  31901. },
  31902. "save": {
  31903. "type": "array",
  31904. "items": {
  31905. "type": "string"
  31906. }
  31907. },
  31908. "metadata": {
  31909. "type": "object"
  31910. },
  31911. "source": {
  31912. "$ref": "#/components/schemas/PermissionV2Source"
  31913. }
  31914. },
  31915. "required": ["id", "sessionID", "action", "resources"],
  31916. "additionalProperties": false
  31917. }
  31918. },
  31919. "required": ["id", "type", "data"],
  31920. "additionalProperties": false
  31921. },
  31922. "PermissionV2Replied": {
  31923. "type": "object",
  31924. "properties": {
  31925. "id": {
  31926. "type": "string",
  31927. "pattern": "^evt_"
  31928. },
  31929. "metadata": {
  31930. "type": "object"
  31931. },
  31932. "type": {
  31933. "type": "string",
  31934. "enum": ["permission.v2.replied"]
  31935. },
  31936. "durable": {
  31937. "type": "object",
  31938. "properties": {
  31939. "aggregateID": {
  31940. "type": "string"
  31941. },
  31942. "seq": {
  31943. "type": "integer"
  31944. },
  31945. "version": {
  31946. "type": "integer"
  31947. }
  31948. },
  31949. "required": ["aggregateID", "seq", "version"],
  31950. "additionalProperties": false
  31951. },
  31952. "location": {
  31953. "$ref": "#/components/schemas/LocationRef"
  31954. },
  31955. "data": {
  31956. "type": "object",
  31957. "properties": {
  31958. "sessionID": {
  31959. "type": "string",
  31960. "pattern": "^ses"
  31961. },
  31962. "requestID": {
  31963. "type": "string",
  31964. "pattern": "^per"
  31965. },
  31966. "reply": {
  31967. "$ref": "#/components/schemas/PermissionV2Reply"
  31968. }
  31969. },
  31970. "required": ["sessionID", "requestID", "reply"],
  31971. "additionalProperties": false
  31972. }
  31973. },
  31974. "required": ["id", "type", "data"],
  31975. "additionalProperties": false
  31976. },
  31977. "PluginAdded": {
  31978. "type": "object",
  31979. "properties": {
  31980. "id": {
  31981. "type": "string",
  31982. "pattern": "^evt_"
  31983. },
  31984. "metadata": {
  31985. "type": "object"
  31986. },
  31987. "type": {
  31988. "type": "string",
  31989. "enum": ["plugin.added"]
  31990. },
  31991. "durable": {
  31992. "type": "object",
  31993. "properties": {
  31994. "aggregateID": {
  31995. "type": "string"
  31996. },
  31997. "seq": {
  31998. "type": "integer"
  31999. },
  32000. "version": {
  32001. "type": "integer"
  32002. }
  32003. },
  32004. "required": ["aggregateID", "seq", "version"],
  32005. "additionalProperties": false
  32006. },
  32007. "location": {
  32008. "$ref": "#/components/schemas/LocationRef"
  32009. },
  32010. "data": {
  32011. "type": "object",
  32012. "properties": {
  32013. "id": {
  32014. "type": "string"
  32015. }
  32016. },
  32017. "required": ["id"],
  32018. "additionalProperties": false
  32019. }
  32020. },
  32021. "required": ["id", "type", "data"],
  32022. "additionalProperties": false
  32023. },
  32024. "ProjectDirectoriesUpdated": {
  32025. "type": "object",
  32026. "properties": {
  32027. "id": {
  32028. "type": "string",
  32029. "pattern": "^evt_"
  32030. },
  32031. "metadata": {
  32032. "type": "object"
  32033. },
  32034. "type": {
  32035. "type": "string",
  32036. "enum": ["project.directories.updated"]
  32037. },
  32038. "durable": {
  32039. "type": "object",
  32040. "properties": {
  32041. "aggregateID": {
  32042. "type": "string"
  32043. },
  32044. "seq": {
  32045. "type": "integer"
  32046. },
  32047. "version": {
  32048. "type": "integer"
  32049. }
  32050. },
  32051. "required": ["aggregateID", "seq", "version"],
  32052. "additionalProperties": false
  32053. },
  32054. "location": {
  32055. "$ref": "#/components/schemas/LocationRef"
  32056. },
  32057. "data": {
  32058. "type": "object",
  32059. "properties": {
  32060. "projectID": {
  32061. "type": "string"
  32062. }
  32063. },
  32064. "required": ["projectID"],
  32065. "additionalProperties": false
  32066. }
  32067. },
  32068. "required": ["id", "type", "data"],
  32069. "additionalProperties": false
  32070. },
  32071. "FileWatcherUpdated": {
  32072. "type": "object",
  32073. "properties": {
  32074. "id": {
  32075. "type": "string",
  32076. "pattern": "^evt_"
  32077. },
  32078. "metadata": {
  32079. "type": "object"
  32080. },
  32081. "type": {
  32082. "type": "string",
  32083. "enum": ["file.watcher.updated"]
  32084. },
  32085. "durable": {
  32086. "type": "object",
  32087. "properties": {
  32088. "aggregateID": {
  32089. "type": "string"
  32090. },
  32091. "seq": {
  32092. "type": "integer"
  32093. },
  32094. "version": {
  32095. "type": "integer"
  32096. }
  32097. },
  32098. "required": ["aggregateID", "seq", "version"],
  32099. "additionalProperties": false
  32100. },
  32101. "location": {
  32102. "$ref": "#/components/schemas/LocationRef"
  32103. },
  32104. "data": {
  32105. "type": "object",
  32106. "properties": {
  32107. "file": {
  32108. "type": "string"
  32109. },
  32110. "event": {
  32111. "type": "string",
  32112. "enum": ["add", "change", "unlink"]
  32113. }
  32114. },
  32115. "required": ["file", "event"],
  32116. "additionalProperties": false
  32117. }
  32118. },
  32119. "required": ["id", "type", "data"],
  32120. "additionalProperties": false
  32121. },
  32122. "PtyCreated": {
  32123. "type": "object",
  32124. "properties": {
  32125. "id": {
  32126. "type": "string",
  32127. "pattern": "^evt_"
  32128. },
  32129. "metadata": {
  32130. "type": "object"
  32131. },
  32132. "type": {
  32133. "type": "string",
  32134. "enum": ["pty.created"]
  32135. },
  32136. "durable": {
  32137. "type": "object",
  32138. "properties": {
  32139. "aggregateID": {
  32140. "type": "string"
  32141. },
  32142. "seq": {
  32143. "type": "integer"
  32144. },
  32145. "version": {
  32146. "type": "integer"
  32147. }
  32148. },
  32149. "required": ["aggregateID", "seq", "version"],
  32150. "additionalProperties": false
  32151. },
  32152. "location": {
  32153. "$ref": "#/components/schemas/LocationRef"
  32154. },
  32155. "data": {
  32156. "type": "object",
  32157. "properties": {
  32158. "info": {
  32159. "$ref": "#/components/schemas/Pty"
  32160. }
  32161. },
  32162. "required": ["info"],
  32163. "additionalProperties": false
  32164. }
  32165. },
  32166. "required": ["id", "type", "data"],
  32167. "additionalProperties": false
  32168. },
  32169. "PtyUpdated": {
  32170. "type": "object",
  32171. "properties": {
  32172. "id": {
  32173. "type": "string",
  32174. "pattern": "^evt_"
  32175. },
  32176. "metadata": {
  32177. "type": "object"
  32178. },
  32179. "type": {
  32180. "type": "string",
  32181. "enum": ["pty.updated"]
  32182. },
  32183. "durable": {
  32184. "type": "object",
  32185. "properties": {
  32186. "aggregateID": {
  32187. "type": "string"
  32188. },
  32189. "seq": {
  32190. "type": "integer"
  32191. },
  32192. "version": {
  32193. "type": "integer"
  32194. }
  32195. },
  32196. "required": ["aggregateID", "seq", "version"],
  32197. "additionalProperties": false
  32198. },
  32199. "location": {
  32200. "$ref": "#/components/schemas/LocationRef"
  32201. },
  32202. "data": {
  32203. "type": "object",
  32204. "properties": {
  32205. "info": {
  32206. "$ref": "#/components/schemas/Pty"
  32207. }
  32208. },
  32209. "required": ["info"],
  32210. "additionalProperties": false
  32211. }
  32212. },
  32213. "required": ["id", "type", "data"],
  32214. "additionalProperties": false
  32215. },
  32216. "PtyExited": {
  32217. "type": "object",
  32218. "properties": {
  32219. "id": {
  32220. "type": "string",
  32221. "pattern": "^evt_"
  32222. },
  32223. "metadata": {
  32224. "type": "object"
  32225. },
  32226. "type": {
  32227. "type": "string",
  32228. "enum": ["pty.exited"]
  32229. },
  32230. "durable": {
  32231. "type": "object",
  32232. "properties": {
  32233. "aggregateID": {
  32234. "type": "string"
  32235. },
  32236. "seq": {
  32237. "type": "integer"
  32238. },
  32239. "version": {
  32240. "type": "integer"
  32241. }
  32242. },
  32243. "required": ["aggregateID", "seq", "version"],
  32244. "additionalProperties": false
  32245. },
  32246. "location": {
  32247. "$ref": "#/components/schemas/LocationRef"
  32248. },
  32249. "data": {
  32250. "type": "object",
  32251. "properties": {
  32252. "id": {
  32253. "type": "string",
  32254. "pattern": "^pty"
  32255. },
  32256. "exitCode": {
  32257. "type": "integer",
  32258. "minimum": 0
  32259. }
  32260. },
  32261. "required": ["id", "exitCode"],
  32262. "additionalProperties": false
  32263. }
  32264. },
  32265. "required": ["id", "type", "data"],
  32266. "additionalProperties": false
  32267. },
  32268. "PtyDeleted": {
  32269. "type": "object",
  32270. "properties": {
  32271. "id": {
  32272. "type": "string",
  32273. "pattern": "^evt_"
  32274. },
  32275. "metadata": {
  32276. "type": "object"
  32277. },
  32278. "type": {
  32279. "type": "string",
  32280. "enum": ["pty.deleted"]
  32281. },
  32282. "durable": {
  32283. "type": "object",
  32284. "properties": {
  32285. "aggregateID": {
  32286. "type": "string"
  32287. },
  32288. "seq": {
  32289. "type": "integer"
  32290. },
  32291. "version": {
  32292. "type": "integer"
  32293. }
  32294. },
  32295. "required": ["aggregateID", "seq", "version"],
  32296. "additionalProperties": false
  32297. },
  32298. "location": {
  32299. "$ref": "#/components/schemas/LocationRef"
  32300. },
  32301. "data": {
  32302. "type": "object",
  32303. "properties": {
  32304. "id": {
  32305. "type": "string",
  32306. "pattern": "^pty"
  32307. }
  32308. },
  32309. "required": ["id"],
  32310. "additionalProperties": false
  32311. }
  32312. },
  32313. "required": ["id", "type", "data"],
  32314. "additionalProperties": false
  32315. },
  32316. "QuestionV2Asked": {
  32317. "type": "object",
  32318. "properties": {
  32319. "id": {
  32320. "type": "string",
  32321. "pattern": "^evt_"
  32322. },
  32323. "metadata": {
  32324. "type": "object"
  32325. },
  32326. "type": {
  32327. "type": "string",
  32328. "enum": ["question.v2.asked"]
  32329. },
  32330. "durable": {
  32331. "type": "object",
  32332. "properties": {
  32333. "aggregateID": {
  32334. "type": "string"
  32335. },
  32336. "seq": {
  32337. "type": "integer"
  32338. },
  32339. "version": {
  32340. "type": "integer"
  32341. }
  32342. },
  32343. "required": ["aggregateID", "seq", "version"],
  32344. "additionalProperties": false
  32345. },
  32346. "location": {
  32347. "$ref": "#/components/schemas/LocationRef"
  32348. },
  32349. "data": {
  32350. "type": "object",
  32351. "properties": {
  32352. "id": {
  32353. "type": "string",
  32354. "pattern": "^que"
  32355. },
  32356. "sessionID": {
  32357. "type": "string",
  32358. "pattern": "^ses"
  32359. },
  32360. "questions": {
  32361. "type": "array",
  32362. "items": {
  32363. "$ref": "#/components/schemas/QuestionV2Info"
  32364. },
  32365. "description": "Questions to ask"
  32366. },
  32367. "tool": {
  32368. "$ref": "#/components/schemas/QuestionV2Tool"
  32369. }
  32370. },
  32371. "required": ["id", "sessionID", "questions"],
  32372. "additionalProperties": false
  32373. }
  32374. },
  32375. "required": ["id", "type", "data"],
  32376. "additionalProperties": false
  32377. },
  32378. "QuestionV2Replied": {
  32379. "type": "object",
  32380. "properties": {
  32381. "id": {
  32382. "type": "string",
  32383. "pattern": "^evt_"
  32384. },
  32385. "metadata": {
  32386. "type": "object"
  32387. },
  32388. "type": {
  32389. "type": "string",
  32390. "enum": ["question.v2.replied"]
  32391. },
  32392. "durable": {
  32393. "type": "object",
  32394. "properties": {
  32395. "aggregateID": {
  32396. "type": "string"
  32397. },
  32398. "seq": {
  32399. "type": "integer"
  32400. },
  32401. "version": {
  32402. "type": "integer"
  32403. }
  32404. },
  32405. "required": ["aggregateID", "seq", "version"],
  32406. "additionalProperties": false
  32407. },
  32408. "location": {
  32409. "$ref": "#/components/schemas/LocationRef"
  32410. },
  32411. "data": {
  32412. "type": "object",
  32413. "properties": {
  32414. "sessionID": {
  32415. "type": "string",
  32416. "pattern": "^ses"
  32417. },
  32418. "requestID": {
  32419. "type": "string",
  32420. "pattern": "^que"
  32421. },
  32422. "answers": {
  32423. "type": "array",
  32424. "items": {
  32425. "$ref": "#/components/schemas/QuestionV2Answer"
  32426. }
  32427. }
  32428. },
  32429. "required": ["sessionID", "requestID", "answers"],
  32430. "additionalProperties": false
  32431. }
  32432. },
  32433. "required": ["id", "type", "data"],
  32434. "additionalProperties": false
  32435. },
  32436. "QuestionV2Rejected": {
  32437. "type": "object",
  32438. "properties": {
  32439. "id": {
  32440. "type": "string",
  32441. "pattern": "^evt_"
  32442. },
  32443. "metadata": {
  32444. "type": "object"
  32445. },
  32446. "type": {
  32447. "type": "string",
  32448. "enum": ["question.v2.rejected"]
  32449. },
  32450. "durable": {
  32451. "type": "object",
  32452. "properties": {
  32453. "aggregateID": {
  32454. "type": "string"
  32455. },
  32456. "seq": {
  32457. "type": "integer"
  32458. },
  32459. "version": {
  32460. "type": "integer"
  32461. }
  32462. },
  32463. "required": ["aggregateID", "seq", "version"],
  32464. "additionalProperties": false
  32465. },
  32466. "location": {
  32467. "$ref": "#/components/schemas/LocationRef"
  32468. },
  32469. "data": {
  32470. "type": "object",
  32471. "properties": {
  32472. "sessionID": {
  32473. "type": "string",
  32474. "pattern": "^ses"
  32475. },
  32476. "requestID": {
  32477. "type": "string",
  32478. "pattern": "^que"
  32479. }
  32480. },
  32481. "required": ["sessionID", "requestID"],
  32482. "additionalProperties": false
  32483. }
  32484. },
  32485. "required": ["id", "type", "data"],
  32486. "additionalProperties": false
  32487. },
  32488. "TodoUpdated": {
  32489. "type": "object",
  32490. "properties": {
  32491. "id": {
  32492. "type": "string",
  32493. "pattern": "^evt_"
  32494. },
  32495. "metadata": {
  32496. "type": "object"
  32497. },
  32498. "type": {
  32499. "type": "string",
  32500. "enum": ["todo.updated"]
  32501. },
  32502. "durable": {
  32503. "type": "object",
  32504. "properties": {
  32505. "aggregateID": {
  32506. "type": "string"
  32507. },
  32508. "seq": {
  32509. "type": "integer"
  32510. },
  32511. "version": {
  32512. "type": "integer"
  32513. }
  32514. },
  32515. "required": ["aggregateID", "seq", "version"],
  32516. "additionalProperties": false
  32517. },
  32518. "location": {
  32519. "$ref": "#/components/schemas/LocationRef"
  32520. },
  32521. "data": {
  32522. "type": "object",
  32523. "properties": {
  32524. "sessionID": {
  32525. "type": "string",
  32526. "pattern": "^ses"
  32527. },
  32528. "todos": {
  32529. "type": "array",
  32530. "items": {
  32531. "$ref": "#/components/schemas/Todo"
  32532. }
  32533. }
  32534. },
  32535. "required": ["sessionID", "todos"],
  32536. "additionalProperties": false
  32537. }
  32538. },
  32539. "required": ["id", "type", "data"],
  32540. "additionalProperties": false
  32541. },
  32542. "LspUpdated": {
  32543. "type": "object",
  32544. "properties": {
  32545. "id": {
  32546. "type": "string",
  32547. "pattern": "^evt_"
  32548. },
  32549. "metadata": {
  32550. "type": "object"
  32551. },
  32552. "type": {
  32553. "type": "string",
  32554. "enum": ["lsp.updated"]
  32555. },
  32556. "durable": {
  32557. "type": "object",
  32558. "properties": {
  32559. "aggregateID": {
  32560. "type": "string"
  32561. },
  32562. "seq": {
  32563. "type": "integer"
  32564. },
  32565. "version": {
  32566. "type": "integer"
  32567. }
  32568. },
  32569. "required": ["aggregateID", "seq", "version"],
  32570. "additionalProperties": false
  32571. },
  32572. "location": {
  32573. "$ref": "#/components/schemas/LocationRef"
  32574. },
  32575. "data": {
  32576. "type": "object",
  32577. "properties": {}
  32578. }
  32579. },
  32580. "required": ["id", "type", "data"],
  32581. "additionalProperties": false
  32582. },
  32583. "PermissionAsked": {
  32584. "type": "object",
  32585. "properties": {
  32586. "id": {
  32587. "type": "string",
  32588. "pattern": "^evt_"
  32589. },
  32590. "metadata": {
  32591. "type": "object"
  32592. },
  32593. "type": {
  32594. "type": "string",
  32595. "enum": ["permission.asked"]
  32596. },
  32597. "durable": {
  32598. "type": "object",
  32599. "properties": {
  32600. "aggregateID": {
  32601. "type": "string"
  32602. },
  32603. "seq": {
  32604. "type": "integer"
  32605. },
  32606. "version": {
  32607. "type": "integer"
  32608. }
  32609. },
  32610. "required": ["aggregateID", "seq", "version"],
  32611. "additionalProperties": false
  32612. },
  32613. "location": {
  32614. "$ref": "#/components/schemas/LocationRef"
  32615. },
  32616. "data": {
  32617. "type": "object",
  32618. "properties": {
  32619. "id": {
  32620. "type": "string",
  32621. "pattern": "^per"
  32622. },
  32623. "sessionID": {
  32624. "type": "string",
  32625. "pattern": "^ses"
  32626. },
  32627. "permission": {
  32628. "type": "string"
  32629. },
  32630. "patterns": {
  32631. "type": "array",
  32632. "items": {
  32633. "type": "string"
  32634. }
  32635. },
  32636. "metadata": {
  32637. "type": "object"
  32638. },
  32639. "always": {
  32640. "type": "array",
  32641. "items": {
  32642. "type": "string"
  32643. }
  32644. },
  32645. "tool": {
  32646. "type": "object",
  32647. "properties": {
  32648. "messageID": {
  32649. "type": "string"
  32650. },
  32651. "callID": {
  32652. "type": "string"
  32653. }
  32654. },
  32655. "required": ["messageID", "callID"],
  32656. "additionalProperties": false
  32657. }
  32658. },
  32659. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  32660. "additionalProperties": false
  32661. }
  32662. },
  32663. "required": ["id", "type", "data"],
  32664. "additionalProperties": false
  32665. },
  32666. "PermissionReplied": {
  32667. "type": "object",
  32668. "properties": {
  32669. "id": {
  32670. "type": "string",
  32671. "pattern": "^evt_"
  32672. },
  32673. "metadata": {
  32674. "type": "object"
  32675. },
  32676. "type": {
  32677. "type": "string",
  32678. "enum": ["permission.replied"]
  32679. },
  32680. "durable": {
  32681. "type": "object",
  32682. "properties": {
  32683. "aggregateID": {
  32684. "type": "string"
  32685. },
  32686. "seq": {
  32687. "type": "integer"
  32688. },
  32689. "version": {
  32690. "type": "integer"
  32691. }
  32692. },
  32693. "required": ["aggregateID", "seq", "version"],
  32694. "additionalProperties": false
  32695. },
  32696. "location": {
  32697. "$ref": "#/components/schemas/LocationRef"
  32698. },
  32699. "data": {
  32700. "type": "object",
  32701. "properties": {
  32702. "sessionID": {
  32703. "type": "string",
  32704. "pattern": "^ses"
  32705. },
  32706. "requestID": {
  32707. "type": "string",
  32708. "pattern": "^per"
  32709. },
  32710. "reply": {
  32711. "type": "string",
  32712. "enum": ["once", "always", "reject"]
  32713. }
  32714. },
  32715. "required": ["sessionID", "requestID", "reply"],
  32716. "additionalProperties": false
  32717. }
  32718. },
  32719. "required": ["id", "type", "data"],
  32720. "additionalProperties": false
  32721. },
  32722. "TuiPromptAppend": {
  32723. "type": "object",
  32724. "properties": {
  32725. "id": {
  32726. "type": "string",
  32727. "pattern": "^evt_"
  32728. },
  32729. "metadata": {
  32730. "type": "object"
  32731. },
  32732. "type": {
  32733. "type": "string",
  32734. "enum": ["tui.prompt.append"]
  32735. },
  32736. "durable": {
  32737. "type": "object",
  32738. "properties": {
  32739. "aggregateID": {
  32740. "type": "string"
  32741. },
  32742. "seq": {
  32743. "type": "integer"
  32744. },
  32745. "version": {
  32746. "type": "integer"
  32747. }
  32748. },
  32749. "required": ["aggregateID", "seq", "version"],
  32750. "additionalProperties": false
  32751. },
  32752. "location": {
  32753. "$ref": "#/components/schemas/LocationRef"
  32754. },
  32755. "data": {
  32756. "type": "object",
  32757. "properties": {
  32758. "text": {
  32759. "type": "string"
  32760. }
  32761. },
  32762. "required": ["text"],
  32763. "additionalProperties": false
  32764. }
  32765. },
  32766. "required": ["id", "type", "data"],
  32767. "additionalProperties": false
  32768. },
  32769. "TuiCommandExecute": {
  32770. "type": "object",
  32771. "properties": {
  32772. "id": {
  32773. "type": "string",
  32774. "pattern": "^evt_"
  32775. },
  32776. "metadata": {
  32777. "type": "object"
  32778. },
  32779. "type": {
  32780. "type": "string",
  32781. "enum": ["tui.command.execute"]
  32782. },
  32783. "durable": {
  32784. "type": "object",
  32785. "properties": {
  32786. "aggregateID": {
  32787. "type": "string"
  32788. },
  32789. "seq": {
  32790. "type": "integer"
  32791. },
  32792. "version": {
  32793. "type": "integer"
  32794. }
  32795. },
  32796. "required": ["aggregateID", "seq", "version"],
  32797. "additionalProperties": false
  32798. },
  32799. "location": {
  32800. "$ref": "#/components/schemas/LocationRef"
  32801. },
  32802. "data": {
  32803. "type": "object",
  32804. "properties": {
  32805. "command": {
  32806. "anyOf": [
  32807. {
  32808. "type": "string",
  32809. "enum": [
  32810. "session.list",
  32811. "session.new",
  32812. "session.share",
  32813. "session.interrupt",
  32814. "session.compact",
  32815. "session.page.up",
  32816. "session.page.down",
  32817. "session.line.up",
  32818. "session.line.down",
  32819. "session.half.page.up",
  32820. "session.half.page.down",
  32821. "session.first",
  32822. "session.last",
  32823. "prompt.clear",
  32824. "prompt.submit",
  32825. "agent.cycle"
  32826. ]
  32827. },
  32828. {
  32829. "type": "string"
  32830. }
  32831. ]
  32832. }
  32833. },
  32834. "required": ["command"],
  32835. "additionalProperties": false
  32836. }
  32837. },
  32838. "required": ["id", "type", "data"],
  32839. "additionalProperties": false
  32840. },
  32841. "TuiToastShow": {
  32842. "type": "object",
  32843. "properties": {
  32844. "id": {
  32845. "type": "string",
  32846. "pattern": "^evt_"
  32847. },
  32848. "metadata": {
  32849. "type": "object"
  32850. },
  32851. "type": {
  32852. "type": "string",
  32853. "enum": ["tui.toast.show"]
  32854. },
  32855. "durable": {
  32856. "type": "object",
  32857. "properties": {
  32858. "aggregateID": {
  32859. "type": "string"
  32860. },
  32861. "seq": {
  32862. "type": "integer"
  32863. },
  32864. "version": {
  32865. "type": "integer"
  32866. }
  32867. },
  32868. "required": ["aggregateID", "seq", "version"],
  32869. "additionalProperties": false
  32870. },
  32871. "location": {
  32872. "$ref": "#/components/schemas/LocationRef"
  32873. },
  32874. "data": {
  32875. "type": "object",
  32876. "properties": {
  32877. "title": {
  32878. "type": "string"
  32879. },
  32880. "message": {
  32881. "type": "string"
  32882. },
  32883. "variant": {
  32884. "type": "string",
  32885. "enum": ["info", "success", "warning", "error"]
  32886. },
  32887. "duration": {
  32888. "type": "integer",
  32889. "exclusiveMinimum": 0
  32890. }
  32891. },
  32892. "required": ["message", "variant"],
  32893. "additionalProperties": false
  32894. }
  32895. },
  32896. "required": ["id", "type", "data"],
  32897. "additionalProperties": false
  32898. },
  32899. "TuiSessionSelect": {
  32900. "type": "object",
  32901. "properties": {
  32902. "id": {
  32903. "type": "string",
  32904. "pattern": "^evt_"
  32905. },
  32906. "metadata": {
  32907. "type": "object"
  32908. },
  32909. "type": {
  32910. "type": "string",
  32911. "enum": ["tui.session.select"]
  32912. },
  32913. "durable": {
  32914. "type": "object",
  32915. "properties": {
  32916. "aggregateID": {
  32917. "type": "string"
  32918. },
  32919. "seq": {
  32920. "type": "integer"
  32921. },
  32922. "version": {
  32923. "type": "integer"
  32924. }
  32925. },
  32926. "required": ["aggregateID", "seq", "version"],
  32927. "additionalProperties": false
  32928. },
  32929. "location": {
  32930. "$ref": "#/components/schemas/LocationRef"
  32931. },
  32932. "data": {
  32933. "type": "object",
  32934. "properties": {
  32935. "sessionID": {
  32936. "type": "string",
  32937. "pattern": "^ses",
  32938. "description": "Session ID to navigate to"
  32939. }
  32940. },
  32941. "required": ["sessionID"],
  32942. "additionalProperties": false
  32943. }
  32944. },
  32945. "required": ["id", "type", "data"],
  32946. "additionalProperties": false
  32947. },
  32948. "McpToolsChanged": {
  32949. "type": "object",
  32950. "properties": {
  32951. "id": {
  32952. "type": "string",
  32953. "pattern": "^evt_"
  32954. },
  32955. "metadata": {
  32956. "type": "object"
  32957. },
  32958. "type": {
  32959. "type": "string",
  32960. "enum": ["mcp.tools.changed"]
  32961. },
  32962. "durable": {
  32963. "type": "object",
  32964. "properties": {
  32965. "aggregateID": {
  32966. "type": "string"
  32967. },
  32968. "seq": {
  32969. "type": "integer"
  32970. },
  32971. "version": {
  32972. "type": "integer"
  32973. }
  32974. },
  32975. "required": ["aggregateID", "seq", "version"],
  32976. "additionalProperties": false
  32977. },
  32978. "location": {
  32979. "$ref": "#/components/schemas/LocationRef"
  32980. },
  32981. "data": {
  32982. "type": "object",
  32983. "properties": {
  32984. "server": {
  32985. "type": "string"
  32986. }
  32987. },
  32988. "required": ["server"],
  32989. "additionalProperties": false
  32990. }
  32991. },
  32992. "required": ["id", "type", "data"],
  32993. "additionalProperties": false
  32994. },
  32995. "McpBrowserOpenFailed": {
  32996. "type": "object",
  32997. "properties": {
  32998. "id": {
  32999. "type": "string",
  33000. "pattern": "^evt_"
  33001. },
  33002. "metadata": {
  33003. "type": "object"
  33004. },
  33005. "type": {
  33006. "type": "string",
  33007. "enum": ["mcp.browser.open.failed"]
  33008. },
  33009. "durable": {
  33010. "type": "object",
  33011. "properties": {
  33012. "aggregateID": {
  33013. "type": "string"
  33014. },
  33015. "seq": {
  33016. "type": "integer"
  33017. },
  33018. "version": {
  33019. "type": "integer"
  33020. }
  33021. },
  33022. "required": ["aggregateID", "seq", "version"],
  33023. "additionalProperties": false
  33024. },
  33025. "location": {
  33026. "$ref": "#/components/schemas/LocationRef"
  33027. },
  33028. "data": {
  33029. "type": "object",
  33030. "properties": {
  33031. "mcpName": {
  33032. "type": "string"
  33033. },
  33034. "url": {
  33035. "type": "string"
  33036. }
  33037. },
  33038. "required": ["mcpName", "url"],
  33039. "additionalProperties": false
  33040. }
  33041. },
  33042. "required": ["id", "type", "data"],
  33043. "additionalProperties": false
  33044. },
  33045. "CommandExecuted": {
  33046. "type": "object",
  33047. "properties": {
  33048. "id": {
  33049. "type": "string",
  33050. "pattern": "^evt_"
  33051. },
  33052. "metadata": {
  33053. "type": "object"
  33054. },
  33055. "type": {
  33056. "type": "string",
  33057. "enum": ["command.executed"]
  33058. },
  33059. "durable": {
  33060. "type": "object",
  33061. "properties": {
  33062. "aggregateID": {
  33063. "type": "string"
  33064. },
  33065. "seq": {
  33066. "type": "integer"
  33067. },
  33068. "version": {
  33069. "type": "integer"
  33070. }
  33071. },
  33072. "required": ["aggregateID", "seq", "version"],
  33073. "additionalProperties": false
  33074. },
  33075. "location": {
  33076. "$ref": "#/components/schemas/LocationRef"
  33077. },
  33078. "data": {
  33079. "type": "object",
  33080. "properties": {
  33081. "name": {
  33082. "type": "string"
  33083. },
  33084. "sessionID": {
  33085. "type": "string",
  33086. "pattern": "^ses"
  33087. },
  33088. "arguments": {
  33089. "type": "string"
  33090. },
  33091. "messageID": {
  33092. "type": "string",
  33093. "pattern": "^msg"
  33094. }
  33095. },
  33096. "required": ["name", "sessionID", "arguments", "messageID"],
  33097. "additionalProperties": false
  33098. }
  33099. },
  33100. "required": ["id", "type", "data"],
  33101. "additionalProperties": false
  33102. },
  33103. "ProjectUpdated": {
  33104. "type": "object",
  33105. "properties": {
  33106. "id": {
  33107. "type": "string",
  33108. "pattern": "^evt_"
  33109. },
  33110. "metadata": {
  33111. "type": "object"
  33112. },
  33113. "type": {
  33114. "type": "string",
  33115. "enum": ["project.updated"]
  33116. },
  33117. "durable": {
  33118. "type": "object",
  33119. "properties": {
  33120. "aggregateID": {
  33121. "type": "string"
  33122. },
  33123. "seq": {
  33124. "type": "integer"
  33125. },
  33126. "version": {
  33127. "type": "integer"
  33128. }
  33129. },
  33130. "required": ["aggregateID", "seq", "version"],
  33131. "additionalProperties": false
  33132. },
  33133. "location": {
  33134. "$ref": "#/components/schemas/LocationRef"
  33135. },
  33136. "data": {
  33137. "type": "object",
  33138. "properties": {
  33139. "id": {
  33140. "type": "string"
  33141. },
  33142. "worktree": {
  33143. "type": "string"
  33144. },
  33145. "vcs": {
  33146. "$ref": "#/components/schemas/ProjectVcs"
  33147. },
  33148. "name": {
  33149. "type": "string"
  33150. },
  33151. "icon": {
  33152. "$ref": "#/components/schemas/ProjectIcon"
  33153. },
  33154. "commands": {
  33155. "$ref": "#/components/schemas/ProjectCommands"
  33156. },
  33157. "time": {
  33158. "$ref": "#/components/schemas/ProjectTime"
  33159. },
  33160. "sandboxes": {
  33161. "type": "array",
  33162. "items": {
  33163. "type": "string"
  33164. }
  33165. }
  33166. },
  33167. "required": ["id", "worktree", "time", "sandboxes"],
  33168. "additionalProperties": false
  33169. }
  33170. },
  33171. "required": ["id", "type", "data"],
  33172. "additionalProperties": false
  33173. },
  33174. "SessionIdle": {
  33175. "type": "object",
  33176. "properties": {
  33177. "id": {
  33178. "type": "string",
  33179. "pattern": "^evt_"
  33180. },
  33181. "metadata": {
  33182. "type": "object"
  33183. },
  33184. "type": {
  33185. "type": "string",
  33186. "enum": ["session.idle"]
  33187. },
  33188. "durable": {
  33189. "type": "object",
  33190. "properties": {
  33191. "aggregateID": {
  33192. "type": "string"
  33193. },
  33194. "seq": {
  33195. "type": "integer"
  33196. },
  33197. "version": {
  33198. "type": "integer"
  33199. }
  33200. },
  33201. "required": ["aggregateID", "seq", "version"],
  33202. "additionalProperties": false
  33203. },
  33204. "location": {
  33205. "$ref": "#/components/schemas/LocationRef"
  33206. },
  33207. "data": {
  33208. "type": "object",
  33209. "properties": {
  33210. "sessionID": {
  33211. "type": "string",
  33212. "pattern": "^ses"
  33213. }
  33214. },
  33215. "required": ["sessionID"],
  33216. "additionalProperties": false
  33217. }
  33218. },
  33219. "required": ["id", "type", "data"],
  33220. "additionalProperties": false
  33221. },
  33222. "QuestionAsked": {
  33223. "type": "object",
  33224. "properties": {
  33225. "id": {
  33226. "type": "string",
  33227. "pattern": "^evt_"
  33228. },
  33229. "metadata": {
  33230. "type": "object"
  33231. },
  33232. "type": {
  33233. "type": "string",
  33234. "enum": ["question.asked"]
  33235. },
  33236. "durable": {
  33237. "type": "object",
  33238. "properties": {
  33239. "aggregateID": {
  33240. "type": "string"
  33241. },
  33242. "seq": {
  33243. "type": "integer"
  33244. },
  33245. "version": {
  33246. "type": "integer"
  33247. }
  33248. },
  33249. "required": ["aggregateID", "seq", "version"],
  33250. "additionalProperties": false
  33251. },
  33252. "location": {
  33253. "$ref": "#/components/schemas/LocationRef"
  33254. },
  33255. "data": {
  33256. "type": "object",
  33257. "properties": {
  33258. "id": {
  33259. "type": "string",
  33260. "pattern": "^que"
  33261. },
  33262. "sessionID": {
  33263. "type": "string",
  33264. "pattern": "^ses"
  33265. },
  33266. "questions": {
  33267. "type": "array",
  33268. "items": {
  33269. "$ref": "#/components/schemas/QuestionInfo"
  33270. },
  33271. "description": "Questions to ask"
  33272. },
  33273. "tool": {
  33274. "$ref": "#/components/schemas/QuestionTool"
  33275. }
  33276. },
  33277. "required": ["id", "sessionID", "questions"],
  33278. "additionalProperties": false
  33279. }
  33280. },
  33281. "required": ["id", "type", "data"],
  33282. "additionalProperties": false
  33283. },
  33284. "SessionCompacted": {
  33285. "type": "object",
  33286. "properties": {
  33287. "id": {
  33288. "type": "string",
  33289. "pattern": "^evt_"
  33290. },
  33291. "metadata": {
  33292. "type": "object"
  33293. },
  33294. "type": {
  33295. "type": "string",
  33296. "enum": ["session.compacted"]
  33297. },
  33298. "durable": {
  33299. "type": "object",
  33300. "properties": {
  33301. "aggregateID": {
  33302. "type": "string"
  33303. },
  33304. "seq": {
  33305. "type": "integer"
  33306. },
  33307. "version": {
  33308. "type": "integer"
  33309. }
  33310. },
  33311. "required": ["aggregateID", "seq", "version"],
  33312. "additionalProperties": false
  33313. },
  33314. "location": {
  33315. "$ref": "#/components/schemas/LocationRef"
  33316. },
  33317. "data": {
  33318. "type": "object",
  33319. "properties": {
  33320. "sessionID": {
  33321. "type": "string",
  33322. "pattern": "^ses"
  33323. }
  33324. },
  33325. "required": ["sessionID"],
  33326. "additionalProperties": false
  33327. }
  33328. },
  33329. "required": ["id", "type", "data"],
  33330. "additionalProperties": false
  33331. },
  33332. "VcsBranchUpdated": {
  33333. "type": "object",
  33334. "properties": {
  33335. "id": {
  33336. "type": "string",
  33337. "pattern": "^evt_"
  33338. },
  33339. "metadata": {
  33340. "type": "object"
  33341. },
  33342. "type": {
  33343. "type": "string",
  33344. "enum": ["vcs.branch.updated"]
  33345. },
  33346. "durable": {
  33347. "type": "object",
  33348. "properties": {
  33349. "aggregateID": {
  33350. "type": "string"
  33351. },
  33352. "seq": {
  33353. "type": "integer"
  33354. },
  33355. "version": {
  33356. "type": "integer"
  33357. }
  33358. },
  33359. "required": ["aggregateID", "seq", "version"],
  33360. "additionalProperties": false
  33361. },
  33362. "location": {
  33363. "$ref": "#/components/schemas/LocationRef"
  33364. },
  33365. "data": {
  33366. "type": "object",
  33367. "properties": {
  33368. "branch": {
  33369. "type": "string"
  33370. }
  33371. },
  33372. "additionalProperties": false
  33373. }
  33374. },
  33375. "required": ["id", "type", "data"],
  33376. "additionalProperties": false
  33377. },
  33378. "WorkspaceReady": {
  33379. "type": "object",
  33380. "properties": {
  33381. "id": {
  33382. "type": "string",
  33383. "pattern": "^evt_"
  33384. },
  33385. "metadata": {
  33386. "type": "object"
  33387. },
  33388. "type": {
  33389. "type": "string",
  33390. "enum": ["workspace.ready"]
  33391. },
  33392. "durable": {
  33393. "type": "object",
  33394. "properties": {
  33395. "aggregateID": {
  33396. "type": "string"
  33397. },
  33398. "seq": {
  33399. "type": "integer"
  33400. },
  33401. "version": {
  33402. "type": "integer"
  33403. }
  33404. },
  33405. "required": ["aggregateID", "seq", "version"],
  33406. "additionalProperties": false
  33407. },
  33408. "location": {
  33409. "$ref": "#/components/schemas/LocationRef"
  33410. },
  33411. "data": {
  33412. "type": "object",
  33413. "properties": {
  33414. "name": {
  33415. "type": "string"
  33416. }
  33417. },
  33418. "required": ["name"],
  33419. "additionalProperties": false
  33420. }
  33421. },
  33422. "required": ["id", "type", "data"],
  33423. "additionalProperties": false
  33424. },
  33425. "WorkspaceFailed": {
  33426. "type": "object",
  33427. "properties": {
  33428. "id": {
  33429. "type": "string",
  33430. "pattern": "^evt_"
  33431. },
  33432. "metadata": {
  33433. "type": "object"
  33434. },
  33435. "type": {
  33436. "type": "string",
  33437. "enum": ["workspace.failed"]
  33438. },
  33439. "durable": {
  33440. "type": "object",
  33441. "properties": {
  33442. "aggregateID": {
  33443. "type": "string"
  33444. },
  33445. "seq": {
  33446. "type": "integer"
  33447. },
  33448. "version": {
  33449. "type": "integer"
  33450. }
  33451. },
  33452. "required": ["aggregateID", "seq", "version"],
  33453. "additionalProperties": false
  33454. },
  33455. "location": {
  33456. "$ref": "#/components/schemas/LocationRef"
  33457. },
  33458. "data": {
  33459. "type": "object",
  33460. "properties": {
  33461. "message": {
  33462. "type": "string"
  33463. }
  33464. },
  33465. "required": ["message"],
  33466. "additionalProperties": false
  33467. }
  33468. },
  33469. "required": ["id", "type", "data"],
  33470. "additionalProperties": false
  33471. },
  33472. "WorkspaceStatus": {
  33473. "type": "object",
  33474. "properties": {
  33475. "id": {
  33476. "type": "string",
  33477. "pattern": "^evt_"
  33478. },
  33479. "metadata": {
  33480. "type": "object"
  33481. },
  33482. "type": {
  33483. "type": "string",
  33484. "enum": ["workspace.status"]
  33485. },
  33486. "durable": {
  33487. "type": "object",
  33488. "properties": {
  33489. "aggregateID": {
  33490. "type": "string"
  33491. },
  33492. "seq": {
  33493. "type": "integer"
  33494. },
  33495. "version": {
  33496. "type": "integer"
  33497. }
  33498. },
  33499. "required": ["aggregateID", "seq", "version"],
  33500. "additionalProperties": false
  33501. },
  33502. "location": {
  33503. "$ref": "#/components/schemas/LocationRef"
  33504. },
  33505. "data": {
  33506. "type": "object",
  33507. "properties": {
  33508. "workspaceID": {
  33509. "type": "string",
  33510. "pattern": "^wrk"
  33511. },
  33512. "status": {
  33513. "type": "string",
  33514. "enum": ["connected", "connecting", "disconnected", "error"]
  33515. }
  33516. },
  33517. "required": ["workspaceID", "status"],
  33518. "additionalProperties": false
  33519. }
  33520. },
  33521. "required": ["id", "type", "data"],
  33522. "additionalProperties": false
  33523. },
  33524. "WorktreeReady": {
  33525. "type": "object",
  33526. "properties": {
  33527. "id": {
  33528. "type": "string",
  33529. "pattern": "^evt_"
  33530. },
  33531. "metadata": {
  33532. "type": "object"
  33533. },
  33534. "type": {
  33535. "type": "string",
  33536. "enum": ["worktree.ready"]
  33537. },
  33538. "durable": {
  33539. "type": "object",
  33540. "properties": {
  33541. "aggregateID": {
  33542. "type": "string"
  33543. },
  33544. "seq": {
  33545. "type": "integer"
  33546. },
  33547. "version": {
  33548. "type": "integer"
  33549. }
  33550. },
  33551. "required": ["aggregateID", "seq", "version"],
  33552. "additionalProperties": false
  33553. },
  33554. "location": {
  33555. "$ref": "#/components/schemas/LocationRef"
  33556. },
  33557. "data": {
  33558. "type": "object",
  33559. "properties": {
  33560. "name": {
  33561. "type": "string"
  33562. },
  33563. "branch": {
  33564. "type": "string"
  33565. }
  33566. },
  33567. "required": ["name"],
  33568. "additionalProperties": false
  33569. }
  33570. },
  33571. "required": ["id", "type", "data"],
  33572. "additionalProperties": false
  33573. },
  33574. "WorktreeFailed": {
  33575. "type": "object",
  33576. "properties": {
  33577. "id": {
  33578. "type": "string",
  33579. "pattern": "^evt_"
  33580. },
  33581. "metadata": {
  33582. "type": "object"
  33583. },
  33584. "type": {
  33585. "type": "string",
  33586. "enum": ["worktree.failed"]
  33587. },
  33588. "durable": {
  33589. "type": "object",
  33590. "properties": {
  33591. "aggregateID": {
  33592. "type": "string"
  33593. },
  33594. "seq": {
  33595. "type": "integer"
  33596. },
  33597. "version": {
  33598. "type": "integer"
  33599. }
  33600. },
  33601. "required": ["aggregateID", "seq", "version"],
  33602. "additionalProperties": false
  33603. },
  33604. "location": {
  33605. "$ref": "#/components/schemas/LocationRef"
  33606. },
  33607. "data": {
  33608. "type": "object",
  33609. "properties": {
  33610. "message": {
  33611. "type": "string"
  33612. }
  33613. },
  33614. "required": ["message"],
  33615. "additionalProperties": false
  33616. }
  33617. },
  33618. "required": ["id", "type", "data"],
  33619. "additionalProperties": false
  33620. },
  33621. "ServerConnected": {
  33622. "type": "object",
  33623. "properties": {
  33624. "id": {
  33625. "type": "string",
  33626. "pattern": "^evt_"
  33627. },
  33628. "metadata": {
  33629. "type": "object"
  33630. },
  33631. "type": {
  33632. "type": "string",
  33633. "enum": ["server.connected"]
  33634. },
  33635. "durable": {
  33636. "type": "object",
  33637. "properties": {
  33638. "aggregateID": {
  33639. "type": "string"
  33640. },
  33641. "seq": {
  33642. "type": "integer"
  33643. },
  33644. "version": {
  33645. "type": "integer"
  33646. }
  33647. },
  33648. "required": ["aggregateID", "seq", "version"],
  33649. "additionalProperties": false
  33650. },
  33651. "location": {
  33652. "$ref": "#/components/schemas/LocationRef"
  33653. },
  33654. "data": {
  33655. "type": "object",
  33656. "properties": {}
  33657. }
  33658. },
  33659. "required": ["id", "type", "data"],
  33660. "additionalProperties": false
  33661. },
  33662. "GlobalDisposed": {
  33663. "type": "object",
  33664. "properties": {
  33665. "id": {
  33666. "type": "string",
  33667. "pattern": "^evt_"
  33668. },
  33669. "metadata": {
  33670. "type": "object"
  33671. },
  33672. "type": {
  33673. "type": "string",
  33674. "enum": ["global.disposed"]
  33675. },
  33676. "durable": {
  33677. "type": "object",
  33678. "properties": {
  33679. "aggregateID": {
  33680. "type": "string"
  33681. },
  33682. "seq": {
  33683. "type": "integer"
  33684. },
  33685. "version": {
  33686. "type": "integer"
  33687. }
  33688. },
  33689. "required": ["aggregateID", "seq", "version"],
  33690. "additionalProperties": false
  33691. },
  33692. "location": {
  33693. "$ref": "#/components/schemas/LocationRef"
  33694. },
  33695. "data": {
  33696. "type": "object",
  33697. "properties": {}
  33698. }
  33699. },
  33700. "required": ["id", "type", "data"],
  33701. "additionalProperties": false
  33702. },
  33703. "QuestionV2Request": {
  33704. "type": "object",
  33705. "properties": {
  33706. "id": {
  33707. "type": "string",
  33708. "pattern": "^que"
  33709. },
  33710. "sessionID": {
  33711. "type": "string",
  33712. "pattern": "^ses"
  33713. },
  33714. "questions": {
  33715. "type": "array",
  33716. "items": {
  33717. "$ref": "#/components/schemas/QuestionV2Info"
  33718. },
  33719. "description": "Questions to ask"
  33720. },
  33721. "tool": {
  33722. "$ref": "#/components/schemas/QuestionV2Tool"
  33723. }
  33724. },
  33725. "required": ["id", "sessionID", "questions"],
  33726. "additionalProperties": false
  33727. },
  33728. "QuestionV2Reply": {
  33729. "type": "object",
  33730. "properties": {
  33731. "answers": {
  33732. "type": "array",
  33733. "items": {
  33734. "$ref": "#/components/schemas/QuestionV2Answer"
  33735. },
  33736. "description": "User answers in order of questions (each answer is an array of selected labels)"
  33737. }
  33738. },
  33739. "required": ["answers"],
  33740. "additionalProperties": false
  33741. },
  33742. "ReferenceLocalSource": {
  33743. "type": "object",
  33744. "properties": {
  33745. "type": {
  33746. "type": "string",
  33747. "enum": ["local"]
  33748. },
  33749. "path": {
  33750. "type": "string"
  33751. },
  33752. "description": {
  33753. "type": "string"
  33754. },
  33755. "hidden": {
  33756. "type": "boolean"
  33757. }
  33758. },
  33759. "required": ["type", "path"],
  33760. "additionalProperties": false
  33761. },
  33762. "ReferenceGitSource": {
  33763. "type": "object",
  33764. "properties": {
  33765. "type": {
  33766. "type": "string",
  33767. "enum": ["git"]
  33768. },
  33769. "repository": {
  33770. "type": "string"
  33771. },
  33772. "branch": {
  33773. "type": "string"
  33774. },
  33775. "description": {
  33776. "type": "string"
  33777. },
  33778. "hidden": {
  33779. "type": "boolean"
  33780. }
  33781. },
  33782. "required": ["type", "repository"],
  33783. "additionalProperties": false
  33784. },
  33785. "ReferenceSource": {
  33786. "anyOf": [
  33787. {
  33788. "$ref": "#/components/schemas/ReferenceLocalSource"
  33789. },
  33790. {
  33791. "$ref": "#/components/schemas/ReferenceGitSource"
  33792. }
  33793. ]
  33794. },
  33795. "ReferenceInfo": {
  33796. "type": "object",
  33797. "properties": {
  33798. "name": {
  33799. "type": "string"
  33800. },
  33801. "path": {
  33802. "type": "string"
  33803. },
  33804. "description": {
  33805. "type": "string"
  33806. },
  33807. "hidden": {
  33808. "type": "boolean"
  33809. },
  33810. "source": {
  33811. "$ref": "#/components/schemas/ReferenceSource"
  33812. }
  33813. },
  33814. "required": ["name", "path", "source"],
  33815. "additionalProperties": false
  33816. },
  33817. "ProjectCopyCopy": {
  33818. "type": "object",
  33819. "properties": {
  33820. "directory": {
  33821. "type": "string"
  33822. }
  33823. },
  33824. "required": ["directory"],
  33825. "additionalProperties": false
  33826. },
  33827. "EventModels-devRefreshed": {
  33828. "type": "object",
  33829. "properties": {
  33830. "id": {
  33831. "type": "string",
  33832. "pattern": "^evt_"
  33833. },
  33834. "type": {
  33835. "type": "string",
  33836. "enum": ["models-dev.refreshed"]
  33837. },
  33838. "properties": {
  33839. "type": "object",
  33840. "properties": {}
  33841. }
  33842. },
  33843. "required": ["id", "type", "properties"],
  33844. "additionalProperties": false
  33845. },
  33846. "EventIntegrationUpdated": {
  33847. "type": "object",
  33848. "properties": {
  33849. "id": {
  33850. "type": "string",
  33851. "pattern": "^evt_"
  33852. },
  33853. "type": {
  33854. "type": "string",
  33855. "enum": ["integration.updated"]
  33856. },
  33857. "properties": {
  33858. "type": "object",
  33859. "properties": {}
  33860. }
  33861. },
  33862. "required": ["id", "type", "properties"],
  33863. "additionalProperties": false
  33864. },
  33865. "EventIntegrationConnectionUpdated": {
  33866. "type": "object",
  33867. "properties": {
  33868. "id": {
  33869. "type": "string",
  33870. "pattern": "^evt_"
  33871. },
  33872. "type": {
  33873. "type": "string",
  33874. "enum": ["integration.connection.updated"]
  33875. },
  33876. "properties": {
  33877. "type": "object",
  33878. "properties": {
  33879. "integrationID": {
  33880. "type": "string"
  33881. }
  33882. },
  33883. "required": ["integrationID"],
  33884. "additionalProperties": false
  33885. }
  33886. },
  33887. "required": ["id", "type", "properties"],
  33888. "additionalProperties": false
  33889. },
  33890. "EventCatalogUpdated": {
  33891. "type": "object",
  33892. "properties": {
  33893. "id": {
  33894. "type": "string",
  33895. "pattern": "^evt_"
  33896. },
  33897. "type": {
  33898. "type": "string",
  33899. "enum": ["catalog.updated"]
  33900. },
  33901. "properties": {
  33902. "type": "object",
  33903. "properties": {}
  33904. }
  33905. },
  33906. "required": ["id", "type", "properties"],
  33907. "additionalProperties": false
  33908. },
  33909. "EventSessionCreated": {
  33910. "type": "object",
  33911. "properties": {
  33912. "id": {
  33913. "type": "string",
  33914. "pattern": "^evt_"
  33915. },
  33916. "type": {
  33917. "type": "string",
  33918. "enum": ["session.created"]
  33919. },
  33920. "properties": {
  33921. "type": "object",
  33922. "properties": {
  33923. "sessionID": {
  33924. "type": "string",
  33925. "pattern": "^ses"
  33926. },
  33927. "info": {
  33928. "$ref": "#/components/schemas/Session"
  33929. }
  33930. },
  33931. "required": ["sessionID", "info"],
  33932. "additionalProperties": false
  33933. }
  33934. },
  33935. "required": ["id", "type", "properties"],
  33936. "additionalProperties": false
  33937. },
  33938. "EventSessionUpdated": {
  33939. "type": "object",
  33940. "properties": {
  33941. "id": {
  33942. "type": "string",
  33943. "pattern": "^evt_"
  33944. },
  33945. "type": {
  33946. "type": "string",
  33947. "enum": ["session.updated"]
  33948. },
  33949. "properties": {
  33950. "type": "object",
  33951. "properties": {
  33952. "sessionID": {
  33953. "type": "string",
  33954. "pattern": "^ses"
  33955. },
  33956. "info": {
  33957. "$ref": "#/components/schemas/Session"
  33958. }
  33959. },
  33960. "required": ["sessionID", "info"],
  33961. "additionalProperties": false
  33962. }
  33963. },
  33964. "required": ["id", "type", "properties"],
  33965. "additionalProperties": false
  33966. },
  33967. "EventSessionDeleted": {
  33968. "type": "object",
  33969. "properties": {
  33970. "id": {
  33971. "type": "string",
  33972. "pattern": "^evt_"
  33973. },
  33974. "type": {
  33975. "type": "string",
  33976. "enum": ["session.deleted"]
  33977. },
  33978. "properties": {
  33979. "type": "object",
  33980. "properties": {
  33981. "sessionID": {
  33982. "type": "string",
  33983. "pattern": "^ses"
  33984. },
  33985. "info": {
  33986. "$ref": "#/components/schemas/Session"
  33987. }
  33988. },
  33989. "required": ["sessionID", "info"],
  33990. "additionalProperties": false
  33991. }
  33992. },
  33993. "required": ["id", "type", "properties"],
  33994. "additionalProperties": false
  33995. },
  33996. "EventMessageUpdated": {
  33997. "type": "object",
  33998. "properties": {
  33999. "id": {
  34000. "type": "string",
  34001. "pattern": "^evt_"
  34002. },
  34003. "type": {
  34004. "type": "string",
  34005. "enum": ["message.updated"]
  34006. },
  34007. "properties": {
  34008. "type": "object",
  34009. "properties": {
  34010. "sessionID": {
  34011. "type": "string",
  34012. "pattern": "^ses"
  34013. },
  34014. "info": {
  34015. "$ref": "#/components/schemas/Message"
  34016. }
  34017. },
  34018. "required": ["sessionID", "info"],
  34019. "additionalProperties": false
  34020. }
  34021. },
  34022. "required": ["id", "type", "properties"],
  34023. "additionalProperties": false
  34024. },
  34025. "EventMessageRemoved": {
  34026. "type": "object",
  34027. "properties": {
  34028. "id": {
  34029. "type": "string",
  34030. "pattern": "^evt_"
  34031. },
  34032. "type": {
  34033. "type": "string",
  34034. "enum": ["message.removed"]
  34035. },
  34036. "properties": {
  34037. "type": "object",
  34038. "properties": {
  34039. "sessionID": {
  34040. "type": "string",
  34041. "pattern": "^ses"
  34042. },
  34043. "messageID": {
  34044. "type": "string",
  34045. "pattern": "^msg"
  34046. }
  34047. },
  34048. "required": ["sessionID", "messageID"],
  34049. "additionalProperties": false
  34050. }
  34051. },
  34052. "required": ["id", "type", "properties"],
  34053. "additionalProperties": false
  34054. },
  34055. "EventMessagePartUpdated": {
  34056. "type": "object",
  34057. "properties": {
  34058. "id": {
  34059. "type": "string",
  34060. "pattern": "^evt_"
  34061. },
  34062. "type": {
  34063. "type": "string",
  34064. "enum": ["message.part.updated"]
  34065. },
  34066. "properties": {
  34067. "type": "object",
  34068. "properties": {
  34069. "sessionID": {
  34070. "type": "string",
  34071. "pattern": "^ses"
  34072. },
  34073. "part": {
  34074. "$ref": "#/components/schemas/Part"
  34075. },
  34076. "time": {
  34077. "type": "number"
  34078. }
  34079. },
  34080. "required": ["sessionID", "part", "time"],
  34081. "additionalProperties": false
  34082. }
  34083. },
  34084. "required": ["id", "type", "properties"],
  34085. "additionalProperties": false
  34086. },
  34087. "EventMessagePartRemoved": {
  34088. "type": "object",
  34089. "properties": {
  34090. "id": {
  34091. "type": "string",
  34092. "pattern": "^evt_"
  34093. },
  34094. "type": {
  34095. "type": "string",
  34096. "enum": ["message.part.removed"]
  34097. },
  34098. "properties": {
  34099. "type": "object",
  34100. "properties": {
  34101. "sessionID": {
  34102. "type": "string",
  34103. "pattern": "^ses"
  34104. },
  34105. "messageID": {
  34106. "type": "string",
  34107. "pattern": "^msg"
  34108. },
  34109. "partID": {
  34110. "type": "string",
  34111. "pattern": "^prt"
  34112. }
  34113. },
  34114. "required": ["sessionID", "messageID", "partID"],
  34115. "additionalProperties": false
  34116. }
  34117. },
  34118. "required": ["id", "type", "properties"],
  34119. "additionalProperties": false
  34120. },
  34121. "EventSessionNextAgentSwitched": {
  34122. "type": "object",
  34123. "properties": {
  34124. "id": {
  34125. "type": "string",
  34126. "pattern": "^evt_"
  34127. },
  34128. "type": {
  34129. "type": "string",
  34130. "enum": ["session.next.agent.switched"]
  34131. },
  34132. "properties": {
  34133. "type": "object",
  34134. "properties": {
  34135. "timestamp": {
  34136. "type": "number"
  34137. },
  34138. "sessionID": {
  34139. "type": "string",
  34140. "pattern": "^ses"
  34141. },
  34142. "messageID": {
  34143. "type": "string",
  34144. "pattern": "^msg_"
  34145. },
  34146. "agent": {
  34147. "type": "string"
  34148. }
  34149. },
  34150. "required": ["timestamp", "sessionID", "messageID", "agent"],
  34151. "additionalProperties": false
  34152. }
  34153. },
  34154. "required": ["id", "type", "properties"],
  34155. "additionalProperties": false
  34156. },
  34157. "EventSessionNextModelSwitched": {
  34158. "type": "object",
  34159. "properties": {
  34160. "id": {
  34161. "type": "string",
  34162. "pattern": "^evt_"
  34163. },
  34164. "type": {
  34165. "type": "string",
  34166. "enum": ["session.next.model.switched"]
  34167. },
  34168. "properties": {
  34169. "type": "object",
  34170. "properties": {
  34171. "timestamp": {
  34172. "type": "number"
  34173. },
  34174. "sessionID": {
  34175. "type": "string",
  34176. "pattern": "^ses"
  34177. },
  34178. "messageID": {
  34179. "type": "string",
  34180. "pattern": "^msg_"
  34181. },
  34182. "model": {
  34183. "$ref": "#/components/schemas/ModelRef"
  34184. }
  34185. },
  34186. "required": ["timestamp", "sessionID", "messageID", "model"],
  34187. "additionalProperties": false
  34188. }
  34189. },
  34190. "required": ["id", "type", "properties"],
  34191. "additionalProperties": false
  34192. },
  34193. "EventSessionNextMoved": {
  34194. "type": "object",
  34195. "properties": {
  34196. "id": {
  34197. "type": "string",
  34198. "pattern": "^evt_"
  34199. },
  34200. "type": {
  34201. "type": "string",
  34202. "enum": ["session.next.moved"]
  34203. },
  34204. "properties": {
  34205. "type": "object",
  34206. "properties": {
  34207. "timestamp": {
  34208. "type": "number"
  34209. },
  34210. "sessionID": {
  34211. "type": "string",
  34212. "pattern": "^ses"
  34213. },
  34214. "location": {
  34215. "$ref": "#/components/schemas/LocationRef"
  34216. },
  34217. "subdirectory": {
  34218. "type": "string"
  34219. }
  34220. },
  34221. "required": ["timestamp", "sessionID", "location"],
  34222. "additionalProperties": false
  34223. }
  34224. },
  34225. "required": ["id", "type", "properties"],
  34226. "additionalProperties": false
  34227. },
  34228. "EventSessionNextPrompted": {
  34229. "type": "object",
  34230. "properties": {
  34231. "id": {
  34232. "type": "string",
  34233. "pattern": "^evt_"
  34234. },
  34235. "type": {
  34236. "type": "string",
  34237. "enum": ["session.next.prompted"]
  34238. },
  34239. "properties": {
  34240. "type": "object",
  34241. "properties": {
  34242. "timestamp": {
  34243. "type": "number"
  34244. },
  34245. "sessionID": {
  34246. "type": "string",
  34247. "pattern": "^ses"
  34248. },
  34249. "messageID": {
  34250. "type": "string",
  34251. "pattern": "^msg_"
  34252. },
  34253. "prompt": {
  34254. "$ref": "#/components/schemas/Prompt"
  34255. },
  34256. "delivery": {
  34257. "type": "string",
  34258. "enum": ["steer", "queue"]
  34259. }
  34260. },
  34261. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34262. "additionalProperties": false
  34263. }
  34264. },
  34265. "required": ["id", "type", "properties"],
  34266. "additionalProperties": false
  34267. },
  34268. "EventSessionNextPromptAdmitted": {
  34269. "type": "object",
  34270. "properties": {
  34271. "id": {
  34272. "type": "string",
  34273. "pattern": "^evt_"
  34274. },
  34275. "type": {
  34276. "type": "string",
  34277. "enum": ["session.next.prompt.admitted"]
  34278. },
  34279. "properties": {
  34280. "type": "object",
  34281. "properties": {
  34282. "timestamp": {
  34283. "type": "number"
  34284. },
  34285. "sessionID": {
  34286. "type": "string",
  34287. "pattern": "^ses"
  34288. },
  34289. "messageID": {
  34290. "type": "string",
  34291. "pattern": "^msg_"
  34292. },
  34293. "prompt": {
  34294. "$ref": "#/components/schemas/Prompt"
  34295. },
  34296. "delivery": {
  34297. "type": "string",
  34298. "enum": ["steer", "queue"]
  34299. }
  34300. },
  34301. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  34302. "additionalProperties": false
  34303. }
  34304. },
  34305. "required": ["id", "type", "properties"],
  34306. "additionalProperties": false
  34307. },
  34308. "EventSessionNextContextUpdated": {
  34309. "type": "object",
  34310. "properties": {
  34311. "id": {
  34312. "type": "string",
  34313. "pattern": "^evt_"
  34314. },
  34315. "type": {
  34316. "type": "string",
  34317. "enum": ["session.next.context.updated"]
  34318. },
  34319. "properties": {
  34320. "type": "object",
  34321. "properties": {
  34322. "timestamp": {
  34323. "type": "number"
  34324. },
  34325. "sessionID": {
  34326. "type": "string",
  34327. "pattern": "^ses"
  34328. },
  34329. "messageID": {
  34330. "type": "string",
  34331. "pattern": "^msg_"
  34332. },
  34333. "text": {
  34334. "type": "string"
  34335. }
  34336. },
  34337. "required": ["timestamp", "sessionID", "messageID", "text"],
  34338. "additionalProperties": false
  34339. }
  34340. },
  34341. "required": ["id", "type", "properties"],
  34342. "additionalProperties": false
  34343. },
  34344. "EventSessionNextSynthetic": {
  34345. "type": "object",
  34346. "properties": {
  34347. "id": {
  34348. "type": "string",
  34349. "pattern": "^evt_"
  34350. },
  34351. "type": {
  34352. "type": "string",
  34353. "enum": ["session.next.synthetic"]
  34354. },
  34355. "properties": {
  34356. "type": "object",
  34357. "properties": {
  34358. "timestamp": {
  34359. "type": "number"
  34360. },
  34361. "sessionID": {
  34362. "type": "string",
  34363. "pattern": "^ses"
  34364. },
  34365. "messageID": {
  34366. "type": "string",
  34367. "pattern": "^msg_"
  34368. },
  34369. "text": {
  34370. "type": "string"
  34371. }
  34372. },
  34373. "required": ["timestamp", "sessionID", "messageID", "text"],
  34374. "additionalProperties": false
  34375. }
  34376. },
  34377. "required": ["id", "type", "properties"],
  34378. "additionalProperties": false
  34379. },
  34380. "EventSessionNextShellStarted": {
  34381. "type": "object",
  34382. "properties": {
  34383. "id": {
  34384. "type": "string",
  34385. "pattern": "^evt_"
  34386. },
  34387. "type": {
  34388. "type": "string",
  34389. "enum": ["session.next.shell.started"]
  34390. },
  34391. "properties": {
  34392. "type": "object",
  34393. "properties": {
  34394. "timestamp": {
  34395. "type": "number"
  34396. },
  34397. "sessionID": {
  34398. "type": "string",
  34399. "pattern": "^ses"
  34400. },
  34401. "messageID": {
  34402. "type": "string",
  34403. "pattern": "^msg_"
  34404. },
  34405. "callID": {
  34406. "type": "string"
  34407. },
  34408. "command": {
  34409. "type": "string"
  34410. }
  34411. },
  34412. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  34413. "additionalProperties": false
  34414. }
  34415. },
  34416. "required": ["id", "type", "properties"],
  34417. "additionalProperties": false
  34418. },
  34419. "EventSessionNextShellEnded": {
  34420. "type": "object",
  34421. "properties": {
  34422. "id": {
  34423. "type": "string",
  34424. "pattern": "^evt_"
  34425. },
  34426. "type": {
  34427. "type": "string",
  34428. "enum": ["session.next.shell.ended"]
  34429. },
  34430. "properties": {
  34431. "type": "object",
  34432. "properties": {
  34433. "timestamp": {
  34434. "type": "number"
  34435. },
  34436. "sessionID": {
  34437. "type": "string",
  34438. "pattern": "^ses"
  34439. },
  34440. "callID": {
  34441. "type": "string"
  34442. },
  34443. "output": {
  34444. "type": "string"
  34445. }
  34446. },
  34447. "required": ["timestamp", "sessionID", "callID", "output"],
  34448. "additionalProperties": false
  34449. }
  34450. },
  34451. "required": ["id", "type", "properties"],
  34452. "additionalProperties": false
  34453. },
  34454. "EventSessionNextStepStarted": {
  34455. "type": "object",
  34456. "properties": {
  34457. "id": {
  34458. "type": "string",
  34459. "pattern": "^evt_"
  34460. },
  34461. "type": {
  34462. "type": "string",
  34463. "enum": ["session.next.step.started"]
  34464. },
  34465. "properties": {
  34466. "type": "object",
  34467. "properties": {
  34468. "timestamp": {
  34469. "type": "number"
  34470. },
  34471. "sessionID": {
  34472. "type": "string",
  34473. "pattern": "^ses"
  34474. },
  34475. "assistantMessageID": {
  34476. "type": "string",
  34477. "pattern": "^msg_"
  34478. },
  34479. "agent": {
  34480. "type": "string"
  34481. },
  34482. "model": {
  34483. "$ref": "#/components/schemas/ModelRef"
  34484. },
  34485. "snapshot": {
  34486. "type": "string"
  34487. }
  34488. },
  34489. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  34490. "additionalProperties": false
  34491. }
  34492. },
  34493. "required": ["id", "type", "properties"],
  34494. "additionalProperties": false
  34495. },
  34496. "EventSessionNextStepEnded": {
  34497. "type": "object",
  34498. "properties": {
  34499. "id": {
  34500. "type": "string",
  34501. "pattern": "^evt_"
  34502. },
  34503. "type": {
  34504. "type": "string",
  34505. "enum": ["session.next.step.ended"]
  34506. },
  34507. "properties": {
  34508. "type": "object",
  34509. "properties": {
  34510. "timestamp": {
  34511. "type": "number"
  34512. },
  34513. "sessionID": {
  34514. "type": "string",
  34515. "pattern": "^ses"
  34516. },
  34517. "assistantMessageID": {
  34518. "type": "string",
  34519. "pattern": "^msg_"
  34520. },
  34521. "finish": {
  34522. "type": "string"
  34523. },
  34524. "cost": {
  34525. "type": "number"
  34526. },
  34527. "tokens": {
  34528. "type": "object",
  34529. "properties": {
  34530. "input": {
  34531. "type": "number"
  34532. },
  34533. "output": {
  34534. "type": "number"
  34535. },
  34536. "reasoning": {
  34537. "type": "number"
  34538. },
  34539. "cache": {
  34540. "type": "object",
  34541. "properties": {
  34542. "read": {
  34543. "type": "number"
  34544. },
  34545. "write": {
  34546. "type": "number"
  34547. }
  34548. },
  34549. "required": ["read", "write"],
  34550. "additionalProperties": false
  34551. }
  34552. },
  34553. "required": ["input", "output", "reasoning", "cache"],
  34554. "additionalProperties": false
  34555. },
  34556. "snapshot": {
  34557. "type": "string"
  34558. },
  34559. "files": {
  34560. "type": "array",
  34561. "items": {
  34562. "type": "string"
  34563. }
  34564. }
  34565. },
  34566. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  34567. "additionalProperties": false
  34568. }
  34569. },
  34570. "required": ["id", "type", "properties"],
  34571. "additionalProperties": false
  34572. },
  34573. "EventSessionNextStepFailed": {
  34574. "type": "object",
  34575. "properties": {
  34576. "id": {
  34577. "type": "string",
  34578. "pattern": "^evt_"
  34579. },
  34580. "type": {
  34581. "type": "string",
  34582. "enum": ["session.next.step.failed"]
  34583. },
  34584. "properties": {
  34585. "type": "object",
  34586. "properties": {
  34587. "timestamp": {
  34588. "type": "number"
  34589. },
  34590. "sessionID": {
  34591. "type": "string",
  34592. "pattern": "^ses"
  34593. },
  34594. "assistantMessageID": {
  34595. "type": "string",
  34596. "pattern": "^msg_"
  34597. },
  34598. "error": {
  34599. "$ref": "#/components/schemas/SessionErrorUnknown"
  34600. }
  34601. },
  34602. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  34603. "additionalProperties": false
  34604. }
  34605. },
  34606. "required": ["id", "type", "properties"],
  34607. "additionalProperties": false
  34608. },
  34609. "EventSessionNextTextStarted": {
  34610. "type": "object",
  34611. "properties": {
  34612. "id": {
  34613. "type": "string",
  34614. "pattern": "^evt_"
  34615. },
  34616. "type": {
  34617. "type": "string",
  34618. "enum": ["session.next.text.started"]
  34619. },
  34620. "properties": {
  34621. "type": "object",
  34622. "properties": {
  34623. "timestamp": {
  34624. "type": "number"
  34625. },
  34626. "sessionID": {
  34627. "type": "string",
  34628. "pattern": "^ses"
  34629. },
  34630. "assistantMessageID": {
  34631. "type": "string",
  34632. "pattern": "^msg_"
  34633. },
  34634. "textID": {
  34635. "type": "string"
  34636. }
  34637. },
  34638. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  34639. "additionalProperties": false
  34640. }
  34641. },
  34642. "required": ["id", "type", "properties"],
  34643. "additionalProperties": false
  34644. },
  34645. "EventSessionNextTextDelta": {
  34646. "type": "object",
  34647. "properties": {
  34648. "id": {
  34649. "type": "string",
  34650. "pattern": "^evt_"
  34651. },
  34652. "type": {
  34653. "type": "string",
  34654. "enum": ["session.next.text.delta"]
  34655. },
  34656. "properties": {
  34657. "type": "object",
  34658. "properties": {
  34659. "timestamp": {
  34660. "type": "number"
  34661. },
  34662. "sessionID": {
  34663. "type": "string",
  34664. "pattern": "^ses"
  34665. },
  34666. "assistantMessageID": {
  34667. "type": "string",
  34668. "pattern": "^msg_"
  34669. },
  34670. "textID": {
  34671. "type": "string"
  34672. },
  34673. "delta": {
  34674. "type": "string"
  34675. }
  34676. },
  34677. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  34678. "additionalProperties": false
  34679. }
  34680. },
  34681. "required": ["id", "type", "properties"],
  34682. "additionalProperties": false
  34683. },
  34684. "EventSessionNextTextEnded": {
  34685. "type": "object",
  34686. "properties": {
  34687. "id": {
  34688. "type": "string",
  34689. "pattern": "^evt_"
  34690. },
  34691. "type": {
  34692. "type": "string",
  34693. "enum": ["session.next.text.ended"]
  34694. },
  34695. "properties": {
  34696. "type": "object",
  34697. "properties": {
  34698. "timestamp": {
  34699. "type": "number"
  34700. },
  34701. "sessionID": {
  34702. "type": "string",
  34703. "pattern": "^ses"
  34704. },
  34705. "assistantMessageID": {
  34706. "type": "string",
  34707. "pattern": "^msg_"
  34708. },
  34709. "textID": {
  34710. "type": "string"
  34711. },
  34712. "text": {
  34713. "type": "string"
  34714. }
  34715. },
  34716. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  34717. "additionalProperties": false
  34718. }
  34719. },
  34720. "required": ["id", "type", "properties"],
  34721. "additionalProperties": false
  34722. },
  34723. "EventSessionNextReasoningStarted": {
  34724. "type": "object",
  34725. "properties": {
  34726. "id": {
  34727. "type": "string",
  34728. "pattern": "^evt_"
  34729. },
  34730. "type": {
  34731. "type": "string",
  34732. "enum": ["session.next.reasoning.started"]
  34733. },
  34734. "properties": {
  34735. "type": "object",
  34736. "properties": {
  34737. "timestamp": {
  34738. "type": "number"
  34739. },
  34740. "sessionID": {
  34741. "type": "string",
  34742. "pattern": "^ses"
  34743. },
  34744. "assistantMessageID": {
  34745. "type": "string",
  34746. "pattern": "^msg_"
  34747. },
  34748. "reasoningID": {
  34749. "type": "string"
  34750. },
  34751. "providerMetadata": {
  34752. "$ref": "#/components/schemas/LLMProviderMetadata"
  34753. }
  34754. },
  34755. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  34756. "additionalProperties": false
  34757. }
  34758. },
  34759. "required": ["id", "type", "properties"],
  34760. "additionalProperties": false
  34761. },
  34762. "EventSessionNextReasoningDelta": {
  34763. "type": "object",
  34764. "properties": {
  34765. "id": {
  34766. "type": "string",
  34767. "pattern": "^evt_"
  34768. },
  34769. "type": {
  34770. "type": "string",
  34771. "enum": ["session.next.reasoning.delta"]
  34772. },
  34773. "properties": {
  34774. "type": "object",
  34775. "properties": {
  34776. "timestamp": {
  34777. "type": "number"
  34778. },
  34779. "sessionID": {
  34780. "type": "string",
  34781. "pattern": "^ses"
  34782. },
  34783. "assistantMessageID": {
  34784. "type": "string",
  34785. "pattern": "^msg_"
  34786. },
  34787. "reasoningID": {
  34788. "type": "string"
  34789. },
  34790. "delta": {
  34791. "type": "string"
  34792. }
  34793. },
  34794. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  34795. "additionalProperties": false
  34796. }
  34797. },
  34798. "required": ["id", "type", "properties"],
  34799. "additionalProperties": false
  34800. },
  34801. "EventSessionNextReasoningEnded": {
  34802. "type": "object",
  34803. "properties": {
  34804. "id": {
  34805. "type": "string",
  34806. "pattern": "^evt_"
  34807. },
  34808. "type": {
  34809. "type": "string",
  34810. "enum": ["session.next.reasoning.ended"]
  34811. },
  34812. "properties": {
  34813. "type": "object",
  34814. "properties": {
  34815. "timestamp": {
  34816. "type": "number"
  34817. },
  34818. "sessionID": {
  34819. "type": "string",
  34820. "pattern": "^ses"
  34821. },
  34822. "assistantMessageID": {
  34823. "type": "string",
  34824. "pattern": "^msg_"
  34825. },
  34826. "reasoningID": {
  34827. "type": "string"
  34828. },
  34829. "text": {
  34830. "type": "string"
  34831. },
  34832. "providerMetadata": {
  34833. "$ref": "#/components/schemas/LLMProviderMetadata"
  34834. }
  34835. },
  34836. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  34837. "additionalProperties": false
  34838. }
  34839. },
  34840. "required": ["id", "type", "properties"],
  34841. "additionalProperties": false
  34842. },
  34843. "EventSessionNextToolInputStarted": {
  34844. "type": "object",
  34845. "properties": {
  34846. "id": {
  34847. "type": "string",
  34848. "pattern": "^evt_"
  34849. },
  34850. "type": {
  34851. "type": "string",
  34852. "enum": ["session.next.tool.input.started"]
  34853. },
  34854. "properties": {
  34855. "type": "object",
  34856. "properties": {
  34857. "timestamp": {
  34858. "type": "number"
  34859. },
  34860. "sessionID": {
  34861. "type": "string",
  34862. "pattern": "^ses"
  34863. },
  34864. "assistantMessageID": {
  34865. "type": "string",
  34866. "pattern": "^msg_"
  34867. },
  34868. "callID": {
  34869. "type": "string"
  34870. },
  34871. "name": {
  34872. "type": "string"
  34873. }
  34874. },
  34875. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  34876. "additionalProperties": false
  34877. }
  34878. },
  34879. "required": ["id", "type", "properties"],
  34880. "additionalProperties": false
  34881. },
  34882. "EventSessionNextToolInputDelta": {
  34883. "type": "object",
  34884. "properties": {
  34885. "id": {
  34886. "type": "string",
  34887. "pattern": "^evt_"
  34888. },
  34889. "type": {
  34890. "type": "string",
  34891. "enum": ["session.next.tool.input.delta"]
  34892. },
  34893. "properties": {
  34894. "type": "object",
  34895. "properties": {
  34896. "timestamp": {
  34897. "type": "number"
  34898. },
  34899. "sessionID": {
  34900. "type": "string",
  34901. "pattern": "^ses"
  34902. },
  34903. "assistantMessageID": {
  34904. "type": "string",
  34905. "pattern": "^msg_"
  34906. },
  34907. "callID": {
  34908. "type": "string"
  34909. },
  34910. "delta": {
  34911. "type": "string"
  34912. }
  34913. },
  34914. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  34915. "additionalProperties": false
  34916. }
  34917. },
  34918. "required": ["id", "type", "properties"],
  34919. "additionalProperties": false
  34920. },
  34921. "EventSessionNextToolInputEnded": {
  34922. "type": "object",
  34923. "properties": {
  34924. "id": {
  34925. "type": "string",
  34926. "pattern": "^evt_"
  34927. },
  34928. "type": {
  34929. "type": "string",
  34930. "enum": ["session.next.tool.input.ended"]
  34931. },
  34932. "properties": {
  34933. "type": "object",
  34934. "properties": {
  34935. "timestamp": {
  34936. "type": "number"
  34937. },
  34938. "sessionID": {
  34939. "type": "string",
  34940. "pattern": "^ses"
  34941. },
  34942. "assistantMessageID": {
  34943. "type": "string",
  34944. "pattern": "^msg_"
  34945. },
  34946. "callID": {
  34947. "type": "string"
  34948. },
  34949. "text": {
  34950. "type": "string"
  34951. }
  34952. },
  34953. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  34954. "additionalProperties": false
  34955. }
  34956. },
  34957. "required": ["id", "type", "properties"],
  34958. "additionalProperties": false
  34959. },
  34960. "EventSessionNextToolCalled": {
  34961. "type": "object",
  34962. "properties": {
  34963. "id": {
  34964. "type": "string",
  34965. "pattern": "^evt_"
  34966. },
  34967. "type": {
  34968. "type": "string",
  34969. "enum": ["session.next.tool.called"]
  34970. },
  34971. "properties": {
  34972. "type": "object",
  34973. "properties": {
  34974. "timestamp": {
  34975. "type": "number"
  34976. },
  34977. "sessionID": {
  34978. "type": "string",
  34979. "pattern": "^ses"
  34980. },
  34981. "assistantMessageID": {
  34982. "type": "string",
  34983. "pattern": "^msg_"
  34984. },
  34985. "callID": {
  34986. "type": "string"
  34987. },
  34988. "tool": {
  34989. "type": "string"
  34990. },
  34991. "input": {
  34992. "type": "object"
  34993. },
  34994. "provider": {
  34995. "type": "object",
  34996. "properties": {
  34997. "executed": {
  34998. "type": "boolean"
  34999. },
  35000. "metadata": {
  35001. "$ref": "#/components/schemas/LLMProviderMetadata"
  35002. }
  35003. },
  35004. "required": ["executed"],
  35005. "additionalProperties": false
  35006. }
  35007. },
  35008. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  35009. "additionalProperties": false
  35010. }
  35011. },
  35012. "required": ["id", "type", "properties"],
  35013. "additionalProperties": false
  35014. },
  35015. "EventSessionNextToolProgress": {
  35016. "type": "object",
  35017. "properties": {
  35018. "id": {
  35019. "type": "string",
  35020. "pattern": "^evt_"
  35021. },
  35022. "type": {
  35023. "type": "string",
  35024. "enum": ["session.next.tool.progress"]
  35025. },
  35026. "properties": {
  35027. "type": "object",
  35028. "properties": {
  35029. "timestamp": {
  35030. "type": "number"
  35031. },
  35032. "sessionID": {
  35033. "type": "string",
  35034. "pattern": "^ses"
  35035. },
  35036. "assistantMessageID": {
  35037. "type": "string",
  35038. "pattern": "^msg_"
  35039. },
  35040. "callID": {
  35041. "type": "string"
  35042. },
  35043. "structured": {
  35044. "type": "object"
  35045. },
  35046. "content": {
  35047. "type": "array",
  35048. "items": {
  35049. "$ref": "#/components/schemas/LLMToolContent"
  35050. }
  35051. }
  35052. },
  35053. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  35054. "additionalProperties": false
  35055. }
  35056. },
  35057. "required": ["id", "type", "properties"],
  35058. "additionalProperties": false
  35059. },
  35060. "EventSessionNextToolSuccess": {
  35061. "type": "object",
  35062. "properties": {
  35063. "id": {
  35064. "type": "string",
  35065. "pattern": "^evt_"
  35066. },
  35067. "type": {
  35068. "type": "string",
  35069. "enum": ["session.next.tool.success"]
  35070. },
  35071. "properties": {
  35072. "type": "object",
  35073. "properties": {
  35074. "timestamp": {
  35075. "type": "number"
  35076. },
  35077. "sessionID": {
  35078. "type": "string",
  35079. "pattern": "^ses"
  35080. },
  35081. "assistantMessageID": {
  35082. "type": "string",
  35083. "pattern": "^msg_"
  35084. },
  35085. "callID": {
  35086. "type": "string"
  35087. },
  35088. "structured": {
  35089. "type": "object"
  35090. },
  35091. "content": {
  35092. "type": "array",
  35093. "items": {
  35094. "$ref": "#/components/schemas/LLMToolContent"
  35095. }
  35096. },
  35097. "outputPaths": {
  35098. "type": "array",
  35099. "items": {
  35100. "type": "string"
  35101. }
  35102. },
  35103. "result": {},
  35104. "provider": {
  35105. "type": "object",
  35106. "properties": {
  35107. "executed": {
  35108. "type": "boolean"
  35109. },
  35110. "metadata": {
  35111. "$ref": "#/components/schemas/LLMProviderMetadata"
  35112. }
  35113. },
  35114. "required": ["executed"],
  35115. "additionalProperties": false
  35116. }
  35117. },
  35118. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  35119. "additionalProperties": false
  35120. }
  35121. },
  35122. "required": ["id", "type", "properties"],
  35123. "additionalProperties": false
  35124. },
  35125. "EventSessionNextToolFailed": {
  35126. "type": "object",
  35127. "properties": {
  35128. "id": {
  35129. "type": "string",
  35130. "pattern": "^evt_"
  35131. },
  35132. "type": {
  35133. "type": "string",
  35134. "enum": ["session.next.tool.failed"]
  35135. },
  35136. "properties": {
  35137. "type": "object",
  35138. "properties": {
  35139. "timestamp": {
  35140. "type": "number"
  35141. },
  35142. "sessionID": {
  35143. "type": "string",
  35144. "pattern": "^ses"
  35145. },
  35146. "assistantMessageID": {
  35147. "type": "string",
  35148. "pattern": "^msg_"
  35149. },
  35150. "callID": {
  35151. "type": "string"
  35152. },
  35153. "error": {
  35154. "$ref": "#/components/schemas/SessionErrorUnknown"
  35155. },
  35156. "result": {},
  35157. "provider": {
  35158. "type": "object",
  35159. "properties": {
  35160. "executed": {
  35161. "type": "boolean"
  35162. },
  35163. "metadata": {
  35164. "$ref": "#/components/schemas/LLMProviderMetadata"
  35165. }
  35166. },
  35167. "required": ["executed"],
  35168. "additionalProperties": false
  35169. }
  35170. },
  35171. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  35172. "additionalProperties": false
  35173. }
  35174. },
  35175. "required": ["id", "type", "properties"],
  35176. "additionalProperties": false
  35177. },
  35178. "EventSessionNextRetried": {
  35179. "type": "object",
  35180. "properties": {
  35181. "id": {
  35182. "type": "string",
  35183. "pattern": "^evt_"
  35184. },
  35185. "type": {
  35186. "type": "string",
  35187. "enum": ["session.next.retried"]
  35188. },
  35189. "properties": {
  35190. "type": "object",
  35191. "properties": {
  35192. "timestamp": {
  35193. "type": "number"
  35194. },
  35195. "sessionID": {
  35196. "type": "string",
  35197. "pattern": "^ses"
  35198. },
  35199. "attempt": {
  35200. "type": "number"
  35201. },
  35202. "error": {
  35203. "$ref": "#/components/schemas/SessionNextRetry_error"
  35204. }
  35205. },
  35206. "required": ["timestamp", "sessionID", "attempt", "error"],
  35207. "additionalProperties": false
  35208. }
  35209. },
  35210. "required": ["id", "type", "properties"],
  35211. "additionalProperties": false
  35212. },
  35213. "EventSessionNextCompactionStarted": {
  35214. "type": "object",
  35215. "properties": {
  35216. "id": {
  35217. "type": "string",
  35218. "pattern": "^evt_"
  35219. },
  35220. "type": {
  35221. "type": "string",
  35222. "enum": ["session.next.compaction.started"]
  35223. },
  35224. "properties": {
  35225. "type": "object",
  35226. "properties": {
  35227. "timestamp": {
  35228. "type": "number"
  35229. },
  35230. "sessionID": {
  35231. "type": "string",
  35232. "pattern": "^ses"
  35233. },
  35234. "messageID": {
  35235. "type": "string",
  35236. "pattern": "^msg_"
  35237. },
  35238. "reason": {
  35239. "type": "string",
  35240. "enum": ["auto", "manual"]
  35241. }
  35242. },
  35243. "required": ["timestamp", "sessionID", "messageID", "reason"],
  35244. "additionalProperties": false
  35245. }
  35246. },
  35247. "required": ["id", "type", "properties"],
  35248. "additionalProperties": false
  35249. },
  35250. "EventSessionNextCompactionDelta": {
  35251. "type": "object",
  35252. "properties": {
  35253. "id": {
  35254. "type": "string",
  35255. "pattern": "^evt_"
  35256. },
  35257. "type": {
  35258. "type": "string",
  35259. "enum": ["session.next.compaction.delta"]
  35260. },
  35261. "properties": {
  35262. "type": "object",
  35263. "properties": {
  35264. "timestamp": {
  35265. "type": "number"
  35266. },
  35267. "sessionID": {
  35268. "type": "string",
  35269. "pattern": "^ses"
  35270. },
  35271. "messageID": {
  35272. "type": "string",
  35273. "pattern": "^msg_"
  35274. },
  35275. "text": {
  35276. "type": "string"
  35277. }
  35278. },
  35279. "required": ["timestamp", "sessionID", "messageID", "text"],
  35280. "additionalProperties": false
  35281. }
  35282. },
  35283. "required": ["id", "type", "properties"],
  35284. "additionalProperties": false
  35285. },
  35286. "EventSessionNextCompactionEnded": {
  35287. "type": "object",
  35288. "properties": {
  35289. "id": {
  35290. "type": "string",
  35291. "pattern": "^evt_"
  35292. },
  35293. "type": {
  35294. "type": "string",
  35295. "enum": ["session.next.compaction.ended"]
  35296. },
  35297. "properties": {
  35298. "type": "object",
  35299. "properties": {
  35300. "timestamp": {
  35301. "type": "number"
  35302. },
  35303. "sessionID": {
  35304. "type": "string",
  35305. "pattern": "^ses"
  35306. },
  35307. "messageID": {
  35308. "type": "string",
  35309. "pattern": "^msg_"
  35310. },
  35311. "reason": {
  35312. "type": "string",
  35313. "enum": ["auto", "manual"]
  35314. },
  35315. "text": {
  35316. "type": "string"
  35317. },
  35318. "recent": {
  35319. "type": "string"
  35320. }
  35321. },
  35322. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  35323. "additionalProperties": false
  35324. }
  35325. },
  35326. "required": ["id", "type", "properties"],
  35327. "additionalProperties": false
  35328. },
  35329. "EventSessionNextRevertStaged": {
  35330. "type": "object",
  35331. "properties": {
  35332. "id": {
  35333. "type": "string",
  35334. "pattern": "^evt_"
  35335. },
  35336. "type": {
  35337. "type": "string",
  35338. "enum": ["session.next.revert.staged"]
  35339. },
  35340. "properties": {
  35341. "type": "object",
  35342. "properties": {
  35343. "timestamp": {
  35344. "type": "number"
  35345. },
  35346. "sessionID": {
  35347. "type": "string",
  35348. "pattern": "^ses"
  35349. },
  35350. "revert": {
  35351. "$ref": "#/components/schemas/RevertState"
  35352. }
  35353. },
  35354. "required": ["timestamp", "sessionID", "revert"],
  35355. "additionalProperties": false
  35356. }
  35357. },
  35358. "required": ["id", "type", "properties"],
  35359. "additionalProperties": false
  35360. },
  35361. "EventSessionNextRevertCleared": {
  35362. "type": "object",
  35363. "properties": {
  35364. "id": {
  35365. "type": "string",
  35366. "pattern": "^evt_"
  35367. },
  35368. "type": {
  35369. "type": "string",
  35370. "enum": ["session.next.revert.cleared"]
  35371. },
  35372. "properties": {
  35373. "type": "object",
  35374. "properties": {
  35375. "timestamp": {
  35376. "type": "number"
  35377. },
  35378. "sessionID": {
  35379. "type": "string",
  35380. "pattern": "^ses"
  35381. }
  35382. },
  35383. "required": ["timestamp", "sessionID"],
  35384. "additionalProperties": false
  35385. }
  35386. },
  35387. "required": ["id", "type", "properties"],
  35388. "additionalProperties": false
  35389. },
  35390. "EventSessionNextRevertCommitted": {
  35391. "type": "object",
  35392. "properties": {
  35393. "id": {
  35394. "type": "string",
  35395. "pattern": "^evt_"
  35396. },
  35397. "type": {
  35398. "type": "string",
  35399. "enum": ["session.next.revert.committed"]
  35400. },
  35401. "properties": {
  35402. "type": "object",
  35403. "properties": {
  35404. "timestamp": {
  35405. "type": "number"
  35406. },
  35407. "sessionID": {
  35408. "type": "string",
  35409. "pattern": "^ses"
  35410. },
  35411. "messageID": {
  35412. "type": "string",
  35413. "pattern": "^msg_"
  35414. }
  35415. },
  35416. "required": ["timestamp", "sessionID", "messageID"],
  35417. "additionalProperties": false
  35418. }
  35419. },
  35420. "required": ["id", "type", "properties"],
  35421. "additionalProperties": false
  35422. },
  35423. "EventMessagePartDelta": {
  35424. "type": "object",
  35425. "properties": {
  35426. "id": {
  35427. "type": "string",
  35428. "pattern": "^evt_"
  35429. },
  35430. "type": {
  35431. "type": "string",
  35432. "enum": ["message.part.delta"]
  35433. },
  35434. "properties": {
  35435. "type": "object",
  35436. "properties": {
  35437. "sessionID": {
  35438. "type": "string",
  35439. "pattern": "^ses"
  35440. },
  35441. "messageID": {
  35442. "type": "string",
  35443. "pattern": "^msg"
  35444. },
  35445. "partID": {
  35446. "type": "string",
  35447. "pattern": "^prt"
  35448. },
  35449. "field": {
  35450. "type": "string"
  35451. },
  35452. "delta": {
  35453. "type": "string"
  35454. }
  35455. },
  35456. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  35457. "additionalProperties": false
  35458. }
  35459. },
  35460. "required": ["id", "type", "properties"],
  35461. "additionalProperties": false
  35462. },
  35463. "EventSessionDiff": {
  35464. "type": "object",
  35465. "properties": {
  35466. "id": {
  35467. "type": "string",
  35468. "pattern": "^evt_"
  35469. },
  35470. "type": {
  35471. "type": "string",
  35472. "enum": ["session.diff"]
  35473. },
  35474. "properties": {
  35475. "type": "object",
  35476. "properties": {
  35477. "sessionID": {
  35478. "type": "string",
  35479. "pattern": "^ses"
  35480. },
  35481. "diff": {
  35482. "type": "array",
  35483. "items": {
  35484. "$ref": "#/components/schemas/SnapshotFileDiff"
  35485. }
  35486. }
  35487. },
  35488. "required": ["sessionID", "diff"],
  35489. "additionalProperties": false
  35490. }
  35491. },
  35492. "required": ["id", "type", "properties"],
  35493. "additionalProperties": false
  35494. },
  35495. "EventSessionError": {
  35496. "type": "object",
  35497. "properties": {
  35498. "id": {
  35499. "type": "string",
  35500. "pattern": "^evt_"
  35501. },
  35502. "type": {
  35503. "type": "string",
  35504. "enum": ["session.error"]
  35505. },
  35506. "properties": {
  35507. "type": "object",
  35508. "properties": {
  35509. "sessionID": {
  35510. "type": "string",
  35511. "pattern": "^ses"
  35512. },
  35513. "error": {
  35514. "anyOf": [
  35515. {
  35516. "$ref": "#/components/schemas/ProviderAuthError"
  35517. },
  35518. {
  35519. "$ref": "#/components/schemas/UnknownError"
  35520. },
  35521. {
  35522. "$ref": "#/components/schemas/MessageOutputLengthError"
  35523. },
  35524. {
  35525. "$ref": "#/components/schemas/MessageAbortedError"
  35526. },
  35527. {
  35528. "$ref": "#/components/schemas/StructuredOutputError"
  35529. },
  35530. {
  35531. "$ref": "#/components/schemas/ContextOverflowError"
  35532. },
  35533. {
  35534. "$ref": "#/components/schemas/ContentFilterError"
  35535. },
  35536. {
  35537. "$ref": "#/components/schemas/APIError"
  35538. }
  35539. ]
  35540. }
  35541. },
  35542. "additionalProperties": false
  35543. }
  35544. },
  35545. "required": ["id", "type", "properties"],
  35546. "additionalProperties": false
  35547. },
  35548. "EventInstallationUpdated": {
  35549. "type": "object",
  35550. "properties": {
  35551. "id": {
  35552. "type": "string",
  35553. "pattern": "^evt_"
  35554. },
  35555. "type": {
  35556. "type": "string",
  35557. "enum": ["installation.updated"]
  35558. },
  35559. "properties": {
  35560. "type": "object",
  35561. "properties": {
  35562. "version": {
  35563. "type": "string"
  35564. }
  35565. },
  35566. "required": ["version"],
  35567. "additionalProperties": false
  35568. }
  35569. },
  35570. "required": ["id", "type", "properties"],
  35571. "additionalProperties": false
  35572. },
  35573. "EventInstallationUpdate-available": {
  35574. "type": "object",
  35575. "properties": {
  35576. "id": {
  35577. "type": "string",
  35578. "pattern": "^evt_"
  35579. },
  35580. "type": {
  35581. "type": "string",
  35582. "enum": ["installation.update-available"]
  35583. },
  35584. "properties": {
  35585. "type": "object",
  35586. "properties": {
  35587. "version": {
  35588. "type": "string"
  35589. }
  35590. },
  35591. "required": ["version"],
  35592. "additionalProperties": false
  35593. }
  35594. },
  35595. "required": ["id", "type", "properties"],
  35596. "additionalProperties": false
  35597. },
  35598. "EventFileEdited": {
  35599. "type": "object",
  35600. "properties": {
  35601. "id": {
  35602. "type": "string",
  35603. "pattern": "^evt_"
  35604. },
  35605. "type": {
  35606. "type": "string",
  35607. "enum": ["file.edited"]
  35608. },
  35609. "properties": {
  35610. "type": "object",
  35611. "properties": {
  35612. "file": {
  35613. "type": "string"
  35614. }
  35615. },
  35616. "required": ["file"],
  35617. "additionalProperties": false
  35618. }
  35619. },
  35620. "required": ["id", "type", "properties"],
  35621. "additionalProperties": false
  35622. },
  35623. "EventReferenceUpdated": {
  35624. "type": "object",
  35625. "properties": {
  35626. "id": {
  35627. "type": "string",
  35628. "pattern": "^evt_"
  35629. },
  35630. "type": {
  35631. "type": "string",
  35632. "enum": ["reference.updated"]
  35633. },
  35634. "properties": {
  35635. "type": "object",
  35636. "properties": {}
  35637. }
  35638. },
  35639. "required": ["id", "type", "properties"],
  35640. "additionalProperties": false
  35641. },
  35642. "EventPermissionV2Asked": {
  35643. "type": "object",
  35644. "properties": {
  35645. "id": {
  35646. "type": "string",
  35647. "pattern": "^evt_"
  35648. },
  35649. "type": {
  35650. "type": "string",
  35651. "enum": ["permission.v2.asked"]
  35652. },
  35653. "properties": {
  35654. "type": "object",
  35655. "properties": {
  35656. "id": {
  35657. "type": "string",
  35658. "pattern": "^per"
  35659. },
  35660. "sessionID": {
  35661. "type": "string",
  35662. "pattern": "^ses"
  35663. },
  35664. "action": {
  35665. "type": "string"
  35666. },
  35667. "resources": {
  35668. "type": "array",
  35669. "items": {
  35670. "type": "string"
  35671. }
  35672. },
  35673. "save": {
  35674. "type": "array",
  35675. "items": {
  35676. "type": "string"
  35677. }
  35678. },
  35679. "metadata": {
  35680. "type": "object"
  35681. },
  35682. "source": {
  35683. "$ref": "#/components/schemas/PermissionV2Source"
  35684. }
  35685. },
  35686. "required": ["id", "sessionID", "action", "resources"],
  35687. "additionalProperties": false
  35688. }
  35689. },
  35690. "required": ["id", "type", "properties"],
  35691. "additionalProperties": false
  35692. },
  35693. "EventPermissionV2Replied": {
  35694. "type": "object",
  35695. "properties": {
  35696. "id": {
  35697. "type": "string",
  35698. "pattern": "^evt_"
  35699. },
  35700. "type": {
  35701. "type": "string",
  35702. "enum": ["permission.v2.replied"]
  35703. },
  35704. "properties": {
  35705. "type": "object",
  35706. "properties": {
  35707. "sessionID": {
  35708. "type": "string",
  35709. "pattern": "^ses"
  35710. },
  35711. "requestID": {
  35712. "type": "string",
  35713. "pattern": "^per"
  35714. },
  35715. "reply": {
  35716. "$ref": "#/components/schemas/PermissionV2Reply"
  35717. }
  35718. },
  35719. "required": ["sessionID", "requestID", "reply"],
  35720. "additionalProperties": false
  35721. }
  35722. },
  35723. "required": ["id", "type", "properties"],
  35724. "additionalProperties": false
  35725. },
  35726. "EventPluginAdded": {
  35727. "type": "object",
  35728. "properties": {
  35729. "id": {
  35730. "type": "string",
  35731. "pattern": "^evt_"
  35732. },
  35733. "type": {
  35734. "type": "string",
  35735. "enum": ["plugin.added"]
  35736. },
  35737. "properties": {
  35738. "type": "object",
  35739. "properties": {
  35740. "id": {
  35741. "type": "string"
  35742. }
  35743. },
  35744. "required": ["id"],
  35745. "additionalProperties": false
  35746. }
  35747. },
  35748. "required": ["id", "type", "properties"],
  35749. "additionalProperties": false
  35750. },
  35751. "EventProjectDirectoriesUpdated": {
  35752. "type": "object",
  35753. "properties": {
  35754. "id": {
  35755. "type": "string",
  35756. "pattern": "^evt_"
  35757. },
  35758. "type": {
  35759. "type": "string",
  35760. "enum": ["project.directories.updated"]
  35761. },
  35762. "properties": {
  35763. "type": "object",
  35764. "properties": {
  35765. "projectID": {
  35766. "type": "string"
  35767. }
  35768. },
  35769. "required": ["projectID"],
  35770. "additionalProperties": false
  35771. }
  35772. },
  35773. "required": ["id", "type", "properties"],
  35774. "additionalProperties": false
  35775. },
  35776. "EventFileWatcherUpdated": {
  35777. "type": "object",
  35778. "properties": {
  35779. "id": {
  35780. "type": "string",
  35781. "pattern": "^evt_"
  35782. },
  35783. "type": {
  35784. "type": "string",
  35785. "enum": ["file.watcher.updated"]
  35786. },
  35787. "properties": {
  35788. "type": "object",
  35789. "properties": {
  35790. "file": {
  35791. "type": "string"
  35792. },
  35793. "event": {
  35794. "type": "string",
  35795. "enum": ["add", "change", "unlink"]
  35796. }
  35797. },
  35798. "required": ["file", "event"],
  35799. "additionalProperties": false
  35800. }
  35801. },
  35802. "required": ["id", "type", "properties"],
  35803. "additionalProperties": false
  35804. },
  35805. "EventPtyCreated": {
  35806. "type": "object",
  35807. "properties": {
  35808. "id": {
  35809. "type": "string",
  35810. "pattern": "^evt_"
  35811. },
  35812. "type": {
  35813. "type": "string",
  35814. "enum": ["pty.created"]
  35815. },
  35816. "properties": {
  35817. "type": "object",
  35818. "properties": {
  35819. "info": {
  35820. "$ref": "#/components/schemas/Pty"
  35821. }
  35822. },
  35823. "required": ["info"],
  35824. "additionalProperties": false
  35825. }
  35826. },
  35827. "required": ["id", "type", "properties"],
  35828. "additionalProperties": false
  35829. },
  35830. "EventPtyUpdated": {
  35831. "type": "object",
  35832. "properties": {
  35833. "id": {
  35834. "type": "string",
  35835. "pattern": "^evt_"
  35836. },
  35837. "type": {
  35838. "type": "string",
  35839. "enum": ["pty.updated"]
  35840. },
  35841. "properties": {
  35842. "type": "object",
  35843. "properties": {
  35844. "info": {
  35845. "$ref": "#/components/schemas/Pty"
  35846. }
  35847. },
  35848. "required": ["info"],
  35849. "additionalProperties": false
  35850. }
  35851. },
  35852. "required": ["id", "type", "properties"],
  35853. "additionalProperties": false
  35854. },
  35855. "EventPtyExited": {
  35856. "type": "object",
  35857. "properties": {
  35858. "id": {
  35859. "type": "string",
  35860. "pattern": "^evt_"
  35861. },
  35862. "type": {
  35863. "type": "string",
  35864. "enum": ["pty.exited"]
  35865. },
  35866. "properties": {
  35867. "type": "object",
  35868. "properties": {
  35869. "id": {
  35870. "type": "string",
  35871. "pattern": "^pty"
  35872. },
  35873. "exitCode": {
  35874. "type": "integer",
  35875. "minimum": 0
  35876. }
  35877. },
  35878. "required": ["id", "exitCode"],
  35879. "additionalProperties": false
  35880. }
  35881. },
  35882. "required": ["id", "type", "properties"],
  35883. "additionalProperties": false
  35884. },
  35885. "EventPtyDeleted": {
  35886. "type": "object",
  35887. "properties": {
  35888. "id": {
  35889. "type": "string",
  35890. "pattern": "^evt_"
  35891. },
  35892. "type": {
  35893. "type": "string",
  35894. "enum": ["pty.deleted"]
  35895. },
  35896. "properties": {
  35897. "type": "object",
  35898. "properties": {
  35899. "id": {
  35900. "type": "string",
  35901. "pattern": "^pty"
  35902. }
  35903. },
  35904. "required": ["id"],
  35905. "additionalProperties": false
  35906. }
  35907. },
  35908. "required": ["id", "type", "properties"],
  35909. "additionalProperties": false
  35910. },
  35911. "EventQuestionV2Asked": {
  35912. "type": "object",
  35913. "properties": {
  35914. "id": {
  35915. "type": "string",
  35916. "pattern": "^evt_"
  35917. },
  35918. "type": {
  35919. "type": "string",
  35920. "enum": ["question.v2.asked"]
  35921. },
  35922. "properties": {
  35923. "type": "object",
  35924. "properties": {
  35925. "id": {
  35926. "type": "string",
  35927. "pattern": "^que"
  35928. },
  35929. "sessionID": {
  35930. "type": "string",
  35931. "pattern": "^ses"
  35932. },
  35933. "questions": {
  35934. "type": "array",
  35935. "items": {
  35936. "$ref": "#/components/schemas/QuestionV2Info"
  35937. },
  35938. "description": "Questions to ask"
  35939. },
  35940. "tool": {
  35941. "$ref": "#/components/schemas/QuestionV2Tool"
  35942. }
  35943. },
  35944. "required": ["id", "sessionID", "questions"],
  35945. "additionalProperties": false
  35946. }
  35947. },
  35948. "required": ["id", "type", "properties"],
  35949. "additionalProperties": false
  35950. },
  35951. "EventQuestionV2Replied": {
  35952. "type": "object",
  35953. "properties": {
  35954. "id": {
  35955. "type": "string",
  35956. "pattern": "^evt_"
  35957. },
  35958. "type": {
  35959. "type": "string",
  35960. "enum": ["question.v2.replied"]
  35961. },
  35962. "properties": {
  35963. "type": "object",
  35964. "properties": {
  35965. "sessionID": {
  35966. "type": "string",
  35967. "pattern": "^ses"
  35968. },
  35969. "requestID": {
  35970. "type": "string",
  35971. "pattern": "^que"
  35972. },
  35973. "answers": {
  35974. "type": "array",
  35975. "items": {
  35976. "$ref": "#/components/schemas/QuestionV2Answer"
  35977. }
  35978. }
  35979. },
  35980. "required": ["sessionID", "requestID", "answers"],
  35981. "additionalProperties": false
  35982. }
  35983. },
  35984. "required": ["id", "type", "properties"],
  35985. "additionalProperties": false
  35986. },
  35987. "EventQuestionV2Rejected": {
  35988. "type": "object",
  35989. "properties": {
  35990. "id": {
  35991. "type": "string",
  35992. "pattern": "^evt_"
  35993. },
  35994. "type": {
  35995. "type": "string",
  35996. "enum": ["question.v2.rejected"]
  35997. },
  35998. "properties": {
  35999. "type": "object",
  36000. "properties": {
  36001. "sessionID": {
  36002. "type": "string",
  36003. "pattern": "^ses"
  36004. },
  36005. "requestID": {
  36006. "type": "string",
  36007. "pattern": "^que"
  36008. }
  36009. },
  36010. "required": ["sessionID", "requestID"],
  36011. "additionalProperties": false
  36012. }
  36013. },
  36014. "required": ["id", "type", "properties"],
  36015. "additionalProperties": false
  36016. },
  36017. "EventTodoUpdated": {
  36018. "type": "object",
  36019. "properties": {
  36020. "id": {
  36021. "type": "string",
  36022. "pattern": "^evt_"
  36023. },
  36024. "type": {
  36025. "type": "string",
  36026. "enum": ["todo.updated"]
  36027. },
  36028. "properties": {
  36029. "type": "object",
  36030. "properties": {
  36031. "sessionID": {
  36032. "type": "string",
  36033. "pattern": "^ses"
  36034. },
  36035. "todos": {
  36036. "type": "array",
  36037. "items": {
  36038. "$ref": "#/components/schemas/Todo"
  36039. }
  36040. }
  36041. },
  36042. "required": ["sessionID", "todos"],
  36043. "additionalProperties": false
  36044. }
  36045. },
  36046. "required": ["id", "type", "properties"],
  36047. "additionalProperties": false
  36048. },
  36049. "EventLspUpdated": {
  36050. "type": "object",
  36051. "properties": {
  36052. "id": {
  36053. "type": "string",
  36054. "pattern": "^evt_"
  36055. },
  36056. "type": {
  36057. "type": "string",
  36058. "enum": ["lsp.updated"]
  36059. },
  36060. "properties": {
  36061. "type": "object",
  36062. "properties": {}
  36063. }
  36064. },
  36065. "required": ["id", "type", "properties"],
  36066. "additionalProperties": false
  36067. },
  36068. "EventPermissionAsked": {
  36069. "type": "object",
  36070. "properties": {
  36071. "id": {
  36072. "type": "string",
  36073. "pattern": "^evt_"
  36074. },
  36075. "type": {
  36076. "type": "string",
  36077. "enum": ["permission.asked"]
  36078. },
  36079. "properties": {
  36080. "type": "object",
  36081. "properties": {
  36082. "id": {
  36083. "type": "string",
  36084. "pattern": "^per"
  36085. },
  36086. "sessionID": {
  36087. "type": "string",
  36088. "pattern": "^ses"
  36089. },
  36090. "permission": {
  36091. "type": "string"
  36092. },
  36093. "patterns": {
  36094. "type": "array",
  36095. "items": {
  36096. "type": "string"
  36097. }
  36098. },
  36099. "metadata": {
  36100. "type": "object"
  36101. },
  36102. "always": {
  36103. "type": "array",
  36104. "items": {
  36105. "type": "string"
  36106. }
  36107. },
  36108. "tool": {
  36109. "type": "object",
  36110. "properties": {
  36111. "messageID": {
  36112. "type": "string"
  36113. },
  36114. "callID": {
  36115. "type": "string"
  36116. }
  36117. },
  36118. "required": ["messageID", "callID"],
  36119. "additionalProperties": false
  36120. }
  36121. },
  36122. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  36123. "additionalProperties": false
  36124. }
  36125. },
  36126. "required": ["id", "type", "properties"],
  36127. "additionalProperties": false
  36128. },
  36129. "EventPermissionReplied": {
  36130. "type": "object",
  36131. "properties": {
  36132. "id": {
  36133. "type": "string",
  36134. "pattern": "^evt_"
  36135. },
  36136. "type": {
  36137. "type": "string",
  36138. "enum": ["permission.replied"]
  36139. },
  36140. "properties": {
  36141. "type": "object",
  36142. "properties": {
  36143. "sessionID": {
  36144. "type": "string",
  36145. "pattern": "^ses"
  36146. },
  36147. "requestID": {
  36148. "type": "string",
  36149. "pattern": "^per"
  36150. },
  36151. "reply": {
  36152. "type": "string",
  36153. "enum": ["once", "always", "reject"]
  36154. }
  36155. },
  36156. "required": ["sessionID", "requestID", "reply"],
  36157. "additionalProperties": false
  36158. }
  36159. },
  36160. "required": ["id", "type", "properties"],
  36161. "additionalProperties": false
  36162. },
  36163. "EventMcpToolsChanged": {
  36164. "type": "object",
  36165. "properties": {
  36166. "id": {
  36167. "type": "string",
  36168. "pattern": "^evt_"
  36169. },
  36170. "type": {
  36171. "type": "string",
  36172. "enum": ["mcp.tools.changed"]
  36173. },
  36174. "properties": {
  36175. "type": "object",
  36176. "properties": {
  36177. "server": {
  36178. "type": "string"
  36179. }
  36180. },
  36181. "required": ["server"],
  36182. "additionalProperties": false
  36183. }
  36184. },
  36185. "required": ["id", "type", "properties"],
  36186. "additionalProperties": false
  36187. },
  36188. "EventMcpBrowserOpenFailed": {
  36189. "type": "object",
  36190. "properties": {
  36191. "id": {
  36192. "type": "string",
  36193. "pattern": "^evt_"
  36194. },
  36195. "type": {
  36196. "type": "string",
  36197. "enum": ["mcp.browser.open.failed"]
  36198. },
  36199. "properties": {
  36200. "type": "object",
  36201. "properties": {
  36202. "mcpName": {
  36203. "type": "string"
  36204. },
  36205. "url": {
  36206. "type": "string"
  36207. }
  36208. },
  36209. "required": ["mcpName", "url"],
  36210. "additionalProperties": false
  36211. }
  36212. },
  36213. "required": ["id", "type", "properties"],
  36214. "additionalProperties": false
  36215. },
  36216. "EventCommandExecuted": {
  36217. "type": "object",
  36218. "properties": {
  36219. "id": {
  36220. "type": "string",
  36221. "pattern": "^evt_"
  36222. },
  36223. "type": {
  36224. "type": "string",
  36225. "enum": ["command.executed"]
  36226. },
  36227. "properties": {
  36228. "type": "object",
  36229. "properties": {
  36230. "name": {
  36231. "type": "string"
  36232. },
  36233. "sessionID": {
  36234. "type": "string",
  36235. "pattern": "^ses"
  36236. },
  36237. "arguments": {
  36238. "type": "string"
  36239. },
  36240. "messageID": {
  36241. "type": "string",
  36242. "pattern": "^msg"
  36243. }
  36244. },
  36245. "required": ["name", "sessionID", "arguments", "messageID"],
  36246. "additionalProperties": false
  36247. }
  36248. },
  36249. "required": ["id", "type", "properties"],
  36250. "additionalProperties": false
  36251. },
  36252. "EventProjectUpdated": {
  36253. "type": "object",
  36254. "properties": {
  36255. "id": {
  36256. "type": "string",
  36257. "pattern": "^evt_"
  36258. },
  36259. "type": {
  36260. "type": "string",
  36261. "enum": ["project.updated"]
  36262. },
  36263. "properties": {
  36264. "type": "object",
  36265. "properties": {
  36266. "id": {
  36267. "type": "string"
  36268. },
  36269. "worktree": {
  36270. "type": "string"
  36271. },
  36272. "vcs": {
  36273. "$ref": "#/components/schemas/ProjectVcs"
  36274. },
  36275. "name": {
  36276. "type": "string"
  36277. },
  36278. "icon": {
  36279. "$ref": "#/components/schemas/ProjectIcon"
  36280. },
  36281. "commands": {
  36282. "$ref": "#/components/schemas/ProjectCommands"
  36283. },
  36284. "time": {
  36285. "$ref": "#/components/schemas/ProjectTime"
  36286. },
  36287. "sandboxes": {
  36288. "type": "array",
  36289. "items": {
  36290. "type": "string"
  36291. }
  36292. }
  36293. },
  36294. "required": ["id", "worktree", "time", "sandboxes"],
  36295. "additionalProperties": false
  36296. }
  36297. },
  36298. "required": ["id", "type", "properties"],
  36299. "additionalProperties": false
  36300. },
  36301. "EventSessionStatus": {
  36302. "type": "object",
  36303. "properties": {
  36304. "id": {
  36305. "type": "string",
  36306. "pattern": "^evt_"
  36307. },
  36308. "type": {
  36309. "type": "string",
  36310. "enum": ["session.status"]
  36311. },
  36312. "properties": {
  36313. "type": "object",
  36314. "properties": {
  36315. "sessionID": {
  36316. "type": "string",
  36317. "pattern": "^ses"
  36318. },
  36319. "status": {
  36320. "$ref": "#/components/schemas/SessionStatus"
  36321. }
  36322. },
  36323. "required": ["sessionID", "status"],
  36324. "additionalProperties": false
  36325. }
  36326. },
  36327. "required": ["id", "type", "properties"],
  36328. "additionalProperties": false
  36329. },
  36330. "EventSessionIdle": {
  36331. "type": "object",
  36332. "properties": {
  36333. "id": {
  36334. "type": "string",
  36335. "pattern": "^evt_"
  36336. },
  36337. "type": {
  36338. "type": "string",
  36339. "enum": ["session.idle"]
  36340. },
  36341. "properties": {
  36342. "type": "object",
  36343. "properties": {
  36344. "sessionID": {
  36345. "type": "string",
  36346. "pattern": "^ses"
  36347. }
  36348. },
  36349. "required": ["sessionID"],
  36350. "additionalProperties": false
  36351. }
  36352. },
  36353. "required": ["id", "type", "properties"],
  36354. "additionalProperties": false
  36355. },
  36356. "EventQuestionAsked": {
  36357. "type": "object",
  36358. "properties": {
  36359. "id": {
  36360. "type": "string",
  36361. "pattern": "^evt_"
  36362. },
  36363. "type": {
  36364. "type": "string",
  36365. "enum": ["question.asked"]
  36366. },
  36367. "properties": {
  36368. "type": "object",
  36369. "properties": {
  36370. "id": {
  36371. "type": "string",
  36372. "pattern": "^que"
  36373. },
  36374. "sessionID": {
  36375. "type": "string",
  36376. "pattern": "^ses"
  36377. },
  36378. "questions": {
  36379. "type": "array",
  36380. "items": {
  36381. "$ref": "#/components/schemas/QuestionInfo"
  36382. },
  36383. "description": "Questions to ask"
  36384. },
  36385. "tool": {
  36386. "$ref": "#/components/schemas/QuestionTool"
  36387. }
  36388. },
  36389. "required": ["id", "sessionID", "questions"],
  36390. "additionalProperties": false
  36391. }
  36392. },
  36393. "required": ["id", "type", "properties"],
  36394. "additionalProperties": false
  36395. },
  36396. "EventQuestionReplied": {
  36397. "type": "object",
  36398. "properties": {
  36399. "id": {
  36400. "type": "string",
  36401. "pattern": "^evt_"
  36402. },
  36403. "type": {
  36404. "type": "string",
  36405. "enum": ["question.replied"]
  36406. },
  36407. "properties": {
  36408. "type": "object",
  36409. "properties": {
  36410. "sessionID": {
  36411. "type": "string",
  36412. "pattern": "^ses"
  36413. },
  36414. "requestID": {
  36415. "type": "string",
  36416. "pattern": "^que"
  36417. },
  36418. "answers": {
  36419. "type": "array",
  36420. "items": {
  36421. "$ref": "#/components/schemas/QuestionAnswer"
  36422. }
  36423. }
  36424. },
  36425. "required": ["sessionID", "requestID", "answers"],
  36426. "additionalProperties": false
  36427. }
  36428. },
  36429. "required": ["id", "type", "properties"],
  36430. "additionalProperties": false
  36431. },
  36432. "EventQuestionRejected": {
  36433. "type": "object",
  36434. "properties": {
  36435. "id": {
  36436. "type": "string",
  36437. "pattern": "^evt_"
  36438. },
  36439. "type": {
  36440. "type": "string",
  36441. "enum": ["question.rejected"]
  36442. },
  36443. "properties": {
  36444. "type": "object",
  36445. "properties": {
  36446. "sessionID": {
  36447. "type": "string",
  36448. "pattern": "^ses"
  36449. },
  36450. "requestID": {
  36451. "type": "string",
  36452. "pattern": "^que"
  36453. }
  36454. },
  36455. "required": ["sessionID", "requestID"],
  36456. "additionalProperties": false
  36457. }
  36458. },
  36459. "required": ["id", "type", "properties"],
  36460. "additionalProperties": false
  36461. },
  36462. "EventSessionCompacted": {
  36463. "type": "object",
  36464. "properties": {
  36465. "id": {
  36466. "type": "string",
  36467. "pattern": "^evt_"
  36468. },
  36469. "type": {
  36470. "type": "string",
  36471. "enum": ["session.compacted"]
  36472. },
  36473. "properties": {
  36474. "type": "object",
  36475. "properties": {
  36476. "sessionID": {
  36477. "type": "string",
  36478. "pattern": "^ses"
  36479. }
  36480. },
  36481. "required": ["sessionID"],
  36482. "additionalProperties": false
  36483. }
  36484. },
  36485. "required": ["id", "type", "properties"],
  36486. "additionalProperties": false
  36487. },
  36488. "EventVcsBranchUpdated": {
  36489. "type": "object",
  36490. "properties": {
  36491. "id": {
  36492. "type": "string",
  36493. "pattern": "^evt_"
  36494. },
  36495. "type": {
  36496. "type": "string",
  36497. "enum": ["vcs.branch.updated"]
  36498. },
  36499. "properties": {
  36500. "type": "object",
  36501. "properties": {
  36502. "branch": {
  36503. "type": "string"
  36504. }
  36505. },
  36506. "additionalProperties": false
  36507. }
  36508. },
  36509. "required": ["id", "type", "properties"],
  36510. "additionalProperties": false
  36511. },
  36512. "EventWorkspaceReady": {
  36513. "type": "object",
  36514. "properties": {
  36515. "id": {
  36516. "type": "string",
  36517. "pattern": "^evt_"
  36518. },
  36519. "type": {
  36520. "type": "string",
  36521. "enum": ["workspace.ready"]
  36522. },
  36523. "properties": {
  36524. "type": "object",
  36525. "properties": {
  36526. "name": {
  36527. "type": "string"
  36528. }
  36529. },
  36530. "required": ["name"],
  36531. "additionalProperties": false
  36532. }
  36533. },
  36534. "required": ["id", "type", "properties"],
  36535. "additionalProperties": false
  36536. },
  36537. "EventWorkspaceFailed": {
  36538. "type": "object",
  36539. "properties": {
  36540. "id": {
  36541. "type": "string",
  36542. "pattern": "^evt_"
  36543. },
  36544. "type": {
  36545. "type": "string",
  36546. "enum": ["workspace.failed"]
  36547. },
  36548. "properties": {
  36549. "type": "object",
  36550. "properties": {
  36551. "message": {
  36552. "type": "string"
  36553. }
  36554. },
  36555. "required": ["message"],
  36556. "additionalProperties": false
  36557. }
  36558. },
  36559. "required": ["id", "type", "properties"],
  36560. "additionalProperties": false
  36561. },
  36562. "EventWorkspaceStatus": {
  36563. "type": "object",
  36564. "properties": {
  36565. "id": {
  36566. "type": "string",
  36567. "pattern": "^evt_"
  36568. },
  36569. "type": {
  36570. "type": "string",
  36571. "enum": ["workspace.status"]
  36572. },
  36573. "properties": {
  36574. "type": "object",
  36575. "properties": {
  36576. "workspaceID": {
  36577. "type": "string",
  36578. "pattern": "^wrk"
  36579. },
  36580. "status": {
  36581. "type": "string",
  36582. "enum": ["connected", "connecting", "disconnected", "error"]
  36583. }
  36584. },
  36585. "required": ["workspaceID", "status"],
  36586. "additionalProperties": false
  36587. }
  36588. },
  36589. "required": ["id", "type", "properties"],
  36590. "additionalProperties": false
  36591. },
  36592. "EventWorktreeReady": {
  36593. "type": "object",
  36594. "properties": {
  36595. "id": {
  36596. "type": "string",
  36597. "pattern": "^evt_"
  36598. },
  36599. "type": {
  36600. "type": "string",
  36601. "enum": ["worktree.ready"]
  36602. },
  36603. "properties": {
  36604. "type": "object",
  36605. "properties": {
  36606. "name": {
  36607. "type": "string"
  36608. },
  36609. "branch": {
  36610. "type": "string"
  36611. }
  36612. },
  36613. "required": ["name"],
  36614. "additionalProperties": false
  36615. }
  36616. },
  36617. "required": ["id", "type", "properties"],
  36618. "additionalProperties": false
  36619. },
  36620. "EventWorktreeFailed": {
  36621. "type": "object",
  36622. "properties": {
  36623. "id": {
  36624. "type": "string",
  36625. "pattern": "^evt_"
  36626. },
  36627. "type": {
  36628. "type": "string",
  36629. "enum": ["worktree.failed"]
  36630. },
  36631. "properties": {
  36632. "type": "object",
  36633. "properties": {
  36634. "message": {
  36635. "type": "string"
  36636. }
  36637. },
  36638. "required": ["message"],
  36639. "additionalProperties": false
  36640. }
  36641. },
  36642. "required": ["id", "type", "properties"],
  36643. "additionalProperties": false
  36644. },
  36645. "EventServerConnected": {
  36646. "type": "object",
  36647. "properties": {
  36648. "id": {
  36649. "type": "string",
  36650. "pattern": "^evt_"
  36651. },
  36652. "type": {
  36653. "type": "string",
  36654. "enum": ["server.connected"]
  36655. },
  36656. "properties": {
  36657. "type": "object",
  36658. "properties": {}
  36659. }
  36660. },
  36661. "required": ["id", "type", "properties"],
  36662. "additionalProperties": false
  36663. },
  36664. "EventGlobalDisposed": {
  36665. "type": "object",
  36666. "properties": {
  36667. "id": {
  36668. "type": "string",
  36669. "pattern": "^evt_"
  36670. },
  36671. "type": {
  36672. "type": "string",
  36673. "enum": ["global.disposed"]
  36674. },
  36675. "properties": {
  36676. "type": "object",
  36677. "properties": {}
  36678. }
  36679. },
  36680. "required": ["id", "type", "properties"],
  36681. "additionalProperties": false
  36682. },
  36683. "CredentialOAuth": {
  36684. "type": "object",
  36685. "properties": {
  36686. "type": {
  36687. "type": "string",
  36688. "enum": ["oauth"]
  36689. },
  36690. "methodID": {
  36691. "type": "string"
  36692. },
  36693. "refresh": {
  36694. "type": "string"
  36695. },
  36696. "access": {
  36697. "type": "string"
  36698. },
  36699. "expires": {
  36700. "type": "integer",
  36701. "minimum": 0
  36702. },
  36703. "metadata": {
  36704. "type": "object"
  36705. }
  36706. },
  36707. "required": ["type", "methodID", "refresh", "access", "expires"],
  36708. "additionalProperties": false
  36709. },
  36710. "CredentialKey": {
  36711. "type": "object",
  36712. "properties": {
  36713. "type": {
  36714. "type": "string",
  36715. "enum": ["key"]
  36716. },
  36717. "key": {
  36718. "type": "string"
  36719. },
  36720. "metadata": {
  36721. "type": "object"
  36722. }
  36723. },
  36724. "required": ["type", "key"],
  36725. "additionalProperties": false
  36726. },
  36727. "SkillV2DirectorySource": {
  36728. "type": "object",
  36729. "properties": {
  36730. "type": {
  36731. "type": "string",
  36732. "enum": ["directory"]
  36733. },
  36734. "path": {
  36735. "type": "string"
  36736. }
  36737. },
  36738. "required": ["type", "path"],
  36739. "additionalProperties": false
  36740. },
  36741. "SkillV2UrlSource": {
  36742. "type": "object",
  36743. "properties": {
  36744. "type": {
  36745. "type": "string",
  36746. "enum": ["url"]
  36747. },
  36748. "url": {
  36749. "type": "string"
  36750. }
  36751. },
  36752. "required": ["type", "url"],
  36753. "additionalProperties": false
  36754. },
  36755. "SkillV2EmbeddedSource": {
  36756. "type": "object",
  36757. "properties": {
  36758. "type": {
  36759. "type": "string",
  36760. "enum": ["embedded"]
  36761. },
  36762. "skill": {
  36763. "$ref": "#/components/schemas/SkillV2Info"
  36764. }
  36765. },
  36766. "required": ["type", "skill"],
  36767. "additionalProperties": false
  36768. },
  36769. "BadRequestError": {
  36770. "type": "object",
  36771. "required": ["name", "data"],
  36772. "properties": {
  36773. "name": {
  36774. "type": "string",
  36775. "enum": ["BadRequest"]
  36776. },
  36777. "data": {
  36778. "type": "object",
  36779. "required": ["message"],
  36780. "properties": {
  36781. "message": {
  36782. "type": "string"
  36783. },
  36784. "kind": {
  36785. "type": "string",
  36786. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  36787. }
  36788. }
  36789. }
  36790. }
  36791. }
  36792. }
  36793. },
  36794. "security": [],
  36795. "tags": [
  36796. {
  36797. "name": "control",
  36798. "description": "Control plane routes."
  36799. },
  36800. {
  36801. "name": "controlPlane",
  36802. "description": "Control-plane orchestration routes."
  36803. },
  36804. {
  36805. "name": "global",
  36806. "description": "Global server routes."
  36807. },
  36808. {
  36809. "name": "event",
  36810. "description": "Instance event stream route."
  36811. },
  36812. {
  36813. "name": "config",
  36814. "description": "Experimental HttpApi config routes."
  36815. },
  36816. {
  36817. "name": "experimental",
  36818. "description": "Experimental HttpApi read-only routes."
  36819. },
  36820. {
  36821. "name": "file",
  36822. "description": "Experimental HttpApi file routes."
  36823. },
  36824. {
  36825. "name": "instance",
  36826. "description": "Experimental HttpApi instance read routes."
  36827. },
  36828. {
  36829. "name": "mcp",
  36830. "description": "Experimental HttpApi MCP routes."
  36831. },
  36832. {
  36833. "name": "project",
  36834. "description": "Experimental HttpApi project routes."
  36835. },
  36836. {
  36837. "name": "projectCopy",
  36838. "description": "Project copy naming routes."
  36839. },
  36840. {
  36841. "name": "pty",
  36842. "description": "Experimental HttpApi PTY routes."
  36843. },
  36844. {
  36845. "name": "question",
  36846. "description": "Question routes."
  36847. },
  36848. {
  36849. "name": "permission",
  36850. "description": "Experimental HttpApi permission routes."
  36851. },
  36852. {
  36853. "name": "provider",
  36854. "description": "Experimental HttpApi provider routes."
  36855. },
  36856. {
  36857. "name": "session",
  36858. "description": "Experimental HttpApi session routes."
  36859. },
  36860. {
  36861. "name": "sync",
  36862. "description": "Experimental HttpApi sync routes."
  36863. },
  36864. {
  36865. "name": "tui",
  36866. "description": "Experimental HttpApi TUI routes."
  36867. },
  36868. {
  36869. "name": "workspace",
  36870. "description": "Experimental HttpApi workspace routes."
  36871. },
  36872. {
  36873. "name": "opencode HttpApi",
  36874. "description": "Experimental HttpApi surface for selected instance routes."
  36875. },
  36876. {
  36877. "name": "opencode HttpApi",
  36878. "description": "Experimental HttpApi surface for selected instance routes."
  36879. },
  36880. {
  36881. "name": "opencode HttpApi",
  36882. "description": "Experimental HttpApi surface for selected instance routes."
  36883. },
  36884. {
  36885. "name": "sessions",
  36886. "description": "Experimental session routes."
  36887. },
  36888. {
  36889. "name": "messages",
  36890. "description": "Experimental message routes."
  36891. },
  36892. {
  36893. "name": "models",
  36894. "description": "Experimental model routes."
  36895. },
  36896. {
  36897. "name": "providers",
  36898. "description": "Experimental provider routes."
  36899. },
  36900. {
  36901. "name": "integrations",
  36902. "description": "Integration discovery and authentication routes."
  36903. },
  36904. {
  36905. "name": "opencode HttpApi",
  36906. "description": "Experimental HttpApi surface for selected instance routes."
  36907. },
  36908. {
  36909. "name": "permissions",
  36910. "description": "Experimental permission routes."
  36911. },
  36912. {
  36913. "name": "filesystem",
  36914. "description": "Experimental location-scoped filesystem routes."
  36915. },
  36916. {
  36917. "name": "commands",
  36918. "description": "Experimental command routes."
  36919. },
  36920. {
  36921. "name": "skills",
  36922. "description": "Experimental skill routes."
  36923. },
  36924. {
  36925. "name": "events",
  36926. "description": "Experimental event stream route."
  36927. },
  36928. {
  36929. "name": "pty",
  36930. "description": "Experimental location-scoped PTY routes."
  36931. },
  36932. {
  36933. "name": "session questions",
  36934. "description": "Experimental session question routes."
  36935. },
  36936. {
  36937. "name": "reference",
  36938. "description": "Location-scoped project references."
  36939. },
  36940. {
  36941. "name": "projectCopy",
  36942. "description": "Project copy management routes."
  36943. },
  36944. {
  36945. "name": "pty",
  36946. "description": "PTY websocket route."
  36947. }
  36948. ]
  36949. }